Logo Search packages:      
Sourcecode: sbuild version File versions  Download package

void sbuild::passwd::query_uid ( uid_t  uid )

Query using a UID.

Parameters:
uidthe UID to search for.

Definition at line 86 of file util.cc.

Referenced by passwd().

{
  buffer_type::size_type size = 1 << 7;
  buffer.reserve(size);
  int error;

  ::passwd *pwd_result;

  while ((error = getpwuid_r(uid, this,
                       &buffer[0], buffer.capacity(),
                       &pwd_result)))
    {
      size <<= 1;
      buffer.reserve(size);
    }

  if (pwd_result)
    valid = true;
  else
    errno = error;
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index