]> andersk Git - openssh.git/commitdiff
- Applied another NetBSD portability patch from David Rankin
authordamien <damien>
Tue, 28 Dec 1999 15:32:22 +0000 (15:32 +0000)
committerdamien <damien>
Tue, 28 Dec 1999 15:32:22 +0000 (15:32 +0000)
   <drankin@bohemians.lexington.ky.us>
 - Fix --with-default-path option.

ChangeLog
acconfig.h
configure.in
login.c

index bb27a81f73468c8442382f0a4cb210b1f065f314..a61a18cd6456b105f93dcdf0d7f6f84e7c256be6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+19991229
+ - Applied another NetBSD portability patch from David Rankin 
+   <drankin@bohemians.lexington.ky.us>
+ - Fix --with-default-path option.
+
 19991228
  - Replacement for getpagesize() for systems which lack it
  - NetBSD login.c compile fix from David Rankin 
index 23376f8d421f435ef0b7448f0c201962eac7be1b..dc0c281856582d9ad7d1c3b1d12520c327c875b7 100644 (file)
@@ -48,6 +48,9 @@
 /* Define is utmp.h has a ut_tv field */
 #undef HAVE_TV_IN_UTMP
 
+/* Define is utmp.h has a ut_id field */
+#undef HAVE_ID_IN_UTMP
+
 /* Define if you want to use utmpx */
 #undef USE_UTMPX
 
index a232a746b68e45a35e9740d301f1272394d9bcae..6d03beca741d3182d5e344952728e12b96f33eab 100644 (file)
@@ -302,6 +302,11 @@ AC_EGREP_HEADER(ut_tv, utmp.h,
        [AC_DEFINE(HAVE_TV_IN_UTMP) AC_MSG_RESULT(yes); ], 
        [AC_MSG_RESULT(no)]
 )
+AC_MSG_CHECKING([whether utmp.h has ut_id field])
+AC_EGREP_HEADER(ut_id, utmp.h, 
+       [AC_DEFINE(HAVE_ID_IN_UTMP) AC_MSG_RESULT(yes); ], 
+       [AC_MSG_RESULT(no)]
+)
 
 dnl Look for lastlog location
 AC_ARG_WITH(lastlog,
@@ -440,7 +445,7 @@ AC_ARG_WITH(path,
        [  --with-default-path=PATH Specify default \$PATH environment for server],
        [
                if test "x$withval" != "xno" ; then     
-                       AC_DEFINE_UNQUOTED(USER_PATH, $withval")
+                       AC_DEFINE_UNQUOTED(USER_PATH, "$withval")
                fi
        ]
 )
diff --git a/login.c b/login.c
index d713155d74a085c89587b9fef265ca2f35e1dc19..6f2c26937c12e34750107d3b94bc6ddac8399f25 100644 (file)
--- a/login.c
+++ b/login.c
@@ -141,7 +141,9 @@ record_login(int pid, const char *ttyname, const char *user, uid_t uid,
        /* Construct an utmp/wtmp entry. */
        memset(&u, 0, sizeof(u));
        strncpy(u.ut_line, ttyname + 5, sizeof(u.ut_line));
+#if defined(HAVE_ID_IN_UTMP)
        strncpy(u.ut_id, ttyname + 8, sizeof(u.ut_id));
+#endif /* defined(HAVE_ID_IN_UTMP) */ 
        strncpy(u.ut_name, user, sizeof(u.ut_name));
 #if defined(HAVE_TV_IN_UTMP)
        (void)gettimeofday(&u.ut_tv, NULL);
This page took 0.833349 seconds and 5 git commands to generate.