summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/getpwent.c
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1995-06-11 19:33:05 +0000
committerrgrimes <rgrimes@FreeBSD.org>1995-06-11 19:33:05 +0000
commit1b1ee5553889e207087539ddafa5dfd4e28bd585 (patch)
treeba998dfb4fcad03e00a5cbf58e2a0ad648bab6e6 /lib/libc/gen/getpwent.c
parentb1a97daa1e06ab0de3071f979965878fd056292b (diff)
downloadFreeBSD-src-1b1ee5553889e207087539ddafa5dfd4e28bd585.zip
FreeBSD-src-1b1ee5553889e207087539ddafa5dfd4e28bd585.tar.gz
Merge RELENG_2_0_5 into HEAD
Diffstat (limited to 'lib/libc/gen/getpwent.c')
-rw-r--r--lib/libc/gen/getpwent.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c
index 22b1485..8b17ca2 100644
--- a/lib/libc/gen/getpwent.c
+++ b/lib/libc/gen/getpwent.c
@@ -496,6 +496,15 @@ static void
_pw_breakout_yp(struct passwd *pw, char *result, int master)
{
char *s;
+ static char name[UT_NAMESIZE+2], passwd[_PASSWORD_LEN], class[1024];
+ static char gecos[1024], dir[MAXPATHLEN], shell[MAXPATHLEN];
+
+ strcpy(name, pw->pw_name); pw->pw_name = (char *)&name;
+ strcpy(passwd, pw->pw_passwd); pw->pw_passwd = (char *)&passwd;
+ strcpy(class, pw->pw_class); pw->pw_class = (char *)&class;
+ strcpy(gecos, pw->pw_gecos); pw->pw_gecos = (char *)&gecos;
+ strcpy(dir, pw->pw_dir); pw->pw_dir = (char *)&dir;
+ strcpy(shell, pw->pw_shell); pw->pw_shell = (char *)&shell;
s = strsep(&result, ":"); /* name */
if(!(pw->pw_fields & _PWF_NAME) || (pw->pw_name[0] == '+')) {
OpenPOWER on IntegriCloud