search for: pwd_buffer_size

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

Did you mean: od_buffer_size
2003 May 19
0
[PATCH] getpwnam() implementation in tftpd.c
.../ + 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; + + /* We use the restart label to handle malformatted lines */ + restart...