linux(4): make linkat(2) handle AT_EMPTY_PATH
Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D29974
This commit is contained in:
parent
3657010266
commit
ee384b229d
@ -1134,11 +1134,12 @@ linux_linkat(struct thread *td, struct linux_linkat_args *args)
|
||||
char *path, *to;
|
||||
int error, olddfd, newdfd, flag;
|
||||
|
||||
if (args->flag & ~LINUX_AT_SYMLINK_FOLLOW)
|
||||
if (args->flag & ~(LINUX_AT_SYMLINK_FOLLOW | LINUX_AT_EMPTY_PATH))
|
||||
return (EINVAL);
|
||||
|
||||
flag = (args->flag & LINUX_AT_SYMLINK_FOLLOW) == 0 ? AT_SYMLINK_FOLLOW :
|
||||
0;
|
||||
flag |= (args->flag & LINUX_AT_EMPTY_PATH) == 0 ? AT_EMPTY_PATH : 0;
|
||||
|
||||
olddfd = (args->olddfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->olddfd;
|
||||
newdfd = (args->newdfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->newdfd;
|
||||
|
Loading…
Reference in New Issue
Block a user