Sync usage with man page.
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / misc / cvsuser.c
blob67e6ae39443195634f143aaa9301fc1ec3a54a44
1 /* Enable a variable CVSUSER for cvs. */
2 /* See cvs/subr.c: getcaller(). */
4 #include <stdlib.h>
5 #include <string.h>
6 #include <pwd.h>
8 int getuid (void)
10 return 0;
13 char * getlogin (void)
15 char *s;
17 s = getenv ("CVSUSER");
18 if (s && *s)
19 return s;
20 s = getenv ("USER");
21 if (s && *s)
22 return s;
23 return NULL;
26 struct passwd * getpwnam (const char *name)
28 static struct passwd pw;
29 static char namebuf[100];
31 pw.pw_name = strcpy (namebuf, name);
32 pw.pw_passwd = "*";
33 pw.pw_uid = 100;
34 pw.pw_gid = 100;
35 pw.pw_gecos = "";
36 pw.pw_dir = "/";
37 pw.pw_shell = "/bin/sh";
39 return &pw;