summaryrefslogtreecommitdiff
path: root/extras/floppy
diff options
context:
space:
mode:
Diffstat (limited to 'extras/floppy')
-rw-r--r--extras/floppy/Makefile.am5
-rw-r--r--extras/floppy/create_floppy_devices.c8
2 files changed, 3 insertions, 10 deletions
diff --git a/extras/floppy/Makefile.am b/extras/floppy/Makefile.am
index 7879e7c2bd..a5e9c10800 100644
--- a/extras/floppy/Makefile.am
+++ b/extras/floppy/Makefile.am
@@ -16,10 +16,8 @@ create_floppy_devices_SOURCES = \
../../udev/udev_utils.c \
../../udev/udev_utils_string.c \
../../udev/udev_utils_file.c
-if USE_SELINUX
-create_floppy_devices_SOURCES += \
- ../../udev/udev_selinux.c
+if USE_SELINUX
create_floppy_devices_LDADD = \
$(SELINUX_LIBS)
endif
@@ -29,4 +27,3 @@ dist_man_MANS = \
distclean-local:
rm -f Makefile.in
-
diff --git a/extras/floppy/create_floppy_devices.c b/extras/floppy/create_floppy_devices.c
index 2c7d44b16d..4cff958da3 100644
--- a/extras/floppy/create_floppy_devices.c
+++ b/extras/floppy/create_floppy_devices.c
@@ -25,7 +25,6 @@
#include <grp.h>
#include "../../udev/udev.h"
-#include "../../udev/udev_selinux.h"
static char *table[] = {
"", "d360", "h1200", "u360", "u720", "h360", "h720",
@@ -145,8 +144,6 @@ int main(int argc, char **argv)
if (type == 0)
return 0;
- selinux_init(udev);
-
i = 0;
while (table_sup[type][i]) {
sprintf(node, "%s%s", dev, table[table_sup[type][i]]);
@@ -155,16 +152,15 @@ int main(int argc, char **argv)
printf("%s b %d %d %d\n", node, mode, major, minor);
if (create_nodes) {
unlink(node);
- selinux_setfscreatecon(udev, node, NULL, S_IFBLK | mode);
+ udev_selinux_setfscreatecon(udev, node, S_IFBLK | mode);
mknod(node, S_IFBLK | mode, makedev(major,minor));
- selinux_resetfscreatecon(udev);
+ udev_selinux_resetfscreatecon(udev);
chown(node, uid, gid);
chmod(node, S_IFBLK | mode);
}
i++;
}
- selinux_exit(udev);
udev_unref(udev);
exit:
return 0;