summaryrefslogtreecommitdiff
path: root/uidswap.c
diff options
context:
space:
mode:
Diffstat (limited to 'uidswap.c')
-rw-r--r--uidswap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/uidswap.c b/uidswap.c
index c339283af..0702e1d9e 100644
--- a/uidswap.c
+++ b/uidswap.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: uidswap.c,v 1.37 2015/01/16 06:40:12 deraadt Exp $ */ 1/* $OpenBSD: uidswap.c,v 1.39 2015/06/24 01:49:19 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -86,7 +86,7 @@ temporarily_use_uid(struct passwd *pw)
86 if (saved_egroupslen < 0) 86 if (saved_egroupslen < 0)
87 fatal("getgroups: %.100s", strerror(errno)); 87 fatal("getgroups: %.100s", strerror(errno));
88 if (saved_egroupslen > 0) { 88 if (saved_egroupslen > 0) {
89 saved_egroups = xrealloc(saved_egroups, 89 saved_egroups = xreallocarray(saved_egroups,
90 saved_egroupslen, sizeof(gid_t)); 90 saved_egroupslen, sizeof(gid_t));
91 if (getgroups(saved_egroupslen, saved_egroups) < 0) 91 if (getgroups(saved_egroupslen, saved_egroups) < 0)
92 fatal("getgroups: %.100s", strerror(errno)); 92 fatal("getgroups: %.100s", strerror(errno));
@@ -104,7 +104,7 @@ temporarily_use_uid(struct passwd *pw)
104 if (user_groupslen < 0) 104 if (user_groupslen < 0)
105 fatal("getgroups: %.100s", strerror(errno)); 105 fatal("getgroups: %.100s", strerror(errno));
106 if (user_groupslen > 0) { 106 if (user_groupslen > 0) {
107 user_groups = xrealloc(user_groups, 107 user_groups = xreallocarray(user_groups,
108 user_groupslen, sizeof(gid_t)); 108 user_groupslen, sizeof(gid_t));
109 if (getgroups(user_groupslen, user_groups) < 0) 109 if (getgroups(user_groupslen, user_groups) < 0)
110 fatal("getgroups: %.100s", strerror(errno)); 110 fatal("getgroups: %.100s", strerror(errno));