- Applied another NetBSD portability patch from David Rankin
<drankin@bohemians.lexington.ky.us> - Fix --with-default-path option.
This commit is contained in:
parent
74d0d4a3d9
commit
9550a76c37
|
@ -1,3 +1,8 @@
|
||||||
|
19991229
|
||||||
|
- Applied another NetBSD portability patch from David Rankin
|
||||||
|
<drankin@bohemians.lexington.ky.us>
|
||||||
|
- Fix --with-default-path option.
|
||||||
|
|
||||||
19991228
|
19991228
|
||||||
- Replacement for getpagesize() for systems which lack it
|
- Replacement for getpagesize() for systems which lack it
|
||||||
- NetBSD login.c compile fix from David Rankin
|
- NetBSD login.c compile fix from David Rankin
|
||||||
|
|
|
@ -48,6 +48,9 @@
|
||||||
/* Define is utmp.h has a ut_tv field */
|
/* Define is utmp.h has a ut_tv field */
|
||||||
#undef HAVE_TV_IN_UTMP
|
#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 */
|
/* Define if you want to use utmpx */
|
||||||
#undef USE_UTMPX
|
#undef USE_UTMPX
|
||||||
|
|
||||||
|
|
|
@ -302,6 +302,11 @@ AC_EGREP_HEADER(ut_tv, utmp.h,
|
||||||
[AC_DEFINE(HAVE_TV_IN_UTMP) AC_MSG_RESULT(yes); ],
|
[AC_DEFINE(HAVE_TV_IN_UTMP) AC_MSG_RESULT(yes); ],
|
||||||
[AC_MSG_RESULT(no)]
|
[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
|
dnl Look for lastlog location
|
||||||
AC_ARG_WITH(lastlog,
|
AC_ARG_WITH(lastlog,
|
||||||
|
@ -440,7 +445,7 @@ AC_ARG_WITH(path,
|
||||||
[ --with-default-path=PATH Specify default \$PATH environment for server],
|
[ --with-default-path=PATH Specify default \$PATH environment for server],
|
||||||
[
|
[
|
||||||
if test "x$withval" != "xno" ; then
|
if test "x$withval" != "xno" ; then
|
||||||
AC_DEFINE_UNQUOTED(USER_PATH, $withval")
|
AC_DEFINE_UNQUOTED(USER_PATH, "$withval")
|
||||||
fi
|
fi
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
4
login.c
4
login.c
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$Id: login.c,v 1.14 1999/12/27 23:41:12 damien Exp $");
|
RCSID("$Id: login.c,v 1.15 1999/12/28 15:32:22 damien Exp $");
|
||||||
|
|
||||||
#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
|
#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
|
||||||
# include <utmpx.h>
|
# include <utmpx.h>
|
||||||
|
@ -141,7 +141,9 @@ record_login(int pid, const char *ttyname, const char *user, uid_t uid,
|
||||||
/* Construct an utmp/wtmp entry. */
|
/* Construct an utmp/wtmp entry. */
|
||||||
memset(&u, 0, sizeof(u));
|
memset(&u, 0, sizeof(u));
|
||||||
strncpy(u.ut_line, ttyname + 5, sizeof(u.ut_line));
|
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));
|
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));
|
strncpy(u.ut_name, user, sizeof(u.ut_name));
|
||||||
#if defined(HAVE_TV_IN_UTMP)
|
#if defined(HAVE_TV_IN_UTMP)
|
||||||
(void)gettimeofday(&u.ut_tv, NULL);
|
(void)gettimeofday(&u.ut_tv, NULL);
|
||||||
|
|
Loading…
Reference in New Issue