OrionLibC
Barry Using POSIX names for structs 11f4683 (2 years, 2 months ago)diff --git a/pwd/getpw.c b/pwd/getpw.c index 116cf97..bc2c92b 100644 --- a/pwd/getpw.c +++ b/pwd/getpw.c @@ -81,20 +81,20 @@ line_to_passwd(char *line) get_part(line, PASSWD_HOMEDIR, entryHomeDir); get_part(line, PASSWD_SHELL, entryShell); - entry.username = entryUsername; - entry.password = entryPassword; - entry.uid = number(uidstr); - entry.gid = number(gidstr); - entry.info = entryInfo; - entry.homedir = entryHomeDir; - entry.shell = entryShell; + entry.pw_name = entryUsername; + entry.pw_passwd = entryPassword; + entry.pw_uid = number(uidstr); + entry.pw_gid = number(gidstr); + entry.pw_gecos = entryInfo; + entry.pw_dir = entryHomeDir; + entry.pw_shell = entryShell; return &entry; } /* Get password file entry by name */ Passwd * -getpwname(const char *username) +getpwnam(const char *username) { int fd = open("/etc/passwd", O_RDONLY);