aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linux/linux_uid16.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linux/linux_uid16.c')
-rw-r--r--sys/compat/linux/linux_uid16.c43
1 files changed, 4 insertions, 39 deletions
diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c
index 181ecd2c7e12..7b7dc8e0f0bb 100644
--- a/sys/compat/linux/linux_uid16.c
+++ b/sys/compat/linux/linux_uid16.c
@@ -72,52 +72,17 @@ DUMMY(getresgid16);
int
linux_chown16(struct thread *td, struct linux_chown16_args *args)
{
- char *path;
- int error;
-
- if (!LUSECONVPATH(td) && !SDT_PROBES_ENABLED()) {
- error = kern_fchownat(td, AT_FDCWD, args->path, UIO_USERSPACE,
- CAST_NOCHG(args->uid), CAST_NOCHG(args->gid), 0);
- } else {
- LCONVPATHEXIST(args->path, &path);
- /*
- * The DTrace probes have to be after the LCONVPATHEXIST, as
- * LCONVPATHEXIST may return on its own and we do not want to
- * have a stray entry without the corresponding return.
- */
- LIN_SDT_PROBE1(uid16, linux_chown16, conv_path, path);
- error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE,
- CAST_NOCHG(args->uid), CAST_NOCHG(args->gid), 0);
- LFREEPATH(path);
- }
- return (error);
+ return (kern_fchownat(td, AT_FDCWD, args->path, UIO_USERSPACE,
+ CAST_NOCHG(args->uid), CAST_NOCHG(args->gid), 0));
}
int
linux_lchown16(struct thread *td, struct linux_lchown16_args *args)
{
- char *path;
- int error;
- if (!LUSECONVPATH(td) && !SDT_PROBES_ENABLED()) {
- error = kern_fchownat(td, AT_FDCWD, args->path, UIO_USERSPACE,
- CAST_NOCHG(args->uid), CAST_NOCHG(args->gid), AT_SYMLINK_NOFOLLOW);
- } else {
- LCONVPATHEXIST(args->path, &path);
-
- /*
- * The DTrace probes have to be after the LCONVPATHEXIST, as
- * LCONVPATHEXIST may return on its own and we do not want to
- * have a stray entry without the corresponding return.
- */
- LIN_SDT_PROBE1(uid16, linux_lchown16, conv_path, path);
-
- error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE,
- CAST_NOCHG(args->uid), CAST_NOCHG(args->gid), AT_SYMLINK_NOFOLLOW);
- LFREEPATH(path);
- }
- return (error);
+ return (kern_fchownat(td, AT_FDCWD, args->path, UIO_USERSPACE,
+ CAST_NOCHG(args->uid), CAST_NOCHG(args->gid), AT_SYMLINK_NOFOLLOW));
}
int