summaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
Diffstat (limited to 'extras')
-rw-r--r--extras/ata_id/Makefile.am9
-rw-r--r--extras/cdrom_id/Makefile.am6
-rw-r--r--extras/edd_id/Makefile.am6
-rw-r--r--extras/floppy/Makefile.am5
-rw-r--r--extras/floppy/create_floppy_devices.c8
-rw-r--r--extras/fstab_import/Makefile.am5
-rw-r--r--extras/scsi_id/Makefile.am5
-rw-r--r--extras/usb_id/Makefile.am5
-rw-r--r--extras/volume_id/Makefile.am5
9 files changed, 40 insertions, 14 deletions
diff --git a/extras/ata_id/Makefile.am b/extras/ata_id/Makefile.am
index 7e7fd2b7ab..db5f87f8c3 100644
--- a/extras/ata_id/Makefile.am
+++ b/extras/ata_id/Makefile.am
@@ -5,7 +5,8 @@ udevhome_PROGRAMS = \
AM_CPPFLAGS = \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-DUDEV_PREFIX=\""$(udev_prefix)"\" \
- -D_LIBUDEV_COMPILATION
+ -D_LIBUDEV_COMPILATION \
+ -UUSE_SELINUX
ata_id_SOURCES = \
ata_id.c \
@@ -16,9 +17,13 @@ ata_id_SOURCES = \
../../udev/udev_utils.c \
../../udev/udev_utils_string.c
+if USE_SELINUX
+ata_id_LDADD = \
+ $(SELINUX_LIBS)
+endif
+
dist_man_MANS = \
ata_id.8
distclean-local:
rm -f Makefile.in
-
diff --git a/extras/cdrom_id/Makefile.am b/extras/cdrom_id/Makefile.am
index dfc98850e0..0514a2ea51 100644
--- a/extras/cdrom_id/Makefile.am
+++ b/extras/cdrom_id/Makefile.am
@@ -20,9 +20,13 @@ cdrom_id_SOURCES = \
../../udev/udev_utils.c \
../../udev/udev_utils_string.c
+if USE_SELINUX
+cdrom_id_LDADD = \
+ $(SELINUX_LIBS)
+endif
+
dist_man_MANS = \
cdrom_id.8
distclean-local:
rm -f Makefile.in
-
diff --git a/extras/edd_id/Makefile.am b/extras/edd_id/Makefile.am
index cc693967ca..22af7e9528 100644
--- a/extras/edd_id/Makefile.am
+++ b/extras/edd_id/Makefile.am
@@ -20,9 +20,13 @@ edd_id_SOURCES = \
../../udev/udev_utils.c \
../../udev/udev_utils_string.c
+if USE_SELINUX
+edd_id_LDADD = \
+ $(SELINUX_LIBS)
+endif
+
dist_man_MANS = \
edd_id.8
distclean-local:
rm -f Makefile.in
-
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;
diff --git a/extras/fstab_import/Makefile.am b/extras/fstab_import/Makefile.am
index 902ab1e28e..c4fbdce248 100644
--- a/extras/fstab_import/Makefile.am
+++ b/extras/fstab_import/Makefile.am
@@ -20,6 +20,11 @@ fstab_import_SOURCES = \
../../udev/udev_utils.c \
../../udev/udev_utils_string.c
+if USE_SELINUX
+fstab_import_LDADD = \
+ $(SELINUX_LIBS)
+endif
+
distclean-local:
rm -f Makefile.in
diff --git a/extras/scsi_id/Makefile.am b/extras/scsi_id/Makefile.am
index fc5c477820..f42563f498 100644
--- a/extras/scsi_id/Makefile.am
+++ b/extras/scsi_id/Makefile.am
@@ -20,6 +20,11 @@ scsi_id_SOURCES = \
../../udev/udev_utils.c \
../../udev/udev_utils_string.c
+if USE_SELINUX
+scsi_id_LDADD = \
+ $(SELINUX_LIBS)
+endif
+
dist_sysconf_DATA = \
scsi_id.config
diff --git a/extras/usb_id/Makefile.am b/extras/usb_id/Makefile.am
index 9d7e7724ec..aa1c4f82b6 100644
--- a/extras/usb_id/Makefile.am
+++ b/extras/usb_id/Makefile.am
@@ -16,6 +16,11 @@ usb_id_SOURCES = \
../../udev/udev_utils.c \
../../udev/udev_utils_string.c
+if USE_SELINUX
+usb_id_LDADD = \
+ $(SELINUX_LIBS)
+endif
+
distclean-local:
rm -f Makefile.in
diff --git a/extras/volume_id/Makefile.am b/extras/volume_id/Makefile.am
index fe9bef7b88..9fb2cba646 100644
--- a/extras/volume_id/Makefile.am
+++ b/extras/volume_id/Makefile.am
@@ -22,6 +22,11 @@ vol_id_SOURCES = \
vol_id_LDADD = \
lib/libvolume_id.la
+if USE_SELINUX
+vol_id_LDADD += \
+ $(SELINUX_LIBS)
+endif
+
dist_man_MANS = \
vol_id.8