summaryrefslogtreecommitdiff
path: root/chmod_chown_chgrp.c
diff options
context:
space:
mode:
authorEric Andersen1999-10-20 19:18:15 +0000
committerEric Andersen1999-10-20 19:18:15 +0000
commitd23f9ba0f6d82e6bab8a3ec1b804865f4b22cfb7 (patch)
tree0ab285d58cd8cf530ad8acac823545df892c90e9 /chmod_chown_chgrp.c
parentef8b6c757de9684f5d88eff4b014527e87121137 (diff)
downloadbusybox-d23f9ba0f6d82e6bab8a3ec1b804865f4b22cfb7.zip
busybox-d23f9ba0f6d82e6bab8a3ec1b804865f4b22cfb7.tar.gz
Made ps work. Fixed some stuff.
Diffstat (limited to 'chmod_chown_chgrp.c')
-rw-r--r--chmod_chown_chgrp.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/chmod_chown_chgrp.c b/chmod_chown_chgrp.c
index faebbbe..85ba247 100644
--- a/chmod_chown_chgrp.c
+++ b/chmod_chown_chgrp.c
@@ -48,56 +48,6 @@ static const char chmod_usage[] = "[-R] MODE[,MODE]... FILE...\n"
"\t-R\tchange files and directories recursively.\n";
-uid_t my_getid(const char *filename, const char *name)
-{
- FILE *stream;
- char *rname, *start, *end, buf[128];
- uid_t rid;
-
- stream=fopen(filename,"r");
-
- while (fgets (buf, 128, stream) != NULL) {
- if (buf[0] == '#')
- continue;
-
- start = buf;
- end = strchr (start, ':');
- if (end == NULL)
- continue;
- *end = '\0';
- rname = start;
-
- start = end + 1;
- end = strchr (start, ':');
- if (end == NULL)
- continue;
-
- start = end + 1;
- rid = (uid_t) strtol (start, &end, 10);
- if (end == start)
- continue;
-
- if (name) {
- if (0 == strcmp(rname, name))
- return( rid);
- }
- }
- fclose(stream);
- return (-1);
-}
-
-uid_t
-my_getpwnam(char *name)
-{
- return my_getid("/etc/passwd", name);
-}
-
-gid_t
-my_getgrnam(char *name)
-{
- return my_getid("/etc/group", name);
-}
-
static int fileAction(const char *fileName, struct stat* statbuf)
{
switch (whichApp) {