X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev%2Fudevd.c;h=e88b11daa079a5ebe8a62591911810e2c6dd2582;hb=b21b95d7222f32940c8e9462c361e45041c9f7d6;hp=a24ca925172518efb9c61e4fff06300026317981;hpb=3bc7c84cf07eae90aee2a0972a4441652e4d38f6;p=elogind.git diff --git a/udev/udevd.c b/udev/udevd.c index a24ca9251..e88b11daa 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -1,20 +1,19 @@ /* - * Copyright (C) 2004-2006 Kay Sievers + * Copyright (C) 2004-2008 Kay Sievers * Copyright (C) 2004 Chris Friesen * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation version 2 of the License. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #include "config.h" @@ -47,7 +46,6 @@ #include "udev.h" #include "udev_rules.h" -#include "udev_selinux.h" #define UDEVD_PRIORITY -4 #define UDEV_PRIORITY -2 @@ -189,9 +187,9 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st unlink(filename_failed); delete_path(msg->udev, filename_failed); create_path(msg->udev, filename); - selinux_setfscreatecon(msg->udev, filename, NULL, S_IFLNK); + udev_selinux_setfscreatecon(msg->udev, filename, S_IFLNK); symlink(msg->devpath, filename); - selinux_resetfscreatecon(msg->udev); + udev_selinux_resetfscreatecon(msg->udev); break; case EVENT_FINISHED: if (msg->devpath_old != NULL) { @@ -804,8 +802,6 @@ int main(int argc, char *argv[]) logging_init("udevd"); udev_set_log_fn(udev, log_fn); - - selinux_init(udev); dbg(udev, "version %s\n", VERSION); while (1) { @@ -1107,7 +1103,6 @@ int main(int argc, char *argv[]) exit: udev_rules_cleanup(&rules); sysfs_cleanup(); - selinux_exit(udev); if (signal_pipe[READ_END] >= 0) close(signal_pipe[READ_END]);