summaryrefslogtreecommitdiff
path: root/security/ssh6/patches/patch-la
diff options
context:
space:
mode:
Diffstat (limited to 'security/ssh6/patches/patch-la')
-rw-r--r--security/ssh6/patches/patch-la28
1 files changed, 28 insertions, 0 deletions
diff --git a/security/ssh6/patches/patch-la b/security/ssh6/patches/patch-la
new file mode 100644
index 00000000000..feaa3c05026
--- /dev/null
+++ b/security/ssh6/patches/patch-la
@@ -0,0 +1,28 @@
+$NetBSD: patch-la,v 1.1 2000/03/20 02:25:44 itojun Exp $
+
+--- userfile.c.orig Mon Mar 6 15:18:17 2000
++++ userfile.c Mon Mar 6 15:18:25 2000
+@@ -180,7 +180,7 @@
+ #endif
+
+
+-#if defined (__FreeBSD__) && defined(HAVE_LOGIN_CAP_H)
++#if (defined (__FreeBSD__) || defined(__NetBSD__)) && defined(HAVE_LOGIN_CAP_H)
+ #include <login_cap.h>
+ #endif
+
+@@ -644,9 +644,13 @@
+ /* Child. We will start serving request. */
+ if (uid != geteuid() || uid != getuid())
+ {
+-#if defined (__FreeBSD__) && defined(HAVE_LOGIN_CAP_H)
++#if (defined (__FreeBSD__) || defined(__NetBSD__)) && defined(HAVE_LOGIN_CAP_H)
+ struct passwd * pw = getpwuid(uid);
++#if defined(__NetBSD__)
++ login_cap_t * lc = login_getpwclass(pw);
++#else
+ login_cap_t * lc = login_getuserclass(pw);
++#endif
+ if (setusercontext(lc, pw, uid,
+ LOGIN_SETALL & ~(LOGIN_SETLOGIN | LOGIN_SETPATH |
+ LOGIN_SETENV)) < 0)