Home
last modified time | relevance | path

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

12

/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.cpp83 char* secontext = nullptr; in CreateDeviceNode() local
85 if (!selabel_lookup(sehandle, &secontext, cpath, S_IFBLK)) { in CreateDeviceNode()
86 setfscreatecon(secontext); in CreateDeviceNode()
99 if (secontext) { in CreateDeviceNode()
101 freecon(secontext); in CreateDeviceNode()
120 char* secontext = nullptr; in PrepareDir() local
122 if (!selabel_lookup(sehandle, &secontext, cpath, S_IFDIR)) { in PrepareDir()
123 setfscreatecon(secontext); in PrepareDir()
129 if (secontext) { in PrepareDir()
131 freecon(secontext); in PrepareDir()
/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.cpp112 std::string secontext; in CreateSocket() local
113 if (SelabelLookupFileContext(addr.sun_path, S_IFSOCK, &secontext) && !secontext.empty()) { in CreateSocket()
114 setfscreatecon(secontext.c_str()); in CreateSocket()
128 if (!secontext.empty()) { in CreateSocket()
184 std::string secontext; in OpenFile() local
185 if (SelabelLookupFileContext(path, mode, &secontext) && !secontext.empty()) { in OpenFile()
186 setfscreatecon(secontext.c_str()); in OpenFile()
191 if (!secontext.empty()) { in OpenFile()
255 std::string secontext; in make_dir() local
256 if (SelabelLookupFileContext(path, mode, &secontext) && !secontext.empty()) { in make_dir()
[all …]
Ddevices.cpp262 std::string secontext; in MakeDevice() local
263 if (!SelabelLookupFileContextBestMatch(path, links, mode, &secontext)) { in MakeDevice()
267 if (!secontext.empty()) { in MakeDevice()
268 setfscreatecon(secontext.c_str()); in MakeDevice()
283 if (mknod(path.c_str(), mode, dev) && (errno == EEXIST) && !secontext.empty()) { in MakeDevice()
291 bool different = fcon != secontext; in MakeDevice()
294 if (different && lsetfilecon(path.c_str(), secontext.c_str())) { in MakeDevice()
295 PLOG(ERROR) << "Cannot set '" << secontext << "' SELinux label on '" << path in MakeDevice()
306 if (!secontext.empty()) { in MakeDevice()
Dsubcontext.cpp368 for (const auto& [path_prefix, secontext] : paths_and_secontexts) { in InitializeSubcontexts()
369 subcontexts.emplace_back(path_prefix, secontext); in InitializeSubcontexts()
Dbuiltins.cpp744 std::string secontext; in MakeSymlink() local
746 if (SelabelLookupFileContext(linkpath, 0, &secontext) && !secontext.empty()) { in MakeSymlink()
747 setfscreatecon(secontext.c_str()); in MakeSymlink()
752 if (!secontext.empty()) { in MakeSymlink()
Dproperty_service.cpp612 for (const auto& [path_prefix, secontext] : paths_and_secontexts) { in LoadProperties()
614 context = secontext; in LoadProperties()
/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/prebuilts/api/28.0/public/
Dkernel.te76 # This should be removed if sdcardfs is modified to alter the secontext for its
Dmediaserver.te119 # 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/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/29.0/public/
Dmediaserver.te116 # This should be removed if sdcardfs is modified to alter the secontext for its
/system/sepolicy/prebuilts/api/26.0/public/
Dmediaserver.te122 # This should be removed if sdcardfs is modified to alter the secontext for its
Dkernel.te74 # 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/private/
Disolated_app.te31 # 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.te164 # This should be removed if sdcardfs is modified to alter the secontext for its

12