chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
910003d
)
dbus-manager.c: log error, why switch-root is refused
author
Harald Hoyer
<harald@redhat.com>
Thu, 25 Apr 2013 08:35:14 +0000
(10:35 +0200)
committer
Harald Hoyer
<harald@redhat.com>
Fri, 26 Apr 2013 11:33:28 +0000
(13:33 +0200)
src/core/dbus-manager.c
patch
|
blob
|
history
diff --git
a/src/core/dbus-manager.c
b/src/core/dbus-manager.c
index 1f5a7d94fd1603c6607af64337dd4d3a6c2f5c03..56b02a1cf5bd12db66e1982e7109798aa7f89179 100644
(file)
--- a/
src/core/dbus-manager.c
+++ b/
src/core/dbus-manager.c
@@
-1503,8
+1503,11
@@
static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
}
/* Safety check */
}
/* Safety check */
- if (isempty(switch_root_init))
+ if (isempty(switch_root_init))
{
good = path_is_os_tree(switch_root);
good = path_is_os_tree(switch_root);
+ if (!good)
+ log_error("Not switching root: %s does not seem to be an OS tree. /etc/os-release is missing.", switch_root);
+ }
else {
_cleanup_free_ char *p = NULL;
else {
_cleanup_free_ char *p = NULL;
@@
-1513,6
+1516,8
@@
static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
goto oom;
good = access(p, X_OK) >= 0;
goto oom;
good = access(p, X_OK) >= 0;
+ if (!good)
+ log_error("Not switching root: cannot execute new init %s", p);
}
if (!good)
return bus_send_error_reply(connection, message, NULL, -EINVAL);
}
if (!good)
return bus_send_error_reply(connection, message, NULL, -EINVAL);