diff options
author | 2015-11-15 23:13:20 +0000 | |
---|---|---|
committer | 2015-11-15 23:13:20 +0000 | |
commit | beaa942c3b3adbdc290a5ddcd80cbecfeedae4e3 (patch) | |
tree | 1008cfe627382e2c2edfd607099e637579e0a5f0 | |
parent | Make key_code unsigned long long not uint64_t which is more portable for (diff) | |
download | wireguard-openbsd-beaa942c3b3adbdc290a5ddcd80cbecfeedae4e3.tar.xz wireguard-openbsd-beaa942c3b3adbdc290a5ddcd80cbecfeedae4e3.zip |
Really silly to chmod "st_mode & 07777" when making a copy of the
group file, like entirely missing the point.
ok jca
-rw-r--r-- | usr.sbin/user/user.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/user/user.c b/usr.sbin/user/user.c index 45003754665..b27f0e2c231 100644 --- a/usr.sbin/user/user.c +++ b/usr.sbin/user/user.c @@ -1,4 +1,4 @@ -/* $OpenBSD: user.c,v 1.103 2015/04/24 08:08:29 dlg Exp $ */ +/* $OpenBSD: user.c,v 1.104 2015/11/15 23:13:20 deraadt Exp $ */ /* $NetBSD: user.c,v 1.69 2003/04/14 17:40:07 agc Exp $ */ /* @@ -372,7 +372,7 @@ creategid(char *group, gid_t gid, const char *name) (void) unlink(f); return 0; } - (void) chmod(_PATH_GROUP, st.st_mode & 07777); + (void) chmod(_PATH_GROUP, st.st_mode & 0777); syslog(LOG_INFO, "new group added: name=%s, gid=%u", group, gid); return 1; } @@ -467,7 +467,7 @@ modify_gid(char *group, char *newent) (void) unlink(f); return 0; } - (void) chmod(_PATH_GROUP, st.st_mode & 07777); + (void) chmod(_PATH_GROUP, st.st_mode & 0777); if (newent == NULL) { syslog(LOG_INFO, "group deleted: name=%s", group); } else { @@ -594,7 +594,7 @@ append_group(char *user, int ngroups, const char **groups) (void) unlink(f); return 0; } - (void) chmod(_PATH_GROUP, st.st_mode & 07777); + (void) chmod(_PATH_GROUP, st.st_mode & 0777); return 1; } @@ -1327,7 +1327,7 @@ rm_user_from_groups(char *login_name) return 0; } } - (void) fchmod(fileno(to), st.st_mode & 07777); + (void) fchmod(fileno(to), st.st_mode & 0777); (void) fclose(from); if (fclose(to) == EOF) { warn("can't remove gid for `%s': short write to `%s'", |