summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/libcruft/getspnam.c
blob: e6573345d035037ffae4bdd79eba697a0eb72ed9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <shadow.h>
#include <string.h>
#include <stdlib.h>

struct spwd *getspnam(const char * name) {
  struct spwd *tmp;
  setspent();
  for (;;) {
    tmp=getspent();
    if (!tmp) return 0;
    if (!strcmp(tmp->sp_namp,name))
      return tmp;
  }
}