From 00a2f168e725bb10753885e227e22a8a279c71c6 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 29 Aug 2000 18:09:15 +0000 Subject: 2000-08-29 Werner Almesberger * libc/unix/getpwent.c (getpwnam, getpwuid, getpwent): removed (broken) support for non-existent /etc/passwd field "comment". --- newlib/libc/unix/getpwent.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'newlib/libc/unix') 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; -- cgit v1.2.3