mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
selinux_init(udev) -> udev_selinux_init(udev)
This commit is contained in:
parent
eb8837e15c
commit
c3b1fa66d2
@ -58,7 +58,7 @@ int main(int argc, char *argv[])
|
||||
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));
|
||||
@ -111,7 +111,7 @@ int main(int argc, char *argv[])
|
||||
fail:
|
||||
udev_rules_unref(rules);
|
||||
exit:
|
||||
selinux_exit(udev);
|
||||
udev_selinux_exit(udev);
|
||||
udev_unref(udev);
|
||||
if (err != 0)
|
||||
return 1;
|
||||
|
@ -29,7 +29,7 @@
|
||||
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);
|
||||
@ -43,7 +43,7 @@ void selinux_init(struct udev *udev)
|
||||
}
|
||||
}
|
||||
|
||||
void selinux_exit(struct udev *udev)
|
||||
void udev_selinux_exit(struct udev *udev)
|
||||
{
|
||||
if (!selinux_enabled)
|
||||
return;
|
||||
|
@ -119,14 +119,14 @@ extern int run_program(struct udev *udev, const char *command, char **envp,
|
||||
|
||||
/* 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);
|
||||
|
@ -140,7 +140,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
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];
|
||||
@ -210,7 +210,7 @@ int main(int argc, char *argv[])
|
||||
help(udev, argc, argv);
|
||||
rc = 2;
|
||||
out:
|
||||
selinux_exit(udev);
|
||||
udev_selinux_exit(udev);
|
||||
udev_unref(udev);
|
||||
logging_close();
|
||||
return rc;
|
||||
|
@ -648,7 +648,7 @@ int main(int argc, char *argv[])
|
||||
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;
|
||||
@ -978,7 +978,7 @@ exit:
|
||||
close(inotify_fd);
|
||||
udev_monitor_unref(kernel_monitor);
|
||||
|
||||
selinux_exit(udev);
|
||||
udev_selinux_exit(udev);
|
||||
udev_unref(udev);
|
||||
logging_close();
|
||||
return rc;
|
||||
|
Loading…
Reference in New Issue
Block a user