MySQL 8.4.2
Source Code Documentation
my_getpwnam.cc File Reference
#include "my_getpwnam.h"
#include <atomic>
#include <vector>
#include <errno.h>
#include <unistd.h>

Namespaces

namespace  anonymous_namespace{my_getpwnam.cc}
 

Functions

std::size_t anonymous_namespace{my_getpwnam.cc}::start_bufsz ()
 
template<class GETPW_CLOS >
PasswdValue anonymous_namespace{my_getpwnam.cc}::my_getpw_ (GETPW_CLOS &&getpwfunc)
 
PasswdValue my_getpwnam (const char *name)
 Wrapper around the getpwnam_r() POSIX function which places the contents of the passwd struct into an object with value semantics and returns this. More...
 
PasswdValue my_getpwuid (uid_t uid)
 Wrapper around the getpwuid_r() POSIX function which places the contents of the passwd struct into an object with value semantics and returns this. More...
 

Function Documentation

◆ my_getpwnam()

PasswdValue my_getpwnam ( const char *  name)

Wrapper around the getpwnam_r() POSIX function which places the contents of the passwd struct into an object with value semantics and returns this.

Parameters
nameSymbolic user id
Return values
PasswdValuerepresenting user's passwd entry. PasswdValue::IsVoid() returns true if no such user exists or an error occurred. In the latter case errno is set.

◆ my_getpwuid()

PasswdValue my_getpwuid ( uid_t  uid)

Wrapper around the getpwuid_r() POSIX function which places the contents of the passwd struct into an object with value semantics and returns this.

Parameters
uidNumeric user id
Return values
PasswdValuerepresenting user's passwd entry. PasswdValue::IsVoid() returns true if no such user exists or an error occurred. In the latter case errno is set.