GETUID(2) BSD Programmer's Manual GETUID(2)
g
\bge
\bet
\btu
\bui
\bid
\bd, g
\bge
\bet
\bte
\beu
\bui
\bid
\bd - get user identification
S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
#
\b#i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be <
\b<u
\bun
\bni
\bis
\bst
\btd
\bd.
\b.h
\bh>
\b>
#
\b#i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be <
\b<s
\bsy
\bys
\bs/
\b/t
\bty
\byp
\bpe
\bes
\bs.
\b.h
\bh>
\b>
g
\bge
\bet
\btu
\bui
\bid
\bd(_
\bv_
\bo_
\bi_
\bd);
g
\bge
\bet
\bte
\beu
\bui
\bid
\bd(_
\bv_
\bo_
\bi_
\bd);
D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
The g
\bge
\bet
\btu
\bui
\bid
\bd() function returns the real user ID of the calling process.
The g
\bge
\bet
\bte
\beu
\bui
\bid
\bd() function returns the effective user ID of the calling pro-
The real user ID is that of the user who has invoked the program. As the
effective user ID gives the process additional permissions during execu-
tion of ``_
\bs_
\be_
\bt_
\b-_
\bu_
\bs_
\be_
\br_
\b-_
\bI_
\bD'' mode processes, g
\bge
\bet
\btu
\bui
\bid
\bd() is used to determine the
real-user-id of the calling process.
The g
\bge
\bet
\btu
\bui
\bid
\bd() and g
\bge
\bet
\bte
\beu
\bui
\bid
\bd() functions are always successful, and no return
value is reserved to indicate an error.
S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
S
\bST
\bTA
\bAN
\bND
\bDA
\bAR
\bRD
\bDS
\bS
G
\bGe
\bet
\bte
\beu
\bui
\bid
\bd() and g
\bge
\bet
\btu
\bui
\bid
\bd() conform to IEEE Std 1003.1-1988 (``POSIX'').
4th Berkeley Distribution June 4, 1993 1