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

void sbuild::passwd::query_name ( const char *  name )

Query using a name.

Parameters:
namethe user name to search for.

Definition at line 109 of file util.cc.

Referenced by passwd().

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

  ::passwd *pwd_result;

  while ((error = getpwnam_r(name, 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