Article View: gnu.utils.bug
Article #741finger-1.35: ignored `&' in the gecos field
From: Hiroto Kagotani
Date: Sun, 06 Sep 1992 11:54
Date: Sun, 06 Sep 1992 11:54
35 lines
1521 bytes
1521 bytes
version: finger Version 1.35
utmp_to_packets() function extracts fullnames of users from passwd
gecos fields. But it ignores `&' letter, while pw_real_name() function
in util.c doesn't. The following fix makes utmp_to_packets() to use
the pw_real_name() as a subroutine. The fix works fine in my site.
--
Hiroto Kagotani <kagotani@cs.titech.ac.jp>
--- lib/os.c.orig Sat Aug 29 06:04:23 1992
+++ lib/os.c Sun Sep 6 20:37:27 1992
@@ -241,7 +241,7 @@
uid = -1;
if (passwd_entry && passwd_entry->pw_gecos)
{
- register char *t = passwd_entry->pw_gecos;
+ char *pw_real_name ();
register int j;
char device_name[50];
struct stat finfo;
@@ -335,13 +335,7 @@
#endif /* _AIX */
}
- for (j = 0; t[j] && t[j] != ';' && t[j] != ','; j++);
- t[j] = '\0';
-
- if (*t)
- strcpy (result[i]->real_name, t);
- else
- strcpy (result[i]->real_name, "");
+ strcpy (result[i]->real_name, pw_real_name (passwd_entry));
}
else
{
Technical Details
Message-ID:
<Bu5nrC.Gnx@cs.titech.ac.jp>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cs.titech.ac.jp!kagotaniShow Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cs.titech.ac.jp!kagotani From: kagotani@cs.titech.ac.jp (Hiroto Kagotani) Subject: finger-1.35: ignored `&' in the gecos field Message-ID: <Bu5nrC.Gnx@cs.titech.ac.jp> Sender: gnulists@ai.mit.edu Organization: Department of Computer Science, Tokyo Institute of Technology Distribution: gnu Date: Sun, 6 Sep 1992 11:54:48 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 36