summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/quota/Makefile1
-rw-r--r--usr.bin/quota/quota.c17
2 files changed, 0 insertions, 18 deletions
diff --git a/usr.bin/quota/Makefile b/usr.bin/quota/Makefile
index 4d41fae73152..666a3baeaa3a 100644
--- a/usr.bin/quota/Makefile
+++ b/usr.bin/quota/Makefile
@@ -3,7 +3,6 @@
PROG= quota
BINOWN= root
-BINMODE=4555
DPADD= ${LIBRPCSVC}
LDADD= -lrpcsvc
diff --git a/usr.bin/quota/quota.c b/usr.bin/quota/quota.c
index 6ce25bf307dc..d30184f91fb1 100644
--- a/usr.bin/quota/quota.c
+++ b/usr.bin/quota/quota.c
@@ -205,10 +205,6 @@ showuid(u_long uid)
else
name = pwd->pw_name;
myuid = getuid();
- if (uid != myuid && myuid != 0) {
- printf("quota: %s (uid %lu): permission denied\n", name, uid);
- return;
- }
showquotas(USRQUOTA, uid, name);
}
@@ -226,10 +222,6 @@ showusrname(char *name)
return;
}
myuid = getuid();
- if (pwd->pw_uid != myuid && myuid != 0) {
- warnx("%s (uid %u): permission denied", name, pwd->pw_uid);
- return;
- }
showquotas(USRQUOTA, pwd->pw_uid, name);
}
@@ -259,10 +251,6 @@ showgid(u_long gid)
for (i = 0; i < ngroups; i++)
if (gid == gidset[i])
break;
- if (i >= ngroups && getuid() != 0) {
- warnx("%s (gid %lu): permission denied", name, gid);
- return;
- }
}
showquotas(GRPQUOTA, gid, name);
}
@@ -292,11 +280,6 @@ showgrpname(char *name)
for (i = 0; i < ngroups; i++)
if (grp->gr_gid == gidset[i])
break;
- if (i >= ngroups && getuid() != 0) {
- warnx("%s (gid %u): permission denied", name,
- grp->gr_gid);
- return;
- }
}
showquotas(GRPQUOTA, grp->gr_gid, name);
}