From 521728584fe312e1b5563353930a4959421f4e4e Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 13 Jan 2010 17:49:35 +0000 Subject: Let csh(1) use utmpx instead of utmp. csh allows you to monitor the utmp(x) file to monitor certain user logins. Unfortunately it needs to directly stat() this file. I don't want to break this module , but eventually it shouldn't do that. The idea of the getutxent(3) API is to hide file access. Approved by: mp --- bin/csh/config.h | 10 +++++----- bin/csh/config_p.h | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'bin/csh') diff --git a/bin/csh/config.h b/bin/csh/config.h index 0971ffa..60b229d 100644 --- a/bin/csh/config.h +++ b/bin/csh/config.h @@ -54,7 +54,7 @@ #define HAVE_GETPWENT 1 /* Define to 1 if you have the `getutent' function. */ -/* #undef HAVE_GETUTENT */ +#define HAVE_GETUTENT 1 /* Define if you have the iconv() function. */ /* #undef HAVE_ICONV */ @@ -130,10 +130,10 @@ #define HAVE_STRUCT_UTMP_UT_HOST 1 /* Define to 1 if `ut_tv' is member of `struct utmp'. */ -/* #undef HAVE_STRUCT_UTMP_UT_TV */ +#define HAVE_STRUCT_UTMP_UT_TV 1 /* Define to 1 if `ut_user' is member of `struct utmp'. */ -/* #undef HAVE_STRUCT_UTMP_UT_USER */ +#define HAVE_STRUCT_UTMP_UT_USER 1 /* Define to 1 if `ut_xtime' is member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_XTIME */ @@ -159,10 +159,10 @@ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the header file. */ -/* #undef HAVE_UTMPX_H */ +#define HAVE_UTMPX_H 1 /* Define to 1 if you have the header file. */ -#define HAVE_UTMP_H 1 +/* #undef HAVE_UTMP_H */ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 diff --git a/bin/csh/config_p.h b/bin/csh/config_p.h index 8c29053..72e3042 100644 --- a/bin/csh/config_p.h +++ b/bin/csh/config_p.h @@ -85,6 +85,7 @@ /* Use LC_MESSAGES locale category to open the message catalog */ #define MCLoadBySet NL_CAT_LOCALE #define BUFSIZE 8192 +#define UTMPX_FILE "/var/run/utx.active" #endif #if defined(__bsdi__) -- cgit v1.1