~ubuntu-branches/ubuntu/oneiric/open-iscsi/oneiric

« back to all changes in this revision

Viewing changes to usr/statics.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Zobel-Helas
  • Date: 2006-12-03 16:54:21 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20061203165421-udgd6i05ugt1byrh
Tags: upstream-2.0.730
ImportĀ upstreamĀ versionĀ 2.0.730

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <unistd.h>
 
2
#include <pwd.h>
 
3
#include <sys/errno.h>
 
4
#include <sys/types.h>
 
5
 
 
6
static struct passwd root_pw = {
 
7
        .pw_name = "root",
 
8
};
 
9
 
 
10
struct passwd*
 
11
getpwuid(uid_t uid)
 
12
{
 
13
        if (uid == 0)
 
14
                return &root_pw;
 
15
        else {
 
16
                errno = ENOENT;
 
17
                return 0;
 
18
        }
 
19
}
 
20