$NetBSD: patch-ao,v 1.6 2000/01/28 13:23:31 jdolecek Exp $

The login_cap fix committed to KDE2 source tree (jdolecek 19990128)

--- kdm/kgreeter.cpp.orig	Mon Aug 16 13:36:34 1999
+++ kdm/kgreeter.cpp	Sun Jan 23 01:23:53 2000
@@ -65,7 +65,7 @@
 #include <shadow.h>
 #endif
 
-#ifdef HAVE_LOGIN_CAP_H
+#if defined(HAVE_LOGIN_CAP_H) && !defined(__NetBSD__)
 #include <login_cap.h>		/* BSDI-like login classes */
 #endif
 
@@ -521,7 +521,7 @@
      memset(swd->sp_pwdp, 0, strlen(swd->sp_pwdp));
 #endif
 
-#ifdef HAVE_LOGIN_CAP_H
+#if defined(HAVE_LOGIN_CAP_H) && !defined(__NetBSD__)
      lc = login_getpwclass(pwd);
 #endif
 
@@ -531,7 +531,7 @@
 	 restrict_time())
        rval = true;
 
-#ifdef HAVE_LOGIN_CAP_H
+#if defined(HAVE_LOGIN_CAP_H) && !defined(__NetBSD__)
      login_close(lc);
      lc = NULL;
 #endif
@@ -539,7 +539,7 @@
      return rval;
 }
 
-#ifdef HAVE_LOGIN_CAP_H
+#if defined(HAVE_LOGIN_CAP_H) && !defined(__NetBSD__)
 bool
 KGreeter::restrict_time()
 {
@@ -581,7 +581,7 @@
 #define _PATH_NOLOGIN "/etc/nologin"
 #endif
 
-#ifdef HAVE_LOGIN_CAP_H
+#if defined(HAVE_LOGIN_CAP_H) && !defined(__NetBSD__)
      /* Do we ignore a nologin file? */
      if (login_getcapbool(lc, "ignorenologin", 0))
        return false;
@@ -597,7 +597,7 @@
 
      QFile f;
 
-#ifdef HAVE_LOGIN_CAP_H
+#if defined(HAVE_LOGIN_CAP_H) && !defined(__NetBSD__)
      if (*file) {
        f.setName(file);
        f.open(IO_ReadOnly);
@@ -632,7 +632,7 @@
      // don't deny root to log in
      if (!pwd->pw_uid) return false;
 
-#ifdef HAVE_LOGIN_CAP_H
+#if defined(HAVE_LOGIN_CAP_H) && !defined(__NetBSD__)
      bool quietlog = login_getcapbool(lc, "hushlogin", 0);
      time_t warntime = login_getcaptime(lc, "warnexpire",
 				 DEFAULT_WARN, DEFAULT_WARN);
@@ -694,7 +694,7 @@
 }
 #endif
 
-#ifdef HAVE_LOGIN_CAP_H
+#if defined(HAVE_LOGIN_CAP_H) && !defined(__NetBSD__)
 bool
 KGreeter::restrict_nohome(){
      // don't deny root to log in
