diff options
| author | Colin Cross <ccross@android.com> | 2013-04-30 21:12:28 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2013-04-30 21:12:28 -0700 |
| commit | 803eda6a2dfcb50f61dd4a6a616e560a87453cb0 (patch) | |
| tree | 57babc9455d716f12f30666feafe760fccec14e3 /init | |
| parent | 55d69a9681061b97d6bdcc0b1b92a7de63d0a07b (diff) | |
| parent | f69cc564f4129ad7f223bb7d83ebec9fe3438b62 (diff) | |
| download | system_core-803eda6a2dfcb50f61dd4a6a616e560a87453cb0.zip system_core-803eda6a2dfcb50f61dd4a6a616e560a87453cb0.tar.gz system_core-803eda6a2dfcb50f61dd4a6a616e560a87453cb0.tar.bz2 | |
am f69cc564: Merge "Update ueventd set the SELinux context on sysfs"
* commit 'f69cc564f4129ad7f223bb7d83ebec9fe3438b62':
Update ueventd set the SELinux context on sysfs
Diffstat (limited to 'init')
| -rw-r--r-- | init/devices.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/init/devices.c b/init/devices.c index e25034c..69f5fc8 100644 --- a/init/devices.c +++ b/init/devices.c @@ -127,6 +127,7 @@ void fixup_sys_perms(const char *upath) char buf[512]; struct listnode *node; struct perms_ *dp; + char *secontext; /* upaths omit the "/sys" that paths in this list * contain, so we add 4 when comparing... @@ -148,6 +149,14 @@ void fixup_sys_perms(const char *upath) INFO("fixup %s %d %d 0%o\n", buf, dp->uid, dp->gid, dp->perm); chown(buf, dp->uid, dp->gid); chmod(buf, dp->perm); + if (sehandle) { + secontext = NULL; + selabel_lookup(sehandle, &secontext, buf, 0); + if (secontext) { + setfilecon(buf, secontext); + freecon(secontext); + } + } } } |
