Lines Matching refs:path
23 void MakeAtomicServiceDir(const SandboxContext *context, const char *path)
25 APPSPAWN_CHECK_ONLY_EXPER(context != NULL && path != NULL, return);
26 if (access(path, F_OK) == 0) {
27 APPSPAWN_LOGV("path %{public}s already exist, no need to recreate", path);
30 int ret = mkdir(path, S_IRWXU);
31 APPSPAWN_CHECK(ret == 0, return, "mkdir %{public}s failed, errno %{public}d", path, errno);
33 if (strstr(path, "/database") != NULL) {
34 ret = chmod(path, S_IRWXU | S_IRWXG | S_ISGID);
35 } else if (strstr(path, "/log") != NULL) {
36 ret = chmod(path, S_IRWXU | S_IRWXG);
38 APPSPAWN_CHECK(ret == 0, return, "chmod %{public}s failed, errno %{public}d", path, errno);
45 hapFileInfo.pathNameOrig.push_back(path);
52 if ((strstr(path, "/base") != NULL) || (strstr(path, "/database") != NULL)) {
55 path, hapFileInfo.apl.c_str(), ret);
60 if (strstr(path, "/base") != NULL) {
61 ret = chown(path, dacInfo->uid, dacInfo->gid);
62 } else if (strstr(path, "/database") != NULL) {
63 ret = chown(path, dacInfo->uid, DecodeGid("ddms"));
64 } else if (strstr(path, "/log") != NULL) {
65 ret = chown(path, dacInfo->uid, DecodeGid("log"));
67 APPSPAWN_CHECK(ret == 0, return, "chown %{public}s failed, errno %{public}d", path, errno);