diff options
author | Tom Gundersen <teg@jklm.no> | 2014-09-17 20:01:42 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-09-17 20:01:42 -0400 |
commit | 136e0eef04563f7d739c1db104c1cab673af85f3 (patch) | |
tree | 0b8e2f88ae7d2db51cfe3185ec3e39646affa51a /src/udev/udevd.c | |
parent | 1aa456d4b9e0a3695184b18afff33b94305092d9 (diff) |
udev: apply permissions to static nodes before signallying READY
Processes expecting static nodes to have the right permissions may order themselves after systemd-udevd.service,
make sure that actually guarantees what is expected.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/udev/udevd.c')
-rw-r--r-- | src/udev/udevd.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 1696c9d1ea..f1aa75adfd 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -1209,6 +1209,20 @@ int main(int argc, char *argv[]) { udev_monitor_set_receive_buffer_size(monitor, 128 * 1024 * 1024); + log_info("starting version " VERSION "\n"); + + udev_builtin_init(udev); + + rules = udev_rules_new(udev, arg_resolve_names); + if (rules == NULL) { + log_error("error reading rules"); + goto exit; + } + + rc = udev_rules_apply_static_dev_perms(rules); + if (rc < 0) + log_error("failed to apply permissions on static device nodes - %s", strerror(-rc)); + if (arg_daemonize) { pid_t pid; @@ -1230,20 +1244,6 @@ int main(int argc, char *argv[]) { write_string_file("/proc/self/oom_score_adj", "-1000"); } - log_info("starting version " VERSION "\n"); - - udev_builtin_init(udev); - - rules = udev_rules_new(udev, arg_resolve_names); - if (rules == NULL) { - log_error("error reading rules"); - goto exit; - } - - rc = udev_rules_apply_static_dev_perms(rules); - if (rc < 0) - log_error("failed to apply permissions on static device nodes - %s", strerror(-rc)); - if (arg_children_max <= 0) { cpu_set_t cpu_set; |