diff options
author | tv <tv> | 2005-11-04 14:47:17 +0000 |
---|---|---|
committer | tv <tv> | 2005-11-04 14:47:17 +0000 |
commit | b403bbba8f3f5f61618cca64bb7d0c6d49b4e8a6 (patch) | |
tree | 35e6d90a24cc3372c1157cedfcae914e3ee841f5 /security/openssh | |
parent | b344aa7a85bf68e597253b1de4ae94de5779bb4b (diff) | |
download | pkgsrc-b403bbba8f3f5f61618cca64bb7d0c6d49b4e8a6.tar.gz |
Add more Interix fixes: Need prototype for strtoll(), and two more
instances of setgroups() that are not usable on that platform.
Diffstat (limited to 'security/openssh')
-rw-r--r-- | security/openssh/patches/patch-ai | 15 | ||||
-rw-r--r-- | security/openssh/patches/patch-ar | 35 |
2 files changed, 44 insertions, 6 deletions
diff --git a/security/openssh/patches/patch-ai b/security/openssh/patches/patch-ai new file mode 100644 index 00000000000..f14f4625ffa --- /dev/null +++ b/security/openssh/patches/patch-ai @@ -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 --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 |