summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/libcruft/pwent.c
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2003-10-29 16:07:11 +0000
committerMystery Man <unknown@mandriva.org>2003-10-29 16:07:11 +0000
commitfa40f30b4253b1e05c46cc5e0c111176825b7623 (patch)
tree76cf2d26c0ce0ee7c6a2c1a1a2b65bc4d8e33029 /mdk-stage1/dietlibc/libcruft/pwent.c
parent327bd24f8e4291bd1882de1990dd7339f781a9cb (diff)
downloaddrakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.tar
drakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.tar.gz
drakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.tar.bz2
drakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.tar.xz
drakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.zip
This commit was manufactured by cvs2svn to create tag 'Corpo_2_1_1'.Corpo_2_1_1
Diffstat (limited to 'mdk-stage1/dietlibc/libcruft/pwent.c')
-rw-r--r--mdk-stage1/dietlibc/libcruft/pwent.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/mdk-stage1/dietlibc/libcruft/pwent.c b/mdk-stage1/dietlibc/libcruft/pwent.c
deleted file mode 100644
index 30a8a0957..000000000
--- a/mdk-stage1/dietlibc/libcruft/pwent.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * dietlibc/lib/pwent.c - getpwent(3)/setpwent(3)/endpwent(3) implementation
- *
- * Copyright 2001 Jeff Garzik <jgarzik@mandrakesoft.com>
- *
- * This is a brand new implementation, based on the interface
- * described in man-pages-1.34-1mdk man pages package.
- */
-
-
-#include "entlib.h" /* this is our only include */
-
-static struct __ent_state *st = NULL; /* state held across calls */
-static struct passwd pw;
-
-struct passwd *getpwent(void)
-{
- char *parts[7];
-
- if (__ent_start(_PATH_PASSWD, &st))
- return NULL;
- if (__ent_get_line(st))
- goto err_out;
- if (__ent_split(st, parts, 7, ':', 1) < 0)
- goto err_out;
-
- pw.pw_name = parts[0];
- pw.pw_passwd = parts[1];
- pw.pw_uid = (uid_t) atoi(parts[2]);
- pw.pw_gid = (gid_t) atoi(parts[3]);
- pw.pw_gecos = parts[4];
- pw.pw_dir = parts[5];
- pw.pw_shell = parts[6];
-
- return &pw;
-
-err_out:
- st->buflen = st->bufptr = 0; /* invalidate file data buffer */
- return NULL;
-}
-
-void setpwent(void) { __ent_set(st); }
-void endpwent(void) { __ent_end(st); st=NULL; }