Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
The use of -r in id command.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2253
Location: $TERM

PostPosted: Wed Dec 17, 2014 8:44 am    Post subject: The use of -r in id command. Reply with quote

With the -r switch id should print the real UID/GID, but running id -ru or -rg with su -c prints the EUID/EGID.

So, what the use of this switch?
_________________
My blog
Back to top
View user's profile Send private message
papahuhn
l33t
l33t


Joined: 06 Sep 2004
Posts: 623

PostPosted: Wed Dec 17, 2014 7:37 pm    Post subject: Reply with quote

su sets both effective and real UID/GID via setuid(), as it is a suid root binary (man 2 setuid).
_________________
Death by snoo-snoo!
Back to top
View user's profile Send private message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2253
Location: $TERM

PostPosted: Thu Dec 18, 2014 7:10 am    Post subject: Reply with quote

Oh, ok,. I didn't know anything like that happened.
_________________
My blog
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum