Lines Matching refs:path
72 computecon (char const *path, mode_t mode, char **con) in computecon() argument
79 char *dir = dir_name (path); in computecon()
111 char const *path, mode_t mode) in defaultcon() argument
121 if (! IS_ABSOLUTE_FILE_NAME (path)) in defaultcon()
124 newpath = canonicalize_filename_mode (path, CAN_MISSING); in defaultcon()
127 path = newpath; in defaultcon()
130 if (selabel_lookup (selabel_handle, &scon, path, mode) < 0) in defaultcon()
141 if (computecon (path, mode, &tcon) < 0) in defaultcon()
178 restorecon_private (struct selabel_handle *selabel_handle, char const *path) in restorecon_private() argument
198 rc = lsetfilecon (path, tcon); in restorecon_private()
205 fd = open (path, O_RDONLY | O_NOFOLLOW); in restorecon_private()
216 if (lstat (path, &sb) < 0) in restorecon_private()
220 if (selabel_lookup (selabel_handle, &scon, path, sb.st_mode) < 0) in restorecon_private()
241 if (lgetfilecon (path, &tcon) < 0) in restorecon_private()
258 rc = lsetfilecon (path, constr); in restorecon_private()
286 char const *path, bool recurse) in restorecon() argument
290 if (! IS_ABSOLUTE_FILE_NAME (path)) in restorecon()
295 newpath = canonicalize_filename_mode (path, CAN_MISSING); in restorecon()
298 path = newpath; in restorecon()
303 bool ok = restorecon_private (selabel_handle, path) != -1; in restorecon()
310 char const *ftspath[2] = { path, nullptr }; in restorecon()