diff options
author | 1996-10-28 04:08:21 +0000 | |
---|---|---|
committer | 1996-10-28 04:08:21 +0000 | |
commit | 50422ff398f512f9c05135b662b01b9079ba743c (patch) | |
tree | 33a36b6df328fc87fcfad26cdf5663824d7544af | |
parent | Most 040 models have scsi regs at base + 0x10000, not base + 0xf000 (diff) | |
download | wireguard-openbsd-50422ff398f512f9c05135b662b01b9079ba743c.tar.xz wireguard-openbsd-50422ff398f512f9c05135b662b01b9079ba743c.zip |
Be more paranoid about passing around user/group name from argv.
-rw-r--r-- | usr.bin/quota/quota.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/quota/quota.c b/usr.bin/quota/quota.c index 008bf2364de..666c78454e7 100644 --- a/usr.bin/quota/quota.c +++ b/usr.bin/quota/quota.c @@ -1,4 +1,4 @@ -/* $OpenBSD: quota.c,v 1.7 1996/08/07 14:08:52 etheisen Exp $ */ +/* $OpenBSD: quota.c,v 1.8 1996/10/28 04:08:21 millert Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -44,7 +44,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)quota.c 8.1 (Berkeley) 6/6/93";*/ -static char rcsid[] = "$OpenBSD: quota.c,v 1.7 1996/08/07 14:08:52 etheisen Exp $"; +static char rcsid[] = "$OpenBSD: quota.c,v 1.8 1996/10/28 04:08:21 millert Exp $"; #endif /* not lint */ /* @@ -207,10 +207,10 @@ showusrname(name) myuid = getuid(); if (pwd->pw_uid != myuid && myuid != 0) { fprintf(stderr, "quota: %s (uid %d): permission denied\n", - name, pwd->pw_uid); + pwd->pw_name, pwd->pw_uid); return; } - showquotas(USRQUOTA, pwd->pw_uid, name); + showquotas(USRQUOTA, pwd->pw_uid, pwd->pw_name); } /* @@ -277,11 +277,11 @@ showgrpname(name) if (i >= ngroups && getuid() != 0) { fprintf(stderr, "quota: %s (gid %d): permission denied\n", - name, grp->gr_gid); + grp->gr_name, grp->gr_gid); return; } } - showquotas(GRPQUOTA, grp->gr_gid, name); + showquotas(GRPQUOTA, grp->gr_gid, grp->gr_name); } showquotas(type, id, name) |