summaryrefslogtreecommitdiff
path: root/sessreg.h
AgeCommit message (Collapse)Author
2014-11-14Include utmp.h if present, even if we're using utmpx interfacesAlan Coopersmith
For platforms which require type or structure definitions from utmp.h when using lastlog or utmpx/wtmpx interfaces. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-11-04If both utmp & utmpx interfaces are available, just use utmpxAlan Coopersmith
As we already do with wtmp & wtmpx, where only one of the interface sets is compiled in at a time, stop building & potentially calling both the utmp & utmpx interfaces, which could lead to confusion and corruption, especially when xdm passed -u /.../utmpx and sessreg wrote utmp format records to the file instead. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-12-16Remove dubious code.Ed Schouten
The NO_UTMP definition is set on non-FreeBSD, non-OpenBSD, BSD-based systems. When looking at the commonly used BSD-based operating systems, they either use utmpx, or I can't think of a reason why the utmp code wouldn't work. If it turns out some obscure operating system breaks because of this change, we should replace this by something more accurate, such as an Autoconf check or an #ifdef specific to that operating system. Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-12-16Place NetBSD specific #defines in the proper place.Ed Schouten
For all the other databases (utmp, wtmp, lastlog) we already do it in sessreg.h. There's no reason why we should place the utmpx specific ones in sessreg.c. Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-26Make lastlog work on BSD systems without <lastlog.h>.Ed Schouten
FreeBSD 8.x and lower have struct lastlog in <utmp.h>. Add a specific Autoconf check for struct lastlog, where we include both <utmp.h> and <lastlog.h>. Also, change NO_LASTLOG to a definition for the opposite; USE_LASTLOG. This is more consistent with USE_UTMP and USE_UTMPX. Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-26Simply define LLOG_FILE and TTYS_FILE unconditionally.Ed Schouten
It doesn't matter if we define these pathnames, even if we're not going to use them in the code itself. It is already done that way for utmp and wtmp. Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-24Correct whitespace and indentation.Ed Schouten
Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-11-10Sun's copyrights belong to Oracle nowAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-01-16Allow sessreg to be built without <utmp.h>.Ed Schouten
As of 9.0, FreeBSD will only support <utmpx.h>. It only implements the POSIX interface with minor extensions. There is no need to write to wtmp and lastlog separately, because this is already done by pututxline(). Add additional checks to configure.ac to search for the presence of utmpxname() and updwtmpx(). Signed-off-by: Ed Schouten <ed@80386.nl> Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-11Update Sun license notices to current X.Org standard formAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2007-06-11X.Org Bug #9887: sessreg should include sys/types.h on FreeBSDAlan Coopersmith
X.Org Bugzilla #9887: <https://bugs.freedesktop.org/show_bug.cgi?id=9887>
2006-11-19include <time.h> before <utmp.h>. Required on some systems.Matthieu Herrb
2006-11-07Substitute correct pathnames for utmp/wtmp files in man pagesAlan Coopersmith
ifdefs to find the paths on each platform have been broken out into a new sessreg.h header that is also preprocessed into sed rules applied to the man page. Old ifdefs left for Imake compatibility in the 6.9/7.0 hybrid release have been dropped now that autoconf is required to build.