summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_uid16.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2014-11-13 18:01:51 +0000
committerkib <kib@FreeBSD.org>2014-11-13 18:01:51 +0000
commitb4ef709604332a259f2a08f546cceec6ab3ecace (patch)
tree6efcfbcf870ce7232247484b3f06affbcf5570d6 /sys/compat/linux/linux_uid16.c
parentbc10954c50985cb9f46aa05d31b1309198d2e65c (diff)
downloadFreeBSD-src-b4ef709604332a259f2a08f546cceec6ab3ecace.zip
FreeBSD-src-b4ef709604332a259f2a08f546cceec6ab3ecace.tar.gz
Remove the no-at variants of the kern_xx() syscall helpers. E.g., we
have both kern_open() and kern_openat(); change the callers to use kern_openat(). This removes one (sometimes two) levels of indirection and consolidates arguments checks. Reviewed by: mckusick Sponsored by: The FreeBSD Foundation MFC after: 1 week
Diffstat (limited to 'sys/compat/linux/linux_uid16.c')
-rw-r--r--sys/compat/linux/linux_uid16.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c
index c5bf2dd..61f3030 100644
--- a/sys/compat/linux/linux_uid16.c
+++ b/sys/compat/linux/linux_uid16.c
@@ -121,8 +121,8 @@ linux_chown16(struct thread *td, struct linux_chown16_args *args)
args->gid);
LIN_SDT_PROBE1(uid16, linux_chown16, conv_path, path);
- error = kern_chown(td, path, UIO_SYSSPACE, CAST_NOCHG(args->uid),
- CAST_NOCHG(args->gid));
+ error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE,
+ CAST_NOCHG(args->uid), CAST_NOCHG(args->gid), 0);
LFREEPATH(path);
LIN_SDT_PROBE1(uid16, linux_chown16, return, error);
@@ -146,8 +146,8 @@ linux_lchown16(struct thread *td, struct linux_lchown16_args *args)
args->gid);
LIN_SDT_PROBE1(uid16, linux_lchown16, conv_path, path);
- error = kern_lchown(td, path, UIO_SYSSPACE, CAST_NOCHG(args->uid),
- CAST_NOCHG(args->gid));
+ error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE,
+ CAST_NOCHG(args->uid), CAST_NOCHG(args->gid), AT_SYMLINK_NOFOLLOW);
LFREEPATH(path);
LIN_SDT_PROBE1(uid16, linux_lchown16, return, error);
OpenPOWER on IntegriCloud