diff options
| author | Jean-Baptiste Queru <jbq@google.com> | 2012-08-08 13:42:20 -0700 |
|---|---|---|
| committer | android code review <noreply-gerritcodereview@google.com> | 2012-08-08 13:42:20 -0700 |
| commit | ef3f7fa32b451bd6f180c4c1586a98cee41aa296 (patch) | |
| tree | fe2f59ac3da17fb714f345541c77fa621586afbe /init/devices.c | |
| parent | 8261d27115746f58a6bbf37e6dcf18a093ee8c85 (diff) | |
| parent | e096e36e50b4b66638ebc4d3c09c2ee35f538dfa (diff) | |
| download | system_core-ef3f7fa32b451bd6f180c4c1586a98cee41aa296.tar.gz system_core-ef3f7fa32b451bd6f180c4c1586a98cee41aa296.tar.bz2 system_core-ef3f7fa32b451bd6f180c4c1586a98cee41aa296.zip | |
Merge "Set the SELinux security label on new directories."
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 125f9815..c367de87 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); |
