mirror of
https://git.freebsd.org/ports.git
synced 2025-05-19 10:33:12 -04:00
- target-mips: Status.UX/SX/KX enable 32-bit address wrapping. [1] - target-mips: define ISA_MIPS64R6. [1] - Change UX/AWRAP to allow compile. Probably, this is part of the problem. [2] - Fix the pipe(2) and pipe2(2) syscalls so the file descriptors are returned correctly. [3] - Add sched_yield(2) and sched_get_priority_{max,min}(2) syscall handlers. [3] - Add missing setresgid(2) and setresuid(2) system call handlers. [3] - Eliminate "Qemu unsupported ioctl" warnings for cryptodev. [3] - Bump PORTREVISION. Submitted by: Leon Alrae <leon.alrae@imgtec.com> [1], sbruno [2], sson [3] Obtained from: https://github.com/seanbruno/qemu-bsd-user/commits/bsd-user
56 lines
1.7 KiB
Text
56 lines
1.7 KiB
Text
From f4319eb1a3a8393930570f061bdac6abe007b2bb Mon Sep 17 00:00:00 2001
|
|
From: Stacey Son <sson@FreeBSD.org>
|
|
Date: Tue, 2 Dec 2014 01:23:34 +0000
|
|
Subject: [PATCH] Add missing setresgid(2) and setresuid(2) system call
|
|
handlers.
|
|
|
|
---
|
|
bsd-user/bsd-proc.h | 12 +++++++++---
|
|
bsd-user/syscall.c | 8 ++++++++
|
|
2 files changed, 17 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/bsd-user/bsd-proc.h b/bsd-user/bsd-proc.h
|
|
index 85dff61..459d321 100644
|
|
--- a/bsd-user/bsd-proc.h
|
|
+++ b/bsd-user/bsd-proc.h
|
|
@@ -303,12 +303,18 @@ static inline abi_long do_bsd_setregid(abi_long arg1, abi_long arg2)
|
|
return get_errno(setregid(arg1, arg2));
|
|
}
|
|
|
|
+/* setresgid(2) */
|
|
+static inline abi_long do_bsd_setresgid(gid_t rgid, gid_t egid, gid_t sgid)
|
|
+{
|
|
+
|
|
+ return get_errno(setresgid(rgid, egid, sgid));
|
|
+}
|
|
+
|
|
/* setresuid(2) */
|
|
-static inline abi_long do_bsd_setresuid(abi_long arg1, abi_long arg2,
|
|
- abi_long arg3)
|
|
+static inline abi_long do_bsd_setresuid(uid_t ruid, uid_t euid, uid_t suid)
|
|
{
|
|
|
|
- return get_errno(setresuid(arg1, arg2, arg3));
|
|
+ return get_errno(setresuid(ruid, euid, suid));
|
|
}
|
|
|
|
/* getresuid(2) */
|
|
diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c
|
|
index 0e090f4..0a1e294 100644
|
|
--- a/bsd-user/syscall.c
|
|
+++ b/bsd-user/syscall.c
|
|
@@ -298,6 +298,14 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1,
|
|
ret = do_bsd_getresgid(arg1, arg2, arg3);
|
|
break;
|
|
|
|
+ case TARGET_FREEBSD_NR_setresuid: /* setresuid(2) */
|
|
+ ret = do_bsd_setresuid(arg1, arg2, arg3);
|
|
+ break;
|
|
+
|
|
+ case TARGET_FREEBSD_NR_setresgid: /* setresgid(2) */
|
|
+ ret = do_bsd_setresgid(arg1, arg2, arg3);
|
|
+ break;
|
|
+
|
|
case TARGET_FREEBSD_NR_getsid: /* getsid(2) */
|
|
ret = do_bsd_getsid(arg1);
|
|
break;
|