diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-09-02 23:11:53 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-09-02 23:11:53 +0000 |
commit | 0ff878f559f184f0e84b3d14024d85b6cfae6af4 (patch) | |
tree | 0b42cbdf6af0a15ec66d8923a184730ef98abca2 /libbb | |
parent | 8a86498388097763b3aed7e147fe0400d0099b46 (diff) | |
download | busybox-w32-0ff878f559f184f0e84b3d14024d85b6cfae6af4.tar.gz busybox-w32-0ff878f559f184f0e84b3d14024d85b6cfae6af4.tar.bz2 busybox-w32-0ff878f559f184f0e84b3d14024d85b6cfae6af4.zip |
No longer needed
git-svn-id: svn://busybox.net/trunk/busybox@9198 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/my_getpwnamegid.c | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/libbb/my_getpwnamegid.c b/libbb/my_getpwnamegid.c deleted file mode 100644 index d1457900e..000000000 --- a/libbb/my_getpwnamegid.c +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | ||
2 | /* | ||
3 | * Utility routines. | ||
4 | * | ||
5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | |||
22 | #include <stdio.h> | ||
23 | #include <string.h> | ||
24 | #include "libbb.h" | ||
25 | #include "pwd_.h" | ||
26 | #include "grp_.h" | ||
27 | |||
28 | |||
29 | |||
30 | /* gets a gid given a user name */ | ||
31 | long my_getpwnamegid(const char *name) | ||
32 | { | ||
33 | struct group *mygroup; | ||
34 | struct passwd *myuser; | ||
35 | |||
36 | myuser=getpwnam(name); | ||
37 | if (myuser==NULL) | ||
38 | bb_error_msg_and_die("unknown user name: %s", name); | ||
39 | |||
40 | mygroup = getgrgid(myuser->pw_gid); | ||
41 | if (mygroup==NULL) | ||
42 | bb_error_msg_and_die("unknown gid %ld", (long)myuser->pw_gid); | ||
43 | |||
44 | return mygroup->gr_gid; | ||
45 | } | ||
46 | |||
47 | |||
48 | /* END CODE */ | ||
49 | /* | ||
50 | Local Variables: | ||
51 | c-file-style: "linux" | ||
52 | c-basic-offset: 4 | ||
53 | tab-width: 4 | ||
54 | End: | ||
55 | */ | ||