This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 3d37b1794ce syscall: Add issetugid()
3d37b1794ce is described below

commit 3d37b1794ce6025aba454fcfc914a4f2428a3248
Author: Marco Casaroli <[email protected]>
AuthorDate: Mon Nov 2 23:03:05 2026 +0100

    syscall: Add issetugid()
    
    With CONFIG_SCHED_USER_IDENTITY the kernel has issetugid()
    (sched/group/group_issetugid.c) and the user libc leaves out its stub, but
    there is no system call.  In a protected or a kernel build, a program that
    calls issetugid() or secure_getenv() does not link: undefined reference to
    issetugid.
    
    Add the system call, next to the other calls of the user identity.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 include/sys/syscall_lookup.h | 1 +
 syscall/syscall.csv          | 1 +
 2 files changed, 2 insertions(+)

diff --git a/include/sys/syscall_lookup.h b/include/sys/syscall_lookup.h
index b98c66bb1c4..196401508b8 100644
--- a/include/sys/syscall_lookup.h
+++ b/include/sys/syscall_lookup.h
@@ -85,6 +85,7 @@ SYSCALL_LOOKUP(sethostname,                2)
   SYSCALL_LOOKUP(setresgid,                3)
   SYSCALL_LOOKUP(getresuid,                3)
   SYSCALL_LOOKUP(getresgid,                3)
+  SYSCALL_LOOKUP(issetugid,                0)
 #endif
 
 /* Semaphores */
diff --git a/syscall/syscall.csv b/syscall/syscall.csv
index e232c6d93fe..7ae03c68d57 100644
--- a/syscall/syscall.csv
+++ b/syscall/syscall.csv
@@ -60,6 +60,7 @@
 
"inotify_rm_watch","sys/inotify.h","defined(CONFIG_FS_NOTIFY)","int","int","int"
 "insmod","nuttx/module.h","defined(CONFIG_MODULE)","FAR void *","FAR const 
char *","FAR const char *"
 "ioctl","sys/ioctl.h","","int","int","int","...","unsigned long"
+"issetugid","unistd.h","defined(CONFIG_SCHED_USER_IDENTITY)","int"
 "kill","signal.h","","int","pid_t","int"
 "lchmod","sys/stat.h","","int","FAR const char *","mode_t"
 "lchown","unistd.h","","int","FAR const char *","uid_t","gid_t"

Reply via email to