summaryrefslogtreecommitdiff
path: root/security/openssh/patches/patch-ar
diff options
context:
space:
mode:
Diffstat (limited to 'security/openssh/patches/patch-ar')
-rw-r--r--security/openssh/patches/patch-ar35
1 files changed, 29 insertions, 6 deletions
diff --git a/security/openssh/patches/patch-ar b/security/openssh/patches/patch-ar
index f9edbb75d4e..33b5ed33c47 100644
--- a/security/openssh/patches/patch-ar
+++ b/security/openssh/patches/patch-ar
@@ -1,8 +1,8 @@
-$NetBSD: patch-ar,v 1.5 2005/09/21 18:07:09 reed Exp $
+$NetBSD: patch-ar,v 1.6 2005/11/04 14:47:17 tv Exp $
---- uidswap.c.orig 2005-02-22 00:57:13.000000000 -0600
+--- uidswap.c.orig 2005-02-22 01:57:13.000000000 -0500
+++ uidswap.c
-@@ -57,13 +57,13 @@
+@@ -57,13 +57,13 @@ temporarily_use_uid(struct passwd *pw)
(u_int)pw->pw_uid, (u_int)pw->pw_gid,
(u_int)saved_euid, (u_int)saved_egid);
#ifndef HAVE_CYGWIN
@@ -18,7 +18,7 @@ $NetBSD: patch-ar,v 1.5 2005/09/21 18:07:09 reed Exp $
privileged = 0;
return;
}
-@@ -87,9 +87,11 @@
+@@ -87,9 +87,11 @@ temporarily_use_uid(struct passwd *pw)
/* set and save the user's groups */
if (user_groupslen == -1) {
@@ -30,7 +30,30 @@ $NetBSD: patch-ar,v 1.5 2005/09/21 18:07:09 reed Exp $
user_groupslen = getgroups(0, NULL);
if (user_groupslen < 0)
-@@ -174,6 +176,10 @@
+@@ -104,9 +106,11 @@ temporarily_use_uid(struct passwd *pw)
+ xfree(user_groups);
+ }
+ }
++#ifndef HAVE_INTERIX
+ /* Set the effective uid to the given (unprivileged) uid. */
+ if (setgroups(user_groupslen, user_groups) < 0)
+ fatal("setgroups: %.100s", strerror(errno));
++#endif
+ #ifndef SAVED_IDS_WORK_WITH_SETEUID
+ /* Propagate the privileged gid to all of our gids. */
+ if (setgid(getegid()) < 0)
+@@ -154,8 +158,10 @@ restore_uid(void)
+ setgid(getgid());
+ #endif /* SAVED_IDS_WORK_WITH_SETEUID */
+
++#ifndef HAVE_INTERIX
+ if (setgroups(saved_egroupslen, saved_egroups) < 0)
+ fatal("setgroups: %.100s", strerror(errno));
++#endif
+ temporarily_use_uid_effective = 0;
+ }
+
+@@ -174,6 +180,10 @@ permanently_set_uid(struct passwd *pw)
debug("permanently_set_uid: %u/%u", (u_int)pw->pw_uid,
(u_int)pw->pw_gid);
@@ -41,7 +64,7 @@ $NetBSD: patch-ar,v 1.5 2005/09/21 18:07:09 reed Exp $
#if defined(HAVE_SETRESGID) && !defined(BROKEN_SETRESGID)
if (setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) < 0)
fatal("setresgid %u: %.100s", (u_int)pw->pw_gid, strerror(errno));
-@@ -222,6 +228,7 @@
+@@ -222,6 +232,7 @@ permanently_set_uid(struct passwd *pw)
(setuid(old_uid) != -1 || seteuid(old_uid) != -1))
fatal("%s: was able to restore old [e]uid", __func__);
#endif