aboutsummaryrefslogtreecommitdiff
path: root/riemann.fmi.uni-sofia.bg/programs/nlogin-0.3-pre/nv_getpwuid.c
blob: 5a0e541491a629f10b2c03a3cd714400bbb6db61 (plain)
1
2
3
4
5
6
7
8
9
10
11
#include <pwd.h>
#include "pw_defs.h"

struct passwd *nv_getpwuid(uid_t uid) /*EXTRACT_INCL*/ {
  struct passwd *tmp;
  nv_setpwent();
  while ((tmp = nv_getpwent()))
    if (tmp->pw_uid == uid) break;
  nv_endpwent();
  return tmp;
}