AIX fixes
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 8 Jan 1995 05:29:12 +0000 (21:29 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 8 Jan 1995 05:29:12 +0000 (21:29 -0800)
SCCS-vsn: usr.sbin/sendmail/src/conf.c 8.126

usr/src/usr.sbin/sendmail/src/conf.c

index c653ed5..a05e462 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)conf.c     8.125 (Berkeley) %G%";
+static char sccsid[] = "@(#)conf.c     8.126 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -986,6 +986,10 @@ struct     nlist Nl[] =
 # if defined(__alpha) || defined(IRIX)
 #  define FSHIFT       10
 # endif
 # if defined(__alpha) || defined(IRIX)
 #  define FSHIFT       10
 # endif
+
+# if defined(_AIX3)
+#  define FSHIFT       16
+# endif
 #endif
 
 #ifndef FSHIFT
 #endif
 
 #ifndef FSHIFT
@@ -1022,7 +1026,11 @@ getla()
                        return (-1);
                }
                (void) fcntl(kmem, F_SETFD, 1);
                        return (-1);
                }
                (void) fcntl(kmem, F_SETFD, 1);
+#ifdef _AIX3
+               if (knlist(Nl, 1, sizeof Nl[0]) < 0)
+#else
                if (nlist(_PATH_UNIX, Nl) < 0)
                if (nlist(_PATH_UNIX, Nl) < 0)
+#endif
                {
                        if (tTd(3, 1))
                                printf("getla: nlist(%s): %s\n", _PATH_UNIX,
                {
                        if (tTd(3, 1))
                                printf("getla: nlist(%s): %s\n", _PATH_UNIX,
@@ -1042,7 +1050,7 @@ getla()
        }
        if (tTd(3, 20))
                printf("getla: symbol address = %#x\n", Nl[X_AVENRUN].n_value);
        }
        if (tTd(3, 20))
                printf("getla: symbol address = %#x\n", Nl[X_AVENRUN].n_value);
-       if (lseek(kmem, (off_t) Nl[X_AVENRUN].n_value, 0) == -1 ||
+       if (lseek(kmem, (off_t) Nl[X_AVENRUN].n_value, SEEK_SET) == -1 ||
            read(kmem, (char *) avenrun, sizeof(avenrun)) < sizeof(avenrun))
        {
                /* thank you Ian */
            read(kmem, (char *) avenrun, sizeof(avenrun)) < sizeof(avenrun))
        {
                /* thank you Ian */
@@ -1862,17 +1870,25 @@ vsprintf(s, fmt, ap)
 
 char   *DefaultUserShells[] =
 {
 
 char   *DefaultUserShells[] =
 {
-       "/bin/sh",
+       "/bin/sh",              /* standard shell */
        "/usr/bin/sh",
        "/usr/bin/sh",
-       "/bin/csh",
+       "/bin/csh",             /* C shell */
        "/usr/bin/csh",
 #ifdef __hpux
        "/usr/bin/csh",
 #ifdef __hpux
-       "/bin/rsh",
-       "/bin/ksh",
-       "/bin/rksh",
+       "/bin/rsh",             /* restricted Bourne shell */
+       "/bin/ksh",             /* Korn shell */
+       "/bin/rksh",            /* restricted Korn shell */
        "/bin/pam",
        "/bin/pam",
-       "/usr/bin/keysh",
+       "/usr/bin/keysh",       /* key shell (extended Korn shell) */
        "/bin/posix/sh",
        "/bin/posix/sh",
+#endif
+#ifdef _AIX3
+       "/bin/ksh",             /* Korn shell */
+       "/usr/bin/ksh",
+       "/bin/tsh",             /* trusted shell */
+       "/usr/bin/tsh",
+       "/bin/bsh",             /* Bourne shell */
+       "/usr/bin/bsh",
 #endif
        NULL
 };
 #endif
        NULL
 };