diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2000-08-29 18:09:15 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2000-08-29 18:09:15 +0000 |
commit | 00a2f168e725bb10753885e227e22a8a279c71c6 (patch) | |
tree | 778ff9c3a9a43293b630adb95c3721f811345007 /newlib/libc/unix/getpwent.c | |
parent | d824bcf985a8a5fd96169135fd13a37729af4b16 (diff) | |
download | cygnal-00a2f168e725bb10753885e227e22a8a279c71c6.tar.gz cygnal-00a2f168e725bb10753885e227e22a8a279c71c6.tar.bz2 cygnal-00a2f168e725bb10753885e227e22a8a279c71c6.zip |
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".
Diffstat (limited to 'newlib/libc/unix/getpwent.c')
-rw-r--r-- | newlib/libc/unix/getpwent.c | 13 |
1 files changed, 6 insertions, 7 deletions
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; |