Lines Matching refs:path

27  * return in path the full path name of the probe(1)
29 * if attr != 0 then path attribute assignments placed here
31 * if path==0 then the space is malloc'd
35 * -3 return non-writable path name with no generation
36 * -2 return path name with no generation
37 * -1 return no $HOME path name with no generation
56 * return non-0 if path is in a readonly or non-setuid fs
60 rofs(const char* path)
65 if (!statvfs(path, &vfs))
72 if ((vfs.f_flag & ST_NOSUID) && (stat(path, &st) || st.st_uid != getuid() && st.st_uid != geteuid()))
86 pathprobe(char* path, char* attr, const char* lang, const char* tool, const char* aproc, int op)
132 if (!path)
133 path = buf;
142 if (pathpath(path, lib, "", PATH_ABSOLUTE) && !stat(path, &st) && (st.st_mode & S_IWUSR))
143 return path == buf ? strdup(path) : path;
146 if (!pathpath(path, lib, "", PATH_ABSOLUTE|PATH_EXECUTE) || stat(path, &ps))
151 n = strlen(path);
154 strcpy(path + n, ".ini");
155 if (!stat(path, &st) && st.st_size && ptime < (unsigned long)st.st_mtime)
157 path[n] = 0;
159 np = path + n - (e - k);
160 nx = path + PATH_MAX - 1;
162 if (!stat(path, &st))
178 dirs = pathcat(path, dir, ':', "..", exe);
179 pathcanon(path, 0);
180 if (*path == '/' && pathexists(path, PATH_REGULAR|PATH_EXECUTE))
182 pathcat(path, dir, ':', "..", lib);
183 pathcanon(path, 0);
184 if (*path == '/' && pathexists(path, PATH_REGULAR|PATH_EXECUTE) && !stat(path, &ps))
192 strcpy(exe, path);
193 if (op >= -1 && (!(st.st_mode & S_ISUID) && ps.st_uid != geteuid() || rofs(path)))
197 p = path + sfsprintf(path, PATH_MAX - 1, "%s/.%s/%s/", p, probe, HOSTTYPE);
201 if (op >= 0 && !stat(path, &st))
209 if (sp = sfopen(NiL, path, "r"))
297 if (eaccess(path, R_OK))
300 return path == buf ? strdup(path) : path;