search for: pwd_fd

Displaying 1 result from an estimated 1 matches for "pwd_fd".

Did you mean: cwd_fd
2003 May 19
0
[PATCH] getpwnam() implementation in tftpd.c
...*pw_passwd; /* Password. */ + uid_t pw_uid; /* User ID. */ + gid_t pw_gid; /* Group ID. */ + char *pw_gecos; /* Real name. */ + char *pw_dir; /* Home directory. */ + char *pw_shell; /* Shell program. */ +}; + +/* to prevent a compiler warning */ +struct passwd *__getpwent(int pwd_fd); +struct passwd *getpwnam(const char *name); + +#define PWD_BUFFER_SIZE 256 +struct passwd *__getpwent(int pwd_fd) +{ + static char line_buff[PWD_BUFFER_SIZE]; + static struct passwd passwd; + char *field_begin; + char *endptr; + char *gid_ptr=NULL; + char *uid_ptr=NULL; + int line_len; + int i; +...