Home
last modified time | relevance | path

Searched refs:secontext (Results 1 – 25 of 42) sorted by relevance

12

/system/core/init/
Dueventd_test.cpp157 char* secontext; in TEST() local
158 ASSERT_EQ(0, selabel_lookup(sehandle.get(), &secontext, files_and_modes[i].file, in TEST()
160 files_and_modes[i].expected_context = secontext; in TEST()
161 freecon(secontext); in TEST()
173 char* secontext; in TEST() local
174 int result = selabel_lookup(sehandle.get(), &secontext, files_and_modes[i].file, in TEST()
179 if (files_and_modes[i].expected_context != secontext) { in TEST()
184 freecon(secontext); in TEST()
Dutil.cpp113 std::string secontext; in CreateSocket() local
114 if (SelabelLookupFileContext(addr.sun_path, S_IFSOCK, &secontext) && !secontext.empty()) { in CreateSocket()
115 setfscreatecon(secontext.c_str()); in CreateSocket()
128 if (!secontext.empty()) { in CreateSocket()
180 std::string secontext; in OpenFile() local
181 if (SelabelLookupFileContext(path, mode, &secontext) && !secontext.empty()) { in OpenFile()
182 setfscreatecon(secontext.c_str()); in OpenFile()
187 if (!secontext.empty()) { in OpenFile()
250 std::string secontext; in make_dir() local
251 if (SelabelLookupFileContext(path, mode, &secontext) && !secontext.empty()) { in make_dir()
[all …]
Ddevices.cpp249 std::string secontext; in MakeDevice() local
250 if (!SelabelLookupFileContextBestMatch(path, links, mode, &secontext)) { in MakeDevice()
254 if (!secontext.empty()) { in MakeDevice()
255 setfscreatecon(secontext.c_str()); in MakeDevice()
270 if (mknod(path.c_str(), mode, dev) && (errno == EEXIST) && !secontext.empty()) { in MakeDevice()
278 bool different = fcon != secontext; in MakeDevice()
281 if (different && lsetfilecon(path.c_str(), secontext.c_str())) { in MakeDevice()
282 PLOG(ERROR) << "Cannot set '" << secontext << "' SELinux label on '" << path in MakeDevice()
293 if (!secontext.empty()) { in MakeDevice()
Dbuiltins.cpp787 std::string secontext; in MakeSymlink() local
789 if (SelabelLookupFileContext(linkpath, 0, &secontext) && !secontext.empty()) { in MakeSymlink()
790 setfscreatecon(secontext.c_str()); in MakeSymlink()
795 if (!secontext.empty()) { in MakeSymlink()
/system/vold/
Dvold_prepare_subdirs.cpp60 auto secontext = std::unique_ptr<char, void (*)(char*)>(nullptr, freecon); in prepare_dir() local
63 secontext.reset(tmp_secontext); in prepare_dir()
66 << gid << " context " << (secontext ? secontext.get() : "null") in prepare_dir()
68 if (secontext) { in prepare_dir()
69 if (setfscreatecon(secontext.get()) != 0) { in prepare_dir()
77 if (secontext) { in prepare_dir()
84 if (strcmp(secontext.get(), oldsecontext.get()) != 0) { in prepare_dir()
86 << ((char*)secontext.get()) << ": " << path; in prepare_dir()
87 if (lsetfilecon(path.c_str(), secontext.get()) != 0) { in prepare_dir()
DUtils.cpp105 char* secontext = nullptr; in CreateDeviceNode() local
107 if (!selabel_lookup(sehandle, &secontext, cpath, S_IFBLK)) { in CreateDeviceNode()
108 setfscreatecon(secontext); in CreateDeviceNode()
121 if (secontext) { in CreateDeviceNode()
123 freecon(secontext); in CreateDeviceNode()
448 char* secontext = nullptr; in PrepareDir() local
450 if (!selabel_lookup(sehandle, &secontext, cpath, S_IFDIR)) { in PrepareDir()
451 setfscreatecon(secontext); in PrepareDir()
457 if (secontext) { in PrepareDir()
459 freecon(secontext); in PrepareDir()
/system/sepolicy/prebuilts/api/26.0/private/
Disolated_app.te33 # is modified to change the secontext when accessing the lower filesystem.
Dadbd.te124 # This should be removed if sdcardfs is modified to alter the secontext for its
/system/sepolicy/public/
Dmediaserver.te115 # This should be removed if sdcardfs is modified to alter the secontext for its
/system/sepolicy/prebuilts/api/28.0/public/
Dmediaserver.te119 # This should be removed if sdcardfs is modified to alter the secontext for its
Dkernel.te76 # This should be removed if sdcardfs is modified to alter the secontext for its
/system/sepolicy/prebuilts/api/27.0/public/
Dmediaserver.te122 # This should be removed if sdcardfs is modified to alter the secontext for its
Dkernel.te75 # This should be removed if sdcardfs is modified to alter the secontext for its
/system/sepolicy/prebuilts/api/26.0/public/
Dkernel.te74 # This should be removed if sdcardfs is modified to alter the secontext for its
Dmediaserver.te122 # This should be removed if sdcardfs is modified to alter the secontext for its
/system/sepolicy/prebuilts/api/29.0/public/
Dmediaserver.te116 # This should be removed if sdcardfs is modified to alter the secontext for its
/system/sepolicy/prebuilts/api/27.0/private/
Disolated_app.te33 # is modified to change the secontext when accessing the lower filesystem.
Dadbd.te126 # This should be removed if sdcardfs is modified to alter the secontext for its
/system/sepolicy/prebuilts/api/30.0/public/
Dmediaserver.te115 # This should be removed if sdcardfs is modified to alter the secontext for its
/system/sepolicy/prebuilts/api/28.0/private/
Disolated_app.te31 # is modified to change the secontext when accessing the lower filesystem.
Dadbd.te131 # This should be removed if sdcardfs is modified to alter the secontext for its
/system/sepolicy/prebuilts/api/30.0/private/
Disolated_app.te35 # is modified to change the secontext when accessing the lower filesystem.
/system/sepolicy/prebuilts/api/29.0/private/
Disolated_app.te31 # is modified to change the secontext when accessing the lower filesystem.
Dadbd.te168 # This should be removed if sdcardfs is modified to alter the secontext for its
/system/sepolicy/private/
Disolated_app.te35 # is modified to change the secontext when accessing the lower filesystem.

12