At least in 1.4Q, there was a login_cap.h, but it didn't define LOGIN_SETENV.

Make sure that is defined before using it!
This commit is contained in:
hubertf 2000-10-19 02:02:57 +00:00
parent 075fb7ee1f
commit 2a82d50a62
2 changed files with 6 additions and 6 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: patch-sum,v 1.21 2000/04/18 19:02:20 thorpej Exp $
# $NetBSD: patch-sum,v 1.22 2000/10/19 02:02:57 hubertf Exp $
MD5 (patch-aa) = 39a4c82d2b89aae61df69a50f7aaa813
MD5 (patch-ab) = 14aab959d372b529a72ef5770aae9b27
@ -37,4 +37,4 @@ MD5 (patch-bk) = e1d08202e611aa0ca82b6330af862c77
MD5 (patch-bl) = 82a4d98c20e38fa515e94df98d99104b
MD5 (patch-bn) = b952c31778b8d95772234c21c1ede892
MD5 (patch-br) = 73c8bfe4215d67e9803b338cc5169b1f
MD5 (patch-la) = 3584ccc61783fe0758d82b5ab82a658e
MD5 (patch-la) = 991af4529826b25ae727615ce835f51d

View file

@ -1,7 +1,7 @@
$NetBSD: patch-la,v 1.1 2000/03/06 14:34:18 mjl Exp $
$NetBSD: patch-la,v 1.2 2000/10/19 02:02:58 hubertf Exp $
--- userfile.c.orig Mon Mar 6 15:18:17 2000
+++ userfile.c Mon Mar 6 15:18:25 2000
--- userfile.c.orig Wed May 12 13:19:29 1999
+++ userfile.c
@@ -180,7 +180,7 @@
#endif
@ -16,7 +16,7 @@ $NetBSD: patch-la,v 1.1 2000/03/06 14:34:18 mjl Exp $
if (uid != geteuid() || uid != getuid())
{
-#if defined (__FreeBSD__) && defined(HAVE_LOGIN_CAP_H)
+#if (defined (__FreeBSD__) || defined(__NetBSD__)) && defined(HAVE_LOGIN_CAP_H)
+#if (defined (__FreeBSD__) || defined(__NetBSD__)) && defined(HAVE_LOGIN_CAP_H) && defined(LOGIN_SETENV)
struct passwd * pw = getpwuid(uid);
+#if defined(__NetBSD__)
+ login_cap_t * lc = login_getpwclass(pw);