summaryrefslogtreecommitdiffstats
path: root/bin/csh
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2010-01-13 17:49:35 +0000
committered <ed@FreeBSD.org>2010-01-13 17:49:35 +0000
commit521728584fe312e1b5563353930a4959421f4e4e (patch)
tree3fabc055d9342984fd5f25f778a5362bda33d5c7 /bin/csh
parented79cccfabe6b9ba70af232bc2fb874b3062e965 (diff)
downloadFreeBSD-src-521728584fe312e1b5563353930a4959421f4e4e.zip
FreeBSD-src-521728584fe312e1b5563353930a4959421f4e4e.tar.gz
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
Diffstat (limited to 'bin/csh')
-rw-r--r--bin/csh/config.h10
-rw-r--r--bin/csh/config_p.h1
2 files changed, 6 insertions, 5 deletions
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 <utmpx.h> header file. */
-/* #undef HAVE_UTMPX_H */
+#define HAVE_UTMPX_H 1
/* Define to 1 if you have the <utmp.h> header file. */
-#define HAVE_UTMP_H 1
+/* #undef HAVE_UTMP_H */
/* Define to 1 if you have the <wchar.h> 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__)
OpenPOWER on IntegriCloud