~ubuntu-branches/ubuntu/hardy/open-iscsi/hardy-updates

« 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
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061203165421-xhttz5j4l9sowg8u
Tags: 2.0.730-0.2
upload to unstable, as no new bugs arised.

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