Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Hiroto Kagotani
Sun, 06 Sep 1992 11:54
finger-1.35: ignored `&' in the gecos field
Author: 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
{
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads