summaryrefslogtreecommitdiffstats
path: root/usr.sbin/cron
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2015-11-11 17:02:22 +0000
committermillert <millert@openbsd.org>2015-11-11 17:02:22 +0000
commit0a2be630266b2a0fce51a0b9423cd77fdb53609d (patch)
tree56894dab3965705d9f2f4043932d247ca68b932a /usr.sbin/cron
parentbottom end of spamdb is just "stdio rpath wpath" (diff)
downloadwireguard-openbsd-0a2be630266b2a0fce51a0b9423cd77fdb53609d.tar.xz
wireguard-openbsd-0a2be630266b2a0fce51a0b9423cd77fdb53609d.zip
Fix spool dir mode check to avoid extraneous chmod() calls.
Diffstat (limited to 'usr.sbin/cron')
-rw-r--r--usr.sbin/cron/common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/cron/common.c b/usr.sbin/cron/common.c
index 0900f806bd2..a5869e87cce 100644
--- a/usr.sbin/cron/common.c
+++ b/usr.sbin/cron/common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: common.c,v 1.3 2015/11/09 15:57:39 millert Exp $ */
+/* $OpenBSD: common.c,v 1.4 2015/11/11 17:02:22 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@@ -89,7 +89,7 @@ set_cron_cwd(void)
if (grp != NULL) {
if (sb.st_gid != grp->gr_gid)
chown(CRON_SPOOL, -1, grp->gr_gid);
- if (sb.st_mode != 01730)
+ if ((sb.st_mode & ALLPERMS) != 01730)
chmod(CRON_SPOOL, 01730);
}
@@ -114,7 +114,7 @@ set_cron_cwd(void)
if (grp != NULL) {
if (sb.st_gid != grp->gr_gid)
chown(AT_SPOOL, -1, grp->gr_gid);
- if (sb.st_mode != 01770)
+ if ((sb.st_mode & ALLPERMS) != 01770)
chmod(AT_SPOOL, 01770);
}
}