pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/openssh/patches Add more Interix fixes: Need...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a31077e4b653
branches:  trunk
changeset: 502408:a31077e4b653
user:      tv <tv%pkgsrc.org@localhost>
date:      Fri Nov 04 14:47:17 2005 +0000

description:
Add more Interix fixes:  Need prototype for strtoll(), and two more
instances of setgroups() that are not usable on that platform.

diffstat:

 security/openssh/patches/patch-ai |  15 +++++++++++++++
 security/openssh/patches/patch-ar |  35 +++++++++++++++++++++++++++++------
 2 files changed, 44 insertions(+), 6 deletions(-)

diffs (84 lines):

diff -r 3460389633cb -r a31077e4b653 security/openssh/patches/patch-ai
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openssh/patches/patch-ai Fri Nov 04 14:47:17 2005 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-ai,v 1.9 2005/11/04 14:47:17 tv Exp $
+
+--- openbsd-compat/openbsd-compat.h.orig       2005-08-26 16:15:20.000000000 -0400
++++ openbsd-compat/openbsd-compat.h
+@@ -78,6 +78,10 @@ size_t strlcat(char *dst, const char *sr
+ int setenv(register const char *name, register const char *value, int rewrite);
+ #endif
+ 
++#ifndef HAVE_STRTOLL
++long long strtoll(const char *, char **, int);
++#endif
++
+ #ifndef HAVE_STRMODE
+ void strmode(int mode, char *p);
+ #endif
diff -r 3460389633cb -r a31077e4b653 security/openssh/patches/patch-ar
--- a/security/openssh/patches/patch-ar Fri Nov 04 14:36:23 2005 +0000
+++ b/security/openssh/patches/patch-ar Fri Nov 04 14:47:17 2005 +0000
@@ -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 @@
                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 @@
  
                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 @@
  #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



Home | Main Index | Thread Index | Old Index