summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/libcruft/spent.c
diff options
context:
space:
mode:
authorGwenolé Beauchesne <gbeauchesne@mandriva.org>2003-06-04 18:47:09 +0000
committerGwenolé Beauchesne <gbeauchesne@mandriva.org>2003-06-04 18:47:09 +0000
commitc46806bf74c2618daa398cb7c3e4b1c47509a105 (patch)
tree0b429074ffc365e7eba2391cf00d7f4eecf372ab /mdk-stage1/dietlibc/libcruft/spent.c
parent7b14ca284d598e7748f6f7a831389525c84890ba (diff)
downloaddrakx-backup-do-not-use-c46806bf74c2618daa398cb7c3e4b1c47509a105.tar
drakx-backup-do-not-use-c46806bf74c2618daa398cb7c3e4b1c47509a105.tar.gz
drakx-backup-do-not-use-c46806bf74c2618daa398cb7c3e4b1c47509a105.tar.bz2
drakx-backup-do-not-use-c46806bf74c2618daa398cb7c3e4b1c47509a105.tar.xz
drakx-backup-do-not-use-c46806bf74c2618daa398cb7c3e4b1c47509a105.zip
even more removals
Diffstat (limited to 'mdk-stage1/dietlibc/libcruft/spent.c')
-rw-r--r--mdk-stage1/dietlibc/libcruft/spent.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/mdk-stage1/dietlibc/libcruft/spent.c b/mdk-stage1/dietlibc/libcruft/spent.c
deleted file mode 100644
index e4beb81e4..000000000
--- a/mdk-stage1/dietlibc/libcruft/spent.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * dietlibc/lib/spent.c - getspent(3)/setspent(3)/endspent(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 spwd sp;
-
-struct spwd *getspent(void)
-{
- char *parts[9];
-
- if (__ent_start(_PATH_SHADOW, &st))
- return NULL;
- if (__ent_get_line(st))
- goto err_out;
- if (__ent_split(st, parts, 9, ':', 1) < 0)
- goto err_out;
-
- sp.sp_namp = parts[0];
- sp.sp_pwdp = parts[1];
- sp.sp_lstchg = atoi(parts[2]); /* XXX: atol */
- sp.sp_min = atoi(parts[3]);
- sp.sp_max = atoi(parts[4]);
- sp.sp_warn = atoi(parts[5]);
- sp.sp_inact = atoi(parts[6]);
- sp.sp_expire = atoi(parts[7]);
- sp.sp_flag = atoi(parts[8]);
-
- return &sp;
-
-err_out:
- st->buflen = st->bufptr = 0; /* invalidate file data buffer */
- return NULL;
-}
-
-void setspent(void) { __ent_set(st); }
-void endspent(void) { __ent_end(st); st=NULL; }