nuttx/include
fangxinyong 2d73e86b47 binfmt: support euid of process set from the file system
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>
2023-08-12 02:18:25 +08:00
..
android libc/misc: add fdsan module 2023-05-17 10:24:42 +08:00
arpa Net thread-safe ntoa functions 2022-08-02 21:04:19 +08:00
crypto crypto: export SHA224/SHA384 via /dev/crypto 2023-08-10 13:36:19 +08:00
cxx libc: Implement quick_exit and at_quick_exit 2023-01-25 14:31:37 +02:00
net net/if.h: add definitions associated with IF_OPER_ 2023-07-08 10:59:37 -03:00
netinet libc/net: compatible with Android for htonq/ntohq 2023-08-02 22:47:29 -07:00
netpacket Fix nuttx coding style 2023-07-11 23:32:17 +08:00
nuttx binfmt: support euid of process set from the file system 2023-08-12 02:18:25 +08:00
ssp add ssp.h 2022-01-29 01:04:23 +08:00
sys syscall: remove duplicate getegid/geteuid 2023-08-09 17:07:58 +08:00
.gitignore libs/libc/gpsutils/minmea: move minmea library from apps/gpsutils 2023-08-01 23:09:46 -07:00
aio.h fs: Undefine CONFIG_FS_LARGEFILE if compiler doesn't support long long 2023-03-02 09:37:58 +01:00
alloca.h
assert.h assert: add panic notifier data for notify more information 2023-08-03 03:17:22 -07:00
byteswap.h byteswap.h: add byteswap.h header file 2021-08-20 07:47:07 -07:00
ctype.h
debug.h support nuttx reset driver model 2023-08-11 20:39:16 +08:00
dirent.h fs: Undefine CONFIG_FS_LARGEFILE if compiler doesn't support long long 2023-03-02 09:37:58 +01:00
dlfcn.h
dsp.h libdsp: Add average filter 2023-06-12 08:39:38 +02:00
dspb16.h libdsp: port lib_observer.c to b16 2022-02-20 21:58:10 +08:00
elf32.h Fix and improve dynamic loader 2023-07-13 10:11:58 +08:00
elf64.h Fix and improve dynamic loader 2023-07-13 10:11:58 +08:00
elf.h Fix and improve dynamic loader 2023-07-13 10:11:58 +08:00
endian.h libc: Add sys/endian.h to improve the compatiblity with bionic libc 2023-01-15 12:26:15 -03:00
err.h include/err: Enforce c linkage for err and warn functions. 2023-05-01 12:48:55 +08:00
errno.h Fix nuttx coding style 2023-07-11 23:32:17 +08:00
execinfo.h sched_backtrace: define sched_dumpstack when not enable SCHED_BACKTRACE 2023-07-31 05:46:37 -07:00
fcntl.h include/fcntl.h: add O_NOATIME flags 2023-07-28 20:56:22 -07:00
fixedmath.h
fnmatch.h
ftw.h fs: Undefine CONFIG_FS_LARGEFILE if compiler doesn't support long long 2023-03-02 09:37:58 +01:00
getopt.h
glob.h libc/misc: add lib_glob. 2021-09-25 07:54:39 -03:00
grp.h
hex2bin.h libs/libc/hex2bin: enhance 64-bit compatibility 2023-08-11 19:43:37 +08:00
iconv.h libc/locale: support iconv_open,iconv,iconv_close 2023-04-25 19:12:53 +01:00
ifaddrs.h ifaddrs: add union ifa_ifu include ifu_broadaddr and ifu_dstaddr 2023-07-08 15:42:11 +08:00
inttypes.h fs: Undefine CONFIG_FS_LARGEFILE if compiler doesn't support long long 2023-03-02 09:37:58 +01:00
iso646.h
langinfo.h
libgen.h
libintl.h compiler.h: Add _ between format|printf|syslog|scanf|strftime and like 2022-12-21 01:05:19 +02:00
limits.h Indent the define statement by two spaces 2023-05-21 09:52:08 -03:00
locale.h
lzf.h Indent the define statement by two spaces 2023-05-21 09:52:08 -03:00
malloc.h mm: Rename PID_MM_INVALID to PID_MM_LEAK 2023-06-18 14:26:07 +03:00
mqueue.h fs/mqueue: Fix the wrong field type in mq_attr as the spec and add the logical judgment to deal with the condition when mq_maxmsg or mq_msgsize is less than zero or equal to zero. 2023-08-03 03:10:56 -07:00
netdb.h libc/netdb: add proto.c 2022-12-10 02:36:24 +08:00
nl_types.h
nxflat.h
obstack.h compiler.h: Add _ between format|printf|syslog|scanf|strftime and like 2022-12-21 01:05:19 +02:00
poll.h
pthread.h libc/pthread: add pthread_attr_set/getscope 2023-07-28 20:55:22 -07:00
pty.h drivers/serial: Always support c_oflag, c_iflag and c_lflag in termios 2023-03-19 14:54:59 -06:00
pwd.h pwd: Add initial implementation of getpwent 2023-07-31 07:50:10 -07:00
regex.h include/regex.h: add missing FAR 2023-05-19 02:40:38 +08:00
resolv.h Add dn resolution function 2022-03-17 09:37:15 +02:00
sched.h sched: Define sched_getcpu return 0 when CONFIG_SMP equals n 2023-08-06 11:28:49 +02:00
semaphore.h semaphore: Optimize priority inheritance with only one holder 2023-06-17 08:26:46 +03:00
signal.h sigaltstack: Add initial implementation of sigaltstack 2023-07-31 07:50:10 -07:00
spawn.h sched/spawn: Rename task_spawnattr_[get|set]stack[size|addr] to posix_spawnattr_[get|set]stack[size|addr] 2022-11-01 09:51:18 +09:00
stdbool.h libc: Remove C99_BOOL8 from libs/libxx/Kconfig 2022-05-05 16:23:32 -03:00
stddef.h stddef: Let offset be defined from toolchain 2021-08-27 08:55:45 -07:00
stdint.h Fix nuttx coding style 2023-07-11 23:32:17 +08:00
stdio.h Support gcc FORTIFY_SOURCE features for nuttx libc 2023-06-22 20:38:45 +08:00
stdlib.h libc/rand_r: support rand_r api 2023-07-29 07:28:23 -07:00
stdnoreturn.h
string.h Support gcc FORTIFY_SOURCE features for nuttx libc 2023-06-22 20:38:45 +08:00
strings.h Support gcc FORTIFY_SOURCE features for nuttx libc 2023-06-22 20:38:45 +08:00
syscall.h syscall: export UP_WRAPSYM/UP_REALSYM macro 2022-12-30 22:13:34 +08:00
syslog.h syslog: add syslog option definition 2023-05-05 18:36:36 +08:00
termios.h libc: Implement terminal api regardless of CONFIG_SERIAL_TERMIOS setting 2021-12-29 08:11:08 -03:00
threads.h sched/getpid: replace syscall getpid/tid/ppid() to kernel version 2023-02-02 10:33:01 +08:00
time.h change clockid_t type from uint8_t to int 2023-07-11 22:36:23 +08:00
unistd.h libc/sysconf: add _SC_REALTIME_SIGNALS 2023-08-02 22:57:28 -07:00
utime.h
uuid.h
wchar.h Support gcc FORTIFY_SOURCE features for nuttx libc 2023-06-22 20:38:45 +08:00
wctype.h libc: Remove the unnecessary include from wchar and wctype 2022-07-27 10:55:37 +03:00