Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jan 2010 17:49:35 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r202190 - head/bin/csh
Message-ID:  <201001131749.o0DHnZ6O077826@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Wed Jan 13 17:49:35 2010
New Revision: 202190
URL: http://svn.freebsd.org/changeset/base/202190

Log:
  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

Modified:
  head/bin/csh/config.h
  head/bin/csh/config_p.h

Modified: head/bin/csh/config.h
==============================================================================
--- head/bin/csh/config.h	Wed Jan 13 17:45:39 2010	(r202189)
+++ head/bin/csh/config.h	Wed Jan 13 17:49:35 2010	(r202190)
@@ -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

Modified: head/bin/csh/config_p.h
==============================================================================
--- head/bin/csh/config_p.h	Wed Jan 13 17:45:39 2010	(r202189)
+++ head/bin/csh/config_p.h	Wed Jan 13 17:49:35 2010	(r202190)
@@ -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__)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001131749.o0DHnZ6O077826>