2d73e86b47
From posix spec, if set-user-ID bit is set in the file permissions, then the effective user ID of the new process shall be set to the user ID of the new process image file. Let's ignore whether ST_NOSUID is set on the mounted file system. https://pubs.opengroup.org/onlinepubs/007904875/functions/exec.html test step: hello example build as a module and call geteuid and getegid API. then set file binary set-user-ID bit on the host. $ chmod +s apps/bin/hello nsh> mount -t hostfs -o fs=. /data nsh> ls -l /data/apps/bin/hello -rwsrwsr-x 1000 1000 9264 /data/apps/bin/hello nsh> /data/apps/bin/hello geteuid:1000 getegid:1000 Signed-off-by: fangxinyong <fangxinyong@xiaomi.com> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
gnu-elf.ld | ||
Kconfig | ||
libelf_addrenv.c | ||
libelf_bind.c | ||
libelf_coredump.c | ||
libelf_ctors.c | ||
libelf_dtors.c | ||
libelf_init.c | ||
libelf_iobuffer.c | ||
libelf_load.c | ||
libelf_read.c | ||
libelf_sections.c | ||
libelf_symbols.c | ||
libelf_uninit.c | ||
libelf_unload.c | ||
libelf_verify.c | ||
libelf.h | ||
Make.defs |