fs-util: enable automatic access mode logic in xopenat()
This commit is contained in:
committed by
Yu Watanabe
parent
07910c73b0
commit
0712316e8e
+3
-5
@@ -412,11 +412,9 @@ int chaseat(int dir_fd, const char *path, ChaseFlags flags, char **ret_path, int
|
||||
return r;
|
||||
|
||||
if (FLAGS_SET(flags, CHASE_MKDIR_0755) && (!isempty(todo) || !(flags & (CHASE_PARENT|CHASE_NONEXISTENT)))) {
|
||||
child = xopenat_full(fd,
|
||||
first,
|
||||
O_DIRECTORY|O_CREAT|O_EXCL|O_NOFOLLOW|O_PATH|O_CLOEXEC,
|
||||
/* xopen_flags = */ 0,
|
||||
0755);
|
||||
child = xopenat(fd,
|
||||
first,
|
||||
O_DIRECTORY|O_CREAT|O_EXCL|O_NOFOLLOW|O_PATH|O_CLOEXEC);
|
||||
if (child < 0)
|
||||
return child;
|
||||
} else if (FLAGS_SET(flags, CHASE_PARENT) && isempty(todo)) {
|
||||
|
||||
Reference in New Issue
Block a user