Update to sessreg 1.0.7
This commit is contained in:
parent
12dde70adc
commit
ec8a851f3c
@ -22,7 +22,7 @@ not be used in advertising or otherwise to promote the sale, use or
|
||||
other dealings in this Software without prior written authorization
|
||||
from The Open Group.
|
||||
|
||||
Copyright 2005 Sun Microsystems, Inc. All rights reserved.
|
||||
Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
|
@ -1,3 +1,255 @@
|
||||
commit 7ac51a652bfb8423604bb1a120568d44516c9de9
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Fri Oct 21 21:09:43 2011 -0700
|
||||
|
||||
sessreg 1.0.7
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit fbe6fa7019309672c311184dd3bce3c25fb578d3
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Mon Sep 26 16:01:40 2011 -0700
|
||||
|
||||
Add const attributes to fix gcc -Wwrite-strings warnings
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 18d68ce74bd810bc09f99a476798b8e4a66ec494
|
||||
Author: Ed Schouten <ed@80386.nl>
|
||||
Date: Sun Jun 26 14:04:20 2011 +0200
|
||||
|
||||
Make lastlog work on BSD systems without <lastlog.h>.
|
||||
|
||||
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>
|
||||
|
||||
commit 9e93c5f65a22824f6b4af7ee68944f2226f7efa7
|
||||
Author: Ed Schouten <ed@80386.nl>
|
||||
Date: Sun Jun 26 13:50:36 2011 +0200
|
||||
|
||||
Simply define LLOG_FILE and TTYS_FILE unconditionally.
|
||||
|
||||
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>
|
||||
|
||||
commit 92d2628e3b1db4b0217d91d532e21018371445bc
|
||||
Author: Ed Schouten <ed@80386.nl>
|
||||
Date: Sun Jun 26 10:15:59 2011 +0200
|
||||
|
||||
Fix whitespace inconsistencies.
|
||||
|
||||
Signed-off-by: Ed Schouten <ed@80386.nl>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 38dd87854f106f6d7a3c8bd8916b65c0d1a87697
|
||||
Author: Ed Schouten <ed@80386.nl>
|
||||
Date: Sun Jun 26 09:51:01 2011 +0200
|
||||
|
||||
Just use time_t directly.
|
||||
|
||||
There is no use for this #define (anymore). We can already assume that
|
||||
any decent system has time_t defined. It has to, otherwise struct utmp
|
||||
and struct utmpx can't even be defined.
|
||||
|
||||
Signed-off-by: Ed Schouten <ed@80386.nl>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 6675a07badfb688aacbd8fd12ba55e16854ba0ab
|
||||
Author: Ed Schouten <ed@80386.nl>
|
||||
Date: Sun Jun 26 09:47:40 2011 +0200
|
||||
|
||||
Only expose the sflag variable when needed.
|
||||
|
||||
The sflag variable is only used when using BSD-style utmp.
|
||||
|
||||
Signed-off-by: Ed Schouten <ed@80386.nl>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 6b9a2f7bfa823a3dc0befd039ee08ec1596a3c64
|
||||
Author: Ed Schouten <ed@80386.nl>
|
||||
Date: Sun Jun 26 09:43:37 2011 +0200
|
||||
|
||||
Get rid of SYSV definition. Just check for pututline().
|
||||
|
||||
If the system provides pututline(), we just want to use that, instead of
|
||||
specifically checking for certain operating systems.
|
||||
|
||||
Signed-off-by: Ed Schouten <ed@80386.nl>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 578b76086edb834aa447ce9aed60c585e44e6cc1
|
||||
Author: Ed Schouten <ed@80386.nl>
|
||||
Date: Sat Jun 25 10:35:25 2011 +0200
|
||||
|
||||
Don't forget to include <sys/types.h> before <utmp.h>.
|
||||
|
||||
Some operating systems (e.g. FreeBSD) require <sys/types.h> to be
|
||||
included before <utmp.h>, because they depend on type definitions such
|
||||
as int32_t, time_t, etc.
|
||||
|
||||
Signed-off-by: Ed Schouten <ed@80386.nl>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit dd5d4c9721417a21133bb44a0567a041a166bd5e
|
||||
Author: Ed Schouten <ed@80386.nl>
|
||||
Date: Fri Jun 24 15:52:18 2011 +0200
|
||||
|
||||
Get rid of bzero() calls. Replace them by memset().
|
||||
|
||||
bzero() is not part of POSIX; memset() is.
|
||||
|
||||
Signed-off-by: Ed Schouten <ed@80386.nl>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 301cbd433bb698147e05e7dbfb4de2ce2e0e9cbb
|
||||
Author: Ed Schouten <ed@80386.nl>
|
||||
Date: Fri Jun 24 15:46:43 2011 +0200
|
||||
|
||||
Use Autoconf to check for utmp field existence.
|
||||
|
||||
Don't use the quirky SYSV and __QNX__ definitions to determine whether
|
||||
the utmp fields exist.
|
||||
|
||||
Signed-off-by: Ed Schouten <ed@80386.nl>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit eb6eb771ff9f53c56bd60f28c5598eee9e2fb9b2
|
||||
Author: Ed Schouten <ed@80386.nl>
|
||||
Date: Wed Jun 22 00:36:41 2011 +0200
|
||||
|
||||
Only split off /dev/ instead trimming to last /.
|
||||
|
||||
This prevents pseudo-terminals with names like /dev/pts/0 from getting
|
||||
trimmed to just 0 instead of pts/0.
|
||||
|
||||
Signed-off-by: Ed Schouten <ed@80386.nl>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit aad7bed11410413b186e0d5af1783686405b47e6
|
||||
Author: Ed Schouten <ed@80386.nl>
|
||||
Date: Wed Jun 22 00:10:17 2011 +0200
|
||||
|
||||
Fix typo in function name check.
|
||||
|
||||
Signed-off-by: Ed Schouten <ed@80386.nl>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 1e20098384961230c3652078fed09e77b2ba2808
|
||||
Author: Ed Schouten <ed@80386.nl>
|
||||
Date: Wed Jun 22 00:09:59 2011 +0200
|
||||
|
||||
Correct whitespace and indentation.
|
||||
|
||||
Signed-off-by: Ed Schouten <ed@80386.nl>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit ba2ea124ff10cadaf1fc96f7e76372b5400e76d1
|
||||
Author: Jon TURNEY <jon.turney@dronecode.org.uk>
|
||||
Date: Mon Mar 14 14:25:22 2011 +0000
|
||||
|
||||
Fix non-srcdir builds
|
||||
|
||||
Commit 3bb9256b8e3a56b94281ea787c07f080c0a80312 introduces an
|
||||
-I.. which should be -I$(top_builddir) -I$(top_srcdir)
|
||||
|
||||
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
||||
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
|
||||
|
||||
commit 5a886e2fc5f4b3f062a20f66ee68bad4a0b98ad1
|
||||
Author: Gaetan Nadon <memsize@videotron.ca>
|
||||
Date: Wed Jan 19 11:20:21 2011 -0500
|
||||
|
||||
config: use AC_CHECK_MEMBERS rather than AC_CHECK_MEMBER
|
||||
|
||||
Let Autoconf do the work of setting up the #define in config.h.
|
||||
Apply and comment standard sections layout.
|
||||
|
||||
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
||||
|
||||
commit 4eaaa6a84a52b7c60df964102f0fb8d860b00308
|
||||
Author: Gaetan Nadon <memsize@videotron.ca>
|
||||
Date: Wed Jan 19 10:52:55 2011 -0500
|
||||
|
||||
config: remove AC_CANONICAL_HOST already included by XORG_DEFAULT_OPTIONS
|
||||
|
||||
Fix some quoting and comments, no functional changes.
|
||||
|
||||
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
||||
|
||||
commit 3bb9256b8e3a56b94281ea787c07f080c0a80312
|
||||
Author: Gaetan Nadon <memsize@videotron.ca>
|
||||
Date: Wed Jan 19 10:06:55 2011 -0500
|
||||
|
||||
config: move man pages into their own directory
|
||||
|
||||
Use services provided by XORG_MANPAGE_SECTIONS.
|
||||
Use standard Makefile for man pages.
|
||||
|
||||
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
||||
|
||||
commit f9d0aa7ca56c68aee0ba53a9ad9c232c544264b0
|
||||
Author: Gaetan Nadon <memsize@videotron.ca>
|
||||
Date: Thu Jan 13 17:15:36 2011 -0500
|
||||
|
||||
man: replace hard coded man page section with substitution strings
|
||||
|
||||
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
||||
|
||||
commit 3ad465bf134560234e75bf421acbe1481bccfde4
|
||||
Author: Gaetan Nadon <memsize@videotron.ca>
|
||||
Date: Thu Jan 13 11:15:47 2011 -0500
|
||||
|
||||
man: remove trailing spaces and tabs
|
||||
|
||||
Using s/[ \t]*$//
|
||||
|
||||
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
||||
|
||||
commit d3055b5828d5ffd92134de31c44c3d14f6bd283d
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Wed Nov 10 21:08:09 2010 -0800
|
||||
|
||||
config: Remove unnecessary calls from configure.ac
|
||||
|
||||
AC_PROG_CC & AC_PROG_INSTALL are provided by XORG_DEFAULT_OPTIONS now
|
||||
PKG_CONFIG_MODULES handles AC_SUBST of the CFLAGS & LIBS variables
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 2d33ed0f648314f661aa5e429834a8f886904f94
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Wed Nov 10 21:06:15 2010 -0800
|
||||
|
||||
config: upgrade to util-macros 1.8 for additional man page support
|
||||
|
||||
Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
|
||||
The value of MAN_SUBST is the same for all X.Org packages.
|
||||
|
||||
Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
|
||||
Enables use of platform appropriate version of sed.
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 87666632a0f066cb9df3fb4ae258f89f1edb56cc
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Wed Nov 10 21:03:59 2010 -0800
|
||||
|
||||
Sun's copyrights belong to Oracle now
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 7f1e17aed0027e4040a1fcc96e6319fca36af233
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Thu Jun 3 17:32:57 2010 -0700
|
||||
|
@ -18,6 +18,7 @@
|
||||
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
SUBDIRS = man
|
||||
bin_PROGRAMS = sessreg
|
||||
|
||||
AM_CFLAGS = $(CWARNFLAGS) $(SESSREG_CFLAGS)
|
||||
@ -26,47 +27,6 @@ sessreg_SOURCES = \
|
||||
sessreg.h \
|
||||
sessreg.c
|
||||
|
||||
appman_PRE = sessreg.man
|
||||
|
||||
appmandir = $(APP_MAN_DIR)
|
||||
|
||||
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
|
||||
|
||||
EXTRA_DIST = $(appman_PRE) filenames.sed.c
|
||||
MAINTAINERCLEANFILES = ChangeLog INSTALL
|
||||
CLEANFILES = $(appman_DATA) filenames.sed
|
||||
|
||||
SED = sed
|
||||
|
||||
# Strings to replace in man pages
|
||||
XORGRELSTRING = @PACKAGE_STRING@
|
||||
XORGMANNAME = X Version 11
|
||||
|
||||
MAN_SUBSTS = -f filenames.sed \
|
||||
-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
|
||||
-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
|
||||
-e 's|__xservername__|Xorg|g' \
|
||||
-e 's|__xconfigfile__|xorg.conf|g' \
|
||||
-e 's|__projectroot__|$(prefix)|g' \
|
||||
-e 's|__apploaddir__|$(appdefaultdir)|' \
|
||||
-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
|
||||
-e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
|
||||
-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
|
||||
-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
|
||||
-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
|
||||
|
||||
SUFFIXES = .$(APP_MAN_SUFFIX) .man
|
||||
|
||||
.man.$(APP_MAN_SUFFIX):
|
||||
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
|
||||
|
||||
sessreg.$(APP_MAN_SUFFIX): filenames.sed
|
||||
|
||||
filenames.sed: filenames.sed.c
|
||||
$(AM_V_GEN)$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/filenames.sed.c | \
|
||||
grep 's|__' > $@
|
||||
|
||||
if LINT
|
||||
ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS)
|
||||
@ -75,6 +35,7 @@ lint:
|
||||
$(LINT) $(ALL_LINT_FLAGS) $(sessreg_SOURCES)
|
||||
endif LINT
|
||||
|
||||
MAINTAINERCLEANFILES = ChangeLog INSTALL
|
||||
|
||||
.PHONY: ChangeLog INSTALL
|
||||
|
||||
|
@ -34,7 +34,6 @@
|
||||
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
@ -44,9 +43,9 @@ pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = .
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
install_sh_DATA = ${SHELL} $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = ${SHELL} $(install_sh) -c
|
||||
install_sh_SCRIPT = ${SHELL} $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
@ -72,7 +71,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
mkinstalldirs = $(SHELL) $(install_sh) -d
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)"
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_sessreg_OBJECTS = sessreg.$(OBJEXT)
|
||||
@ -87,16 +86,15 @@ CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(sessreg_SOURCES)
|
||||
DIST_SOURCES = $(sessreg_SOURCES)
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
appmanDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(appman_DATA)
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
@ -160,6 +158,7 @@ MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MAN_SUBSTS = @MAN_SUBSTS@
|
||||
MISC_MAN_DIR = @MISC_MAN_DIR@
|
||||
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
|
||||
OBJEXT = @OBJEXT@
|
||||
@ -171,12 +170,15 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
SED = @SED@
|
||||
SESSREG_CFLAGS = @SESSREG_CFLAGS@
|
||||
SESSREG_LIBS = @SESSREG_LIBS@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRICT_CFLAGS = @STRICT_CFLAGS@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
XORG_MAN_PAGE = @XORG_MAN_PAGE@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
@ -220,44 +222,21 @@ sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
SUBDIRS = man
|
||||
AM_CFLAGS = $(CWARNFLAGS) $(SESSREG_CFLAGS)
|
||||
sessreg_SOURCES = \
|
||||
sessreg.h \
|
||||
sessreg.c
|
||||
|
||||
appman_PRE = sessreg.man
|
||||
appmandir = $(APP_MAN_DIR)
|
||||
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
|
||||
EXTRA_DIST = $(appman_PRE) filenames.sed.c
|
||||
MAINTAINERCLEANFILES = ChangeLog INSTALL
|
||||
CLEANFILES = $(appman_DATA) filenames.sed
|
||||
SED = sed
|
||||
|
||||
# Strings to replace in man pages
|
||||
XORGRELSTRING = @PACKAGE_STRING@
|
||||
XORGMANNAME = X Version 11
|
||||
MAN_SUBSTS = -f filenames.sed \
|
||||
-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
|
||||
-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
|
||||
-e 's|__xservername__|Xorg|g' \
|
||||
-e 's|__xconfigfile__|xorg.conf|g' \
|
||||
-e 's|__projectroot__|$(prefix)|g' \
|
||||
-e 's|__apploaddir__|$(appdefaultdir)|' \
|
||||
-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
|
||||
-e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
|
||||
-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
|
||||
-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
|
||||
-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
|
||||
|
||||
SUFFIXES = .$(APP_MAN_SUFFIX) .man
|
||||
@LINT_TRUE@ALL_LINT_FLAGS = $(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
@LINT_TRUE@ $(AM_CPPFLAGS) $(CPPFLAGS)
|
||||
|
||||
MAINTAINERCLEANFILES = ChangeLog INSTALL
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .$(APP_MAN_SUFFIX) .man .c .o .obj
|
||||
.SUFFIXES: .c .o .obj
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@ -357,22 +336,76 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
uninstall-info-am:
|
||||
install-appmanDATA: $(appman_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(appmandir)" || $(mkdir_p) "$(DESTDIR)$(appmandir)"
|
||||
@list='$(appman_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(appmanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appmandir)/$$f'"; \
|
||||
$(appmanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appmandir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-appmanDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(appman_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(appmandir)/$$f"; \
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
@ -385,10 +418,23 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
@ -401,7 +447,7 @@ TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
@ -452,6 +498,21 @@ distdir: $(DISTFILES)
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-hook
|
||||
@ -553,21 +614,22 @@ distcleancheck: distclean
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS) $(DATA) config.h
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)"; do \
|
||||
check: check-recursive
|
||||
all-am: Makefile $(PROGRAMS) config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
@ -576,7 +638,6 @@ install-strip:
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
@ -585,85 +646,77 @@ maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
clean: clean-am
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-hdr distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
html: html-recursive
|
||||
|
||||
info: info-am
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-appmanDATA
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
install-info: install-info-am
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
|
||||
uninstall-info-am
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
|
||||
clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
|
||||
dist-gzip dist-hook dist-shar dist-tarZ dist-zip distcheck \
|
||||
distclean distclean-compile distclean-generic distclean-hdr \
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-appmanDATA install-binPROGRAMS install-data \
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
|
||||
check-am clean clean-binPROGRAMS clean-generic clean-recursive \
|
||||
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
|
||||
dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \
|
||||
distclean-compile distclean-generic distclean-hdr \
|
||||
distclean-recursive distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
install install-am install-binPROGRAMS install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am uninstall-appmanDATA uninstall-binPROGRAMS \
|
||||
uninstall-info-am
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive \
|
||||
mostlyclean mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am
|
||||
|
||||
|
||||
.man.$(APP_MAN_SUFFIX):
|
||||
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
|
||||
|
||||
sessreg.$(APP_MAN_SUFFIX): filenames.sed
|
||||
|
||||
filenames.sed: filenames.sed.c
|
||||
$(AM_V_GEN)$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/filenames.sed.c | \
|
||||
grep 's|__' > $@
|
||||
|
||||
@LINT_TRUE@lint:
|
||||
@LINT_TRUE@ $(LINT) $(ALL_LINT_FLAGS) $(sessreg_SOURCES)
|
||||
|
||||
|
752
app/sessreg/aclocal.m4
vendored
752
app/sessreg/aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
@ -9,6 +9,12 @@
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `pututline' function. */
|
||||
#undef HAVE_PUTUTLINE
|
||||
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
#undef HAVE_PWD_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
@ -21,6 +27,24 @@
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if the system has the type `struct lastlog'. */
|
||||
#undef HAVE_STRUCT_LASTLOG
|
||||
|
||||
/* Define to 1 if `ut_syslen' is member of `struct utmpx'. */
|
||||
#undef HAVE_STRUCT_UTMPX_UT_SYSLEN
|
||||
|
||||
/* Define to 1 if `ut_host' is member of `struct utmp'. */
|
||||
#undef HAVE_STRUCT_UTMP_UT_HOST
|
||||
|
||||
/* Define to 1 if `ut_id' is member of `struct utmp'. */
|
||||
#undef HAVE_STRUCT_UTMP_UT_ID
|
||||
|
||||
/* Define to 1 if `ut_pid' is member of `struct utmp'. */
|
||||
#undef HAVE_STRUCT_UTMP_UT_PID
|
||||
|
||||
/* Define to 1 if `ut_type' is member of `struct utmp'. */
|
||||
#undef HAVE_STRUCT_UTMP_UT_TYPE
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
@ -42,9 +66,6 @@
|
||||
/* Define to 1 if you have the <utmpx.h> header file. */
|
||||
#undef HAVE_UTMPX_H
|
||||
|
||||
/* utmpx structure includes ut_syslen field */
|
||||
#undef HAVE_UTMPX_UT_SYSLEN
|
||||
|
||||
/* Define to 1 if you have the <utmp.h> header file. */
|
||||
#undef HAVE_UTMP_H
|
||||
|
||||
|
2473
app/sessreg/configure
vendored
2473
app/sessreg/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -22,12 +22,10 @@ dnl Process this file with autoconf to create configure.
|
||||
|
||||
# Initialize Autoconf
|
||||
AC_PREREQ([2.60])
|
||||
AC_INIT(sessreg, [1.0.6],
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
|
||||
sessreg)
|
||||
AC_INIT([sessreg], [1.0.7],
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [sessreg])
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CANONICAL_HOST
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
@ -35,32 +33,44 @@ AC_SYS_LARGEFILE
|
||||
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
# Require xorg-macros: XORG_DEFAULT_OPTIONS
|
||||
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
|
||||
m4_ifndef([XORG_MACROS_VERSION],
|
||||
[m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])])
|
||||
XORG_MACROS_VERSION(1.4)
|
||||
[m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
|
||||
XORG_MACROS_VERSION(1.8)
|
||||
XORG_DEFAULT_OPTIONS
|
||||
XORG_WITH_LINT
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_C99
|
||||
AC_PROG_INSTALL
|
||||
|
||||
# Checks for header files.
|
||||
AC_CHECK_HEADERS([lastlog.h utmp.h utmpx.h sys/param.h])
|
||||
AC_CHECK_MEMBER([struct utmpx.ut_syslen],
|
||||
HAVE_SYSLEN=1,
|
||||
HAVE_SYSLEN=0,
|
||||
[#include <utmpx.h>])
|
||||
AC_DEFINE_UNQUOTED(HAVE_UTMPX_UT_SYSLEN,$HAVE_SYSLEN,
|
||||
[utmpx structure includes ut_syslen field])
|
||||
AC_CHECK_HEADERS([lastlog.h pwd.h utmp.h utmpx.h sys/param.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_CHECK_FUNCS([updwtmpx utmpxname])
|
||||
AC_CHECK_MEMBERS([
|
||||
struct utmp.ut_host,
|
||||
struct utmp.ut_id,
|
||||
struct utmp.ut_pid,
|
||||
struct utmp.ut_type], [], [], [
|
||||
#include <sys/types.h>
|
||||
#include <utmp.h>
|
||||
])
|
||||
AC_CHECK_MEMBERS([struct utmpx.ut_syslen], [], [], [#include <utmpx.h>])
|
||||
AC_CHECK_TYPES([
|
||||
struct lastlog], [], [],[
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_UTMP_H
|
||||
#include <utmp.h>
|
||||
#endif
|
||||
#ifdef HAVE_LASTLOG_H
|
||||
#include <lastlog.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
# Checks for pkg-config packages
|
||||
# Checks for library functions.
|
||||
AC_CHECK_FUNCS([pututline updwtmpx utmpxname])
|
||||
|
||||
# Obtain compiler/linker options for depedencies
|
||||
PKG_CHECK_MODULES(SESSREG, xproto)
|
||||
AC_SUBST(SESSREG_CFLAGS)
|
||||
|
||||
AC_OUTPUT([Makefile])
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
man/Makefile])
|
||||
AC_OUTPUT
|
||||
|
22
app/sessreg/man/Makefile.am
Normal file
22
app/sessreg/man/Makefile.am
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
appmandir = $(APP_MAN_DIR)
|
||||
appman_PRE = sessreg.man
|
||||
appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
|
||||
|
||||
EXTRA_DIST = $(appman_PRE) filenames.sed.c
|
||||
CLEANFILES = $(appman_DATA) filenames.sed
|
||||
SUFFIXES = .$(APP_MAN_SUFFIX) .man
|
||||
|
||||
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)
|
||||
filenames.sed: filenames.sed.c
|
||||
$(AM_V_GEN)$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/filenames.sed.c | \
|
||||
grep 's|__' > $@
|
||||
|
||||
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
|
||||
MAN_SUBSTS += -f filenames.sed
|
||||
|
||||
sessreg.$(APP_MAN_SUFFIX): filenames.sed
|
||||
|
||||
.man.$(APP_MAN_SUFFIX):
|
||||
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
|
369
app/sessreg/man/Makefile.in
Normal file
369
app/sessreg/man/Makefile.in
Normal file
@ -0,0 +1,369 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = ${SHELL} $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = ${SHELL} $(install_sh) -c
|
||||
install_sh_SCRIPT = ${SHELL} $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = man
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(appmandir)"
|
||||
appmanDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(appman_DATA)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
|
||||
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
APP_MAN_DIR = @APP_MAN_DIR@
|
||||
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CHANGELOG_CMD = @CHANGELOG_CMD@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CWARNFLAGS = @CWARNFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
|
||||
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FILE_MAN_DIR = @FILE_MAN_DIR@
|
||||
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
|
||||
GREP = @GREP@
|
||||
INSTALL_CMD = @INSTALL_CMD@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIB_MAN_DIR = @LIB_MAN_DIR@
|
||||
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
|
||||
LINT = @LINT@
|
||||
LINT_FALSE = @LINT_FALSE@
|
||||
LINT_FLAGS = @LINT_FLAGS@
|
||||
LINT_TRUE = @LINT_TRUE@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
|
||||
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
|
||||
MAN_SUBSTS = @MAN_SUBSTS@ -f filenames.sed
|
||||
MISC_MAN_DIR = @MISC_MAN_DIR@
|
||||
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
SED = @SED@
|
||||
SESSREG_CFLAGS = @SESSREG_CFLAGS@
|
||||
SESSREG_LIBS = @SESSREG_LIBS@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRICT_CFLAGS = @STRICT_CFLAGS@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
XORG_MAN_PAGE = @XORG_MAN_PAGE@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
appmandir = $(APP_MAN_DIR)
|
||||
appman_PRE = sessreg.man
|
||||
appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
|
||||
EXTRA_DIST = $(appman_PRE) filenames.sed.c
|
||||
CLEANFILES = $(appman_DATA) filenames.sed
|
||||
SUFFIXES = .$(APP_MAN_SUFFIX) .man
|
||||
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .$(APP_MAN_SUFFIX) .man
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign man/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
uninstall-info-am:
|
||||
install-appmanDATA: $(appman_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(appmandir)" || $(mkdir_p) "$(DESTDIR)$(appmandir)"
|
||||
@list='$(appman_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(appmanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appmandir)/$$f'"; \
|
||||
$(appmanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appmandir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-appmanDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(appman_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(appmandir)/$$f"; \
|
||||
done
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(DATA)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(appmandir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-appmanDATA
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-appmanDATA uninstall-info-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-appmanDATA install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
||||
pdf-am ps ps-am uninstall uninstall-am uninstall-appmanDATA \
|
||||
uninstall-info-am
|
||||
|
||||
filenames.sed: filenames.sed.c
|
||||
$(AM_V_GEN)$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/filenames.sed.c | \
|
||||
grep 's|__' > $@
|
||||
|
||||
sessreg.$(APP_MAN_SUFFIX): filenames.sed
|
||||
|
||||
.man.$(APP_MAN_SUFFIX):
|
||||
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
@ -104,7 +104,7 @@ This describes the "line" name of the entry. For terminal sessions,
|
||||
this is the final pathname segment of the terminal device filename
|
||||
(e.g. ttyd0). For X sessions, it should probably be the local display name
|
||||
given to the users session (e.g. :0). If none is specified, the
|
||||
terminal name will be determined with ttyname(3) and stripped of leading
|
||||
terminal name will be determined with ttyname(__libmansuffix__) and stripped of leading
|
||||
components.
|
||||
.IP "\fB-h\fP \fIhost-name\fP"
|
||||
This is set for BSD hosts to indicate that the session was initiated from
|
||||
@ -113,7 +113,7 @@ a remote host. In typical xdm usage, this options is not used.
|
||||
Each potential session has a unique slot number in BSD systems, most are
|
||||
identified by the position of the \fIline-name\fP in the
|
||||
.BR __ttys_file__ file.
|
||||
This option overrides the default position determined with ttyslot(3).
|
||||
This option overrides the default position determined with ttyslot(__libmansuffix__).
|
||||
This option is inappropriate for use with xdm, the -x option is more useful.
|
||||
.IP "\fB-x\fP \fIXservers-file\fP"
|
||||
As X sessions are one-per-display, and each display is entered in this file,
|
@ -25,7 +25,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
|
||||
/*
|
||||
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@ -60,7 +61,7 @@
|
||||
*
|
||||
* usage: sessreg [ -w <wtmp-file> ] [ -u <utmp-file> ]
|
||||
* [ -l <line> ]
|
||||
* [ -L <lastlog-file> ] / #ifndef NO_LASTLOG
|
||||
* [ -L <lastlog-file> ] / #ifdef USE_LASTLOG
|
||||
* [ -h <host-name> ] / BSD only
|
||||
* [ -s <slot-number> ] [ -x Xservers-file ] / BSD only
|
||||
* [ -t <ttys-file> ] / BSD only
|
||||
@ -71,36 +72,31 @@
|
||||
|
||||
#include "sessreg.h"
|
||||
|
||||
# include <X11/Xos.h>
|
||||
# include <X11/Xfuncs.h>
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
|
||||
#if defined(__SVR4) || defined(SVR4) || defined(linux) || defined(__GLIBC__)
|
||||
# define SYSV
|
||||
#endif
|
||||
|
||||
#include <X11/Xos.h>
|
||||
#include <X11/Xfuncs.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#define Time_t time_t
|
||||
|
||||
#ifdef USE_UTMP
|
||||
static void set_utmp (struct utmp *u, char *line, char *user, char *host,
|
||||
Time_t date, int addp);
|
||||
time_t date, int addp);
|
||||
#endif
|
||||
|
||||
#ifdef USE_UTMPX
|
||||
static void set_utmpx (struct utmpx *u, const char *line, const char *user,
|
||||
const char *host, Time_t date, int addp);
|
||||
const char *host, time_t date, int addp);
|
||||
#endif
|
||||
|
||||
static int wflag, uflag, lflag;
|
||||
static char *wtmp_file, *utmp_file, *line;
|
||||
static const char *wtmp_file, *utmp_file;
|
||||
static char *line;
|
||||
#ifdef USE_UTMPX
|
||||
#ifdef HAVE_UPDWTMPX
|
||||
static char *wtmpx_file = NULL;
|
||||
static const char *wtmpx_file = NULL;
|
||||
#endif
|
||||
#ifdef HAVE_UTMPXNAME
|
||||
static char *utmpx_file = NULL;
|
||||
static const char *utmpx_file = NULL;
|
||||
#endif
|
||||
#endif
|
||||
static int utmp_none, wtmp_none;
|
||||
@ -108,22 +104,23 @@ static int utmp_none, wtmp_none;
|
||||
* BSD specific variables. To make life much easier for Xstartup/Xreset
|
||||
* maintainers, these arguments are accepted but ignored for sysV
|
||||
*/
|
||||
static int hflag, sflag, xflag, tflag;
|
||||
static int hflag, xflag, tflag;
|
||||
static char *host_name = NULL;
|
||||
#ifdef USE_UTMP
|
||||
#if defined(USE_UTMP) && !defined(HAVE_PUTUTLINE)
|
||||
static int sflag;
|
||||
static int slot_number;
|
||||
#endif
|
||||
static char *xservers_file, *ttys_file;
|
||||
static char *user_name;
|
||||
static int aflag, dflag;
|
||||
#ifndef NO_LASTLOG
|
||||
static char *llog_file;
|
||||
#ifdef USE_LASTLOG
|
||||
static const char *llog_file;
|
||||
static int llog_none, Lflag;
|
||||
#endif
|
||||
|
||||
static char *program_name;
|
||||
|
||||
#ifndef SYSV
|
||||
#if defined(USE_UTMP) && !defined(HAVE_PUTUTLINE)
|
||||
static int findslot (char *line_name, char *host_name, int addp, int slot);
|
||||
static int Xslot (char *ttys_file, char *servers_file, char *tty_line,
|
||||
char *host_name, int addp);
|
||||
@ -134,7 +131,7 @@ usage (int x)
|
||||
{
|
||||
if (x) {
|
||||
fprintf (stderr, "%s: usage %s {-a -d} [-w wtmp-file] [-u utmp-file]", program_name, program_name);
|
||||
#ifndef NO_LASTLOG
|
||||
#ifdef USE_LASTLOG
|
||||
fprintf (stderr, " [-L lastlog-file]");
|
||||
#endif
|
||||
fprintf (stderr, "\n");
|
||||
@ -159,7 +156,7 @@ getstring (char ***avp, int *flagp)
|
||||
return *a;
|
||||
}
|
||||
|
||||
#ifndef SYSV
|
||||
#if defined(USE_UTMP) && !defined(HAVE_PUTUTLINE)
|
||||
static int
|
||||
syserr (int x, const char *s)
|
||||
{
|
||||
@ -184,14 +181,13 @@ sysnerr (int x, const char *s)
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
#if defined(USE_UTMP) && !defined(SYSV)
|
||||
#if defined(USE_UTMP) && !defined(HAVE_PUTUTLINE)
|
||||
int utmp;
|
||||
#endif
|
||||
char *line_tmp;
|
||||
#ifndef USE_UTMPX
|
||||
int wtmp;
|
||||
#endif
|
||||
Time_t current_time;
|
||||
time_t current_time;
|
||||
#ifdef USE_UTMP
|
||||
struct utmp utmp_entry;
|
||||
#endif
|
||||
@ -212,7 +208,7 @@ main (int argc, char **argv)
|
||||
if (!strcmp (utmp_file, "none"))
|
||||
utmp_none = 1;
|
||||
break;
|
||||
#ifndef NO_LASTLOG
|
||||
#ifdef USE_LASTLOG
|
||||
case 'L':
|
||||
llog_file = getstring (&argv, &Lflag);
|
||||
if (!strcmp (llog_file, "none"))
|
||||
@ -229,7 +225,7 @@ main (int argc, char **argv)
|
||||
host_name = getstring (&argv, &hflag);
|
||||
break;
|
||||
case 's':
|
||||
#ifdef USE_UTMP
|
||||
#if defined(USE_UTMP) && !defined(HAVE_PUTUTLINE)
|
||||
slot_number = atoi (getstring (&argv, &sflag));
|
||||
#endif
|
||||
break;
|
||||
@ -271,11 +267,11 @@ main (int argc, char **argv)
|
||||
#else
|
||||
utmp_none = 1;
|
||||
#endif
|
||||
#ifndef NO_LASTLOG
|
||||
#ifdef USE_LASTLOG
|
||||
if (!Lflag)
|
||||
llog_file = LLOG_FILE;
|
||||
#endif
|
||||
#if defined(USE_UTMP) && !defined(SYSV) && !defined(linux) && !defined(__QNX__)
|
||||
#if defined(USE_UTMP) && !defined(HAVE_PUTUTLINE)
|
||||
if (!tflag)
|
||||
ttys_file = TTYS_FILE;
|
||||
if (!sflag && !utmp_none) {
|
||||
@ -286,12 +282,9 @@ main (int argc, char **argv)
|
||||
}
|
||||
#endif
|
||||
if (!lflag) {
|
||||
sysnerr ((line_tmp = ttyname (0)) != NULL, "ttyname");
|
||||
line = strrchr(line_tmp, '/');
|
||||
if (line)
|
||||
line = line + 1;
|
||||
else
|
||||
line = line_tmp;
|
||||
sysnerr ((line = ttyname (0)) != NULL, "ttyname");
|
||||
if (strncmp(line, "/dev/", 5) == 0)
|
||||
line += 5;
|
||||
}
|
||||
time (¤t_time);
|
||||
#ifdef USE_UTMP
|
||||
@ -312,7 +305,7 @@ main (int argc, char **argv)
|
||||
|
||||
if (!utmp_none) {
|
||||
#ifdef USE_UTMPX
|
||||
# ifdef HAVE_UTMPX_NAME
|
||||
# ifdef HAVE_UTMPXNAME
|
||||
if (utmpx_file != NULL)
|
||||
# endif
|
||||
{
|
||||
@ -323,7 +316,7 @@ main (int argc, char **argv)
|
||||
}
|
||||
#endif
|
||||
#ifdef USE_UTMP
|
||||
# ifdef SYSV
|
||||
# ifdef HAVE_PUTUTLINE
|
||||
utmpname (utmp_file);
|
||||
setutent ();
|
||||
(void) getutid (&utmp_entry);
|
||||
@ -356,7 +349,7 @@ main (int argc, char **argv)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#ifndef NO_LASTLOG
|
||||
#ifdef USE_LASTLOG
|
||||
if (aflag && !llog_none) {
|
||||
int llog;
|
||||
struct passwd *pwd = getpwnam(user_name);
|
||||
@ -369,7 +362,7 @@ main (int argc, char **argv)
|
||||
|
||||
sysnerr (lseek(llog, (long) pwd->pw_uid*sizeof(ll), 0)
|
||||
!= -1, "seeking lastlog entry");
|
||||
bzero((char *)&ll, sizeof(ll));
|
||||
memset(&ll, 0, sizeof(ll));
|
||||
ll.ll_time = current_time;
|
||||
if (line)
|
||||
(void) strncpy (ll.ll_line, line, sizeof (ll.ll_line));
|
||||
@ -391,18 +384,18 @@ main (int argc, char **argv)
|
||||
|
||||
#ifdef USE_UTMP
|
||||
static void
|
||||
set_utmp (struct utmp *u, char *line, char *user, char *host, Time_t date, int addp)
|
||||
set_utmp (struct utmp *u, char *line, char *user, char *host, time_t date, int addp)
|
||||
{
|
||||
bzero (u, sizeof (*u));
|
||||
memset (u, 0, sizeof (*u));
|
||||
if (line)
|
||||
(void) strncpy (u->ut_line, line, sizeof (u->ut_line));
|
||||
else
|
||||
bzero (u->ut_line, sizeof (u->ut_line));
|
||||
memset (u->ut_line, 0, sizeof (u->ut_line));
|
||||
if (addp && user)
|
||||
(void) strncpy (u->ut_name, user, sizeof (u->ut_name));
|
||||
else
|
||||
bzero (u->ut_name, sizeof (u->ut_name));
|
||||
#ifdef SYSV
|
||||
memset (u->ut_name, 0, sizeof (u->ut_name));
|
||||
#ifdef HAVE_STRUCT_UTMP_UT_ID
|
||||
if (line) {
|
||||
int i;
|
||||
/*
|
||||
@ -419,20 +412,25 @@ set_utmp (struct utmp *u, char *line, char *user, char *host, Time_t date, int a
|
||||
i = 0;
|
||||
(void) strncpy (u->ut_id, line + i, sizeof (u->ut_id));
|
||||
} else
|
||||
bzero (u->ut_id, sizeof (u->ut_id));
|
||||
if (addp) {
|
||||
u->ut_pid = getppid ();
|
||||
u->ut_type = USER_PROCESS;
|
||||
} else {
|
||||
u->ut_pid = 0;
|
||||
u->ut_type = DEAD_PROCESS;
|
||||
}
|
||||
memset (u->ut_id, 0, sizeof (u->ut_id));
|
||||
#endif
|
||||
#if (!defined(SYSV) && !defined(__QNX__)) || defined(linux)
|
||||
#ifdef HAVE_STRUCT_UTMP_UT_PID
|
||||
if (addp)
|
||||
u->ut_pid = getppid ();
|
||||
else
|
||||
u->ut_pid = 0;
|
||||
#endif
|
||||
#ifdef HAVE_STRUCT_UTMP_UT_TYPE
|
||||
if (addp)
|
||||
u->ut_type = USER_PROCESS;
|
||||
else
|
||||
u->ut_type = DEAD_PROCESS;
|
||||
#endif
|
||||
#ifdef HAVE_STRUCT_UTMP_UT_HOST
|
||||
if (addp && host)
|
||||
(void) strncpy (u->ut_host, host, sizeof (u->ut_host));
|
||||
else
|
||||
bzero (u->ut_host, sizeof (u->ut_host));
|
||||
memset (u->ut_host, 0, sizeof (u->ut_host));
|
||||
#endif
|
||||
u->ut_time = date;
|
||||
}
|
||||
@ -463,7 +461,7 @@ UtmpxIdOpen( char *utmpId )
|
||||
|
||||
static void
|
||||
set_utmpx (struct utmpx *u, const char *line, const char *user,
|
||||
const char *host, Time_t date, int addp)
|
||||
const char *host, time_t date, int addp)
|
||||
{
|
||||
static const char letters[] =
|
||||
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
@ -476,16 +474,16 @@ set_utmpx (struct utmpx *u, const char *line, const char *user,
|
||||
(void) strncpy (u->ut_line, line, sizeof (u->ut_line));
|
||||
|
||||
strncpy(u->ut_host, line, sizeof(u->ut_host));
|
||||
#if HAVE_UTMPX_UT_SYSLEN
|
||||
#ifdef HAVE_STRUCT_UTMPX_UT_SYSLEN
|
||||
u->ut_syslen = strlen(line);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
bzero (u->ut_line, sizeof (u->ut_line));
|
||||
memset (u->ut_line, 0, sizeof (u->ut_line));
|
||||
if (addp && user)
|
||||
(void) strncpy (u->ut_user, user, sizeof (u->ut_user));
|
||||
else
|
||||
bzero (u->ut_user, sizeof (u->ut_user));
|
||||
memset (u->ut_user, 0, sizeof (u->ut_user));
|
||||
|
||||
if (line) {
|
||||
int i;
|
||||
@ -530,7 +528,7 @@ set_utmpx (struct utmpx *u, const char *line, const char *user,
|
||||
endutxent();
|
||||
}
|
||||
} else
|
||||
bzero (u->ut_id, sizeof (u->ut_id));
|
||||
memset (u->ut_id, 0, sizeof (u->ut_id));
|
||||
|
||||
if (addp) {
|
||||
u->ut_pid = getppid ();
|
||||
@ -544,7 +542,7 @@ set_utmpx (struct utmpx *u, const char *line, const char *user,
|
||||
}
|
||||
#endif /* USE_UTMPX */
|
||||
|
||||
#if defined(USE_UTMP) && !defined(SYSV)
|
||||
#if defined(USE_UTMP) && !defined(HAVE_PUTUTLINE)
|
||||
/*
|
||||
* compute the slot-number for an X display. This is computed
|
||||
* by counting the lines in /etc/ttys and adding the line-number
|
||||
@ -636,7 +634,7 @@ findslot (char *line_name, char *host_name, int addp, int slot)
|
||||
while (read (utmp, (char *) &entry, sizeof (entry)) == sizeof (entry)) {
|
||||
if (strncmp(entry.ut_line, line_name,
|
||||
sizeof(entry.ut_line)) == 0
|
||||
#ifndef __QNX__
|
||||
#ifdef HAVE_STRUCT_UTMP_UT_HOST
|
||||
&&
|
||||
strncmp(entry.ut_host, host_name,
|
||||
sizeof(entry.ut_host)) == 0
|
||||
|
@ -25,7 +25,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
|
||||
/*
|
||||
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@ -66,19 +67,12 @@
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_LASTLOG_H
|
||||
# define NO_LASTLOG
|
||||
#endif
|
||||
|
||||
#ifndef NO_LASTLOG
|
||||
# ifdef CSRG_BASED
|
||||
# if (BSD < 199103)
|
||||
# include <lastlog.h>
|
||||
# endif
|
||||
# else
|
||||
#if defined(HAVE_STRUCT_LASTLOG) && defined(HAVE_PWD_H)
|
||||
# ifdef HAVE_LASTLOG_H
|
||||
# include <lastlog.h>
|
||||
# endif
|
||||
# include <pwd.h>
|
||||
# define USE_LASTLOG
|
||||
#endif
|
||||
|
||||
#ifdef CSRG_BASED
|
||||
@ -102,18 +96,13 @@
|
||||
# define UTMP_FILE "/etc/utmp"
|
||||
# endif
|
||||
#endif
|
||||
#ifndef NO_LASTLOG
|
||||
# ifndef LLOG_FILE
|
||||
#ifndef LLOG_FILE
|
||||
# ifdef _PATH_LASTLOG
|
||||
# define LLOG_FILE _PATH_LASTLOG
|
||||
# else
|
||||
# define LLOG_FILE "/usr/adm/lastlog"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#ifndef SYSV
|
||||
# ifndef TTYS_FILE
|
||||
#ifndef TTYS_FILE
|
||||
# define TTYS_FILE "/etc/ttys"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user