X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev_selinux.c;h=b802e1fc6ee36016824db6968129ee0041839e37;hb=b4e4b5a5db32177ec422c96d4440651a85d59704;hp=1e1fdb961794409ed3f3d4be13e56ee9a4d86458;hpb=1698d39857e105876011b95e82d44c5e1e0846f2;p=elogind.git diff --git a/udev_selinux.c b/udev_selinux.c index 1e1fdb961..b802e1fc6 100644 --- a/udev_selinux.c +++ b/udev_selinux.c @@ -1,6 +1,4 @@ /* - * udev_selinux.h - * * Copyright (C) 2004 Daniel Walsh * * This program is free software; you can redistribute it and/or modify it @@ -14,7 +12,7 @@ * * 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., - * 675 Mass Ave, Cambridge, MA 02139, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ @@ -30,8 +28,8 @@ #include #include +#include "udev.h" #include "udev_selinux.h" -#include "logging.h" static security_context_t prev_scontext = NULL; @@ -54,7 +52,7 @@ static char *get_media(const char *devname, int mode) int size; char *media = NULL; - if (!(mode && S_IFBLK)) + if (!(mode & S_IFBLK)) return NULL; snprintf(procfile, PATH_MAX, "/proc/ide/%s/media", devname);