if (udev == NULL)
exit(1);
info(udev, "version %s\n", VERSION);
- selinux_init(udev);
+ udev_selinux_init(udev);
/* set signal handlers */
memset(&act, 0x00, sizeof(act));
fail:
udev_rules_unref(rules);
exit:
- selinux_exit(udev);
+ udev_selinux_exit(udev);
udev_unref(udev);
if (err != 0)
return 1;
static int selinux_enabled;
security_context_t selinux_prev_scontext;
-void selinux_init(struct udev *udev)
+void udev_selinux_init(struct udev *udev)
{
/* record the present security context */
selinux_enabled = (is_selinux_enabled() > 0);
}
}
-void selinux_exit(struct udev *udev)
+void udev_selinux_exit(struct udev *udev)
{
if (!selinux_enabled)
return;
/* udev-selinux.c */
#ifndef USE_SELINUX
-static inline void selinux_init(struct udev *udev) {}
-static inline void selinux_exit(struct udev *udev) {}
+static inline void udev_selinux_init(struct udev *udev) {}
+static inline void udev_selinux_exit(struct udev *udev) {}
static inline void udev_selinux_lsetfilecon(struct udev *udev, const char *file, unsigned int mode) {}
static inline void udev_selinux_setfscreatecon(struct udev *udev, const char *file, unsigned int mode) {}
static inline void udev_selinux_resetfscreatecon(struct udev *udev) {}
#else
-extern void selinux_init(struct udev *udev);
-extern void selinux_exit(struct udev *udev);
+extern void udev_selinux_init(struct udev *udev);
+extern void udev_selinux_exit(struct udev *udev);
extern void udev_selinux_lsetfilecon(struct udev *udev, const char *file, unsigned int mode);
extern void udev_selinux_setfscreatecon(struct udev *udev, const char *file, unsigned int mode);
extern void udev_selinux_resetfscreatecon(struct udev *udev);
logging_init("udevadm");
udev_set_log_fn(udev, log_fn);
- selinux_init(udev);
+ udev_selinux_init(udev);
/* see if we are a compat link, this will be removed in a future release */
command = argv[0];
help(udev, argc, argv);
rc = 2;
out:
- selinux_exit(udev);
+ udev_selinux_exit(udev);
udev_unref(udev);
logging_close();
return rc;
logging_init("udevd");
udev_set_log_fn(udev, log_fn);
info(udev, "version %s\n", VERSION);
- selinux_init(udev);
+ udev_selinux_init(udev);
while (1) {
int option;
close(inotify_fd);
udev_monitor_unref(kernel_monitor);
- selinux_exit(udev);
+ udev_selinux_exit(udev);
udev_unref(udev);
logging_close();
return rc;