Skip to content
Snippets Groups Projects
  • Nadav Har'El's avatar
    c6399e55
    Stub getpwnam(), setuid() and setgid() · c6399e55
    Nadav Har'El authored
    Implement getpwname(), setuid() and setgid() in the simplest way possible
    considering that we don't support any userid except 0:
    
    getpwname() returns user 0 for any username given to it.
    setuid() and setgid() does nothing for uid or gid 0, otherwise fails.
    Where would the caller get this !=0 id anyway?
    
    Memcached needs these calls, because it wants to be clever and
    warn the user against running it as root....
    c6399e55
    History
    Stub getpwnam(), setuid() and setgid()
    Nadav Har'El authored
    Implement getpwname(), setuid() and setgid() in the simplest way possible
    considering that we don't support any userid except 0:
    
    getpwname() returns user 0 for any username given to it.
    setuid() and setgid() does nothing for uid or gid 0, otherwise fails.
    Where would the caller get this !=0 id anyway?
    
    Memcached needs these calls, because it wants to be clever and
    warn the user against running it as root....