The 'flags' argument can be modified in vn_open_cred(), so we need to
set it for every loop interation. Pointed out by: kib
This commit is contained in:
parent
7e5e69b41a
commit
ab9dc4d86b
@ -3125,12 +3125,12 @@ expand_name(const char *comm, uid_t uid, pid_t pid, struct thread *td,
|
||||
struct nameidata nd;
|
||||
int cmode, flags, oflags, error;
|
||||
|
||||
flags = O_CREAT | O_EXCL | FWRITE | O_NOFOLLOW;
|
||||
cmode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP;
|
||||
oflags = VN_OPEN_NOAUDIT |
|
||||
(capmode_coredump ? VN_OPEN_NOCAPCHECK : 0);
|
||||
|
||||
for (i = 0; i < num_cores; i++) {
|
||||
flags = O_CREAT | O_EXCL | FWRITE | O_NOFOLLOW;
|
||||
name[indexpos] = '0' + i;
|
||||
NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE,
|
||||
name, td);
|
||||
|
Loading…
Reference in New Issue
Block a user