Skip to content
  • Dyre Tjeldvoll's avatar
    5d730dc6
    Bug#11762203: GETPWNAM USED IN A THREADED CODE · 5d730dc6
    Dyre Tjeldvoll authored
    Problem: The POSIX functions getpwnam() and getpwuid() are not
    guaranteed to be thread safe. And as the synopsis indicates, they were
    being called after the server has spawned additional threads.
    
    Solution: Write wrapper functions around the thread-safe versions
    getpwnam_r() and getpwuid_r() which returns the passwd information in
    an object with value semantics so that it can be safely copied,
    assigned and stored.
    
    Change-Id: I8aebe94c46f5d8be69a129dd89c40f181ad16187
    5d730dc6
    Bug#11762203: GETPWNAM USED IN A THREADED CODE
    Dyre Tjeldvoll authored
    Problem: The POSIX functions getpwnam() and getpwuid() are not
    guaranteed to be thread safe. And as the synopsis indicates, they were
    being called after the server has spawned additional threads.
    
    Solution: Write wrapper functions around the thread-safe versions
    getpwnam_r() and getpwuid_r() which returns the passwd information in
    an object with value semantics so that it can be safely copied,
    assigned and stored.
    
    Change-Id: I8aebe94c46f5d8be69a129dd89c40f181ad16187
Loading