diff options
Diffstat (limited to 'init/devices.c')
-rw-r--r-- | init/devices.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/init/devices.c b/init/devices.c index 125f981..c367de8 100644 --- a/init/devices.c +++ b/init/devices.c @@ -52,7 +52,7 @@ #define FIRMWARE_DIR2 "/vendor/firmware" #ifdef HAVE_SELINUX -static struct selabel_handle *sehandle; +extern struct selabel_handle *sehandle; #endif static int device_fd = -1; @@ -220,32 +220,6 @@ static void make_device(const char *path, #endif } - -static int make_dir(const char *path, mode_t mode) -{ - int rc; - -#ifdef HAVE_SELINUX - char *secontext = NULL; - - if (sehandle) { - selabel_lookup(sehandle, &secontext, path, mode); - setfscreatecon(secontext); - } -#endif - - rc = mkdir(path, mode); - -#ifdef HAVE_SELINUX - if (secontext) { - freecon(secontext); - setfscreatecon(NULL); - } -#endif - return rc; -} - - static void add_platform_device(const char *name) { int name_len = strlen(name); |