diff options
author | 1997-10-07 23:39:34 +0000 | |
---|---|---|
committer | 1997-10-07 23:39:34 +0000 | |
commit | 95c20346df56b8fd64497c38f773498fe4ae7d5d (patch) | |
tree | bae1b8f04c096e82ed398d34effd68f913ebedd0 | |
parent | Get right version fo libskey. Thanks Hans. There are more syncs to (diff) | |
download | wireguard-openbsd-95c20346df56b8fd64497c38f773498fe4ae7d5d.tar.xz wireguard-openbsd-95c20346df56b8fd64497c38f773498fe4ae7d5d.zip |
Don't use cached name value for uid/gid if last lookup was by id (and not name).
Fix also sent to rdist-bugs@usc.edu
-rw-r--r-- | usr.bin/rdist/common.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/rdist/common.c b/usr.bin/rdist/common.c index b67d6521c2b..ca9996671c4 100644 --- a/usr.bin/rdist/common.c +++ b/usr.bin/rdist/common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: common.c,v 1.4 1997/04/27 13:01:28 downsj Exp $ */ +/* $OpenBSD: common.c,v 1.5 1997/10/07 23:39:34 millert Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. @@ -35,7 +35,7 @@ #ifndef lint static char RCSid[] = -"$OpenBSD: common.c,v 1.4 1997/04/27 13:01:28 downsj Exp $"; +"$OpenBSD: common.c,v 1.5 1997/10/07 23:39:34 millert Exp $"; static char sccsid[] = "@(#)common.c"; @@ -542,7 +542,7 @@ extern char *getusername(uid, file, opts) /* * Try to avoid getpwuid() call. */ - if (lastuid == uid && buf[0]) + if (lastuid == uid && buf[0] && buf[0] != ':') return(buf); lastuid = uid; @@ -581,7 +581,7 @@ extern char *getgroupname(gid, file, opts) /* * Try to avoid getgrgid() call. */ - if (lastgid == gid && buf[0]) + if (lastgid == gid && buf[0] && buf[0] != ':') return(buf); lastgid = gid; |