From 524b56b5e28875b48613b812be92476573bb8325 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 9 Jul 2025 01:07:03 -0400 Subject: kernel: cred: Introduce SYS_setuid syscall Signed-off-by: Ian Moffett --- sys/include/sys/syscall.h | 1 + sys/include/sys/ucred.h | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'sys/include') diff --git a/sys/include/sys/syscall.h b/sys/include/sys/syscall.h index 3650e7a..05288f4 100644 --- a/sys/include/sys/syscall.h +++ b/sys/include/sys/syscall.h @@ -56,6 +56,7 @@ #define SYS_inject 15 #define SYS_getpid 16 #define SYS_getppid 17 +#define SYS_setuid 18 #if defined(_KERNEL) /* Syscall return value and arg type */ diff --git a/sys/include/sys/ucred.h b/sys/include/sys/ucred.h index ef66a18..b44a7fe 100644 --- a/sys/include/sys/ucred.h +++ b/sys/include/sys/ucred.h @@ -33,6 +33,7 @@ #include #if defined(_KERNEL) #include +#include #endif /* @@ -47,4 +48,8 @@ struct ucred { }; int setuid(uid_t new); + +#if defined(_KERNEL) +scret_t sys_setuid(struct syscall_args *scargs); +#endif #endif /* !_SYS_UCRED_H_ */ -- cgit v1.2.3