diff options
author | Karel Zak | 2006-12-07 00:26:54 +0100 |
---|---|---|
committer | Karel Zak | 2006-12-07 00:26:54 +0100 |
commit | 48d7b13a1eab85fab91c8d6c5ddf298f733c74f5 (patch) | |
tree | 8813d36590ee3361bd75f57a12fd2032e9296ddb /login-utils | |
parent | Imported from util-linux-2.12r tarball. (diff) | |
download | kernel-qcow2-util-linux-48d7b13a1eab85fab91c8d6c5ddf298f733c74f5.tar.gz kernel-qcow2-util-linux-48d7b13a1eab85fab91c8d6c5ddf298f733c74f5.tar.xz kernel-qcow2-util-linux-48d7b13a1eab85fab91c8d6c5ddf298f733c74f5.zip |
Imported from util-linux-2.13-pre1 tarball.
Diffstat (limited to 'login-utils')
-rw-r--r-- | login-utils/Makefile | 230 | ||||
-rw-r--r-- | login-utils/Makefile.am | 112 | ||||
-rw-r--r-- | login-utils/Makefile.in | 987 | ||||
-rw-r--r-- | login-utils/agetty.c | 4 | ||||
-rw-r--r-- | login-utils/checktty.c | 40 | ||||
-rw-r--r-- | login-utils/chfn.c | 18 | ||||
-rw-r--r-- | login-utils/chsh.c | 20 | ||||
-rw-r--r-- | login-utils/cryptocard.c | 228 | ||||
-rw-r--r-- | login-utils/cryptocard.h | 7 | ||||
-rw-r--r-- | login-utils/last.c | 34 | ||||
-rw-r--r-- | login-utils/login.c | 149 | ||||
-rw-r--r-- | login-utils/newgrp.c | 1 | ||||
-rw-r--r-- | login-utils/passwd.1 | 111 | ||||
-rw-r--r-- | login-utils/passwd.c | 425 | ||||
-rw-r--r-- | login-utils/selinux_utils.c | 3 | ||||
-rw-r--r-- | login-utils/vipw.c | 4 |
16 files changed, 1155 insertions, 1218 deletions
diff --git a/login-utils/Makefile b/login-utils/Makefile deleted file mode 100644 index e6e6a0d33..000000000 --- a/login-utils/Makefile +++ /dev/null @@ -1,230 +0,0 @@ -# Makefile -- Makefile for util-linux Linux utilities -# Created: Sat Dec 26 20:09:40 1992 -# Revised: Sun Nov 10 20:28:43 1996 by faith@cs.unc.edu -# Copyright 1992, 1993, 1994, 1995 Rickard E. Faith (faith@cs.unc.edu) -# -# Suggested changes from Bauke Jan Douma <bjdouma@xs4all.nl> have been -# implemented to handle shadow and sysvinit systems - -include ../make_include -include ../MCONFIG - -# Where to put man pages? - -MAN1.MISC= last.1 mesg.1 wall.1 - -MAN1.PUTILS= chfn.1 chsh.1 login.1 newgrp.1 -MAN1.PASSWD= passwd.1 - -MAN8.GETTY= agetty.8 - -MAN8.INIT= fastboot.8 fasthalt.8 halt.8 reboot.8 simpleinit.8 shutdown.8 \ - initctl.8 - -MAN8.PUTILS= vipw.8 vigr.8 - -# Where to put binaries? -# See the "install" rule for the links. . . - -SBIN.GETTY= agetty - -SBIN.INIT= simpleinit shutdown initctl - -BIN.PUTILS= login - -USRBIN.MISC= last mesg wall - -USRBIN.PUTILS= chfn chsh newgrp -USRBIN.PASSWD= passwd - -USRSBIN.PUTILS= vipw - -ifeq "$(NEED_LIBCRYPT)" "yes" -CRYPT=-lcrypt -endif - -ifeq "$(HAVE_PAM)" "yes" -PAM=-lpam -ldl -lpam_misc -PAMFL=-DUSE_PAM=1 -endif - -ifeq "$(HAVE_SELINUX)" "yes" -CFLAGS += -DWITH_SELINUX=1 -g -SELINUXLLIB=-lselinux -SELINUXOBJS=selinux_utils.o -endif - -ifeq "$(HAVE_SHADOW)" "no" -WHAT_TO_BUILD:=$(WHAT_TO_BUILD) all-putils -WHAT_TO_INSTALL:=$(WHAT_TO_INSTALL) install-putils -ifeq "$(HAVE_PAM)" "no" -ifeq "$(HAVE_PASSWD)" "no" -WHAT_TO_BUILD:=$(WHAT_TO_BUILD) all-passwd -WHAT_TO_INSTALL:=$(WHAT_TO_INSTALL) install-passwd -endif -endif -endif - -ifeq "$(HAVE_SYSVINIT)" "no" -WHAT_TO_BUILD:=$(WHAT_TO_BUILD) all-init -WHAT_TO_INSTALL:=$(WHAT_TO_INSTALL) install-init -endif - -ifeq "$(HAVE_SYSVINIT_UTILS)" "no" -WHAT_TO_BUILD:=$(WHAT_TO_BUILD) all-misc -WHAT_TO_INSTALL:=$(WHAT_TO_INSTALL) install-misc -endif - -ifeq "$(HAVE_GETTY)" "no" -WHAT_TO_BUILD:=$(WHAT_TO_BUILD) all-getty -WHAT_TO_INSTALL:=$(WHAT_TO_INSTALL) install-getty -endif - -all: $(WHAT_TO_BUILD) -all-passwd: $(USRBIN.PASSWD) -all-putils: $(BIN.PUTILS) $(USRBIN.PUTILS) $(USRSBIN.PUTILS) -all-init: $(SBIN.INIT) -all-getty: $(SBIN.GETTY) -all-misc: $(USRBIN.MISC) - -# Rules for everything else -login.o: ../MCONFIG -checktty.o login.o: login.h -cryptocard.o login.o: cryptocard.h -chfn.o chsh.o islocal.o passwd.o: islocal.h -chfn.o chsh.o passwd.o setpwnam.o vipw.o: setpwnam.h -chfn.o chsh.o login.o newgrp.o passwd.o simpleinit.o: my_crypt.h -initctl.o simpleinit.o: simpleinit.h -agetty.o islocal.o last.o setpwnam.o shutdown.o simpleinit.o \ - vipw.o: $(LIB)/pathnames.h -shutdown.o simpleinit.o: $(LIB)/linux_reboot.h -wall.o: ttymsg.h $(LIB)/carefulputc.h - -agetty: agetty.o $(LIB)/xstrncpy.o -chfn: chfn.o islocal.o setpwnam.o $(SELINUXOBJS) $(LIB)/env.o $(LIB)/xstrncpy.o - $(CC) $(LDFLAGS) -o $@ $^ $(CRYPT) $(PAM) $(SELINUXLLIB) -chsh: chsh.o islocal.o setpwnam.o $(SELINUXOBJS) $(LIB)/env.o - $(CC) $(LDFLAGS) -o $@ $^ $(CRYPT) $(PAM) $(SELINUXLLIB) -last: last.o - -ifeq "$(HAVE_PAM)" "yes" -login: login.o $(LIB)/setproctitle.o $(LIB)/xstrncpy.o - $(CC) $(LDFLAGS) -o $@ $^ $(CRYPT) $(PAM) $(SELINUXLLIB) -else -login: login.o $(LIB)/xstrncpy.o $(LIB)/setproctitle.o checktty.o - $(CC) $(LDFLAGS) -o $@ $^ $(CRYPT) $(SELINUXLLIB) -endif - -mesg: mesg.o $(ERR_O) - -newgrp: newgrp.o - $(CC) $(LDFLAGS) -o $@ $^ $(CRYPT) $(PAM) - -shutdown: shutdown.o $(LIB)/my_reboot.o $(LIB)/xstrncpy.o - -simpleinit: simpleinit.o $(LIB)/my_reboot.o $(LIB)/xstrncpy.o - $(CC) $(LDFLAGS) -o $@ $^ $(CRYPT) - -initctl: initctl.o - $(CC) $(LDFLAGS) -o $@ $^ - -vipw: vipw.o $(LIB)/xstrncpy.o - $(CC) $(LDFLAGS) -o $@ $^ $(SELINUXLLIB) - -newgrp.o: $(LIB)/pathnames.h - $(CC) -c $(CFLAGS) $(PAMFL) newgrp.c - -wall: wall.o ttymsg.o $(LIB)/carefulputc.o $(LIB)/xstrncpy.o - -LOGINFLAGS= -ifeq "$(USE_TTY_GROUP)" "yes" - LOGINFLAGS += -DUSE_TTY_GROUP -endif -ifeq "$(ALLOW_VCS_USE)" "yes" - LOGINFLAGS += -DCHOWNVCS -endif -ifeq "$(DO_STAT_MAIL)" "yes" - LOGINFLAGS += -DDO_STAT_MAIL -endif - -login.o: login.c $(LIB)/pathnames.h $(LIB)/setproctitle.c $(LIB)/setproctitle.h - $(CC) -c $(CFLAGS) $(PAMFL) $(LOGINFLAGS) login.c - -# LOGINFLAGS here only for -DUSE_TTY_GROUP -mesg.o: mesg.c $(LIB)/errs.h - $(CC) -c $(CFLAGS) $(LOGINFLAGS) mesg.c - -passwd: passwd.o islocal.o setpwnam.o $(LIB)/env.o $(LIB)/xstrncpy.o - $(CC) $(LDFLAGS) -o $@ $^ $(CRYPT) - -ifeq "$(REQUIRE_PASSWORD)" "yes" -CHSH_FLAGS:=$(CHSH_FLAGS) -DREQUIRE_PASSWORD -endif - -ifeq "$(ONLY_LISTED_SHELLS)" "yes" -CHSH_FLAGS:=$(CHSH_FLAGS) -DONLY_LISTED_SHELLS -endif - -chsh.o: chsh.c - $(CC) -c $(CFLAGS) $(PAMFL) $(CHSH_FLAGS) chsh.c - -chfn.o: chfn.c - $(CC) -c $(CFLAGS) $(PAMFL) $(CHSH_FLAGS) chfn.c - -install: all $(WHAT_TO_INSTALL) - -install-putils: $(BIN.PUTILS) $(USRBIN.PUTILS) $(USRSBIN.PUTILS) - $(INSTALLDIR) $(BINDIR) $(USRBINDIR) $(USRSBINDIR) - $(INSTALLBIN) $(BIN.PUTILS) $(BINDIR) - $(INSTALLSUID) $(USRBIN.PUTILS) $(USRBINDIR) - $(INSTALLBIN) $(USRSBIN.PUTILS) $(USRSBINDIR) - (cd $(USRSBINDIR); ln -sf vipw vigr) - $(INSTALLDIR) $(MAN1DIR) $(MAN8DIR) - $(INSTALLMAN) $(MAN1.PUTILS) $(MAN1DIR) - $(INSTALLMAN) $(MAN8.PUTILS) $(MAN8DIR) - -install-passwd: $(USRBIN.PASSWD) - $(INSTALLDIR) $(USRBINDIR) - $(INSTALLSUID) $(USRBIN.PASSWD) $(USRBINDIR) - $(INSTALLDIR) $(MAN1DIR) - $(INSTALLMAN) $(MAN1.PASSWD) $(MAN1DIR) - -install-init: $(SBIN.INIT) - $(INSTALLDIR) $(SBINDIR) - $(INSTALLBIN) $(SBIN.INIT) $(SBINDIR) - $(INSTALLDIR) $(MAN8DIR) - $(INSTALLMAN) $(MAN8.INIT) $(MAN8DIR) - # Make *relative* links for these - (cd $(SHUTDOWNDIR); ln -sf shutdown reboot) - (cd $(SHUTDOWNDIR); ln -sf shutdown fastboot) - (cd $(SHUTDOWNDIR); ln -sf shutdown halt) - (cd $(SHUTDOWNDIR); ln -sf shutdown fasthalt) - (cd $(SHUTDOWNDIR); ln -sf initctl need) - (cd $(SHUTDOWNDIR); ln -sf initctl display-services) - (cd $(SHUTDOWNDIR); ln -sf initctl provide) - (cd $(MAN8DIR); ln -sf initctl.8 need.8) - (cd $(MAN8DIR); ln -sf initctl.8 display-services.8) - (cd $(MAN8DIR); ln -sf initctl.8 provide.8) - - -install-getty: $(SBIN.GETTY) - $(INSTALLDIR) $(SBINDIR) - $(INSTALLBIN) $(SBIN.GETTY) $(SBINDIR) - $(INSTALLDIR) $(MAN8DIR) - $(INSTALLMAN) $(MAN8.GETTY) $(MAN8DIR) - -install-misc: $(USRBIN.MISC) - $(INSTALLDIR) $(USRBINDIR) - $(INSTALLBIN) $(USRBIN.MISC) $(USRBINDIR) - $(INSTALLDIR) $(MAN1DIR) - $(INSTALLMAN) $(MAN1.MISC) $(MAN1DIR) -ifeq "$(USE_TTY_GROUP)" "yes" - chgrp tty $(USRBINDIR)/wall - chmod g+s $(USRBINDIR)/wall -endif - -.PHONY: clean distclean -clean distclean: - -rm -f *.o *~ core $(BIN.PASSWD) $(SBIN.GETTY) $(SBIN.INIT) \ - $(USRBIN.MISC) $(USRBIN.PASSWD) $(USRBIN.PUTILS) \ - $(USRSBIN.PUTILS) $(BIN.PUTILS) diff --git a/login-utils/Makefile.am b/login-utils/Makefile.am new file mode 100644 index 000000000..45bac667d --- /dev/null +++ b/login-utils/Makefile.am @@ -0,0 +1,112 @@ +include $(top_srcdir)/config/include-Makefile.am + +bin_PROGRAMS = +usrbin_PROGRAMS = +sbin_PROGRAMS = +usrsbin_PROGRAMS = +man_MANS = + +if BUILD_AGETTY +sbin_PROGRAMS += agetty +man_MANS += agetty +endif + +if BUILD_INIT + +sbin_PROGRAMS += simpleinit shutdown initctl +man_MANS += fastboot.8 fasthalt.8 halt.8 reboot.8 simpleinit.8 shutdown.8 \ + initctl.8 + + +if NEED_LIBCRYPT +simpleinit_LDADD = -lcrypt +endif + +endif + +if BUILD_LAST +usrbin_PROGRAMS += last +man_MANS += last.1 +endif + +if BUILD_LOGIN_UTILS + +bin_PROGRAMS += login +usrbin_PROGRAMS += chfn chsh +usrsbin_PROGRAMS += vipw +man_MANS += chfn.1 chsh.1 login.1 vipw.8 vigr.8 + +chfn_SOURCES = chfn.c islocal.c setpwnam.c +chsh_SOURCES = chsh.c islocal.c setpwnam.c + +chfn_LDADD = ../lib/libenv.la +chsh_LDADD = ../lib/libenv.la +login_LDADD = ../lib/libsetproctitle.la +newgrp_LDADD = +vipw_LDADD = + +if NEED_LIBCRYPT +usrbin_PROGRAMS += newgrp +man_MANS += newgrp.1 +chfn_LDADD += -lcrypt +chsh_LDADD += -lcrypt +login_LDADD += -lcrypt +newgrp_LDADD += -lcrypt +endif + +if HAVE_PAM +chfn_LDADD += -lpam -lpam_misc +chsh_LDADD += -lpam -lpam_misc +login_LDADD += -lpam -lpam_misc +login_SOURCES = login.c +else +login_SOURCES = login.c checktty.c +endif + + +if HAVE_SELINUX +chfn_SOURCES += selinux_utils.c +chfn_LDADD += -lselinux +chsh_SOURCES += selinux_utils.c +chsh_LDADD += -lselinux +vipw_LDADD += -lselinux +endif + + +install-data-hook:: + cd $(DESTDIR)$(usrsbindir) && ln -sf vipw vigr + +endif + +if BUILD_MESG +usrbin_PROGRAMS += mesg +man_MANS += mesg.1 +endif + +if BUILD_WALL + +usrbin_PROGRAMS += wall +wall_SOURCES = wall.c ttymsg.c +man_MANS += wall.1 + +if USE_TTY_GROUP +install-data-hook:: + chgrp tty $(DESTDIR)$(usrbindir)/wall + chmod g+s $(DESTDIR)$(usrbindir)/wall +endif + +endif + + +install-exec-hook:: + cd $(DESTDIR)$(sbindir) && ln -sf shutdown reboot + cd $(DESTDIR)$(sbindir) && ln -sf shutdown fastboot + cd $(DESTDIR)$(sbindir) && ln -sf shutdown halt + cd $(DESTDIR)$(sbindir) && ln -sf shutdown fasthalt + cd $(DESTDIR)$(sbindir) && ln -sf initctl need + cd $(DESTDIR)$(sbindir) && ln -sf initctl display-services + cd $(DESTDIR)$(sbindir) && ln -sf initctl provide + cd $(DESTDIR)$(mandir)/man8 && ln -sf initctl.8 need.8 + cd $(DESTDIR)$(mandir)/man8 && ln -sf initctl.8 display-services.8 + cd $(DESTDIR)$(mandir)/man8 && ln -sf initctl.8 provide.8 + diff --git a/login-utils/Makefile.in b/login-utils/Makefile.in new file mode 100644 index 000000000..4a3a6c137 --- /dev/null +++ b/login-utils/Makefile.in @@ -0,0 +1,987 @@ +# 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 = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(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@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/config/include-Makefile.am +bin_PROGRAMS = $(am__EXEEXT_1) +usrbin_PROGRAMS = $(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) \ + $(am__EXEEXT_7) $(am__EXEEXT_8) +sbin_PROGRAMS = $(am__EXEEXT_2) $(am__EXEEXT_3) +usrsbin_PROGRAMS = $(am__EXEEXT_9) +@BUILD_AGETTY_TRUE@am__append_1 = agetty +@BUILD_AGETTY_TRUE@am__append_2 = agetty +@BUILD_INIT_TRUE@am__append_3 = simpleinit shutdown initctl +@BUILD_INIT_TRUE@am__append_4 = fastboot.8 fasthalt.8 halt.8 reboot.8 simpleinit.8 shutdown.8 \ +@BUILD_INIT_TRUE@ initctl.8 + +@BUILD_LAST_TRUE@am__append_5 = last +@BUILD_LAST_TRUE@am__append_6 = last.1 +@BUILD_LOGIN_UTILS_TRUE@am__append_7 = login +@BUILD_LOGIN_UTILS_TRUE@am__append_8 = chfn chsh +@BUILD_LOGIN_UTILS_TRUE@am__append_9 = vipw +@BUILD_LOGIN_UTILS_TRUE@am__append_10 = chfn.1 chsh.1 login.1 vipw.8 vigr.8 +@BUILD_LOGIN_UTILS_TRUE@@NEED_LIBCRYPT_TRUE@am__append_11 = newgrp +@BUILD_LOGIN_UTILS_TRUE@@NEED_LIBCRYPT_TRUE@am__append_12 = newgrp.1 +@BUILD_LOGIN_UTILS_TRUE@@NEED_LIBCRYPT_TRUE@am__append_13 = -lcrypt +@BUILD_LOGIN_UTILS_TRUE@@NEED_LIBCRYPT_TRUE@am__append_14 = -lcrypt +@BUILD_LOGIN_UTILS_TRUE@@NEED_LIBCRYPT_TRUE@am__append_15 = -lcrypt +@BUILD_LOGIN_UTILS_TRUE@@NEED_LIBCRYPT_TRUE@am__append_16 = -lcrypt +@BUILD_LOGIN_UTILS_TRUE@@HAVE_PAM_TRUE@am__append_17 = -lpam -lpam_misc +@BUILD_LOGIN_UTILS_TRUE@@HAVE_PAM_TRUE@am__append_18 = -lpam -lpam_misc +@BUILD_LOGIN_UTILS_TRUE@@HAVE_PAM_TRUE@am__append_19 = -lpam -lpam_misc +@BUILD_LOGIN_UTILS_TRUE@@HAVE_SELINUX_TRUE@am__append_20 = selinux_utils.c +@BUILD_LOGIN_UTILS_TRUE@@HAVE_SELINUX_TRUE@am__append_21 = -lselinux +@BUILD_LOGIN_UTILS_TRUE@@HAVE_SELINUX_TRUE@am__append_22 = selinux_utils.c +@BUILD_LOGIN_UTILS_TRUE@@HAVE_SELINUX_TRUE@am__append_23 = -lselinux +@BUILD_LOGIN_UTILS_TRUE@@HAVE_SELINUX_TRUE@am__append_24 = -lselinux +@BUILD_MESG_TRUE@am__append_25 = mesg +@BUILD_MESG_TRUE@am__append_26 = mesg.1 +@BUILD_WALL_TRUE@am__append_27 = wall +@BUILD_WALL_TRUE@am__append_28 = wall.1 +subdir = login-utils +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +@BUILD_LOGIN_UTILS_TRUE@am__EXEEXT_1 = login$(EXEEXT) +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" \ + "$(DESTDIR)$(usrbindir)" "$(DESTDIR)$(usrsbindir)" \ + "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +@BUILD_AGETTY_TRUE@am__EXEEXT_2 = agetty$(EXEEXT) +@BUILD_INIT_TRUE@am__EXEEXT_3 = simpleinit$(EXEEXT) shutdown$(EXEEXT) \ +@BUILD_INIT_TRUE@ initctl$(EXEEXT) +sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +@BUILD_LAST_TRUE@am__EXEEXT_4 = last$(EXEEXT) +@BUILD_LOGIN_UTILS_TRUE@am__EXEEXT_5 = chfn$(EXEEXT) chsh$(EXEEXT) +@BUILD_LOGIN_UTILS_TRUE@@NEED_LIBCRYPT_TRUE@am__EXEEXT_6 = \ +@BUILD_LOGIN_UTILS_TRUE@@NEED_LIBCRYPT_TRUE@ newgrp$(EXEEXT) +@BUILD_MESG_TRUE@am__EXEEXT_7 = mesg$(EXEEXT) +@BUILD_WALL_TRUE@am__EXEEXT_8 = wall$(EXEEXT) +usrbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +@BUILD_LOGIN_UTILS_TRUE@am__EXEEXT_9 = vipw$(EXEEXT) +usrsbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS) $(usrbin_PROGRAMS) \ + $(usrsbin_PROGRAMS) +agetty_SOURCES = agetty.c +agetty_OBJECTS = agetty.$(OBJEXT) +agetty_LDADD = $(LDADD) +am__chfn_SOURCES_DIST = chfn.c islocal.c setpwnam.c selinux_utils.c +@BUILD_LOGIN_UTILS_TRUE@@HAVE_SELINUX_TRUE@am__objects_1 = selinux_utils.$(OBJEXT) +@BUILD_LOGIN_UTILS_TRUE@am_chfn_OBJECTS = chfn.$(OBJEXT) \ +@BUILD_LOGIN_UTILS_TRUE@ islocal.$(OBJEXT) setpwnam.$(OBJEXT) \ +@BUILD_LOGIN_UTILS_TRUE@ $(am__objects_1) +chfn_OBJECTS = $(am_chfn_OBJECTS) +am__DEPENDENCIES_1 = +@BUILD_LOGIN_UTILS_TRUE@chfn_DEPENDENCIES = ../lib/libenv.la \ +@BUILD_LOGIN_UTILS_TRUE@ $(am__DEPENDENCIES_1) \ +@BUILD_LOGIN_UTILS_TRUE@ $(am__DEPENDENCIES_1) \ +@BUILD_LOGIN_UTILS_TRUE@ $(am__DEPENDENCIES_1) +am__chsh_SOURCES_DIST = chsh.c islocal.c setpwnam.c selinux_utils.c +@BUILD_LOGIN_UTILS_TRUE@am_chsh_OBJECTS = chsh.$(OBJEXT) \ +@BUILD_LOGIN_UTILS_TRUE@ islocal.$(OBJEXT) setpwnam.$(OBJEXT) \ +@BUILD_LOGIN_UTILS_TRUE@ $(am__objects_1) +chsh_OBJECTS = $(am_chsh_OBJECTS) +@BUILD_LOGIN_UTILS_TRUE@chsh_DEPENDENCIES = ../lib/libenv.la \ +@BUILD_LOGIN_UTILS_TRUE@ $(am__DEPENDENCIES_1) \ +@BUILD_LOGIN_UTILS_TRUE@ $(am__DEPENDENCIES_1) \ +@BUILD_LOGIN_UTILS_TRUE@ $(am__DEPENDENCIES_1) +initctl_SOURCES = initctl.c +initctl_OBJECTS = initctl.$(OBJEXT) +initctl_LDADD = $(LDADD) +last_SOURCES = last.c +last_OBJECTS = last.$(OBJEXT) +last_LDADD = $(LDADD) +am__login_SOURCES_DIST = login.c checktty.c +@BUILD_LOGIN_UTILS_TRUE@@HAVE_PAM_FALSE@am_login_OBJECTS = \ +@BUILD_LOGIN_UTILS_TRUE@@HAVE_PAM_FALSE@ login.$(OBJEXT) \ +@BUILD_LOGIN_UTILS_TRUE@@HAVE_PAM_FALSE@ checktty.$(OBJEXT) +@BUILD_LOGIN_UTILS_TRUE@@HAVE_PAM_TRUE@am_login_OBJECTS = \ +@BUILD_LOGIN_UTILS_TRUE@@HAVE_PAM_TRUE@ login.$(OBJEXT) +login_OBJECTS = $(am_login_OBJECTS) +@BUILD_LOGIN_UTILS_TRUE@login_DEPENDENCIES = \ +@BUILD_LOGIN_UTILS_TRUE@ ../lib/libsetproctitle.la \ +@BUILD_LOGIN_UTILS_TRUE@ $(am__DEPENDENCIES_1) \ +@BUILD_LOGIN_UTILS_TRUE@ $(am__DEPENDENCIES_1) +mesg_SOURCES = mesg.c +mesg_OBJECTS = mesg.$(OBJEXT) +mesg_LDADD = $(LDADD) +newgrp_SOURCES = newgrp.c +newgrp_OBJECTS = newgrp.$(OBJEXT) +@BUILD_LOGIN_UTILS_TRUE@newgrp_DEPENDENCIES = $(am__DEPENDENCIES_1) +shutdown_SOURCES = shutdown.c +shutdown_OBJECTS = shutdown.$(OBJEXT) +shutdown_LDADD = $(LDADD) +simpleinit_SOURCES = simpleinit.c +simpleinit_OBJECTS = simpleinit.$(OBJEXT) +simpleinit_DEPENDENCIES = +vipw_SOURCES = vipw.c +vipw_OBJECTS = vipw.$(OBJEXT) +@BUILD_LOGIN_UTILS_TRUE@vipw_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__wall_SOURCES_DIST = wall.c ttymsg.c +@BUILD_WALL_TRUE@am_wall_OBJECTS = wall.$(OBJEXT) ttymsg.$(OBJEXT) +wall_OBJECTS = $(am_wall_OBJECTS) +wall_LDADD = $(LDADD) +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = agetty.c $(chfn_SOURCES) $(chsh_SOURCES) initctl.c last.c \ + $(login_SOURCES) mesg.c newgrp.c shutdown.c simpleinit.c \ + vipw.c $(wall_SOURCES) +DIST_SOURCES = agetty.c $(am__chfn_SOURCES_DIST) \ + $(am__chsh_SOURCES_DIST) initctl.c last.c \ + $(am__login_SOURCES_DIST) mesg.c newgrp.c shutdown.c \ + simpleinit.c vipw.c $(am__wall_SOURCES_DIST) +man1dir = $(mandir)/man1 +man8dir = $(mandir)/man8 +NROFF = nroff +MANS = $(man_MANS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_AGETTY_FALSE = @BUILD_AGETTY_FALSE@ +BUILD_AGETTY_TRUE = @BUILD_AGETTY_TRUE@ +BUILD_ELVTUNE_FALSE = @BUILD_ELVTUNE_FALSE@ +BUILD_ELVTUNE_TRUE = @BUILD_ELVTUNE_TRUE@ +BUILD_INIT_FALSE = @BUILD_INIT_FALSE@ +BUILD_INIT_TRUE = @BUILD_INIT_TRUE@ +BUILD_KILL_FALSE = @BUILD_KILL_FALSE@ +BUILD_KILL_TRUE = @BUILD_KILL_TRUE@ +BUILD_LAST_FALSE = @BUILD_LAST_FALSE@ +BUILD_LAST_TRUE = @BUILD_LAST_TRUE@ +BUILD_LOGIN_UTILS_FALSE = @BUILD_LOGIN_UTILS_FALSE@ +BUILD_LOGIN_UTILS_TRUE = @BUILD_LOGIN_UTILS_TRUE@ +BUILD_MESG_FALSE = @BUILD_MESG_FALSE@ +BUILD_MESG_TRUE = @BUILD_MESG_TRUE@ +BUILD_PARTX_FALSE = @BUILD_PARTX_FALSE@ +BUILD_PARTX_TRUE = @BUILD_PARTX_TRUE@ +BUILD_RAW_FALSE = @BUILD_RAW_FALSE@ +BUILD_RAW_TRUE = @BUILD_RAW_TRUE@ +BUILD_RDEV_FALSE = @BUILD_RDEV_FALSE@ +BUILD_RDEV_TRUE = @BUILD_RDEV_TRUE@ +BUILD_RENAME_FALSE = @BUILD_RENAME_FALSE@ +BUILD_RENAME_TRUE = @BUILD_RENAME_TRUE@ +BUILD_RESET_FALSE = @BUILD_RESET_FALSE@ +BUILD_RESET_TRUE = @BUILD_RESET_TRUE@ +BUILD_SCHEDUTILS_FALSE = @BUILD_SCHEDUTILS_FALSE@ +BUILD_SCHEDUTILS_TRUE = @BUILD_SCHEDUTILS_TRUE@ +BUILD_WALL_FALSE = @BUILD_WALL_FALSE@ +BUILD_WALL_TRUE = @BUILD_WALL_TRUE@ +BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@ +BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GMSGFMT = @GMSGFMT@ +HAVE_BLKID_FALSE = @HAVE_BLKID_FALSE@ +HAVE_BLKID_TRUE = @HAVE_BLKID_TRUE@ +HAVE_LIBUTIL_FALSE = @HAVE_LIBUTIL_FALSE@ +HAVE_LIBUTIL_TRUE = @HAVE_LIBUTIL_TRUE@ +HAVE_NCURSES_FALSE = @HAVE_NCURSES_FALSE@ +HAVE_NCURSES_TRUE = @HAVE_NCURSES_TRUE@ +HAVE_PAM_FALSE = @HAVE_PAM_FALSE@ +HAVE_PAM_TRUE = @HAVE_PAM_TRUE@ +HAVE_PIVOT_ROOT_FALSE = @HAVE_PIVOT_ROOT_FALSE@ +HAVE_PIVOT_ROOT_TRUE = @HAVE_PIVOT_ROOT_TRUE@ +HAVE_RAW_FALSE = @HAVE_RAW_FALSE@ +HAVE_RAW_TRUE = @HAVE_RAW_TRUE@ +HAVE_SELINUX_FALSE = @HAVE_SELINUX_FALSE@ +HAVE_SELINUX_TRUE = @HAVE_SELINUX_TRUE@ +HAVE_TERMCAP_FALSE = @HAVE_TERMCAP_FALSE@ +HAVE_TERMCAP_TRUE = @HAVE_TERMCAP_TRUE@ +HAVE_UUID_FALSE = @HAVE_UUID_FALSE@ +HAVE_UUID_TRUE = @HAVE_UUID_TRUE@ +HAVE_ZLIB_FALSE = @HAVE_ZLIB_FALSE@ +HAVE_ZLIB_TRUE = @HAVE_ZLIB_TRUE@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTEL_FALSE = @INTEL_FALSE@ +INTEL_TRUE = @INTEL_TRUE@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NEED_LIBCRYPT_FALSE = @NEED_LIBCRYPT_FALSE@ +NEED_LIBCRYPT_TRUE = @NEED_LIBCRYPT_TRUE@ +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@ +PERL = @PERL@ +POSUB = @POSUB@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPARC_FALSE = @SPARC_FALSE@ +SPARC_TRUE = @SPARC_TRUE@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +USE_SLANG_FALSE = @USE_SLANG_FALSE@ +USE_SLANG_TRUE = @USE_SLANG_TRUE@ +USE_TTY_GROUP_FALSE = @USE_TTY_GROUP_FALSE@ +USE_TTY_GROUP_TRUE = @USE_TTY_GROUP_TRUE@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_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 = $(prefix)/usr/share +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = $(datadir)/info +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = $(datadir)/man +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +usrbindir = $(prefix)/usr/bin +usrsbindir = $(prefix)/usr/sbin +AM_CPPFLAGS = -include ../config.h -I$(top_srcdir)/include +DEFAULT_INCLUDES = +man_MANS = $(am__append_2) $(am__append_4) $(am__append_6) \ + $(am__append_10) $(am__append_12) $(am__append_26) \ + $(am__append_28) +@BUILD_INIT_TRUE@@NEED_LIBCRYPT_TRUE@simpleinit_LDADD = -lcrypt +@BUILD_LOGIN_UTILS_TRUE@chfn_SOURCES = chfn.c islocal.c setpwnam.c \ +@BUILD_LOGIN_UTILS_TRUE@ $(am__append_20) +@BUILD_LOGIN_UTILS_TRUE@chsh_SOURCES = chsh.c islocal.c setpwnam.c \ +@BUILD_LOGIN_UTILS_TRUE@ $(am__append_22) +@BUILD_LOGIN_UTILS_TRUE@chfn_LDADD = ../lib/libenv.la $(am__append_13) \ +@BUILD_LOGIN_UTILS_TRUE@ $(am__append_17) $(am__append_21) +@BUILD_LOGIN_UTILS_TRUE@chsh_LDADD = ../lib/libenv.la $(am__append_14) \ +@BUILD_LOGIN_UTILS_TRUE@ $(am__append_18) $(am__append_23) +@BUILD_LOGIN_UTILS_TRUE@login_LDADD = ../lib/libsetproctitle.la \ +@BUILD_LOGIN_UTILS_TRUE@ $(am__append_15) $(am__append_19) +@BUILD_LOGIN_UTILS_TRUE@newgrp_LDADD = $(am__append_16) +@BUILD_LOGIN_UTILS_TRUE@vipw_LDADD = $(am__append_24) +@BUILD_LOGIN_UTILS_TRUE@@HAVE_PAM_FALSE@login_SOURCES = login.c checktty.c +@BUILD_LOGIN_UTILS_TRUE@@HAVE_PAM_TRUE@login_SOURCES = login.c +@BUILD_WALL_TRUE@wall_SOURCES = wall.c ttymsg.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/config/include-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 login-utils/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign login-utils/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: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done + +installcheck-binPROGRAMS: $(bin_PROGRAMS) + bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \ + case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ + *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ + esac; \ + f=`echo "$$p" | \ + sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + for opt in --help --version; do \ + if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ + 2>c$${pid}_.err </dev/null \ + && test -n "`cat c$${pid}_.out`" \ + && test -z "`cat c$${pid}_.err`"; then :; \ + else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \ + done; \ + done; rm -f c$${pid}_.???; exit $$bad +install-sbinPROGRAMS: $(sbin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)" + @list='$(sbin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-sbinPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(sbin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \ + rm -f "$(DESTDIR)$(sbindir)/$$f"; \ + done + +clean-sbinPROGRAMS: + @list='$(sbin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done + +installcheck-sbinPROGRAMS: $(sbin_PROGRAMS) + bad=0; pid=$$$$; list="$(sbin_PROGRAMS)"; for p in $$list; do \ + case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ + *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ + esac; \ + f=`echo "$$p" | \ + sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + for opt in --help --version; do \ + if "$(DESTDIR)$(sbindir)/$$f" $$opt >c$${pid}_.out \ + 2>c$${pid}_.err </dev/null \ + && test -n "`cat c$${pid}_.out`" \ + && test -z "`cat c$${pid}_.err`"; then :; \ + else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \ + done; \ + done; rm -f c$${pid}_.???; exit $$bad +install-usrbinPROGRAMS: $(usrbin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(usrbindir)" || $(mkdir_p) "$(DESTDIR)$(usrbindir)" + @list='$(usrbin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(usrbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(usrbindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(usrbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(usrbindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-usrbinPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(usrbin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(usrbindir)/$$f'"; \ + rm -f "$(DESTDIR)$(usrbindir)/$$f"; \ + done + +clean-usrbinPROGRAMS: + @list='$(usrbin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done + +installcheck-usrbinPROGRAMS: $(usrbin_PROGRAMS) + bad=0; pid=$$$$; list="$(usrbin_PROGRAMS)"; for p in $$list; do \ + case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ + *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ + esac; \ + f=`echo "$$p" | \ + sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + for opt in --help --version; do \ + if "$(DESTDIR)$(usrbindir)/$$f" $$opt >c$${pid}_.out \ + 2>c$${pid}_.err </dev/null \ + && test -n "`cat c$${pid}_.out`" \ + && test -z "`cat c$${pid}_.err`"; then :; \ + else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \ + done; \ + done; rm -f c$${pid}_.???; exit $$bad +install-usrsbinPROGRAMS: $(usrsbin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(usrsbindir)" || $(mkdir_p) "$(DESTDIR)$(usrsbindir)" + @list='$(usrsbin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(usrsbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(usrsbindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(usrsbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(usrsbindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-usrsbinPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(usrsbin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(usrsbindir)/$$f'"; \ + rm -f "$(DESTDIR)$(usrsbindir)/$$f"; \ + done + +clean-usrsbinPROGRAMS: + @list='$(usrsbin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done + +installcheck-usrsbinPROGRAMS: $(usrsbin_PROGRAMS) + bad=0; pid=$$$$; list="$(usrsbin_PROGRAMS)"; for p in $$list; do \ + case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ + *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ + esac; \ + f=`echo "$$p" | \ + sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + for opt in --help --version; do \ + if "$(DESTDIR)$(usrsbindir)/$$f" $$opt >c$${pid}_.out \ + 2>c$${pid}_.err </dev/null \ + && test -n "`cat c$${pid}_.out`" \ + && test -z "`cat c$${pid}_.err`"; then :; \ + else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \ + done; \ + done; rm -f c$${pid}_.???; exit $$bad +agetty$(EXEEXT): $(agetty_OBJECTS) $(agetty_DEPENDENCIES) + @rm -f agetty$(EXEEXT) + $(LINK) $(agetty_LDFLAGS) $(agetty_OBJECTS) $(agetty_LDADD) $(LIBS) +chfn$(EXEEXT): $(chfn_OBJECTS) $(chfn_DEPENDENCIES) + @rm -f chfn$(EXEEXT) + $(LINK) $(chfn_LDFLAGS) $(chfn_OBJECTS) $(chfn_LDADD) $(LIBS) +chsh$(EXEEXT): $(chsh_OBJECTS) $(chsh_DEPENDENCIES) + @rm -f chsh$(EXEEXT) + $(LINK) $(chsh_LDFLAGS) $(chsh_OBJECTS) $(chsh_LDADD) $(LIBS) +initctl$(EXEEXT): $(initctl_OBJECTS) $(initctl_DEPENDENCIES) + @rm -f initctl$(EXEEXT) + $(LINK) $(initctl_LDFLAGS) $(initctl_OBJECTS) $(initctl_LDADD) $(LIBS) +last$(EXEEXT): $(last_OBJECTS) $(last_DEPENDENCIES) + @rm -f last$(EXEEXT) + $(LINK) $(last_LDFLAGS) $(last_OBJECTS) $(last_LDADD) $(LIBS) +login$(EXEEXT): $(login_OBJECTS) $(login_DEPENDENCIES) + @rm -f login$(EXEEXT) + $(LINK) $(login_LDFLAGS) $(login_OBJECTS) $(login_LDADD) $(LIBS) +mesg$(EXEEXT): $(mesg_OBJECTS) $(mesg_DEPENDENCIES) + @rm -f mesg$(EXEEXT) + $(LINK) $(mesg_LDFLAGS) $(mesg_OBJECTS) $(mesg_LDADD) $(LIBS) +newgrp$(EXEEXT): $(newgrp_OBJECTS) $(newgrp_DEPENDENCIES) + @rm -f newgrp$(EXEEXT) + $(LINK) $(newgrp_LDFLAGS) $(newgrp_OBJECTS) $(newgrp_LDADD) $(LIBS) +shutdown$(EXEEXT): $(shutdown_OBJECTS) $(shutdown_DEPENDENCIES) + @rm -f shutdown$(EXEEXT) + $(LINK) $(shutdown_LDFLAGS) $(shutdown_OBJECTS) $(shutdown_LDADD) $(LIBS) +simpleinit$(EXEEXT): $(simpleinit_OBJECTS) $(simpleinit_DEPENDENCIES) + @rm -f simpleinit$(EXEEXT) + $(LINK) $(simpleinit_LDFLAGS) $(simpleinit_OBJECTS) $(simpleinit_LDADD) $(LIBS) +vipw$(EXEEXT): $(vipw_OBJECTS) $(vipw_DEPENDENCIES) + @rm -f vipw$(EXEEXT) + $(LINK) $(vipw_LDFLAGS) $(vipw_OBJECTS) $(vipw_LDADD) $(LIBS) +wall$(EXEEXT): $(wall_OBJECTS) $(wall_DEPENDENCIES) + @rm -f wall$(EXEEXT) + $(LINK) $(wall_LDFLAGS) $(wall_OBJECTS) $(wall_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agetty.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checktty.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chfn.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chsh.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/initctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/islocal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/last.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/login.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newgrp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/selinux_utils.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setpwnam.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shutdown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simpleinit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttymsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vipw.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wall.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +install-man1: $(man1_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ + done +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ + done +install-man8: $(man8_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)" + @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.8*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 8*) ;; \ + *) ext='8' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \ + done +uninstall-man8: + @$(NORMAL_UNINSTALL) + @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.8*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 8*) ;; \ + *) ext='8' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man8dir)/$$inst"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(mkdir_p) $(distdir)/../config + @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 $(PROGRAMS) $(MANS) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(usrbindir)" "$(DESTDIR)$(usrsbindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"; 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: + +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." +@BUILD_LOGIN_UTILS_FALSE@@BUILD_WALL_FALSE@install-data-hook: +@BUILD_LOGIN_UTILS_FALSE@@USE_TTY_GROUP_FALSE@install-data-hook: +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool \ + clean-sbinPROGRAMS clean-usrbinPROGRAMS clean-usrsbinPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-man install-usrbinPROGRAMS \ + install-usrsbinPROGRAMS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook + +install-exec-am: install-binPROGRAMS install-sbinPROGRAMS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook + +install-info: install-info-am + +install-man: install-man1 install-man8 + +installcheck-am: installcheck-binPROGRAMS installcheck-sbinPROGRAMS \ + installcheck-usrbinPROGRAMS installcheck-usrsbinPROGRAMS + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man \ + uninstall-sbinPROGRAMS uninstall-usrbinPROGRAMS \ + uninstall-usrsbinPROGRAMS + +uninstall-man: uninstall-man1 uninstall-man8 + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool clean-sbinPROGRAMS \ + clean-usrbinPROGRAMS clean-usrsbinPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-data-hook install-exec install-exec-am \ + install-exec-hook install-info install-info-am install-man \ + install-man1 install-man8 install-sbinPROGRAMS install-strip \ + install-usrbinPROGRAMS install-usrsbinPROGRAMS installcheck \ + installcheck-am installcheck-binPROGRAMS \ + installcheck-sbinPROGRAMS installcheck-usrbinPROGRAMS \ + installcheck-usrsbinPROGRAMS installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-info-am uninstall-man uninstall-man1 uninstall-man8 \ + uninstall-sbinPROGRAMS uninstall-usrbinPROGRAMS \ + uninstall-usrsbinPROGRAMS + + +@BUILD_LOGIN_UTILS_TRUE@install-data-hook:: +@BUILD_LOGIN_UTILS_TRUE@ cd $(DESTDIR)$(usrsbindir) && ln -sf vipw vigr + +@BUILD_WALL_TRUE@@USE_TTY_GROUP_TRUE@install-data-hook:: +@BUILD_WALL_TRUE@@USE_TTY_GROUP_TRUE@ chgrp tty $(DESTDIR)$(usrbindir)/wall +@BUILD_WALL_TRUE@@USE_TTY_GROUP_TRUE@ chmod g+s $(DESTDIR)$(usrbindir)/wall + +install-exec-hook:: + cd $(DESTDIR)$(sbindir) && ln -sf shutdown reboot + cd $(DESTDIR)$(sbindir) && ln -sf shutdown fastboot + cd $(DESTDIR)$(sbindir) && ln -sf shutdown halt + cd $(DESTDIR)$(sbindir) && ln -sf shutdown fasthalt + cd $(DESTDIR)$(sbindir) && ln -sf initctl need + cd $(DESTDIR)$(sbindir) && ln -sf initctl display-services + cd $(DESTDIR)$(sbindir) && ln -sf initctl provide + cd $(DESTDIR)$(mandir)/man8 && ln -sf initctl.8 need.8 + cd $(DESTDIR)$(mandir)/man8 && ln -sf initctl.8 display-services.8 + cd $(DESTDIR)$(mandir)/man8 && ln -sf initctl.8 provide.8 +# 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: diff --git a/login-utils/agetty.c b/login-utils/agetty.c index f9f33b535..d159d573c 100644 --- a/login-utils/agetty.c +++ b/login-utils/agetty.c @@ -604,7 +604,7 @@ update_utmp(line) endutent(); { -#ifdef HAVE_updwtmp +#ifdef HAVE_UPDWTMP updwtmp(_PATH_WTMP, &ut); #else int ut_fd; @@ -869,7 +869,7 @@ do_prompt(op, tp) case 'o': { char domainname[256]; -#ifdef HAVE_getdomainname +#ifdef HAVE_GETDOMAINNAME getdomainname(domainname, sizeof(domainname)); #else strcpy(domainname, "unknown_domain"); diff --git a/login-utils/checktty.c b/login-utils/checktty.c index 8171f44d2..9c3ce46d0 100644 --- a/login-utils/checktty.c +++ b/login-utils/checktty.c @@ -23,33 +23,13 @@ #include <sys/syslog.h> #include "nls.h" -#ifdef __linux__ -# include <sys/sysmacros.h> -# include <linux/major.h> -#endif +#include <sys/sysmacros.h> +#include <linux/major.h> #include "pathnames.h" #include "login.h" #include "xstrncpy.h" -#ifdef TESTING -char hostaddress[4]; -char *hostname; - -void -badlogin(const char *s) -{ - printf("badlogin: %s\n", s); -} - -void -sleepexit(int x) -{ - printf("sleepexit %d\n", x); - exit(1); -} -#endif - static gid_t mygroups[NGROUPS]; static int num_groups; @@ -145,7 +125,6 @@ isapty(const char *tty) return 0; sprintf(devname, "/dev/%s", tty); -#if defined(__linux__) if((stat(devname, &stb) >= 0) && S_ISCHR(stb.st_mode)) { int majordev = major(stb.st_rdev); @@ -167,7 +146,6 @@ isapty(const char *tty) #endif } -#endif return 0; } @@ -349,11 +327,7 @@ checktty(const char *user, const char *tty, struct passwd *pwd) int found_match = 0; /* no /etc/usertty, default to allow access */ -#ifdef TESTING - if (!(f = fopen("usertty", "r"))) return; -#else if (!(f = fopen(_PATH_USERTTY, "r"))) return; -#endif if (pwd == NULL) { fclose(f); @@ -439,13 +413,3 @@ checktty(const char *user, const char *tty, struct passwd *pwd) on all tty's */ free_all(); /* JDS */ } - -#ifdef TESTING -main(int argc, char *argv[]) -{ - struct passwd *pw; - - pw = getpwnam(argv[1]); - checktty(argv[1], argv[2], pw); -} -#endif diff --git a/login-utils/chfn.c b/login-utils/chfn.c index 834dedfd4..638af06a7 100644 --- a/login-utils/chfn.c +++ b/login-utils/chfn.c @@ -40,13 +40,13 @@ #include "nls.h" #include "env.h" -#ifdef WITH_SELINUX +#ifdef HAVE_LIBSELINUX #include <selinux/selinux.h> #include <selinux/av_permissions.h> #include "selinux_utils.h" #endif -#if REQUIRE_PASSWORD && USE_PAM +#if defined(REQUIRE_PASSWORD) && defined(HAVE_SECURITY_PAM_MISC_H) #include <security/pam_appl.h> #include <security/pam_misc.h> #endif @@ -90,7 +90,7 @@ int main (int argc, char **argv) { struct finfo oldf, newf; boolean interactive; int status; -#if REQUIRE_PASSWORD && USE_PAM +#if defined(REQUIRE_PASSWORD) && defined(HAVE_SECURITY_PAM_MISC_H) pam_handle_t *pamh = NULL; int retcode; struct pam_conv conv = { misc_conv, NULL }; @@ -142,7 +142,7 @@ int main (int argc, char **argv) { exit(1); } -#ifdef WITH_SELINUX +#ifdef HAVE_LIBSELINUX if (is_selinux_enabled()) { if(uid == 0) { if (checkAccess(oldf.username,PASSWD__CHFN)!=0) { @@ -172,8 +172,8 @@ int main (int argc, char **argv) { printf (_("Changing finger information for %s.\n"), oldf.username); -#if REQUIRE_PASSWORD -# if USE_PAM +#ifdef REQUIRE_PASSWORD +#ifdef HAVE_SECURITY_PAM_MISC_H if(uid != 0) { if (pam_start("chfn", oldf.username, &conv, &pamh)) { puts(_("Password error.")); @@ -197,7 +197,7 @@ int main (int argc, char **argv) { /* no need to establish a session; this isn't a session-oriented * activity... */ } -# else /* USE_PAM */ +# else /* HAVE_SECURITY_PAM_MISC_H */ /* require password, unless root */ if(uid != 0 && oldf.pw->pw_passwd && oldf.pw->pw_passwd[0]) { char *pwdstr = getpass(_("Password: ")); @@ -207,7 +207,7 @@ int main (int argc, char **argv) { exit(1); } } -# endif /* USE_PAM */ +# endif /* HAVE_SECURITY_PAM_MISC_H */ #endif /* REQUIRE_PASSWORD */ @@ -251,7 +251,7 @@ static boolean parse_argv (argc, argv, pinfo) if (c == -1) break; /* version? output version and exit. */ if (c == 'v') { - printf ("%s\n", util_linux_version); + printf ("%s\n", PACKAGE_STRING); exit (0); } if (c == 'u') { diff --git a/login-utils/chsh.c b/login-utils/chsh.c index aa8e10dcd..8bd2d0bda 100644 --- a/login-utils/chsh.c +++ b/login-utils/chsh.c @@ -42,12 +42,12 @@ #include "nls.h" #include "env.h" -#if REQUIRE_PASSWORD && USE_PAM +#if defined(REQUIRE_PASSWORD) && defined(HAVE_SECURITY_PAM_MISC_H) #include <security/pam_appl.h> #include <security/pam_misc.h> #endif -#ifdef WITH_SELINUX +#ifdef HAVE_LIBSELINUX #include <selinux/selinux.h> #include <selinux/av_permissions.h> #include "selinux_utils.h" @@ -85,7 +85,7 @@ main (int argc, char *argv[]) { uid_t uid; struct sinfo info; struct passwd *pw; -#if REQUIRE_PASSWORD && USE_PAM +#if defined(REQUIRE_PASSWORD) && defined(HAVE_SECURITY_PAM_MISC_H) pam_handle_t *pamh = NULL; int retcode; struct pam_conv conv = { misc_conv, NULL }; @@ -127,7 +127,7 @@ main (int argc, char *argv[]) { exit(1); } -#ifdef WITH_SELINUX +#ifdef HAVE_LIBSELINUX if (is_selinux_enabled()) { if(uid == 0) { if (checkAccess(pw->pw_name,PASSWD__CHSH)!=0) { @@ -169,8 +169,8 @@ main (int argc, char *argv[]) { printf( _("Changing shell for %s.\n"), pw->pw_name ); -#if REQUIRE_PASSWORD -# if USE_PAM +#ifdef REQUIRE_PASSWORD +#ifdef HAVE_SECURITY_PAM_MISC_H if(uid != 0) { if (pam_start("chsh", pw->pw_name, &conv, &pamh)) { puts(_("Password error.")); @@ -194,7 +194,7 @@ main (int argc, char *argv[]) { /* no need to establish a session; this isn't a session-oriented * activity... */ } -# else /* USE_PAM */ +#else /* HAVE_SECURITY_PAM_MISC_H */ /* require password, unless root */ if(uid != 0 && pw->pw_passwd && pw->pw_passwd[0]) { char *pwdstr = getpass(_("Password: ")); @@ -204,7 +204,7 @@ main (int argc, char *argv[]) { exit(1); } } -# endif /* USE_PAM */ +#endif /* HAVE_SECURITY_PAM_MISC_H */ #endif /* REQUIRE_PASSWORD */ if (! shell) { @@ -253,7 +253,7 @@ parse_argv (int argc, char *argv[], struct sinfo *pinfo) { case -1: break; case 'v': - printf ("%s\n", util_linux_version); + printf ("%s\n", PACKAGE_STRING); exit (0); case 'u': usage (stdout); @@ -356,7 +356,7 @@ check_shell (char *shell) { return (-1); } } -#if ONLY_LISTED_SHELLS +#ifdef ONLY_LISTED_SHELLS if (! get_shell_list (shell)) { if (!getuid()) printf (_("Warning: \"%s\" is not listed in /etc/shells\n"), shell); diff --git a/login-utils/cryptocard.c b/login-utils/cryptocard.c deleted file mode 100644 index 44cfb55d5..000000000 --- a/login-utils/cryptocard.c +++ /dev/null @@ -1,228 +0,0 @@ -/* cryptocard.c - support for the CRYPTOCard - RB-1 Challenge-Response Token, initial code by - bentson@grieg.seaslug.org (Randolph Bentson) on 3-Dec-96, - Hacked severely by poe@daimi.aau.dk. - This relies on an implementation of DES in a library, currently - it interfaces with the koontz-des.tar.gz implementation which - can be found in: - - ftp://ftp.funet.fi/pub/crypt/cryptography/symmetric/des/ - - (Link with the fdes.o file from that distribution) - - and with Eric A. Young's libdes implementation used in SSLeay. Also - available from the above ftp site. Link with the libdes.a library. - - The sources for this code are maintained in - - ftp://ftp.daimi.aau.dk/pub/linux/poe/poeigl-X.XX.tar.gz - - 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL> - - added Native Language Support - -*/ -#ifdef CRYPTOCARD - -/******************** CONFIGURATION section *****************************/ -/*--------------- select ONE DES implementation ------------------------*/ -/*#define KOONTZ_DES */ -#define EAY_LIBDES -/*--------------- define if on little endian machine (Intel x86) -------*/ -#define LITTLE_ENDIAN -/******************** end of CONFIGURATION section **********************/ - -#define _BSD_SOURCE -#define _GNU_SOURCE - -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <string.h> -#include <unistd.h> -#include <fcntl.h> -#include <syslog.h> -#include <pwd.h> -#include <sys/param.h> -#include <sys/stat.h> -#include "nls.h" - -#ifdef KOONTZ_DES -#include "../koontz-des/des.h" -#endif /* KOONTZ_DES */ - -#ifdef EAY_LIBDES -#include "../libdes/des.h" -#endif /* EAY_LIBDES */ - -#include "cryptocard.h" - -static char * -generate_challenge(void) -{ - static char challenge_str[30]; - int rfd; - unsigned long clong; - - /* create and present a challenge string */ - if ((rfd = open("/dev/urandom", O_RDONLY)) < 0) { - syslog(LOG_NOTICE, _("couldn't open /dev/urandom")); - return NULL; - } - if (read(rfd, &clong, 4) < 4) { - close(rfd); - syslog(LOG_NOTICE, _("couldn't read random data from /dev/urandom")); - return NULL; - } - close(rfd); - - sprintf(challenge_str,"%08lu", clong); - return challenge_str; -} - -static char * -get_key() -{ - int success = 0; - char keyfile[MAXPATHLEN]; - static char key[10]; - int rfd; - struct stat statbuf; - - if (strlen(pwd->pw_dir) + 13 > sizeof(keyfile)) - goto bail_out; - sprintf(keyfile, "%s/.cryptocard", pwd->pw_dir); - - if ((rfd = open(keyfile, O_RDONLY)) < 0) { - syslog(LOG_NOTICE, _("can't open %s for reading"), keyfile); - goto bail_out; - } - if (fstat(rfd, &statbuf) < 0) { - syslog(LOG_NOTICE, _("can't stat(%s)"), keyfile); - goto close_and_bail_out; - } - if ((statbuf.st_uid != pwd->pw_uid) - || ((statbuf.st_mode & S_IFMT) != S_IFREG) - || (statbuf.st_mode & (S_IRWXU|S_IRWXG|S_IRWXO))) { - syslog(LOG_NOTICE, _("%s doesn't have the correct filemodes"), keyfile); - goto close_and_bail_out; - } - - if (read(rfd, key, 8) < 8) { - syslog(LOG_NOTICE, _("can't read data from %s"), keyfile); - goto close_and_bail_out; - } - - key[8] = 0; - success = 1; - -close_and_bail_out: - close(rfd); - -bail_out: - if (success) - return key; - else - return NULL; -} - -static int -check_response(char *challenge, char *response, char *key) -{ - char buf[20]; - -#ifdef KOONTZ_DES - extern void des (union LR_block *); - extern void loadkey(char *,int); - extern void set_des_mode(int); - - union LR_block data; - - strncpy((char *)data.string, (char *)challenge, 8); - set_des_mode(ENCRYPT); - loadkey(key, NOSHIFT); - des(&data); - - memset(key, 0, 8); /* no need for the secret key anymore, scratch it */ - - sprintf(buf, "%2.2X%2.2X%2.2X%2.2X", - (int)(data.LR[0]) & 0xff, - (int)(data.LR[0]>>8) & 0xff, - (int)(data.LR[0]>>16) & 0xff, - (int)(data.LR[0]>>24) & 0xff); -#endif /* KOONTZ_DES */ -#ifdef EAY_LIBDES - des_cblock res; - des_key_schedule ks; - - des_set_key((des_cblock *)key, ks); - memset(key, 0, 8); - des_ecb_encrypt((des_cblock *)challenge, &res, ks, DES_ENCRYPT); - -#ifdef LITTLE_ENDIAN - /* use this on Intel x86 boxes */ - sprintf(buf, "%2.2X%2.2X%2.2X%2.2X", - res[0], res[1], res[2], res[3]); -#else /* ie. BIG_ENDIAN */ - /* use this on big endian RISC boxes */ - sprintf(buf, "%2.2X%2.2X%2.2X%2.2X", - res[3], res[2], res[1], res[0]); -#endif /* LITTLE_ENDIAN */ -#endif /* EAY_LIBDES */ - - /* return success only if ALL requirements have been met */ - if (strncmp(buf, response, 8) == 0) - return 1; - - return 0; -} - -int -cryptocard(void) -{ - char prompt[80]; - char *challenge; - char *key; - char *response; - - challenge = generate_challenge(); - if (challenge == NULL) return 0; - - if (strlen(challenge) + 13 > sizeof(prompt)) return 0; - sprintf(prompt, "%s Password: ", challenge); - - alarm((unsigned int)timeout); /* give user time to fiddle with card */ - response = getpass(prompt); /* presents challenge and gets response */ - - if (response == NULL) return 0; - - /* This requires some explanation: As root we may not be able to - read the directory of the user if it is on an NFS mounted - filesystem. We temporarily set our effective uid to the user-uid - making sure that we keep root privs. in the real uid. - - A portable solution would require a fork(), but we rely on Linux - having the BSD setreuid() */ - - { - uid_t ruid = getuid(); - gid_t egid = getegid(); - - setregid(-1, pwd->pw_gid); - setreuid(0, pwd->pw_uid); - - /* now we can access the file */ - /* get the (properly qualified) key */ - key = get_key(); - - /* reset to root privs */ - setuid(0); /* setreuid doesn't do it alone! */ - setreuid(ruid, 0); - setregid(-1, egid); - - if (key == NULL) return 0; - } - - return check_response(challenge, response, key); -} - -#endif /* CRYPTOCARD */ diff --git a/login-utils/cryptocard.h b/login-utils/cryptocard.h deleted file mode 100644 index a967137f9..000000000 --- a/login-utils/cryptocard.h +++ /dev/null @@ -1,7 +0,0 @@ -/* defined in cryptocard.c */ -extern int cryptocard (void); - -/* defined in login.c */ -extern struct passwd *pwd; -extern int timeout; - diff --git a/login-utils/last.c b/login-utils/last.c index 6d0ce2ff6..13a3b2449 100644 --- a/login-utils/last.c +++ b/login-utils/last.c @@ -202,15 +202,10 @@ wtmp(void) { long delta; /* time difference */ char *crmsg = NULL; char *ct = NULL; -#if USE_GETUTENT - struct utmp **utmplist = NULL; - int listlen = 0; -#else int fd; struct utmp *utl; struct stat st; int utl_len; -#endif int listnr = 0; int i; @@ -220,20 +215,6 @@ wtmp(void) { (void)signal(SIGINT, onintr); (void)signal(SIGQUIT, onintr); -#if USE_GETUTENT - setutent(); - while((bp = getutent())) { - if(listnr >= listlen) { - listlen += 10; - listlen *= 2; /* avoid quadratic behaviour */ - utmplist = realloc(utmplist, sizeof(bp) * listlen); - } - - utmplist[listnr] = malloc(sizeof(*bp)); - memcpy(utmplist[listnr++], bp, sizeof(*bp)); - } - endutent(); -#else if ((fd = open(file,O_RDONLY)) < 0) exit(1); fstat(fd, &st); @@ -243,21 +224,12 @@ wtmp(void) { if (utl == NULL) exit(1); listnr = utl_len/sizeof(struct utmp); -#endif if(listnr) -#if USE_GETUTENT - ct = ctime(&utmplist[0]->ut_time); -#else ct = ctime(&utl[0].ut_time); -#endif for(i = listnr - 1; i >= 0; i--) { -#if USE_GETUTENT - bp = utmplist[i]; -#else bp = utl+i; -#endif /* * if the terminal line is '~', the machine stopped. * see utmp(5) for more info. @@ -328,15 +300,9 @@ wtmp(void) { } T->logout = bp->ut_time; utmpbuf.ut_time = bp->ut_time; -#if USE_GETUTENT - free(bp); - } - if(utmplist) free(utmplist); -#else } munmap(utl,utl_len); close(fd); -#endif if(ct) printf(_("\nwtmp begins %s"), ct); /* ct already ends in \n */ } diff --git a/login-utils/login.c b/login-utils/login.c index 666121240..fb3847d08 100644 --- a/login-utils/login.c +++ b/login-utils/login.c @@ -77,13 +77,7 @@ * login -f name (for pre-authenticated login: datakit, xterm, etc.) */ -/* #define TESTING */ - -#ifdef TESTING -#include "param.h" -#else #include <sys/param.h> -#endif #include <stdio.h> #include <ctype.h> @@ -118,22 +112,12 @@ #include "xstrncpy.h" #include "nls.h" -#ifdef __linux__ -# include <sys/sysmacros.h> -# include <linux/major.h> -#endif - -#ifdef TESTING -# include "utmp.h" -#else -# include <utmp.h> -#endif +#include <sys/sysmacros.h> +#include <linux/major.h> -#ifdef SHADOW_PWD -# include <shadow.h> -#endif +#include <utmp.h> -#ifdef USE_PAM +#ifdef HAVE_SECURITY_PAM_MISC_H # include <security/pam_appl.h> # include <security/pam_misc.h> # define PAM_MAX_LOGIN_TRIES 3 @@ -149,31 +133,13 @@ } #endif -#ifndef __linux__ -# include <tzfile.h> -#endif #include <lastlog.h> #define SLEEP_EXIT_TIMEOUT 5 -#ifdef __linux__ -#define DO_PS_FIDDLING -#endif - -#ifdef DO_PS_FIDDLING #include "setproctitle.h" -#endif - -#if 0 -/* from before we had a lastlog.h file in linux */ -struct lastlog -{ long ll_time; - char ll_line[12]; - char ll_host[16]; -}; -#endif -#ifndef USE_PAM +#ifndef HAVE_SECURITY_PAM_MISC_H static void getloginname (void); static void checknologin (void); static int rootterm (char *ttyn); @@ -183,17 +149,6 @@ static void sigint (int); static void motd (void); static void dolastlog (int quiet); -#ifdef CRYPTOCARD -#include "cryptocard.h" -#endif - -#ifdef KERBEROS -#include <kerberos/krb.h> -#include <sys/termios.h> -char realm[REALM_SZ]; -int kerror = KSUCCESS, notickets = 1; -#endif - #ifdef USE_TTY_GROUP # define TTY_MODE 0620 #else @@ -210,14 +165,11 @@ int kerror = KSUCCESS, notickets = 1; * This bounds the time given to login. Not a define so it can * be patched on machines where it's too small. */ -#ifndef __linux__ -int timeout = 300; -#else -int timeout = 60; /* used in cryptocard.c */ -#endif +int timeout = 60; -struct passwd *pwd; /* used in cryptocard.c */ -#if USE_PAM +struct passwd *pwd; + +#ifdef HAVE_SECURITY_PAM_MISC_H static struct passwd pwdcopy; #endif char hostaddress[4]; /* used in checktty.c */ @@ -227,16 +179,6 @@ static char thishost[100]; static int failures = 1; static pid_t pid; -#ifndef __linux__ -struct sgttyb sgttyb; -struct tchars tc = { - CINTR, CQUIT, CSTART, CSTOP, CEOT, CBRK -}; -struct ltchars ltc = { - CSUSP, CDSUSP, CRPRNT, CFLUSH, CWERASE, CLNEXT -}; -#endif - /* Nice and simple code provided by Linus Torvalds 16-Feb-93 */ /* Nonblocking stuff by Maciej W. Rozycki, macro@ds2.pg.gda.pl, 1999. He writes: "Login performs open() on a tty in a blocking mode. @@ -288,10 +230,10 @@ check_ttyname(char *ttyn) { } } +#ifdef LOGIN_CHOWN_VCS /* true if the filedescriptor fd is a console tty, very Linux specific */ static int consoletty(int fd) { -#ifdef __linux__ struct stat stb; if ((fstat(fd, &stb) >= 0) @@ -299,11 +241,11 @@ consoletty(int fd) { && (minor(stb.st_rdev) < 64)) { return 1; } -#endif return 0; } +#endif -#if USE_PAM +#ifdef HAVE_SECURITY_PAM_MISC_H /* * Log failed login attempts in _PATH_BTMP if that exists. * Must be called only with username the name of an actual user. @@ -339,11 +281,11 @@ logbtmp(const char *line, const char *username, const char *hostname) { if (hostaddress[0]) memcpy(&ut.ut_addr, hostaddress, sizeof(ut.ut_addr)); } -#ifdef HAVE_updwtmp /* bad luck for ancient systems */ +#if HAVE_UPDWTMP /* bad luck for ancient systems */ updwtmp(_PATH_BTMP, &ut); #endif } -#endif /* USE_PAM */ +#endif /* HAVE_SECURITY_PAM_MISC_H */ int main(int argc, char **argv) @@ -361,7 +303,7 @@ main(int argc, char **argv) char *childArgv[10]; char *buff; int childArgc = 0; -#ifdef USE_PAM +#ifdef HAVE_SECURITY_PAM_MISC_H int retcode; pam_handle_t *pamh = NULL; struct pam_conv conv = { misc_conv, NULL }; @@ -369,7 +311,7 @@ main(int argc, char **argv) #else char *salt, *pp; #endif -#ifdef CHOWNVCS +#ifdef LOGIN_CHOWN_VCS char vcsn[20], vcsan[20]; #endif @@ -385,12 +327,7 @@ main(int argc, char **argv) textdomain(PACKAGE); setpriority(PRIO_PROCESS, 0, 0); -#ifdef HAVE_QUOTA - quota(Q_SETUID, 0, 0, 0); -#endif -#ifdef DO_PS_FIDDLING initproctitle(argc, argv); -#endif /* * -p is used by getty to tell login not to destroy the environment @@ -484,7 +421,7 @@ main(int argc, char **argv) tty_number = p; } -#ifdef CHOWNVCS +#ifdef LOGIN_CHOWN_VCS /* find names of Virtual Console devices, for later mode change */ snprintf(vcsn, sizeof(vcsn), "/dev/vcs%s", tty_number); snprintf(vcsan, sizeof(vcsan), "/dev/vcsa%s", tty_number); @@ -526,7 +463,7 @@ main(int argc, char **argv) fprintf(stderr,"\033(K"); #endif -#ifdef USE_PAM +#ifdef HAVE_SECURITY_PAM_MISC_H /* * username is initialized to NULL * and if specified on the command line it is set. @@ -689,7 +626,7 @@ main(int argc, char **argv) retcode = pam_setcred(pamh, PAM_ESTABLISH_CRED); PAM_FAIL_CHECK; -#else /* ! USE_PAM */ +#else /* ! HAVE_SECURITY_PAM_MISC_H */ for (cnt = 0;; ask = 1) { @@ -823,33 +760,11 @@ main(int argc, char **argv) sleep((unsigned int)((cnt - 3) * 5)); } } -#endif /* !USE_PAM */ +#endif /* !HAVE_SECURITY_PAM_MISC_H */ /* committed to login -- turn off timeout */ alarm((unsigned int)0); -#ifdef HAVE_QUOTA - if (quota(Q_SETUID, pwd->pw_uid, 0, 0) < 0 && errno != EINVAL) { - switch(errno) { - case EUSERS: - fprintf(stderr, - _("Too many users logged on already.\nTry again later.\n")); - break; - case EPROCLIM: - fprintf(stderr, - _("You have too many processes running.\n")); - break; - default: - perror("quota (Q_SETUID)"); - } - sleepexit(0); /* %% */ - } -#endif - - /* paranoia... */ -#ifdef SHADOW_PWD - endspent(); -#endif endpwent(); /* This requires some explanation: As root we may not be able to @@ -943,7 +858,7 @@ Michael Riepe <michael@stud.uni-hannover.de> pututline(&ut); endutent(); -#ifdef HAVE_updwtmp +#if HAVE_UPDWTMP updwtmp(_PATH_WTMP, &ut); #else #if 0 @@ -982,7 +897,7 @@ Michael Riepe <michael@stud.uni-hannover.de> (gr = getgrnam(TTYGRPNAME)) ? gr->gr_gid : pwd->pw_gid); chmod(ttyn, TTY_MODE); -#ifdef CHOWNVCS +#ifdef LOGIN_CHOWN_VCS /* if tty is one of the VC's then change owner and mode of the special /dev/vcs devices as well */ if (consoletty(0)) { @@ -995,10 +910,6 @@ Michael Riepe <michael@stud.uni-hannover.de> setgid(pwd->pw_gid); -#ifdef HAVE_QUOTA - quota(Q_DOWARN, pwd->pw_uid, (dev_t)-1, 0); -#endif - if (*pwd->pw_shell == '\0') pwd->pw_shell = _PATH_BSHELL; @@ -1041,7 +952,7 @@ Michael Riepe <michael@stud.uni-hannover.de> */ setenv("LOGNAME", pwd->pw_name, 1); -#ifdef USE_PAM +#ifdef HAVE_SECURITY_PAM_MISC_H { int i; char ** env = pam_getenvlist(pamh); @@ -1055,9 +966,7 @@ Michael Riepe <michael@stud.uni-hannover.de> } #endif -#ifdef DO_PS_FIDDLING setproctitle("login", username); -#endif if (!strncmp(tty_name, "ttyS", 4)) syslog(LOG_INFO, _("DIALUP AT %s BY %s"), tty_name, pwd->pw_name); @@ -1083,7 +992,7 @@ Michael Riepe <michael@stud.uni-hannover.de> if (!quietlog) { motd(); -#ifdef DO_STAT_MAIL +#ifdef LOGIN_STAT_MAIL /* * This turns out to be a bad idea: when the mail spool * is NFS mounted, and the NFS connection hangs, the @@ -1109,7 +1018,7 @@ Michael Riepe <michael@stud.uni-hannover.de> signal(SIGQUIT, SIG_DFL); signal(SIGTSTP, SIG_IGN); -#ifdef USE_PAM +#ifdef HAVE_SECURITY_PAM_MISC_H /* * We must fork before setuid() because we need to call * pam_close_session() as root. @@ -1215,7 +1124,7 @@ Michael Riepe <michael@stud.uni-hannover.de> exit(0); } -#ifndef USE_PAM +#ifndef HAVE_SECURITY_PAM_MISC_H static void getloginname(void) { int ch, cnt, cnt2; @@ -1293,7 +1202,7 @@ timedout(int sig) { timedout2(0); } -#ifndef USE_PAM +#ifndef HAVE_SECURITY_PAM_MISC_H int rootterm(char * ttyn) { @@ -1323,7 +1232,7 @@ rootterm(char * ttyn) } } } -#endif /* !USE_PAM */ +#endif /* !HAVE_SECURITY_PAM_MISC_H */ jmp_buf motdinterrupt; @@ -1348,7 +1257,7 @@ sigint(int sig) { longjmp(motdinterrupt, 1); } -#ifndef USE_PAM /* PAM takes care of this */ +#ifndef HAVE_SECURITY_PAM_MISC_H /* PAM takes care of this */ void checknologin(void) { int fd, nchars; diff --git a/login-utils/newgrp.c b/login-utils/newgrp.c index 89db17548..a46f9ee53 100644 --- a/login-utils/newgrp.c +++ b/login-utils/newgrp.c @@ -33,6 +33,7 @@ allow_setgid(struct passwd *pe, struct group *ge) int notfound = 1; if (getuid() == 0) return TRUE; /* root may do anything */ + if (ge->gr_gid == pe->pw_gid) return TRUE; /* You can switch back to your default group */ look = ge->gr_mem; while (*look && (notfound = strcmp(*look++,pe->pw_name))); diff --git a/login-utils/passwd.1 b/login-utils/passwd.1 deleted file mode 100644 index b6a25a3f6..000000000 --- a/login-utils/passwd.1 +++ /dev/null @@ -1,111 +0,0 @@ -.\" Copyright 1992 Rickard E. Faith (faith@cs.unc.edu) -.\" May be distributed under the GNU General Public License -.TH PASSWD 1 "11 November 1996" "Util-linux 2.6" "Linux Programmer's Manual" -.SH NAME -passwd \- change password -.SH SYNOPSIS -.BR "passwd" -.RB [ " \-o " ] -.RB [ " \-q " ] -.RB [ " \-v " ] -.RI [ " name " [ " password " ]] -.br -.BR "passwd \-f " -.RI [ " arguments to chfn " ] -.br -.BR "passwd \-s " -.RI [ " arguments to chsh " ] - -.SH DESCRIPTION -Without arguments -.B passwd -will change the password for the current user. First the user is asked for -the old password, then prompted twice for the new password in order to -catch typing errors. - -The one and two argument forms may only be used by the superuser. Using the -one argument form, the superuser may change the password for that -.IR user . -The superuser is not asked for the users old password, but the rules -for proper passwords are also applied unless the -.B "\-o" -option is used. The superuser may have legitimate -reasons to choose a non-conformant password. - -The two argument form gives the -.IR user " the " password -stated as the second argument. Note that this password will -be visible to people doing `ps' or so. Avoid this form. - -Giving an empty string as the second argument erases the password for the -user, but only in combination with the -.B "\-o" -option. - -Password changes may get logged using the -.BR syslog (3) -facility, depending on compile-time defines (on by default). -If so, every change will -be logged at a low level as auth.notice, except for changing the root -password with will be logged with auth.warning. - -.SH OPTIONS -.TP -.B "\-f, \-\-fullname" -Change the user's full name (the GECOS field of the passwd entry). -Invokes /usr/bin/chfn with the non-option command line arguments. -.TP -.B "\-o, \-\-force" -Turn off simplicity checks on the new password. This option may only -be used by the super user. This is intend to allow simple initial -passwords given by the superuser. -.TP -.B "\-s, \-\-shell" -Change the user's shell by invoking /usr/bin/chsh with the non-option -command line arguments. -.TP -.B "\-q, \-\-quiet, \-\-silent" -In this mode passwd won't tell that the passwd get's changed. -.TP -.B "\-v, \-V, \-\-version" -Prints version information and exits. - -.SH PASSWORD RULES -The new password must fulfill these rules: -.TP -o -be at least six characters long; - -.TP -o -must not be equal to the old password; - -.TP -o -must contain characters out of at least two of the following classes: -upper and lower case letters, digits and non alphanumeric characters; - -.TP -o -must not match neither the username nor any word of the realname, -neither in normal nor in reverse order, neither at the beginning nor -at the end. -.SH BUGS -If you change your mind there is no escaping from this program. -It will insist on a new password until killed from another terminal. -(This is caused by a bug in getpass(3): it ignores signals.) -.SH FILES -.TP -.I /etc/passwd -The password file. -.SH "SEE ALSO" -.BR chsh (1), -.BR chfn (1), -.BR syslog (3), -.BR syslog.conf (5), -.BR passwd (8). -.SH AUTHOR -Peter Orbaek (poe@daimi.aau.dk). -.br -Martin Schulze (joey@infodrom.north.de) with extensive rewriting and -improving done. diff --git a/login-utils/passwd.c b/login-utils/passwd.c deleted file mode 100644 index eb3303899..000000000 --- a/login-utils/passwd.c +++ /dev/null @@ -1,425 +0,0 @@ -/* - * passwd.c - change password on an account - * - * Initially written for Linux by Peter Orbaek <poe@daimi.aau.dk> - * Currently maintained at ftp://ftp.daimi.aau.dk/pub/linux/poe/ - * - * Hacked by Alvaro Martinez Echevarria, alvaro@enano.etsit.upm.es, - * to allow peaceful coexistence with yp. Nov 94. - * - * Hacked to allow root to set passwd from command line. - * by Arpad Magossanyi (mag@tas.vein.hu) - */ - -/* - * Sun Oct 15 13:18:34 1995 Martin Schulze <joey@finlandia.infodrom.north.de> - * - * I have completely rewritten the whole argument handling (what?) - * to support two things. First I wanted "passwd $user $pw" to - - (a very bad idea; command lines are visible to people doing ps - or running a background job that just collects all command lines) - - * work and second I wanted simplicity checks to be done for - * root, too. Only root can turn this off using the -f - * switch. Okay, I started with this to support -V version - * information, but one thing comes to the next. *sigh* - * In a later step perhaps we'll be able to support shadow - * passwords. (?) - * - * I have also included a DEBUG mode (-DDEBUG) to test the - * argument handling _without_ any write attempt to - * /etc/passwd. - * - * If you're paranoid about security on your system, you may want - * to add -DLOGALL to CFLAGS. This will turn on additional syslog - * logging of every password change. (user changes are logged as - * auth.notice, but changing root's password is logged as - * auth.warning. (Of course, the password itself is not logged.) - */ - - /* 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL> - * - added Native Language Support - * Sun Mar 21 1999 - Arnaldo Carvalho de Melo <acme@conectiva.com.br> - * - fixed strerr(errno) in gettext calls - */ - -/* - * Usage: passwd [username [password]] - * Only root may use the one and two argument forms. - */ - -#include <sys/types.h> -#include <sys/stat.h> -#include <stdio.h> -#include <unistd.h> -#include <stdarg.h> -#include <termios.h> -#include <getopt.h> -#include <malloc.h> -#include <fcntl.h> -#include <pwd.h> -#include <ctype.h> -#include <time.h> -#include <string.h> -#include <errno.h> -#include <sys/resource.h> -#include <stdlib.h> -#include "my_crypt.h" -#include "setpwnam.h" -#include "islocal.h" -#include "xstrncpy.h" -#include "nls.h" -#include "env.h" - -#ifndef _PATH_CHFN -# define _PATH_CHFN "/usr/bin/chfn" -# define _PATH_CHSH "/usr/bin/chsh" -#endif - -#define LOGALL - -#ifdef LOGALL -#include <syslog.h> -#endif /* LOGALL */ - -#define ascii_to_bin(c) ((c)>='a'?(c-59):(c)>='A'?((c)-53):(c)-'.') -#define bin_to_ascii(c) ((c)>=38?((c)-38+'a'):(c)>=12?((c)-12+'A'):(c)+'.') - -static void -pexit(char *str, ...) -{ - va_list vlst; - - va_start(vlst, str); - vfprintf(stderr, str, vlst); - fprintf(stderr, ": "); - perror(""); - va_end(vlst); - exit(1); -} - -/* - * Do various checks for stupid passwords here... - * - * This would probably be the best place for checking against - * dictionaries. :-) - */ -static int -check_passwd_string(char *passwd, char *string) { - int r; - char *p, *q; - - r = 0; - /* test for string at the beginning of passwd */ - for (p = passwd, q = string; *q && *p; q++, p++) { - if(tolower(*p) != tolower(*q)) { - r++; - break; - } - } - - /* test for reverse string at the beginning of passwd */ - for (p = passwd, q = string + strlen(string)-1; - *p && q >= string; p++, q--) { - if(tolower(*p) != tolower(*q)) { - r++; - break; - } - } - - /* test for string at the end of passwd */ - for (p = passwd + strlen(passwd)-1, q = string + strlen(string)-1; - q >= string && p >= passwd; q--, p--) { - if(tolower(*p) != tolower(*q)) { - r++; - break; - } - } - - /* test for reverse string at the beginning of passwd */ - for (p = passwd + strlen(passwd)-1, q = string; - p >= passwd && *q; p--, q++) { - if(tolower(*p) != tolower(*q)) { - r++; - break; - } - } - - if (r != 4) { - return 0; - } - return 1; -} - -static int -check_passwd(char *passwd, char *oldpasswd, char *user, char *gecos) { - int ucase, lcase, digit, other; - char *c, *g, *p; - - if ( (strlen(passwd) < 6) ) { - printf(_("The password must have at least 6 characters, try again.\n")); - return 0; - } - - other = digit = ucase = lcase = 0; - for (p = passwd; *p; p++) { - ucase = ucase || isupper(*p); - lcase = lcase || islower(*p); - digit = digit || isdigit(*p); - other = other || !isalnum(*p); - } - - if ( (other + digit + ucase + lcase) < 2) { - printf(_("The password must contain characters out of two of " - "the following\n" - "classes: upper and lower case letters, digits and " - "non alphanumeric\n" - "characters. See passwd(1) for more information.\n")); - return 0; - } - - if ( oldpasswd[0] && !strncmp(oldpasswd, crypt(passwd, oldpasswd), 13) ) { - printf(_("You cannot reuse the old password.\n")); - return 0; - } - - if ( !check_passwd_string(passwd, user) ) { - printf(_("Please don't use something like your username as password!\n")); - return 0; - } - - /* check against realname */ - if ( (c = index(gecos, ',')) ) { - if ( c-gecos && (g = (char *)malloc (c-gecos+1)) ) { - strncpy (g, gecos, c-gecos); - g[c-gecos] = 0; - while ( (c=rindex(g, ' ')) ) { - if ( !check_passwd_string(passwd, c+1) ) { - printf(_("Please don't use something like your realname as password!\n")); - free (g); - return 0; - } - *c = '\0'; - } /* while */ - if ( !check_passwd_string(passwd, g) ) { - printf(_("Please don't use something like your realname as password!\n")); - free (g); - return 0; - } - free (g); - } /* if malloc */ - } - - /* - * if ( !check_password_dict(passwd) ) ... - */ - - return 1; /* fine */ -} - -#if 0 -static void -usage(void) { - printf (_("Usage: passwd [username [password]]\n")); - printf(_("Only root may use the one and two argument forms.\n")); -} -#endif - -int -main(int argc, char *argv[]) { - struct passwd *pe; - uid_t gotuid = getuid(); - char *pwdstr = NULL, *cryptstr, *oldstr; - char pwdstr1[10]; - char *user; - time_t tm; - char salt[2]; - int force_passwd = 0; - int silent = 0; - int c; - int opt_index; - int fullname = 0, shell = 0; - static const struct option long_options[] = - { - {"fullname", no_argument, 0, 'f'}, - {"shell", no_argument, 0, 's'}, - {"force", no_argument, 0, 'o'}, - {"quiet", no_argument, 0, 'q'}, - {"silent", no_argument, 0, 'q'}, - {"version", no_argument, 0, 'v'}, - {0, 0, 0, 0} - }; - - sanitize_env(); - setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); - - optind = 0; - while ((c = getopt_long(argc, argv, "foqsvV", - long_options, &opt_index)) != -1) { - switch (c) { - case 'f': - fullname = 1; - break; - case 's': - shell = 1; - break; - case 'o': - force_passwd = 1; - break; - case 'q': - silent = 1; - break; - case 'V': - case 'v': - printf("%s\n", util_linux_version); - exit(0); - default: - fprintf(stderr, _("Usage: passwd [-foqsvV] [user [password]]\n")); - exit(1); - } /* switch (c) */ - } /* while */ - - if (fullname || shell) { - char *args[100]; - int i, j, errsv; - - setuid(getuid()); /* drop special privs. */ - if (fullname) - args[0] = _PATH_CHFN; - else - args[0] = _PATH_CHSH; - - for (i = optind, j = 1; (i < argc) && (j < 99); i++, j++) - args[j] = argv[i]; - - args[j] = NULL; - execv(args[0], args); - errsv = errno; - fprintf(stderr, _("Can't exec %s: %s\n"), args[0], strerror(errsv)); - exit(1); - } - - switch (argc - optind) { - case 0: - /* Why use getlogin()? Some systems allow having several - usernames with the same uid, especially several root accounts. - One changes the password for the username, not the uid. */ - if ( !(user = getlogin()) || !*user ) { - if ( !(pe = getpwuid( getuid() )) ) { - pexit(_("Cannot find login name")); - } else - user = pe->pw_name; - } - break; - case 1: - if(gotuid) { - printf(_("Only root can change the password for others.\n")); - exit (1); - } else - user = argv[optind]; - break; - case 2: - if(gotuid) { - printf(_("Only root can change the password for others.\n")); - exit(1); - } else { - user = argv[optind]; - pwdstr = argv[optind+1]; - } - break; - default: - printf(_("Too many arguments.\n")); - exit (1); - } /* switch */ - - if(!(pe = getpwnam(user))) { - pexit(_("Can't find username anywhere. Is `%s' really a user?"), user); - } - - if (!(is_local(user))) { - puts(_("Sorry, I can only change local passwords. Use yppasswd instead.")); - exit(1); - } - - /* if somebody got into changing utmp... */ - if(gotuid && gotuid != pe->pw_uid) { - puts(_("UID and username does not match, imposter!")); - exit(1); - } - - if ( !silent ) - printf( _("Changing password for %s\n"), user ); - - if ( (gotuid && pe->pw_passwd && pe->pw_passwd[0]) - || (!gotuid && !strcmp(user,"root")) ) { - oldstr = getpass(_("Enter old password: ")); - if(strncmp(pe->pw_passwd, crypt(oldstr, pe->pw_passwd), 13)) { - puts(_("Illegal password, imposter.")); - exit(1); - } - } - - if ( pwdstr ) { /* already set on command line */ - if ( !force_passwd && !check_passwd(pwdstr, pe->pw_passwd, user, pe->pw_gecos) ) - exit (1); - } else { - /* password not set on command line by root, ask for it ... */ - - redo_it: - pwdstr = getpass(_("Enter new password: ")); - if (pwdstr[0] == '\0') { - puts(_("Password not changed.")); - exit(1); - } - - if ( (gotuid || (!gotuid && !force_passwd)) - && !check_passwd(pwdstr, pe->pw_passwd, user, pe->pw_gecos) ) - goto redo_it; - - xstrncpy(pwdstr1, pwdstr, sizeof(pwdstr1)); - pwdstr = getpass(_("Re-type new password: ")); - - if(strncmp(pwdstr, pwdstr1, 8)) { - puts(_("You misspelled it. Password not changed.")); - exit(1); - } - } /* pwdstr i.e. password set on command line */ - - time(&tm); tm ^= getpid(); - salt[0] = bin_to_ascii(tm & 0x3f); - salt[1] = bin_to_ascii((tm >> 6) & 0x3f); - cryptstr = crypt(pwdstr, salt); - - if (pwdstr[0] == 0) cryptstr = ""; - -#ifdef LOGALL - openlog("passwd", 0, LOG_AUTH); - if (gotuid) - syslog(LOG_NOTICE,_("password changed, user %s"),user); - else { - if ( !strcmp(user, "root") ) - syslog(LOG_WARNING,_("ROOT PASSWORD CHANGED")); - else - syslog(LOG_NOTICE,_("password changed by root, user %s"),user); - } - closelog(); -#endif /* LOGALL */ - - pe->pw_passwd = cryptstr; -#ifdef DEBUG - printf (_("calling setpwnam to set password.\n")); -#else - if (setpwnam( pe ) < 0) { - perror( "setpwnam" ); - printf( _("Password *NOT* changed. Try again later.\n" )); - exit( 1 ); - } -#endif - - if ( !silent ) - printf(_("Password changed.\n")); - exit(0); -} diff --git a/login-utils/selinux_utils.c b/login-utils/selinux_utils.c index 3711a632c..e21b8e1df 100644 --- a/login-utils/selinux_utils.c +++ b/login-utils/selinux_utils.c @@ -1,6 +1,6 @@ -#ifdef WITH_SELINUX #include <sys/types.h> #include <stdio.h> +#include <string.h> #include <selinux/selinux.h> #include <selinux/flask.h> #include <selinux/av_permissions.h> @@ -52,4 +52,3 @@ int setupDefaultContext(char *orig_file) { } return 0; } -#endif diff --git a/login-utils/vipw.c b/login-utils/vipw.c index 22f87428e..cc41b86b1 100644 --- a/login-utils/vipw.c +++ b/login-utils/vipw.c @@ -67,7 +67,7 @@ static char version_string[] = "vipw 1.4"; #include "xstrncpy.h" #include "nls.h" -#ifdef WITH_SELINUX +#ifdef HAVE_LIBSELINUX #include <selinux/selinux.h> #endif @@ -194,7 +194,7 @@ pw_unlock(void) { unlink(tmp); link(orig_file, tmp); -#ifdef WITH_SELINUX +#ifdef HAVE_LIBSELINUX if (is_selinux_enabled()) { security_context_t passwd_context=NULL; int ret=0; |