Lines Matching refs:mode
21 mode_t mode, in mkdir_safe_internal() argument
30 assert(mode != MODE_INVALID); in mkdir_safe_internal()
33 if (_mkdirat(AT_FDCWD, path, mode) >= 0) { in mkdir_safe_internal()
34 r = chmod_and_chown(path, mode, uid, gid); in mkdir_safe_internal()
49 return mkdir_safe_internal(p, mode, uid, gid, in mkdir_safe_internal()
61 if ((st.st_mode & ~mode & 0777) != 0) in mkdir_safe_internal()
64 path, st.st_mode & 0777, mode); in mkdir_safe_internal()
82 int mkdirat_errno_wrapper(int dirfd, const char *pathname, mode_t mode) { in mkdirat_errno_wrapper() argument
83 return RET_NERRNO(mkdirat(dirfd, pathname, mode)); in mkdirat_errno_wrapper()
86 int mkdir_safe(const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlags flags) { in mkdir_safe() argument
87 return mkdir_safe_internal(path, mode, uid, gid, flags, mkdirat_errno_wrapper); in mkdir_safe()
90 int mkdir_parents_internal(const char *prefix, const char *path, mode_t mode, uid_t uid, gid_t gid,… in mkdir_parents_internal() argument
144 … r = mkdir_safe_internal(path, mode, uid, gid, flags | MKDIR_IGNORE_EXISTING, _mkdirat); in mkdir_parents_internal()
153 int mkdir_parents(const char *path, mode_t mode) { in mkdir_parents() argument
154 …return mkdir_parents_internal(NULL, path, mode, UID_INVALID, UID_INVALID, 0, mkdirat_errno_wrapper… in mkdir_parents()
157 int mkdir_parents_safe(const char *prefix, const char *path, mode_t mode, uid_t uid, gid_t gid, Mkd… in mkdir_parents_safe() argument
158 return mkdir_parents_internal(prefix, path, mode, uid, gid, flags, mkdirat_errno_wrapper); in mkdir_parents_safe()
161 int mkdir_p_internal(const char *prefix, const char *path, mode_t mode, uid_t uid, gid_t gid, Mkdir… in mkdir_p_internal() argument
168 … r = mkdir_parents_internal(prefix, path, mode, uid, gid, flags | MKDIR_FOLLOW_SYMLINK, _mkdirat); in mkdir_p_internal()
173 r = _mkdirat(AT_FDCWD, path, mode); in mkdir_p_internal()
177 r = mkdir_safe_internal(path, mode, uid, gid, flags, _mkdirat); in mkdir_p_internal()
185 int mkdir_p(const char *path, mode_t mode) { in mkdir_p() argument
186 … return mkdir_p_internal(NULL, path, mode, UID_INVALID, UID_INVALID, 0, mkdirat_errno_wrapper); in mkdir_p()
189 int mkdir_p_safe(const char *prefix, const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlag… in mkdir_p_safe() argument
190 return mkdir_p_internal(prefix, path, mode, uid, gid, flags, mkdirat_errno_wrapper); in mkdir_p_safe()