Does the process created with vfork() has same the same level of privileges that of a creator process i.e parent process ?
example : If I run a process as root does vfork() child possess the same execution privileges?
Does the process created with vfork() has same the same level of privileges that of a creator process i.e parent process ?
example : If I run a process as root does vfork() child possess the same execution privileges?
Open Group (POSIX) specification of
fork()
says:As there is no mention of UIDs/GIDs below that text, you can deduce that these properties are inherited.
These properties are eventually changed by calls to appropriate property changing functions (
setuid
, etc) orexec
.The old (POSIX 2004 or earlier) specification of
vfork()
is similar:The specification of
vfork()
was removed from POSIX 2008 (aka POSIX 2016).