Remove apollo support
[oweals/cde.git] / cde / programs / dtlogin / sysauth.c
index caf6679f3f9075f739d10d675b3423cfa3637a03..9bad7ec83cbca5a8469e95045d73d9575cdc6d5d 100644 (file)
@@ -64,8 +64,6 @@
  **     Platform identification:
  **
  **    __hpux      HP-UX OS only
- **    __apollo    Domain OS only
- **    __hp_osf    HP OSF/1 OS only
  **     sun         SUN OS only
  **     SVR4        SUN OS et al.
  **     _AIX        AIX only
 /*
  * Define as generic those without platform specific code.
  */
-#if !(defined(__hpux)   || \
-      defined(__apollo) || \
-      defined(_AIX)     || \
-      defined(sun))
+#if !(defined(__hpux) || defined(_AIX) || defined(sun))
 #define generic
 #endif
 
-#ifdef __osf__
-#include <sys/sysinfo.h>
-#endif
-
-#if defined(linux)
+#if defined(__linux__)
 #    include <shadow.h>
 #endif
 
@@ -712,7 +703,7 @@ CheckPassword( char *name, char     *passwd, struct passwd **ppwd )
 
 #ifdef __PASSWD_ETC
     /*
-     *   If regular passwd check fails, try old-style Apollo SR
+     *   If regular passwd check fails, try old-style SR
      */
 
     if (rgy_$is_des(passwd, strlen(passwd), p->pw_passwd) == TRUE)
@@ -1952,7 +1943,7 @@ Authenticate( struct display *d, char *name, char *passwd, char **msg )
 
     p = getpwnam(name);
     
-#if defined(linux)
+#if defined(__linux__)
     /*
      * Use the Linux Shadow Password system to get the crypt()ed password
      */
@@ -1964,6 +1955,13 @@ Authenticate( struct display *d, char *name, char *passwd, char **msg )
     }
 #endif
 
+#if defined(__OpenBSD__) && OSMAJORVERSION > 5
+    /*
+     * Use the OpenBSD getpwnam_shadow function to get the crypt()ed password
+     */
+     p = getpwnam_shadow(name);
+#endif
+
     if (!p || strlen(name) == 0 ||
         strcmp (crypt (passwd, p->pw_passwd), p->pw_passwd)) {