Searched refs:secontext (Results 1 – 4 of 4) sorted by relevance
/aosp14/system/core/init/ |
H A D | ueventd_test.cpp | 153 char* secontext; in TEST() local 154 ASSERT_EQ(0, selabel_lookup(sehandle.get(), &secontext, files_and_modes[i].file, in TEST() 156 files_and_modes[i].expected_context = secontext; in TEST() 157 freecon(secontext); in TEST() 169 char* secontext; in TEST() local 170 int result = selabel_lookup(sehandle.get(), &secontext, files_and_modes[i].file, in TEST() 175 if (files_and_modes[i].expected_context != secontext) { in TEST() 180 freecon(secontext); in TEST()
|
H A D | util.cpp | 116 std::string secontext; in CreateSocket() local 117 if (SelabelLookupFileContext(addr.sun_path, S_IFSOCK, &secontext) && !secontext.empty()) { in CreateSocket() 118 setfscreatecon(secontext.c_str()); in CreateSocket() 131 if (!secontext.empty()) { in CreateSocket() 186 std::string secontext; in OpenFile() local 187 if (SelabelLookupFileContext(path, mode, &secontext) && !secontext.empty()) { in OpenFile() 188 setfscreatecon(secontext.c_str()); in OpenFile() 193 if (!secontext.empty()) { in OpenFile() 271 std::string secontext; in make_dir() local 272 if (SelabelLookupFileContext(path, mode, &secontext) && !secontext.empty()) { in make_dir() [all …]
|
H A D | devices.cpp | 287 std::string secontext; in MakeDevice() local 288 if (!SelabelLookupFileContextBestMatch(path, links, mode, &secontext)) { in MakeDevice() 292 if (!secontext.empty()) { in MakeDevice() 293 setfscreatecon(secontext.c_str()); in MakeDevice() 310 if (mknod(path.c_str(), mode, dev) && (errno == EEXIST) && !secontext.empty()) { in MakeDevice() 318 bool different = fcon != secontext; in MakeDevice() 321 if (different && lsetfilecon(path.c_str(), secontext.c_str())) { in MakeDevice() 322 PLOG(ERROR) << "Cannot set '" << secontext << "' SELinux label on '" << path in MakeDevice() 349 if (!secontext.empty()) { in MakeDevice()
|
H A D | builtins.cpp | 804 std::string secontext; in MakeSymlink() local 806 if (SelabelLookupFileContext(linkpath, 0, &secontext) && !secontext.empty()) { in MakeSymlink() 807 setfscreatecon(secontext.c_str()); in MakeSymlink() 812 if (!secontext.empty()) { in MakeSymlink()
|