diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2000-08-29 22:09:15 +0400 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2000-08-29 22:09:15 +0400 |
commit | 00a2f168e725bb10753885e227e22a8a279c71c6 (patch) | |
tree | 778ff9c3a9a43293b630adb95c3721f811345007 | |
parent | d824bcf985a8a5fd96169135fd13a37729af4b16 (diff) |
2000-08-29 Werner Almesberger <Werner.Almesberger@epfl.ch>
* libc/unix/getpwent.c (getpwnam, getpwuid, getpwent): removed
(broken) support for non-existent /etc/passwd field "comment".
-rw-r--r-- | newlib/ChangeLog | 5 | ||||
-rw-r--r-- | newlib/libc/unix/getpwent.c | 13 |
2 files changed, 11 insertions, 7 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 9661de9c5..98dc1414f 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2000-08-29 Werner Almesberger <Werner.Almesberger@epfl.ch> + + * libc/unix/getpwent.c (getpwnam, getpwuid, getpwent): removed + (broken) support for non-existent /etc/passwd field "comment". + 2000-08-27 Werner Almesberger <Werner.Almesberger@epfl.ch> * libc/posix/scandir.c (DIRSIZ, scandir): use struct dirent.d_namlen diff --git a/newlib/libc/unix/getpwent.c b/newlib/libc/unix/getpwent.c index 90ce30eaf..5390c682f 100644 --- a/newlib/libc/unix/getpwent.c +++ b/newlib/libc/unix/getpwent.c @@ -12,7 +12,6 @@ static FILE *passwd_fp; static char logname[8]; static char password[1024]; -static char comment[1024]; static char gecos[1024]; static char dir[1024]; static char shell[1024]; @@ -33,11 +32,11 @@ getpwnam (name) { sscanf (buf, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%s\n", logname, password, &pw_passwd.pw_uid, - &pw_passwd.pw_gid, comment, gecos, + &pw_passwd.pw_gid, gecos, dir, shell); pw_passwd.pw_name = logname; pw_passwd.pw_passwd = password; - pw_passwd.pw_comment = comment; + pw_passwd.pw_comment = ""; pw_passwd.pw_gecos = gecos; pw_passwd.pw_dir = dir; pw_passwd.pw_shell = shell; @@ -67,11 +66,11 @@ getpwuid (uid_t uid) { sscanf (buf, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%s\n", logname, password, &pw_passwd.pw_uid, - &pw_passwd.pw_gid, comment, gecos, + &pw_passwd.pw_gid, gecos, dir, shell); pw_passwd.pw_name = logname; pw_passwd.pw_passwd = password; - pw_passwd.pw_comment = comment; + pw_passwd.pw_comment = ""; pw_passwd.pw_gecos = gecos; pw_passwd.pw_dir = dir; pw_passwd.pw_shell = shell; @@ -99,11 +98,11 @@ getpwent () sscanf (buf, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%s\n", logname, password, &pw_passwd.pw_uid, - &pw_passwd.pw_gid, comment, gecos, + &pw_passwd.pw_gid, gecos, dir, shell); pw_passwd.pw_name = logname; pw_passwd.pw_passwd = password; - pw_passwd.pw_comment = comment; + pw_passwd.pw_comment = ""; pw_passwd.pw_gecos = gecos; pw_passwd.pw_dir = dir; pw_passwd.pw_shell = shell; |