Compare commits

...

7 Commits

Author SHA1 Message Date
Balint Reczey 749c178062 New upstream version 4.9 2021-11-07 15:18:49 +01:00
Balint Reczey d906ecd3b6 New upstream version 4.8.1 2020-02-06 23:14:47 +01:00
Andreas Henriksson 69d932140c New upstream version 4.8 2019-12-05 13:29:31 +01:00
Balint Reczey b28d45d2bd New upstream version 4.7 2019-06-23 22:06:37 +02:00
Balint Reczey b0729855e8 New upstream version 4.6 2019-03-03 23:31:24 +01:00
Balint Reczey 589f97ade4 New upstream version 4.5 2017-08-10 18:26:45 -04:00
Balint Reczey 365658d0f3 Imported Upstream version 4.4 2016-11-30 02:36:06 +01:00
623 changed files with 90245 additions and 51379 deletions
+197 -10
View File
@@ -1,16 +1,203 @@
2014-05-09 Christian Perrier <bubulle@debian.org> 2021-07-22 Serge Hallyn <serge@hallyn.com>
* Include patches only included in Debian for 4.2 * Updated translations (Björn Esser, Juergen Hoetzel)
* man/su.1.xml: Fix typo * Major salt updates (Björn Esser)
* etc/login.defs src/newusers.c src/useradd.c libmisc/find_new_sub_uids.c libmisc/find_new_sub_gids.c: * Various coverity and cleanup fixes (Iker Pedrosa)
configure userns * Consistently use 0 to disable PASS_MIN_DAYS in man (tzccinct)
* po/vi.po: Vietnamese translation update * Implement NSS support for subids and a libsubid (Serge Hallyn)
* po/fr.po, man/po/fr.po: French translation update * setfcap: retain setfcap when mapping uid 0 (Christian Brauner)
* po/de.po: German translation update * login.defs: include HMAC_CRYPTO_ALGO key (Iker Pedrosa)
* selinux fixes (Christian Göttsche)
* Fix path prefix path handling (Lucas Servén Marín)
* Manpage updates (tzccinct, Sevan Janiyan, Iker Pedrosa, Geert Ijewski,
谭九鼎, Jamin W. Collins, towerpark, andydna, Frans Spiesschaert)
* Treat an empty passwd field as invalid (Haelwenn Monnier)
* newxidmap: allow running under alternative gid (Martijn de Gouw)
* usermod: check that shell is executable (Geert Ijewski)
* Add yescript support (Rodolphe Bréard)
* useradd memleak fixes (whzhe)
* useradd: use built-in settings by default (Ludwig Nussel)
* getdefs: add foreign (non-shadow-utils) items (Karel Zak)
* buffer overflow fixes (Tobias Stoeckmann)
* Adding run-parts style for pre and post useradd/del (ed@s5h.net)
2014-04-30 Christian Perrier <bubulle@debian.org> 2020-01-23 Serge Hallyn <serge@hallyn.com>
* Release 4.2 "as is" * selinux: inclue stdio (Michael Vetter)
* man: don't suggest making groupmems user-writeable (Michael Weiser)
* Makefile: bail out on error in for loops (Wolfgang Bumiller)
* Adding logging of SSH_ORIGINAL_COMMAND to nologin. (ed@s5h.net)
* add new HOME_MODE login.defs option (Duncan Overbruck)
* Add tty logging to useradd (ed@s5h.net)
* Useradd: make non-executable shell check only a warning (Tomas Mraz)
* Update Dutch translation (Frans-Spiesschaert)
* user_busy: Do not mistake a regular user process for a namespaced one (Tomas Mraz)
* Revert "Honor --sbindir and --bindir for binary installation" Patrick McLean)
2019-12-20 Dave Reisner <dreisner@archlinux.org>
* Do not auto-enable acct_tools_setuid just because
pam is enabled. NOTE - any distros which are relying
on this behavior will need to switch to configure
--enable-account-tools-setuid
2019-12-01 Serge Hallyn <serge@hallyn.com>
* Release 4.8
* Initial optional bcrypt support.
* Make build/install of 'su' optional.
* Fix for vipw not resuming correctly when suspended
* Sync password field descriptions in manpages
* Check for valid shell argument in useradd
* Allow translation of new strings through POTFILES.in
* Migrate to itstool for translations
* Migrate to new SELinux api
* Support --enable-vendordir
* pwck: Only check homedir if set and not a system user
* Support nonstandard usernames
* sget{pw,gr}ent: check for data at EOL
* Add YYY-MM-DD support in chage
* Fix failing chmod calls for suidubins
* Fix --sbindir and --bindir for binary installations
* Fix LASTLOG_UID_MAX in login.defs
* Fix configure error with dash
2019-06-13 Serge Hallyn <serge@hallyn.com>
* Release 4.7
* Spawn: don't loop forever on ECHILD
* Do not fail locking if there is a stale lockfile Tomas Mraz)
* Use lckpwdf if prefix not set (Tomas Mraz)
* Build: check correct DocBook version (Jan Tojnar)
* Usermod: Print 'no changes' to stdout, not stderr (Serge Hallyn)
* Add support for btrfs subvolumes for home (Adam Majer)
* Fix chpasswd long line handling (Nathan Ruiz)
* Use secure_getenv for gettime (Chris Lamb)
* Make sp_lstchg reproducible (Chris Lamb)
* Do not crash commonio_close if db file is not open (Tomas Mraz)
* Don't flush nscd and sssd cache in read-only mode (Charlie Vuillemez)
* French manpage update (Alban VIDAL)
* Fix manpage defaults for SUB_UID/GID_COUNT (Tomas Mraz)
* Sync po files from shadow.pot (Alban VIDAL)
* Usermod: guard against unsafe chown of homedir contents (Tomas Mraz)
* Add LASTLOG_UID_MAX to login.defs (Tomas Mraz)
* new[ug]idmap file capabilities support (Giuseppe Scrivano and Christian Brauner)
* Fix segfault in useradd (Tomas Mraz)
* Coverity issues (Tomas Mraz)
* Flush sssd caches (Jakub Hrozek)
* Log UID in nologin (Vladimir Ivanov)
* run pam_getenvlist after setup_env in su.c (Michael Vogt)
* Support systems with only utmpx (A. Wilcox)
* Fix unguarded ENABLE_SUBIDS code (Jan Chren (rindeal))
* Update po/zh_CN translation (Lion Yang)
* Create parent dirs for useradd -m (Michael Vetter)
* Prevent usermod segv
* Fix usermod crash (fariouche)
2018-04-29 Serge Hallyn <serge@hallyn.com>
* Release 4.6
* Newgrp: avoid unnecessary lookups
* Make language less binary
* Add error when turning off man switch
* Spelling fixes
* Make userdel work with -R
* newgidmap: enforce setgroups=deny if self-mapping a group
* Norwegian bokmål translation
* pwck: prevent crash by not passing O_CREAT
* WITH_TCB fixes from Mandriva
* Fix pwconv and grpconv entry skips
* Fix -- slurping in su
* add --prefix option
2017-07-16 Serge Hallyn <serge@hallyn.com>
* Import new Dutch translations.
2017-07-10 Serge Hallyn <serge@hallyn.com>
* Expand error codes for groupmod.
2017-05-17 Serge Hallyn <serge@hallyn.com>
* Release 4.5
2017-05-17 Serge Hallyn <serge@hallyn.com>
* Patch from Tobias Stoeckmann fixing regression in previous CVE fix
preventing SIGTERM to su from being propagated to the job.
* Patch from Chris Lamb making sp_lstchg shadow field reproducible.
* Merge Russian translation updates from Yuri Kozlov
* Fix missing close of subuid file on error
2017-02-23 Serge Hallyn <serge@hallyn.com>
* Merge patch by Tobias Stoeckmann <tobias@stoeckmann.org> to fix
the equivalent of util-linux CVE-2017-2616.
2017-02-08 Serge Hallyn <serge@hallyn.com>
* Update Kazakh translations
* Consult configuration before calculating subuids
* Remove misplaced semicolon
2017-01-29 Serge Hallyn <serge@hallyn.com>
* Patch from Fedora to improve performance with SSSD, Winbind,
or nss_ldap. (Tomas Mraz)
* Make sure knowndef_table is NULL-terminated. (Bernhard Rosenkränzer)
2016-12-21 Serge Hallyn <serge@hallyn.com>
* Drop leading underscore from _COMMONIO_H and _SHADOWIO_H
* Fix readability in usermod error messages.
* Reset user in tallylog
* Add audit support to su
2016-12-02 Serge Hallyn <serge@hallyn.com>
* changes since 4.4
- Use sizeof rather than hardcoding snprintf args
- Fix useradd improper default loading
- Update Vietnamese translations
- Update Polish translations
- Remove non-POSIX chmod option in Makefile
- Fix suidubins assignments
- Fix --add-subuids etc spelling in manpages
- Audit homedir ownership change.
- Print error on selinux file context update failure
- Keep original file perms when creating a backup
* (henceforth we'll update Changelog with each commit
and proper credit)
2016-12-02 Serge Hallyn <serge@hallyn.com>
* Changes since 4.2.1:
- Documentation, error report and translations updates
- Replace path_max with 32
- User namespace support fixes/updates including:
- Correct sanity checks in newXidmap
- Fix building without subuid support
- Add /etc/subuid support for UID matching
- Support subuid for nonlocal users
- Default to 65536 subuid allocations
- Respect -r
- Check for range overflows
- Add tests from svn tree
- Use AC_CHECK_SIZEOF for uid_t size checks
- Accomodate missing /etc and login.defs
- Support FORCE_SHADOW
- Be more robust in hostile environment
- Allow removing a primary group
- Clear passwords on __pw_dup errors
- Memory leak fix in commonio_update and get_map_ranges
- Fix resource leak in syslog_sg
- Fix user busy error at userdel
- Support set/clear lastlog record via lastlog command
- Add --no-create-home as longopt for -M
- Fix signal races
- Reduce syslog priority of common usage events
2013-08-25 Nicolas François <nicolas.francois@centraliens.net> 2013-08-25 Nicolas François <nicolas.francois@centraliens.net>
+10 -3
View File
@@ -2,7 +2,14 @@
EXTRA_DIST = NEWS README TODO shadow.spec.in EXTRA_DIST = NEWS README TODO shadow.spec.in
AUTOMAKE_OPTIONS = 1.5 dist-bzip2 foreign SUBDIRS = libmisc lib
SUBDIRS = po man libmisc lib src \ if ENABLE_SUBIDS
contrib doc etc SUBDIRS += libsubid
endif
SUBDIRS += src po contrib doc etc
if ENABLE_REGENERATE_MAN
SUBDIRS += man
endif
+65 -31
View File
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.13.3 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,17 @@
@SET_MAKE@ @SET_MAKE@
VPATH = @srcdir@ VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \ am__make_running_with_option = \
case $${target_option-} in \ case $${target_option-} in \
?) ;; \ ?) ;; \
@@ -77,18 +87,22 @@ PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_triplet = @build@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
@ENABLE_SUBIDS_TRUE@am__append_1 = libsubid
@ENABLE_REGENERATE_MAN_TRUE@am__append_2 = man
subdir = . subdir = .
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.h.in $(top_srcdir)/man/po/Makefile.in \
$(srcdir)/shadow.spec.in ABOUT-NLS COPYING ChangeLog NEWS \
README TODO config.guess config.rpath config.sub depcomp \
install-sh missing ylwrap ltmain.sh
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/configure.in $(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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
$(am__configure_deps) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d mkinstalldirs = $(install_sh) -d
@@ -151,7 +165,12 @@ am__define_uniq_tagged_files = \
ETAGS = etags ETAGS = etags
CTAGS = ctags CTAGS = ctags
CSCOPE = cscope CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS) DIST_SUBDIRS = libmisc lib libsubid src po contrib doc etc man
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(srcdir)/shadow.spec.in $(top_srcdir)/man/po/Makefile.in \
ABOUT-NLS COPYING ChangeLog NEWS README TODO compile \
config.guess config.rpath config.sub install-sh ltmain.sh \
missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION) distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir) top_distdir = $(distdir)
@@ -187,9 +206,9 @@ am__relativize = \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \ done; \
reldir="$$dir2" reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz
GZIP_ENV = --best GZIP_ENV = --best
DIST_TARGETS = dist-bzip2 dist-gzip DIST_TARGETS = dist-xz dist-gzip
distuninstallcheck_listfiles = find . -type f -print distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@@ -216,10 +235,10 @@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
ECONF_CPPFLAGS = @ECONF_CPPFLAGS@
EGREP = @EGREP@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FGREP = @FGREP@ FGREP = @FGREP@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@ GMSGFMT_015 = @GMSGFMT_015@
GREP = @GREP@ GREP = @GREP@
@@ -238,6 +257,7 @@ LIBATTR = @LIBATTR@
LIBAUDIT = @LIBAUDIT@ LIBAUDIT = @LIBAUDIT@
LIBCRACK = @LIBCRACK@ LIBCRACK = @LIBCRACK@
LIBCRYPT = @LIBCRYPT@ LIBCRYPT = @LIBCRYPT@
LIBECONF = @LIBECONF@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@ LIBINTL = @LIBINTL@
LIBMD = @LIBMD@ LIBMD = @LIBMD@
@@ -247,13 +267,19 @@ LIBS = @LIBS@
LIBSELINUX = @LIBSELINUX@ LIBSELINUX = @LIBSELINUX@
LIBSEMANAGE = @LIBSEMANAGE@ LIBSEMANAGE = @LIBSEMANAGE@
LIBSKEY = @LIBSKEY@ LIBSKEY = @LIBSKEY@
LIBSUBID_ABI = @LIBSUBID_ABI@
LIBSUBID_ABI_MAJOR = @LIBSUBID_ABI_MAJOR@
LIBSUBID_ABI_MICRO = @LIBSUBID_ABI_MICRO@
LIBSUBID_ABI_MINOR = @LIBSUBID_ABI_MINOR@
LIBTCB = @LIBTCB@ LIBTCB = @LIBTCB@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@ LIPO = @LIPO@
LIYESCRYPT = @LIYESCRYPT@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@ LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@ LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@ MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -282,10 +308,10 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
USE_NLS = @USE_NLS@ USE_NLS = @USE_NLS@
VENDORDIR = @VENDORDIR@
VERSION = @VERSION@ VERSION = @VERSION@
XGETTEXT = @XGETTEXT@ XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
XMLCATALOG = @XMLCATALOG@ XMLCATALOG = @XMLCATALOG@
XML_CATALOG_FILE = @XML_CATALOG_FILE@ XML_CATALOG_FILE = @XML_CATALOG_FILE@
XSLTPROC = @XSLTPROC@ XSLTPROC = @XSLTPROC@
@@ -310,6 +336,7 @@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
builddir = @builddir@ builddir = @builddir@
capcmd = @capcmd@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
docdir = @docdir@ docdir = @docdir@
@@ -335,6 +362,7 @@ pdfdir = @pdfdir@
prefix = @prefix@ prefix = @prefix@
program_transform_name = @program_transform_name@ program_transform_name = @program_transform_name@
psdir = @psdir@ psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@ srcdir = @srcdir@
@@ -344,10 +372,8 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
EXTRA_DIST = NEWS README TODO shadow.spec.in EXTRA_DIST = NEWS README TODO shadow.spec.in
AUTOMAKE_OPTIONS = 1.5 dist-bzip2 foreign SUBDIRS = libmisc lib $(am__append_1) src po contrib doc etc \
SUBDIRS = po man libmisc lib src \ $(am__append_2)
contrib doc etc
all: config.h all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive $(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -367,7 +393,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \ $(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile $(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \ @case '$?' in \
*config.status*) \ *config.status*) \
@@ -388,8 +413,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps): $(am__aclocal_m4_deps):
config.h: stamp-h1 config.h: stamp-h1
@if test ! -f $@; then rm -f stamp-h1; else :; fi @test -f $@ || rm -f stamp-h1
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1 @rm -f stamp-h1
@@ -586,8 +611,9 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)" || chmod -R a+r "$(distdir)"
dist-gzip: distdir dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-bzip2: distdir dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__post_remove_distdir) $(am__post_remove_distdir)
@@ -595,17 +621,22 @@ dist-bzip2: distdir
dist-lzip: distdir dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-xz: distdir dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-tarZ: distdir dist-tarZ: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-shar: distdir dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz @echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-zip: distdir dist-zip: distdir
@@ -623,7 +654,7 @@ dist dist-all:
distcheck: dist distcheck: dist
case '$(DIST_ARCHIVES)' in \ case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \ *.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \ *.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \ *.tar.lz*) \
@@ -633,22 +664,23 @@ distcheck: dist
*.tar.Z*) \ *.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \ *.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \ *.zip*) \
unzip $(distdir).zip ;;\ unzip $(distdir).zip ;;\
esac esac
chmod -R a-w $(distdir) chmod -R a-w $(distdir)
chmod u+w $(distdir) chmod u+w $(distdir)
mkdir $(distdir)/_build $(distdir)/_inst mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
chmod a-w $(distdir) chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \ test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \ && am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \ && $(am__cd) $(distdir)/_build/sub \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \ && ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) check \
@@ -825,6 +857,8 @@ uninstall-am:
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am uninstall-am
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables. # 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. # Otherwise a system limit (for SysV at least) may be exceeded.
+72 -84
View File
@@ -1,18 +1,6 @@
$Id$ $Id$
shadow-4.2 -> shadow-4.2.1 UNRELEASED shadow-4.1.5.1 -> shadow-4.2 UNRELEASED
*** general
* Properly release with a generated configure script, built manpages
* Include the configure_userns patch from Debian
*** translation
* Vietnamese translation update
* French man pages translation update
* French translation update
* Typo fixes in German translation
shadow-4.1.5.1 -> shadow-4.2 2013-04-30
*** general *** general
* Handle libc whose crypt() returns NULL when passed a salt that * Handle libc whose crypt() returns NULL when passed a salt that
@@ -666,9 +654,9 @@ shadow-4.0.18.2 -> shadow-4.1.0 09-12-2007
- Use MD5_CRYPT_ENAB, ENCRYPT_METHOD, SHA_CRYPT_MIN_ROUNDS, and - Use MD5_CRYPT_ENAB, ENCRYPT_METHOD, SHA_CRYPT_MIN_ROUNDS, and
SHA_CRYPT_MAX_ROUNDS to define the default encryption algorithm for the SHA_CRYPT_MAX_ROUNDS to define the default encryption algorithm for the
passwords. passwords.
- chpaswd, chgpasswd, newusers: New options -c/--crypt-method and - chpasswd, chgpasswd, newusers: New options -c/--crypt-method and
-s/--sha-rounds to supersede the system default encryption algorithm. -s/--sha-rounds to supersede the system default encryption algorithm.
- chpaswd, chgpasswd, newusers: DES is no more the default algorithm. They - chpasswd, chgpasswd, newusers: DES is no more the default algorithm. They
will respect the system default configured in /etc/login.defs will respect the system default configured in /etc/login.defs
*** documentation: *** documentation:
@@ -713,14 +701,14 @@ shadow-4.0.17 -> shadow-4.0.18 01-08-2006
- groupadd, groupmod, useradd, usermod: fixed UID/GID overflow (fixed - groupadd, groupmod, useradd, usermod: fixed UID/GID overflow (fixed
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=198920) http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=198920)
- passwd, useradd, usermod: fixed inactive/mindays/warndays/maxdays overflow - passwd, useradd, usermod: fixed inactive/mindays/warndays/maxdays overflow
(simillar to RH#198920), (similar to RH#198920),
- groupmems: rewrited for use PAM and getopt_long() and now it is enabled - groupmems: rewritten for use PAM and getopt_long() and now it is enabled
for build and install (patch by George Kraft <gk4@swbell.net>), for build and install (patch by George Kraft <gk4@swbell.net>),
- S/Key: removed assign getpass() to libshadow_getpass() on autoconf level - S/Key: removed assign getpass() to libshadow_getpass() on autoconf level
(patch by Ulrich Mueller <ulm@kph.uni-mainz.de>; http://bugs.gentoo.org/139966), (patch by Ulrich Mueller <ulm@kph.uni-mainz.de>; http://bugs.gentoo.org/139966),
- usermod: back to previous -a option semantics and clarify -a behavior - usermod: back to previous -a option semantics and clarify -a behavior
on documentation level (by Greg Schafer <gschafer@zip.com.au>), on documentation level (by Greg Schafer <gschafer@zip.com.au>),
- chsh, groupmod: rewrited for use getopt_long(). - chsh, groupmod: rewritten for use getopt_long().
- updated translations: ca, cs, da, eu, fr, gl, hu, ko, pl, pt, ru, sv, tr, uk, vi. - updated translations: ca, cs, da, eu, fr, gl, hu, ko, pl, pt, ru, sv, tr, uk, vi.
*** documentation: *** documentation:
- fr and ru man pages are up to date, - fr and ru man pages are up to date,
@@ -755,7 +743,7 @@ shadow-4.0.15 -> shadow-4.0.16 05-06-2006
*** general: *** general:
- userdel: better fix for old CERT VU#312962 (which was fixed in shadow 4.0.8): - userdel: better fix for old CERT VU#312962 (which was fixed in shadow 4.0.8):
fixed forgoten checking of the return value from fchown() before fixed forgotten checking of the return value from fchown() before
proceeding with the fchmod() (based on Owl patch prepared by proceeding with the fchmod() (based on Owl patch prepared by
Rafal Wojtczuk <nergal@owl.openwall.com>), Rafal Wojtczuk <nergal@owl.openwall.com>),
- userdel: use login.defs::MAIL_DIR instead hardcoded /var/mail in created - userdel: use login.defs::MAIL_DIR instead hardcoded /var/mail in created
@@ -767,7 +755,7 @@ shadow-4.0.15 -> shadow-4.0.16 05-06-2006
passwords and libshadow_getpass() is used only because libc getpass() passwords and libshadow_getpass() is used only because libc getpass()
do not handles password prompting with echo enabled, do not handles password prompting with echo enabled,
- move login.defs::MD5_CRYPT_ENAB to non-PAM part, - move login.defs::MD5_CRYPT_ENAB to non-PAM part,
- userdel: rewrited for use getopt_log(), - userdel: rewritten for use getopt_log(),
- install default/template configuration files: - install default/template configuration files:
-- if shadow is configured with use PAM install /etc/pam.d/* files, -- if shadow is configured with use PAM install /etc/pam.d/* files,
-- if shadow do not uses PAM install /etc/{limits,login.acces} files, -- if shadow do not uses PAM install /etc/{limits,login.acces} files,
@@ -805,7 +793,7 @@ shadow-4.0.15 -> shadow-4.0.16 05-06-2006
- updated ru login.defs(5), passwd(1), userdel(8), usermod(8) man pages, - updated ru login.defs(5), passwd(1), userdel(8), usermod(8) man pages,
- pw_auth(3) man page removed (outdated), - pw_auth(3) man page removed (outdated),
- install limits(5), login.access(5) and porttime(5) man pages only when - install limits(5), login.access(5) and porttime(5) man pages only when
shadow is builded with PAM support disabled, shadow is built with PAM support disabled,
- passwd(1): better document how password strength is checked - passwd(1): better document how password strength is checked
(fixed http://bugs.debian.org/115380), (fixed http://bugs.debian.org/115380),
- usermod(8): added missing -a option description - usermod(8): added missing -a option description
@@ -828,7 +816,7 @@ shadow-4.0.14 -> shadow-4.0.15 13-03-2006
- login: default UMASK if not specified in login.defs is 022 (pointed by - login: default UMASK if not specified in login.defs is 022 (pointed by
Peter Vrabec <pvrabec@redhat.com>), Peter Vrabec <pvrabec@redhat.com>),
- chgpasswd: new tool (by Jonas Meurer <mejo@debian.org>), - chgpasswd: new tool (by Jonas Meurer <mejo@debian.org>),
- lastlog: print the usage and exit if an additional argument is profided to - lastlog: print the usage and exit if an additional argument is provided to
lastlog (merge 488_laslog_verify_arguments Debian patch), lastlog (merge 488_laslog_verify_arguments Debian patch),
- login, newgrp, nologin, su: do not link with libselinux (merge - login, newgrp, nologin, su: do not link with libselinux (merge
490_link_selinux_only_when_needed Debian patch), 490_link_selinux_only_when_needed Debian patch),
@@ -842,9 +830,9 @@ shadow-4.0.14 -> shadow-4.0.15 13-03-2006
tries exceeded, tries exceeded,
- always prints the number of tries in the syslog entry. - always prints the number of tries in the syslog entry.
- add special handling for PAM_ABORT - add special handling for PAM_ABORT
- add an entry to failog, as when USE_PAM is not defined. (#53164) - add an entry to faillog, as when USE_PAM is not defined. (#53164)
- changed pam_end to PAM_END. This is certainly was a mistake. PAM_END is - changed pam_end to PAM_END. This is certainly was a mistake. PAM_END is
pam_close_seesion + pam_end. Here, the session is still not open, we pam_close_session + pam_end. Here, the session is still not open, we
don't have to close it. don't have to close it.
- a HAVE_PAM_FAIL_DELAY is missing, - a HAVE_PAM_FAIL_DELAY is missing,
- su: fixed pam session support (patch from Topi Miettinen; fixed #57526, - su: fixed pam session support (patch from Topi Miettinen; fixed #57526,
@@ -852,7 +840,7 @@ shadow-4.0.14 -> shadow-4.0.15 13-03-2006
- userdel: user's group is already removed by update_groups(). - userdel: user's group is already removed by update_groups().
remove_group() is not needed (bug introduced in 4.0.14 on merge FC fixes). remove_group() is not needed (bug introduced in 4.0.14 on merge FC fixes).
Fixed by Nicolas François <nicolas.francois@centraliens.net>, Fixed by Nicolas François <nicolas.francois@centraliens.net>,
- useradd: allways remove group and gshadow databases lock, Fixed by Nicolas - useradd: always remove group and gshadow databases lock, Fixed by Nicolas
François <nicolas.francois@centraliens.net> François <nicolas.francois@centraliens.net>
(http://bugs.debian.org/348250) (http://bugs.debian.org/348250)
- auditing fixes: - auditing fixes:
@@ -860,14 +848,14 @@ shadow-4.0.14 -> shadow-4.0.15 13-03-2006
added audit_logger() prototype), added audit_logger() prototype),
- useradd: fixed excess audit_logger() argument, - useradd: fixed excess audit_logger() argument,
- chage: added missing \n on display password status if password must be - chage: added missing \n on display password status if password must be
chaged, changed,
- useradd: fixed allow non-unique UID (http://bugs.debian.org/351281), - useradd: fixed allow non-unique UID (http://bugs.debian.org/351281),
- variouse code cleanups for make possible compilation of shadow with -Wall - various code cleanups for make possible compilation of shadow with -Wall
-Werror (by Alexander Gattin <xrgtn@yandex.ru>), -Werror (by Alexander Gattin <xrgtn@yandex.ru>),
- su: move exit() outside libmisc/shell.c::shell() for handle shell() errors - su: move exit() outside libmisc/shell.c::shell() for handle shell() errors
on higher level (now is better visable where some programs exit with 126 on higher level (now is better visable where some programs exit with 126
and 127 exit codes); added new shell() parameter (char *const envp[]) and 127 exit codes); added new shell() parameter (char *const envp[])
which allow fix preserving enviloment in su on using -p, (patch by which allow fix preserving enviroment in su on using -p, (patch by
Alexander Gattin <xrgtn@yandex.ru>), Alexander Gattin <xrgtn@yandex.ru>),
- su: added handle -c,--command option for GNU su compliance (merge - su: added handle -c,--command option for GNU su compliance (merge
437_su_-c_option Debian patch), 437_su_-c_option Debian patch),
@@ -915,7 +903,7 @@ shadow-4.0.13 -> shadow-4.0.14 03-01-2006
- userdel: make the -f option force the removal of the user's group (even if it - userdel: make the -f option force the removal of the user's group (even if it
is the primary group of another user) is the primary group of another user)
(merge 453_userdel_-f_removes_group Debian patch), (merge 453_userdel_-f_removes_group Debian patch),
- usermod: rewrited for use getopt_long() (Christian Perrier <bubulle@kheops.frmug.org>), - usermod: rewritten for use getopt_long() (Christian Perrier <bubulle@kheops.frmug.org>),
- grpck: fixed segmentation fault on using -s when /etc/gshadow is empty (fix by - grpck: fixed segmentation fault on using -s when /etc/gshadow is empty (fix by
Tomasz Lemiech <szpajder@staszic.waw.pl>), Tomasz Lemiech <szpajder@staszic.waw.pl>),
- passwd: remove handle -f, -g and -s options. - passwd: remove handle -f, -g and -s options.
@@ -924,7 +912,7 @@ shadow-4.0.13 -> shadow-4.0.14 03-01-2006
Nicolas François <nicolas.francois@centraliens.net>) Nicolas François <nicolas.francois@centraliens.net>)
- su: export $USER and $SHELL as well as $HOME (http://bugs.debian.org/11003 and - su: export $USER and $SHELL as well as $HOME (http://bugs.debian.org/11003 and
http://bugs.debian.org/11189), http://bugs.debian.org/11189),
- su, vipw: rewrited for use getopt_long(), - su, vipw: rewritten for use getopt_long(),
- su: log successful/failed through syslog (http://bugs.debian.org/190215), - su: log successful/failed through syslog (http://bugs.debian.org/190215),
- updated translations: ca, cs, da, eu, fi, fr, it, pl, pt, ru, sv, tl, vi, - updated translations: ca, cs, da, eu, fi, fr, it, pl, pt, ru, sv, tl, vi,
- new translations: gl. - new translations: gl.
@@ -958,7 +946,7 @@ shadow-4.0.12 -> shadow-4.0.13 10-10-2005
*** general: *** general:
- chage: removed duplicated pam_start(), - chage: removed duplicated pam_start(),
- chfn, chsh: finished PAM support usin pam_start() and co., - chfn, chsh: finished PAM support using pam_start() and co.,
- userdel: userdel should not remove the group which is primary for someone else - userdel: userdel should not remove the group which is primary for someone else
(fix by Nicolas François <nicolas.francois@centraliens.net> (fix by Nicolas François <nicolas.francois@centraliens.net>
http://bugs.debian.org/295416), http://bugs.debian.org/295416),
@@ -967,7 +955,7 @@ shadow-4.0.12 -> shadow-4.0.13 10-10-2005
- fixedlib/commonio.c: don't assume selinux is enabled if is_selinux_enabled() - fixedlib/commonio.c: don't assume selinux is enabled if is_selinux_enabled()
returns -1 (merge isSelinuxEnabled FC patch by Jeremy Katz <katzj@redhat.com>), returns -1 (merge isSelinuxEnabled FC patch by Jeremy Katz <katzj@redhat.com>),
- login, su (non-PAM case): fixed setup max address space limits (added missing break - login, su (non-PAM case): fixed setup max address space limits (added missing break
statement in case) spoted by Lasse Collin <lasse.collin@tukaani.org>, statement in case) spotted by Lasse Collin <lasse.collin@tukaani.org>,
- auditing support added. Patch prepared by Peter Vrabec <pvrabec@redhat.com> basing - auditing support added. Patch prepared by Peter Vrabec <pvrabec@redhat.com> basing
on work by Steve Grubb from http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=159215 on work by Steve Grubb from http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=159215
Now auditing support have commands: chage, gpasswd, groupadd, groupdel, groupmod, Now auditing support have commands: chage, gpasswd, groupadd, groupdel, groupmod,
@@ -984,12 +972,12 @@ shadow-4.0.12 -> shadow-4.0.13 10-10-2005
This will permit to adduser Debian script to detect if chage failed because the This will permit to adduser Debian script to detect if chage failed because the
system doesn't have shadowed passwords (fix for http://bugs.debian.org/317012), system doesn't have shadowed passwords (fix for http://bugs.debian.org/317012),
- merge 010_more-i18ned-messages Debian patch which adds i18n support for few - merge 010_more-i18ned-messages Debian patch which adds i18n support for few
more messages (orginaly patch was prepared by Guillem Jover <guillem@debian.org>), more messages (originally patch was prepared by Guillem Jover <guillem@debian.org>),
- lastlog: added handle -b option which allow print only lastlog records older than - lastlog: added handle -b option which allow print only lastlog records older than
specified DAYS (fix by <miles@lubin.us>), specified DAYS (fix by <miles@lubin.us>),
- chpasswd, gpasswd, newusers: fixed libmisc/salt.c for use login.defs::MD5_CRYPT_ENAB - chpasswd, gpasswd, newusers: fixed libmisc/salt.c for use login.defs::MD5_CRYPT_ENAB
only if PAM support is disabled (fix by John Gatewood Ham <zappaman@buraphalinux.org>), only if PAM support is disabled (fix by John Gatewood Ham <zappaman@buraphalinux.org>),
- passwd: rewrited for use getopt_long(), - passwd: rewritten for use getopt_long(),
- newgrp: when newgrp process sits between parent and child shells, it should - newgrp: when newgrp process sits between parent and child shells, it should
propagate STOPs from child to parent and CONTs from parent to child, propagate STOPs from child to parent and CONTs from parent to child,
otherwise e.g. bash's "suspend" command won't work otherwise e.g. bash's "suspend" command won't work
@@ -999,11 +987,11 @@ shadow-4.0.12 -> shadow-4.0.13 10-10-2005
- chsh(1), groupadd(8), newusers(8), pwconv(8), useradd(8), userdel(8), usermod(8): - chsh(1), groupadd(8), newusers(8), pwconv(8), useradd(8), userdel(8), usermod(8):
added missing references to /etc/login.defs and login.defs(5) added missing references to /etc/login.defs and login.defs(5)
(Christian Perrier <bubulle@kheops.frmug.org>), (Christian Perrier <bubulle@kheops.frmug.org>),
- passwd(5): rewrited based on work by Greg Wooledge <greg@wooledge.org> - passwd(5): rewritten based on work by Greg Wooledge <greg@wooledge.org>
http://bugs.debian.org/328113 http://bugs.debian.org/328113
- login(1): added securetty(5) to SEE ALSO section - login(1): added securetty(5) to SEE ALSO section
(fixed Debian bug http://bugs.debian.org/325773), (fixed Debian bug http://bugs.debian.org/325773),
- groupadd(8), useradd(8): fix regular expression describing alloved login/group - groupadd(8), useradd(8): fix regular expression describing allowed login/group
names (pointed by Nicolas François <nicolas.francois@centraliens.net>) names (pointed by Nicolas François <nicolas.francois@centraliens.net>)
(correct is [a-z_][a-z0-9_-]*[$]), (correct is [a-z_][a-z0-9_-]*[$]),
- groupadd(8), useradd(8): documents in CAVEATS section the limitations shadow - groupadd(8), useradd(8): documents in CAVEATS section the limitations shadow
@@ -1013,9 +1001,9 @@ shadow-4.0.12 -> shadow-4.0.13 10-10-2005
shadow-4.0.11.1 -> shadow-4.0.12 22-08-2005 shadow-4.0.11.1 -> shadow-4.0.12 22-08-2005
*** general: *** general:
- newgrp, login: remove using login.defs::CLOSE_SESSIONS variable and allways - newgrp, login: remove using login.defs::CLOSE_SESSIONS variable and always
close PAM session, close PAM session,
- fixed configure.in: realy enable shadow group support by default (pointed by - fixed configure.in: really enable shadow group support by default (pointed by
Greg Schafer <gschafer@zip.com.au> and Peter Vrabec <pvrabec@redhat.com>), Greg Schafer <gschafer@zip.com.au> and Peter Vrabec <pvrabec@redhat.com>),
- login.defs: removed handle QMAIL_DIR variable, - login.defs: removed handle QMAIL_DIR variable,
- login: allow regular user to login on read-only root file system (not only for root) - login: allow regular user to login on read-only root file system (not only for root)
@@ -1040,9 +1028,9 @@ shadow-4.0.11.1 -> shadow-4.0.12 22-08-2005
period and permit brute-force attacks (fixed http://bugs.debian.org/288827), period and permit brute-force attacks (fixed http://bugs.debian.org/288827),
- uClibc fixes (by Martin Schlemmer <azarah@nosferatu.za.org>): - uClibc fixes (by Martin Schlemmer <azarah@nosferatu.za.org>):
added require ngettext (added [need-ngettext] to AM_GNU_GETTEXT() parameters) added require ngettext (added [need-ngettext] to AM_GNU_GETTEXT() parameters)
and stub prototype for ngettext() in lib/prototypes.h (neccessary if shadow and stub prototype for ngettext() in lib/prototypes.h (necessary if shadow
compiled with disabled NLS support) compiled with disabled NLS support)
- groupadd: rewrited for use getopt_long(), - groupadd: rewritten for use getopt_long(),
- groupadd, groupdel, groupmod, userdel: do OPENLOG() before pam_start(), - groupadd, groupdel, groupmod, userdel: do OPENLOG() before pam_start(),
- groupadd: fixed double OPENLOG(), - groupadd: fixed double OPENLOG(),
- removed lib/{grpack,gspack,pwpack,sppack}.c and prototypes from lib/prototypes.h - removed lib/{grpack,gspack,pwpack,sppack}.c and prototypes from lib/prototypes.h
@@ -1078,7 +1066,7 @@ shadow-4.0.10 -> shadow-4.0.11 18-07-2005
- su: ignore SIGINT while authenticating. A ^C could defeat the waiting period and - su: ignore SIGINT while authenticating. A ^C could defeat the waiting period and
permit brute-force attacks. Also ignore SIGQUIT. permit brute-force attacks. Also ignore SIGQUIT.
Fixed: http://bugs.debian.org/52372 and http://bugs.debian.org/288827 Fixed: http://bugs.debian.org/52372 and http://bugs.debian.org/288827
- useradd: rewrited for use getopt_long(), - useradd: rewritten for use getopt_long(),
- newgrp: add fix for handle splitted NIS groups: extends the functionality that, - newgrp: add fix for handle splitted NIS groups: extends the functionality that,
if the requested group is given, all groups of the same GID are tested for if the requested group is given, all groups of the same GID are tested for
membership of the requesting user. membership of the requesting user.
@@ -1109,7 +1097,7 @@ shadow-4.0.10 -> shadow-4.0.11 18-07-2005
- updated translations: cs, da, de, es, fi, pl, pt, ro, ru, sk. - updated translations: cs, da, de, es, fi, pl, pt, ro, ru, sk.
*** documentation: *** documentation:
- pwck(8): document -q option (based on Debian patch for fix http://bugs.debian.org/309408) - pwck(8): document -q option (based on Debian patch for fix http://bugs.debian.org/309408)
- pwck(8): rewrited OPTIONS section and better SYNOPSIS, - pwck(8): rewritten OPTIONS section and better SYNOPSIS,
- lastlog(8): document that lastlog is a sparse file, and don't need to be rotated - lastlog(8): document that lastlog is a sparse file, and don't need to be rotated
http://bugs.debian.org/219321 http://bugs.debian.org/219321
- login(8): better explain the respective roles of login, init and getty with regards - login(8): better explain the respective roles of login, init and getty with regards
@@ -1123,12 +1111,12 @@ shadow-4.0.9 -> shadow-4.0.10 28-06-2005
*** general: *** general:
- mkpasswd: removed, - mkpasswd: removed,
- userdel: now deletes user groups from /etc/gshdow as well as /etc/group. - userdel: now deletes user groups from /etc/gshadow as well as /etc/group.
Fix by Nicolas François <nicolas.francois@centraliens.net>. Fix by Nicolas François <nicolas.francois@centraliens.net>.
http://bugs.debian.org/99442 http://bugs.debian.org/99442
- usermod: when relocating a user's home directory, don't fail and remove the new - usermod: when relocating a user's home directory, don't fail and remove the new
home directory if we can't remove the old home directory for some home directory if we can't remove the old home directory for some
reason; the results can be spectularly poort if, for instance, only reason; the results can be spectacularly poor if, for instance, only
the rmdir() fails. Patch prepared by Timo Lindfors <lindi-spamtrap@newmail.com>. the rmdir() fails. Patch prepared by Timo Lindfors <lindi-spamtrap@newmail.com>.
http://bugs.debian.org/166369 http://bugs.debian.org/166369
- su: fix syslogs to be less ambiguous. Use old:new format instead of old-new - su: fix syslogs to be less ambiguous. Use old:new format instead of old-new
@@ -1136,7 +1124,7 @@ shadow-4.0.9 -> shadow-4.0.10 28-06-2005
http://bugs.debian.org/213592 http://bugs.debian.org/213592
- removed not used now libmisc/setup.c, - removed not used now libmisc/setup.c,
- login: use also UTMPX API instead UTMP on failure (login was affected for this - login: use also UTMPX API instead UTMP on failure (login was affected for this
when shadow was builded without PAM support) when shadow was built without PAM support)
patch by Nicolas François <nicolas.francois@centraliens.net> patch by Nicolas François <nicolas.francois@centraliens.net>
- login: the PAM session needs to be closed as root, thus before change_uid() - login: the PAM session needs to be closed as root, thus before change_uid()
http://bugs.debian.org/53570 http://bugs.debian.org/195048 http://bugs.debian.org/211884 http://bugs.debian.org/53570 http://bugs.debian.org/195048 http://bugs.debian.org/211884
@@ -1147,12 +1135,12 @@ shadow-4.0.9 -> shadow-4.0.10 28-06-2005
http://bugs.debian.org/48002 http://bugs.debian.org/48002
- login: fixed username on succesful login (was using the normal username, - login: fixed username on succesful login (was using the normal username,
when it should have used pam_user) http://bugs.debian.org/47819 when it should have used pam_user) http://bugs.debian.org/47819
- remove using SHADOWPWD #define so now shadow is allways builded with shadow - remove using SHADOWPWD #define so now shadow is always built with shadow
passwowd support, password support,
- chage: rewrited for use getopt_long(), - chage: rewritten for use getopt_long(),
- updated translations: ca, cs, da, fi, pl, ru, zh_TW. - updated translations: ca, cs, da, fi, pl, ru, zh_TW.
*** documentation: *** documentation:
- most of the man pages now are generated from XML files so in case submiting any - most of the man pages now are generated from XML files so in case submitting any
chages to this resources please make diff to XML files, chages to this resources please make diff to XML files,
- chfn: give more details about the influence of login.defs on what's allowed to - chfn: give more details about the influence of login.defs on what's allowed to
users. users.
@@ -1160,7 +1148,7 @@ shadow-4.0.9 -> shadow-4.0.10 28-06-2005
shadow-4.0.8 -> shadow-4.0.9 23-05-2005 shadow-4.0.8 -> shadow-4.0.9 23-05-2005
*** general: *** general:
- passwd: fixed segfault in non-PAM connfiguration - passwd: fixed segfault in non-PAM configuration
(submited by Greg Schafer <gschafer@zip.com.au>), (submited by Greg Schafer <gschafer@zip.com.au>),
- newgrp: fixed NULL pointer dereference - getlogin() and ttyname() can - newgrp: fixed NULL pointer dereference - getlogin() and ttyname() can
return NULL which is not checked (http://bugs.debian.org/162303), return NULL which is not checked (http://bugs.debian.org/162303),
@@ -1182,15 +1170,15 @@ shadow-4.0.7 -> shadow-4.0.8 26-04-2005
- configure.in: add using AC_GNU_SOURCE macro for kill compilation warnings about - configure.in: add using AC_GNU_SOURCE macro for kill compilation warnings about
implicit declaration of function `fseeko', implicit declaration of function `fseeko',
- faillog: changed faillog record display format for allow fit in 80 columns all - faillog: changed faillog record display format for allow fit in 80 columns all
faillog atributies, faillog attributes,
- removed NDBM code (unused), - removed NDBM code (unused),
- fixed use of SU_WHEEL_ONLY in su. Now su realy is avalaible for wheel group - fixed use of SU_WHEEL_ONLY in su. Now su really is available for wheel group
members. Thanks to Mike Frysinger <vapier@gentoo.org> for report: members. Thanks to Mike Frysinger <vapier@gentoo.org> for report:
http://bugs.gentoo.org/show_bug.cgi?id=80345 http://bugs.gentoo.org/show_bug.cgi?id=80345
- drop never finished kerberos and des_rpc support (for kerberos support back firs - drop never finished kerberos and des_rpc support (for kerberos support back firs
must be prepared modularization), must be prepared modularization),
- fixed UTMP path detection (by Kelledin <kelledin@users.sf.net>), - fixed UTMP path detection (by Kelledin <kelledin@users.sf.net>),
- useradd: rewrited group count to dynamic (by John Newbigin - useradd: rewritten group count to dynamic (by John Newbigin
<jnewbigin@ict.swin.edu.au>), <jnewbigin@ict.swin.edu.au>),
- login: fixed create lastlog entry fo users never loged in on non-PAM - login: fixed create lastlog entry fo users never loged in on non-PAM
variant of login (fix by <oracular@ziplip.com>), variant of login (fix by <oracular@ziplip.com>),
@@ -1205,7 +1193,7 @@ shadow-4.0.7 -> shadow-4.0.8 26-04-2005
fchmod() is executed. (Actually, we could also pass the final "mode" to fchmod() is executed. (Actually, we could also pass the final "mode" to
the open() call and then save the consequent fchmod().) the open() call and then save the consequent fchmod().)
- SELinux changes: added changes in chage, chfn, chsh, passwd for allow - SELinux changes: added changes in chage, chfn, chsh, passwd for allow
construct more grained user password/accuunt properties on SELinux construct more grained user password/account properties on SELinux
policies level. Patch originally based on RH changes (submited by Chris policies level. Patch originally based on RH changes (submited by Chris
PeBenito <pebenito@gentoo.org>), PeBenito <pebenito@gentoo.org>),
- added SELinux changes: in libmisc/copydir.c (based on Fedora patch), - added SELinux changes: in libmisc/copydir.c (based on Fedora patch),
@@ -1223,7 +1211,7 @@ shadow-4.0.7 -> shadow-4.0.8 26-04-2005
- newgrp(1): fix #251926, #166173, #113191 Debian bugs: explain why editing /etc/group - newgrp(1): fix #251926, #166173, #113191 Debian bugs: explain why editing /etc/group
(without gshadow) doesn't permit to use newgrp, (without gshadow) doesn't permit to use newgrp,
- newgrp(1): newgrp uses /bin/sh (not bash), - newgrp(1): newgrp uses /bin/sh (not bash),
- faillog(8): updated after rewrited faillog command for use getopt_long(), - faillog(8): updated after rewritten faillog command for use getopt_long(),
- login(1): removed fragment about abilities pass enviroment variables in login prompt, - login(1): removed fragment about abilities pass enviroment variables in login prompt,
- gshadow(5): new file (by Nicolas Nicolas François <nicolas.francois@centraliens.net>), - gshadow(5): new file (by Nicolas Nicolas François <nicolas.francois@centraliens.net>),
- usermod(8): fixed #302388 Debian bug: added separated -o option description, - usermod(8): fixed #302388 Debian bug: added separated -o option description,
@@ -1241,24 +1229,24 @@ shadow-4.0.6 -> shadow-4.0.7 26-01-2005
-- use fseeko() instead fseek() and remove casting file offsets to unsigned -- use fseeko() instead fseek() and remove casting file offsets to unsigned
long. long.
- lastlog: - lastlog:
-- rewrited source code using the same style as in chpasswd.c, -- rewritten source code using the same style as in chpasswd.c,
-- open lastlog file after finish parse comman line optiomns -- open lastlog file after finish parse commandline options
(now --help otput can be displayd for users without lastlog (now --help output can be displayed for users without lastlog
file read permission), file read permission),
-- cleanups in lastlog(8) man page using the same style as in -- cleanups in lastlog(8) man page using the same style as in
chpasswd(8). chpasswd(8).
- chpasswd: - chpasswd:
-- switch chpasswd to use getopt_long() and adds a --md5 option -- switch chpasswd to use getopt_long() and adds a --md5 option
(by Ian Gulliver <ian@penguinhosting.net>), (by Ian Gulliver <ian@penguinhosting.net>),
-- rewrited chpasswd(8) man page. -- rewritten chpasswd(8) man page.
shadow-4.0.5 -> shadow-4.0.6 08-11-2004 shadow-4.0.5 -> shadow-4.0.6 08-11-2004
- su: fixed adding of pam_env env variables to enviroment - su: fixed adding of pam_env env variables to enviroment
(Martin Schlemmer <azarah@nosferatu.za.org>), (Martin Schlemmer <azarah@nosferatu.za.org>),
- autoconf: fixed filling MAIL_SPOOL_DIR and MAIL_SPOOL_FILE variables - autoconf: fixed filling MAIL_SPOOL_DIR and MAIL_SPOOL_FILE variables
which was allways empty (Gregorio Guidi <g.guidi@sns.it>), which was always empty (Gregorio Guidi <g.guidi@sns.it>),
- realuy closse security bug in libmisc/pwdcheck.c, - really close security bug in libmisc/pwdcheck.c,
- added missing template/example PAM service config files for chfn, chsh and - added missing template/example PAM service config files for chfn, chsh and
userdel, userdel,
- do not translate variable names from /etc/default/useradd during - do not translate variable names from /etc/default/useradd during
@@ -1269,10 +1257,10 @@ shadow-4.0.4.1 -> shadow-4.0.5 27-10-2004
- change libmisc to private static library, - change libmisc to private static library,
- added SELinux support (basing on patch from Gentoo), - added SELinux support (basing on patch from Gentoo),
- chage: more verbose/human readable -l output. This output is much more - chage: more verbose/human readable -l output. This output is much more
beter for send directly via email for each users as message with account better for send directly via email for each users as message with account
status (for example as message with warning about account/password expiration), status (for example as message with warning about account/password expiration),
- login: fixed handle -f option: now it works correctly without specify "-h - login: fixed handle -f option: now it works correctly without specify "-h
<host>" if open login session localy is required (thanks for help <host>" if open login session locally is required (thanks for help
investigate bug for Krzysztof Kotlenga), investigate bug for Krzysztof Kotlenga),
- userdel: when removing a user with userdel, userdel was always exits with 1 (fixed). - userdel: when removing a user with userdel, userdel was always exits with 1 (fixed).
Based on http://bugs.gentoo.org/show_bug.cgi?id=66687, Based on http://bugs.gentoo.org/show_bug.cgi?id=66687,
@@ -1286,7 +1274,7 @@ shadow-4.0.4.1 -> shadow-4.0.5 27-10-2004
makes httpd Option SymlinkIfOwnerMatch break for default weg pages makes httpd Option SymlinkIfOwnerMatch break for default weg pages
including symlinks placed into /etc/skel/public_html for example. including symlinks placed into /etc/skel/public_html for example.
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=66819 http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=66819
- su: add pam_open_session() support. If builded without PAM support - su: add pam_open_session() support. If built without PAM support
propagate $DISPLAY and $XAUTHORITY enviroment variables. propagate $DISPLAY and $XAUTHORITY enviroment variables.
Based on http://www.gentoo.org/cgi-bin/viewcvs.cgi/sys-apps/shadow/files/shadow-4.0.4.1-su-pam_open_session.patch?rev=1.1 Based on http://www.gentoo.org/cgi-bin/viewcvs.cgi/sys-apps/shadow/files/shadow-4.0.4.1-su-pam_open_session.patch?rev=1.1
- applied 036_pam_access_with_preauth.patch Debian patch submited by Bjorn - applied 036_pam_access_with_preauth.patch Debian patch submited by Bjorn
@@ -1299,11 +1287,11 @@ shadow-4.0.4.1 -> shadow-4.0.5 27-10-2004
Use constant strings rather than argv[0] for syslog ident in the user Use constant strings rather than argv[0] for syslog ident in the user
management commands, management commands,
shadow-4.0.4.1-owl-tmp.diff: shadow-4.0.4.1-owl-tmp.diff:
Remove using mktemp() if mkstemp() prototype not found (use allways mkstemp()), Remove using mktemp() if mkstemp() prototype not found (use always mkstemp()),
shadow-4.0.4.1-owl-check-reads.diff: shadow-4.0.4.1-owl-check-reads.diff:
Add checking for read errors in commonio and vipw/vigr (not doing so could Add checking for read errors in commonio and vipw/vigr (not doing so could
result in data loss when the records are written back), result in data loss when the records are written back),
- fixed securirty bug in libmisc/pwdcheck.c which allow unauthorized - fixed security bug in libmisc/pwdcheck.c which allow unauthorized
account properties modification. account properties modification.
Affected tools: chfn and chsh. Affected tools: chfn and chsh.
Bug was discovered by Martin Schulze <joey@infodrom.org>. Bug was discovered by Martin Schulze <joey@infodrom.org>.
@@ -1319,12 +1307,12 @@ shadow-4.0.4.1 -> shadow-4.0.5 27-10-2004
shadow-4.0.4 => shadow-4.0.4.1 14-01-2004 shadow-4.0.4 => shadow-4.0.4.1 14-01-2004
- bug fixes in automake files for generate correct tar ball on "make dist": - bug fixes in automake files for generate correct tar ball on "make dist":
added mising "EXTRA_DIST = $(man_MANS)" in man/*/Makefile.am. added missing "EXTRA_DIST = $(man_MANS)" in man/*/Makefile.am.
shadow-4.0.3 => shadow-4.0.4 14-01-2004 shadow-4.0.3 => shadow-4.0.4 14-01-2004
*** general: *** general:
- added missing information about -f options in groupadd usage mesage - added missing information about -f options in groupadd usage message
(document this also in man page), (document this also in man page),
- removed TCFS support (tcfs is dead), - removed TCFS support (tcfs is dead),
- convert all po/*.po files to utf-8, - convert all po/*.po files to utf-8,
@@ -1332,7 +1320,7 @@ shadow-4.0.3 => shadow-4.0.4 14-01-2004
per service flushing method instead HUPing nscd process), per service flushing method instead HUPing nscd process),
- removed old AUTH_METHODS dependent code, - removed old AUTH_METHODS dependent code,
- chage: now all code depend on SHADOWPWD. If shadow will not be configured - chage: now all code depend on SHADOWPWD. If shadow will not be configured
on autoconf level for using shadow possword chage is olny stub which on autoconf level for using shadow password chage is olny stub which
informs "chage not configured for shadow password support." informs "chage not configured for shadow password support."
- dpasswd: removed, - dpasswd: removed,
- login: remove handle login.defs::DIALUPS_CHECK_ENAB code, - login: remove handle login.defs::DIALUPS_CHECK_ENAB code,
@@ -1340,7 +1328,7 @@ shadow-4.0.3 => shadow-4.0.4 14-01-2004
- ALL tools, libraries: remove old SVR4, SVR4_SI86_EUA BSD_QUOTA and ATT_AGE - ALL tools, libraries: remove old SVR4, SVR4_SI86_EUA BSD_QUOTA and ATT_AGE
dependent code, dependent code,
- ALL: ready for gettext 0.11.5, automake 1.7.4, autoconf 2.57, - ALL: ready for gettext 0.11.5, automake 1.7.4, autoconf 2.57,
- logoutd, userd: handle also utmpx if avalaile, - logoutd, userd: handle also utmpx if available,
- newgrp: fix for non-PAM version - newgrp: fix for non-PAM version
Use CLOSE_SESSIONS depending code only when USE_PAM. Use CLOSE_SESSIONS depending code only when USE_PAM.
The problem was reported by Mattias Webjorn Eriksson using Slackware The problem was reported by Mattias Webjorn Eriksson using Slackware
@@ -1368,7 +1356,7 @@ shadow-4.0.3 => shadow-4.0.4 14-01-2004
shadow-4.0.2 => shadow-4.0.3 13-03-2002 shadow-4.0.2 => shadow-4.0.3 13-03-2002
- added variouse cs, de, fr, id, it, ko man pages found mainly in national - added various cs, de, fr, id, it, ko man pages found mainly in national
man pages translations projects (this documents are not synced with man pages translations projects (this documents are not synced with
current en version but you know .. "Documentations is lik sex. When it is current en version but you know .. "Documentations is lik sex. When it is
good it very very good. Whet it is bad it is better than nothing."). Any good it very very good. Whet it is bad it is better than nothing."). Any
@@ -1384,9 +1372,9 @@ shadow-4.0.2 => shadow-4.0.3 13-03-2002
shadow-4.0.1 => shadow-4.0.2 17-02-2002 shadow-4.0.1 => shadow-4.0.2 17-02-2002
- resolve many fuzzy translations also all this which may cause problems on - resolve many fuzzy translations also all this which may cause problems on
displaing long uid/gid, displaying long uid/gid,
- allow use "$" on ending in cereated by useradd usermname accounts for allow - allow use "$" on ending in created by useradd username accounts for allow
create machine acounts for samba (thanks to Jerome Borsboom create machine accounts for samba (thanks to Jerome Borsboom
<borsboom@tch.fgg.eur.nl> for point this problem in 4.0.1), <borsboom@tch.fgg.eur.nl> for point this problem in 4.0.1),
- fix small but ugly bug in configure.in in libpam_mics library detection. - fix small but ugly bug in configure.in in libpam_mics library detection.
@@ -1406,7 +1394,7 @@ shadow-4.0.0 => shadow-4.0.1
as root. If root does read-only, there's no lock needed. Added missing as root. If root does read-only, there's no lock needed. Added missing
"#include <errno.h>" for above (me). "#include <errno.h>" for above (me).
shadow-4.0.0-owl-warnings.diff shadow-4.0.0-owl-warnings.diff
Olny one fix from this patch was aplayd because other was fixed few days Olny one fix from this patch was applied because other was fixed few days
before :) before :)
shadow-4.0.0-owl-check_names.diff shadow-4.0.0-owl-check_names.diff
Merge only prat this patch with checking login name matching; checking Merge only prat this patch with checking login name matching; checking
@@ -1414,7 +1402,7 @@ shadow-4.0.0 => shadow-4.0.1
probably _POSIX_LOGIN_NAME_MAX from <bits/posix1_lim.h>, probably _POSIX_LOGIN_NAME_MAX from <bits/posix1_lim.h>,
shadow-4.0.0-owl-chage-drop-priv.diff shadow-4.0.0-owl-chage-drop-priv.diff
shadow-4.0.0-owl-pam-auth.diff shadow-4.0.0-owl-pam-auth.diff
Merge part with reorder initialize PAM and checkin is chage is runed by Merge part with reorder initialize PAM and checking if chage is runed by
root or not - now chage can be runed from non-root account for checking root or not - now chage can be runed from non-root account for checking
by user own account information (if PAM enabled). by user own account information (if PAM enabled).
- fixes for handle/print correctly 32bit uid/gid (Thorsten Kukuk <kukuk@suse.de>), - fixes for handle/print correctly 32bit uid/gid (Thorsten Kukuk <kukuk@suse.de>),
@@ -1458,30 +1446,30 @@ shadow-20001016 => shadow-4.0.0 06-01-2002
- much better automake support, - much better automake support,
- added pt_BR man pages for gpasswd(1), groupadd(8), groupdel(8), - added pt_BR man pages for gpasswd(1), groupadd(8), groupdel(8),
groupmod(8), shadow(5) (man pages for other nations also are welcome), groupmod(8), shadow(5) (man pages for other nations also are welcome),
- mamny small fixes and updates nad improvements in man pages, - many small fixes and updates nad improvements in man pages,
- aplayed Debian patch to man pages for shadowconfig, - applied Debian patch to man pages for shadowconfig,
- remove limit to 6 chars logged tty name (012_libmisc_sulog.c.diff Debian - remove limit to 6 chars logged tty name (012_libmisc_sulog.c.diff Debian
patch). patch).
shadow-20001012 -> shadow-20001016: shadow-20001012 -> shadow-20001016:
- conditionaly disabled body reload_nscd() because not every - conditionally disabled body reload_nscd() because not every
version of nscd can handle it (this can be enabled by define version of nscd can handle it (this can be enabled by define
ENABLE_NSCD_SIGHUP) (Marek Michałkiewicz <marekm@linux.org.pl>) ENABLE_NSCD_SIGHUP) (Marek Michałkiewicz <marekm@linux.org.pl>)
- fixes on autoconf/automake level for dist target, - fixes on autoconf/automake level for dist target,
- Julianne F. Haugh new contact adress. - Julianne F. Haugh new contact address.
shadow-20000902 => shadow-20001012 shadow-20000902 => shadow-20001012
- removed /redhat directory with obsoleted files (partialy rewrited spec - removed /redhat directory with obsoleted files (partially rewritten spec
file is now in root directory), file is now in root directory),
- aplayed shadow-19990827-group.patch patch from RH wich prevents adduser - applied shadow-19990827-group.patch patch from RH wich prevents adduser
overwrite previously existing groups in adduser, overwrite previously existing groups in adduser,
- added PAM support for chage (bind to "chage" PAM config file) also - added PAM support for chage (bind to "chage" PAM config file) also
added PAM support for all other small tools like chpasswd, groupadd, added PAM support for all other small tools like chpasswd, groupadd,
groupdel, groupmod, newusers, useradd, userdel, usermod (bind to common groupdel, groupmod, newusers, useradd, userdel, usermod (bind to common
"shadow" PAM config file) - this modificaytions mainly based on "shadow" PAM config file) - this modifications mainly based on
modifications prepared by Janek Rękojarski <baggins@pld.org.pl>, modifications prepared by Janek Rękojarski <baggins@pld.org.pl>,
- many small fixes and improvments in automake (mow "make dist" - many small fixes and improvements in automake (mow "make dist"
works correctly), works correctly),
- added cs translation (Jiri Pavlovsky <Jiri.Pavlovsky@ff.cuni.cz>). - added cs translation (Jiri Pavlovsky <Jiri.Pavlovsky@ff.cuni.cz>).
+20 -17
View File
@@ -2,30 +2,25 @@ Shadow SITES
============ ============
Homepage Homepage
http://pkg-shadow.alioth.debian.org/ http://github.com/shadow-maint/shadow
FTP site Issue tracker
ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow http://github.com/shadow-maint/shadow/issues
SVN repository Releases
anonymous read only access: svn://svn.debian.org/pkg-shadow/upstream https://github.com/shadow-maint/shadow/releases
SVN web interface
http://svn.debian.org/wsvn/pkg-shadow/upstream
or
http://svn.debian.org/viewsvn/pkg-shadow/upstream
Mailing lists Mailing lists
for general discuss: pkg-shadow-devel@lists.alioth.debian.org for general discuss: pkg-shadow-devel@alioth-lists.debian.net
commit list: pkg-shadow-commits@lists.alioth.debian.org commit list: pkg-shadow-commits@alioth-lists.debian.net
Mailing lists subscription Mailing lists subscription
http://lists.alioth.debian.org/mailman/listinfo/pkg-shadow-devel http://alioth-lists.debian.net/mailman/listinfo/pkg-shadow-devel
http://lists.alioth.debian.org/mailman/listinfo/pkg-shadow-commits http://alioth-lists.debian.net/mailman/listinfo/pkg-shadow-commits
Mailing lists archives: Mailing lists archives:
http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/ http://alioth-lists.debian.net/pipermail/pkg-shadow-devel/
http://lists.alioth.debian.org/pipermail/pkg-shadow-commits/ http://alioth-lists.debian.net/pipermail/pkg-shadow-commits/
S/Key support: S/Key support:
Shadow can be built with S/Key support using the S/Key package from: Shadow can be built with S/Key support using the S/Key package from:
@@ -44,6 +39,7 @@ a lot of mail...
Adam Rudnicki <adam@v-lo.krakow.pl> Adam Rudnicki <adam@v-lo.krakow.pl>
Alan Curry <pacman@tardis.mars.net> Alan Curry <pacman@tardis.mars.net>
Aleksa Sarai <cyphar@cyphar.com>
Alexander O. Yuriev <alex@bach.cis.temple.edu> Alexander O. Yuriev <alex@bach.cis.temple.edu>
Algis Rudys <arudys@rice.edu> Algis Rudys <arudys@rice.edu>
Andreas Jaeger <aj@arthur.rhein-neckar.de> Andreas Jaeger <aj@arthur.rhein-neckar.de>
@@ -55,6 +51,7 @@ Brian R. Gaeke <brg@dgate.org>
Calle Karlsson <ckn@kash.se> Calle Karlsson <ckn@kash.se>
Chip Rosenthal <chip@unicom.com> Chip Rosenthal <chip@unicom.com>
Chris Evans <lady0110@sable.ox.ac.uk> Chris Evans <lady0110@sable.ox.ac.uk>
Chris Lamb <chris@chris-lamb.co.uk>
Cristian Gafton <gafton@sorosis.ro> Cristian Gafton <gafton@sorosis.ro>
Dan Walsh <dwalsh@redhat.com> Dan Walsh <dwalsh@redhat.com>
Darcy Boese <possum@chardonnay.niagara.com> Darcy Boese <possum@chardonnay.niagara.com>
@@ -62,6 +59,8 @@ Dave Hagewood <admin@arrowweb.com>
David A. Holland <dholland@hcs.harvard.edu> David A. Holland <dholland@hcs.harvard.edu>
David Frey <David.Frey@lugs.ch> David Frey <David.Frey@lugs.ch>
Ed Carp <ecarp@netcom.com> Ed Carp <ecarp@netcom.com>
Ed Neville <ed@s5h.net>
Eric W. Biederman" <ebiederm@xmission.com>
Floody <flood@evcom.net> Floody <flood@evcom.net>
Frank Denis <j@4u.net> Frank Denis <j@4u.net>
George Kraft IV <gk4@us.ibm.com> George Kraft IV <gk4@us.ibm.com>
@@ -71,6 +70,7 @@ Guy Maor <maor@debian.org>
Hrvoje Dogan <hdogan@bjesomar.srce.hr> Hrvoje Dogan <hdogan@bjesomar.srce.hr>
Jakub Hrozek <jhrozek@redhat.com> Jakub Hrozek <jhrozek@redhat.com>
Janos Farkas <chexum@bankinf.banki.hu> Janos Farkas <chexum@bankinf.banki.hu>
Jason Franklin <jason.franklin@quoininc.com>
Jay Soffian <jay@lw.net> Jay Soffian <jay@lw.net>
Jesse Thilo <Jesse.Thilo@pobox.com> Jesse Thilo <Jesse.Thilo@pobox.com>
Joey Hess <joey@kite.ml.org> Joey Hess <joey@kite.ml.org>
@@ -92,6 +92,7 @@ Martin Bene <mb@sime.com>
Martin Mares <mj@gts.cz> Martin Mares <mj@gts.cz>
Michael Meskes <meskes@topsystem.de> Michael Meskes <meskes@topsystem.de>
Michael Talbot-Wilson <mike@calypso.bns.com.au> Michael Talbot-Wilson <mike@calypso.bns.com.au>
Michael Vetter <jubalh@iodoru.org>
Mike Frysinger <vapier@gentoo.org> Mike Frysinger <vapier@gentoo.org>
Mike Pakovic <mpakovic@users.southeast.net> Mike Pakovic <mpakovic@users.southeast.net>
Nicolas François <nicolas.francois@centraliens.net> Nicolas François <nicolas.francois@centraliens.net>
@@ -117,5 +118,7 @@ Maintainers
=========== ===========
Tomasz Kłoczko <kloczek@pld.org.pl> (2000-2007) Tomasz Kłoczko <kloczek@pld.org.pl> (2000-2007)
Nicolas François <nicolas.francois@centraliens.net> (2007-now) Nicolas François <nicolas.francois@centraliens.net> (2007-2014)
Serge E. Hallyn <serge@hallyn.com> (2014-now)
Christian Brauner <christian@brauner.io> (2019-now)
Vendored
+188 -11055
View File
File diff suppressed because it is too large Load Diff
Executable
+347
View File
@@ -0,0 +1,347 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
+394 -466
View File
File diff suppressed because it is too large Load Diff
+60 -7
View File
@@ -1,4 +1,4 @@
/* config.h.in. Generated from configure.in by autoheader. */ /* config.h.in. Generated from configure.ac by autoheader. */
/* Define if account management tools should be installed setuid and /* Define if account management tools should be installed setuid and
authenticate the callers */ authenticate the callers */
@@ -24,23 +24,32 @@
/* Define to 1 if you have the declaration of 'pam_fail_delay' */ /* Define to 1 if you have the declaration of 'pam_fail_delay' */
#undef HAS_PAM_FAIL_DELAY #undef HAS_PAM_FAIL_DELAY
/* Defined to 1 if you have the declaration of 'secure_getenv' */
#undef HAS_SECURE_GETENV
/* Define to 1 if you have the <acl/libacl.h> header file. */ /* Define to 1 if you have the <acl/libacl.h> header file. */
#undef HAVE_ACL_LIBACL_H #undef HAVE_ACL_LIBACL_H
/* Define to 1 if you have the `arc4random_buf' function. */
#undef HAVE_ARC4RANDOM_BUF
/* Define to 1 if you have the <attr/error_context.h> header file. */ /* Define to 1 if you have the <attr/error_context.h> header file. */
#undef HAVE_ATTR_ERROR_CONTEXT_H #undef HAVE_ATTR_ERROR_CONTEXT_H
/* Define to 1 if you have the <attr/libattr.h> header file. */ /* Define to 1 if you have the <attr/libattr.h> header file. */
#undef HAVE_ATTR_LIBATTR_H #undef HAVE_ATTR_LIBATTR_H
/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the /* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */ CoreFoundation framework. */
#undef HAVE_CFLOCALECOPYCURRENT #undef HAVE_CFLOCALECOPYCURRENT
/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in /* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
the CoreFoundation framework. */ the CoreFoundation framework. */
#undef HAVE_CFPREFERENCESCOPYAPPVALUE #undef HAVE_CFPREFERENCESCOPYAPPVALUE
/* Define to 1 if you have the <crypt.h> header file. */
#undef HAVE_CRYPT_H
/* Define if the GNU dcgettext() function is already present or preinstalled. /* Define if the GNU dcgettext() function is already present or preinstalled.
*/ */
#undef HAVE_DCGETTEXT #undef HAVE_DCGETTEXT
@@ -68,6 +77,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */ /* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H #undef HAVE_DLFCN_H
/* Define to 1 if you have the `dlopen' function. */
#undef HAVE_DLOPEN
/* Define to 1 if you have the <errno.h> header file. */ /* Define to 1 if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H #undef HAVE_ERRNO_H
@@ -89,6 +101,9 @@
/* Define to 1 if you have the `getaddrinfo' function. */ /* Define to 1 if you have the `getaddrinfo' function. */
#undef HAVE_GETADDRINFO #undef HAVE_GETADDRINFO
/* Define to 1 if you have the `getentropy' function. */
#undef HAVE_GETENTROPY
/* Define to 1 if you have the `getgrgid_r' function. */ /* Define to 1 if you have the `getgrgid_r' function. */
#undef HAVE_GETGRGID_R #undef HAVE_GETGRGID_R
@@ -107,6 +122,9 @@
/* Define to 1 if you have the `getpwuid_r' function. */ /* Define to 1 if you have the `getpwuid_r' function. */
#undef HAVE_GETPWUID_R #undef HAVE_GETPWUID_R
/* Define to 1 if you have the `getrandom' function. */
#undef HAVE_GETRANDOM
/* Define to 1 if you have the `getspnam' function. */ /* Define to 1 if you have the `getspnam' function. */
#undef HAVE_GETSPNAM #undef HAVE_GETSPNAM
@@ -128,7 +146,7 @@
/* Define to 1 if you have the <gshadow.h> header file. */ /* Define to 1 if you have the <gshadow.h> header file. */
#undef HAVE_GSHADOW_H #undef HAVE_GSHADOW_H
/* Define if you have the iconv() function and it works. */ /* Define if you have the iconv() function. */
#undef HAVE_ICONV #undef HAVE_ICONV
/* Define to 1 if you have the `initgroups' function. */ /* Define to 1 if you have the `initgroups' function. */
@@ -164,6 +182,12 @@
/* Define to 1 if you have the <limits.h> header file. */ /* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H #undef HAVE_LIMITS_H
/* Define to 1 if you have the <linux/btrfs_tree.h> header file. */
#undef HAVE_LINUX_BTRFS_TREE_H
/* Define to 1 if you have the <linux/magic.h> header file. */
#undef HAVE_LINUX_MAGIC_H
/* Define if struct lastlog has ll_host */ /* Define if struct lastlog has ll_host */
#undef HAVE_LL_HOST #undef HAVE_LL_HOST
@@ -359,6 +383,9 @@
/* Define to 1 if you have the <syslog.h> header file. */ /* Define to 1 if you have the <syslog.h> header file. */
#undef HAVE_SYSLOG_H #undef HAVE_SYSLOG_H
/* Define to 1 if you have the <sys/capability.h> header file. */
#undef HAVE_SYS_CAPABILITY_H
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/ */
#undef HAVE_SYS_DIR_H #undef HAVE_SYS_DIR_H
@@ -370,9 +397,15 @@
*/ */
#undef HAVE_SYS_NDIR_H #undef HAVE_SYS_NDIR_H
/* Define to 1 if you have the <sys/random.h> header file. */
#undef HAVE_SYS_RANDOM_H
/* Define to 1 if you have the <sys/resource.h> header file. */ /* Define to 1 if you have the <sys/resource.h> header file. */
#undef HAVE_SYS_RESOURCE_H #undef HAVE_SYS_RESOURCE_H
/* Define to 1 if you have the <sys/statfs.h> header file. */
#undef HAVE_SYS_STATFS_H
/* Define to 1 if you have the <sys/stat.h> header file. */ /* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H #undef HAVE_SYS_STAT_H
@@ -424,8 +457,7 @@
/* Path for lastlog file. */ /* Path for lastlog file. */
#undef LASTLOG_FILE #undef LASTLOG_FILE
/* Define to the sub-directory in which libtool stores uninstalled libraries. /* Define to the sub-directory where libtool stores uninstalled libraries. */
*/
#undef LT_OBJDIR #undef LT_OBJDIR
/* Location of system mail spool directory. */ /* Location of system mail spool directory. */
@@ -470,12 +502,18 @@
/* Define to support the shadow group file. */ /* Define to support the shadow group file. */
#undef SHADOWGRP #undef SHADOWGRP
/* PAM converstation to use */ /* PAM conversation to use */
#undef SHADOW_PAM_CONVERSATION #undef SHADOW_PAM_CONVERSATION
/* The default shell. */ /* The default shell. */
#undef SHELL #undef SHELL
/* The size of `gid_t', as computed by sizeof. */
#undef SIZEOF_GID_T
/* The size of `uid_t', as computed by sizeof. */
#undef SIZEOF_UID_T
/* Define to support S/Key logins. */ /* Define to support S/Key logins. */
#undef SKEY #undef SKEY
@@ -497,6 +535,9 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */ /* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME #undef TM_IN_SYS_TIME
/* Define to allow the bcrypt password encryption algorithm */
#undef USE_BCRYPT
/* Define to support flushing of nscd caches */ /* Define to support flushing of nscd caches */
#undef USE_NSCD #undef USE_NSCD
@@ -506,6 +547,9 @@
/* Define to allow the SHA256 and SHA512 password encryption algorithms */ /* Define to allow the SHA256 and SHA512 password encryption algorithms */
#undef USE_SHA_CRYPT #undef USE_SHA_CRYPT
/* Define to support flushing of sssd caches */
#undef USE_SSSD
/* Define to use syslog(). */ /* Define to use syslog(). */
#undef USE_SYSLOG #undef USE_SYSLOG
@@ -534,6 +578,9 @@
/* Define if utmpx should be used */ /* Define if utmpx should be used */
#undef USE_UTMPX #undef USE_UTMPX
/* Define to allow the yescrypt password encryption algorithm */
#undef USE_YESCRYPT
/* Version number of package */ /* Version number of package */
#undef VERSION #undef VERSION
@@ -546,9 +593,15 @@
/* Define if you want to enable Audit messages */ /* Define if you want to enable Audit messages */
#undef WITH_AUDIT #undef WITH_AUDIT
/* Build shadow with BtrFS support */
#undef WITH_BTRFS
/* Build shadow with SELinux support */ /* Build shadow with SELinux support */
#undef WITH_SELINUX #undef WITH_SELINUX
/* Build with su */
#undef WITH_SU
/* Build shadow with tcb support (incomplete) */ /* Build shadow with tcb support (incomplete) */
#undef WITH_TCB #undef WITH_TCB
Vendored
+178 -165
View File
@@ -1,8 +1,8 @@
#! /bin/sh #! /bin/sh
# Configuration validation subroutine script. # Configuration validation subroutine script.
# Copyright 1992-2013 Free Software Foundation, Inc. # Copyright 1992-2018 Free Software Foundation, Inc.
timestamp='2013-04-24' timestamp='2018-02-22'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2013-04-24'
# General Public License for more details. # General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>. # along with this program; if not, see <https://www.gnu.org/licenses/>.
# #
# As a special exception to the GNU General Public License, if you # As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a # distribute this file as part of a program that contains a
@@ -25,7 +25,7 @@ timestamp='2013-04-24'
# of the GNU General Public License, version 3 ("GPLv3"). # of the GNU General Public License, version 3 ("GPLv3").
# Please send patches with a ChangeLog entry to config-patches@gnu.org. # Please send patches to <config-patches@gnu.org>.
# #
# Configuration subroutine to validate and canonicalize a configuration type. # Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument. # Supply the specified configuration type as an argument.
@@ -33,7 +33,7 @@ timestamp='2013-04-24'
# Otherwise, we print the canonical config type on stdout and succeed. # Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from: # You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages # This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases # and recognize all the CPU types, system types and aliases
@@ -53,12 +53,11 @@ timestamp='2013-04-24'
me=`echo "$0" | sed -e 's,.*/,,'` me=`echo "$0" | sed -e 's,.*/,,'`
usage="\ usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
$0 [OPTION] ALIAS
Canonicalize a configuration name. Canonicalize a configuration name.
Operation modes: Options:
-h, --help print this help, then exit -h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit -t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit -v, --version print version number, then exit
@@ -68,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\ version="\
GNU config.sub ($timestamp) GNU config.sub ($timestamp)
Copyright 1992-2013 Free Software Foundation, Inc. Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -95,7 +94,7 @@ while test $# -gt 0 ; do
*local*) *local*)
# First pass through any local machine types. # First pass through any local machine types.
echo $1 echo "$1"
exit ;; exit ;;
* ) * )
@@ -113,24 +112,24 @@ esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations. # Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
kopensolaris*-gnu* | \ kopensolaris*-gnu* | cloudabi*-eabi* | \
storm-chaos* | os2-emx* | rtmk-nova*) storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;; ;;
android-linux) android-linux)
os=-linux-android os=-linux-android
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
;; ;;
*) *)
basic_machine=`echo $1 | sed 's/-[^-]*$//'` basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ] if [ "$basic_machine" != "$1" ]
then os=`echo $1 | sed 's/.*-/-/'` then os=`echo "$1" | sed 's/.*-/-/'`
else os=; fi else os=; fi
;; ;;
esac esac
@@ -179,44 +178,44 @@ case $os in
;; ;;
-sco6) -sco6)
os=-sco5v6 os=-sco5v6
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-sco5) -sco5)
os=-sco3.2v5 os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-sco4) -sco4)
os=-sco3.2v4 os=-sco3.2v4
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-sco3.2.[4-9]*) -sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-sco3.2v[4-9]*) -sco3.2v[4-9]*)
# Don't forget version if it is 3.2v4 or newer. # Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-sco5v6*) -sco5v6*)
# Don't forget version if it is 3.2v4 or newer. # Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-sco*) -sco*)
os=-sco3.2v2 os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-udk*) -udk*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-isc) -isc)
os=-isc2.2 os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-clix*) -clix*)
basic_machine=clipper-intergraph basic_machine=clipper-intergraph
;; ;;
-isc*) -isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;; ;;
-lynx*178) -lynx*178)
os=-lynxos178 os=-lynxos178
@@ -228,10 +227,7 @@ case $os in
os=-lynxos os=-lynxos
;; ;;
-ptx*) -ptx*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
;;
-windowsnt*)
os=`echo $os | sed -e 's/windowsnt/winnt/'`
;; ;;
-psos*) -psos*)
os=-psos os=-psos
@@ -255,16 +251,18 @@ case $basic_machine in
| arc | arceb \ | arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \ | avr | avr32 \
| ba \
| be32 | be64 \ | be32 | be64 \
| bfin \ | bfin \
| c4x | clipper \ | c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \ | d10v | d30v | dlx | dsp16xx \
| epiphany \ | e2k | epiphany \
| fido | fr30 | frv \ | fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \ | hexagon \
| i370 | i860 | i960 | ia64 \ | i370 | i860 | i960 | ia16 | ia64 \
| ip2k | iq2000 \ | ip2k | iq2000 \
| k1om \
| le32 | le64 \ | le32 | le64 \
| lm32 \ | lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \ | m32c | m32r | m32rle | m68000 | m68k | m88k \
@@ -282,8 +280,10 @@ case $basic_machine in
| mips64vr5900 | mips64vr5900el \ | mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \ | mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \ | mipsisa32r2 | mipsisa32r2el \
| mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \ | mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \ | mipsisa64r2 | mipsisa64r2el \
| mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \ | mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \ | mipsr5900 | mipsr5900el \
@@ -295,14 +295,15 @@ case $basic_machine in
| nds32 | nds32le | nds32be \ | nds32 | nds32le | nds32be \
| nios | nios2 | nios2eb | nios2el \ | nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \ | ns16k | ns32k \
| open8 \ | open8 | or1k | or1knd | or32 \
| or1k | or32 \ | pdp10 | pj | pjl \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \ | powerpc | powerpc64 | powerpc64le | powerpcle \
| pru \
| pyramid \ | pyramid \
| riscv32 | riscv64 \
| rl78 | rx \ | rl78 | rx \
| score \ | score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \ | sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -310,7 +311,8 @@ case $basic_machine in
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \ | ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| we32k \ | visium \
| wasm32 \
| x86 | xc16x | xstormy16 | xtensa \ | x86 | xc16x | xstormy16 | xtensa \
| z8k | z80) | z8k | z80)
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
@@ -324,11 +326,14 @@ case $basic_machine in
c6x) c6x)
basic_machine=tic6x-unknown basic_machine=tic6x-unknown
;; ;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) leon|leon[3-9])
basic_machine=sparc-$basic_machine
;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
os=-none os=-none
;; ;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
;; ;;
ms1) ms1)
basic_machine=mt-unknown basic_machine=mt-unknown
@@ -357,7 +362,7 @@ case $basic_machine in
;; ;;
# Object if more than one company name word. # Object if more than one company name word.
*-*-*) *-*-*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
exit 1 exit 1
;; ;;
# Recognize the basic CPU types with company name. # Recognize the basic CPU types with company name.
@@ -369,18 +374,20 @@ case $basic_machine in
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \ | avr-* | avr32-* \
| ba-* \
| be32-* | be64-* \ | be32-* | be64-* \
| bfin-* | bs2000-* \ | bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \ | c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \ | d10v-* | d30v-* | dlx-* \
| elxsi-* \ | e2k-* | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \ | h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \ | hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \ | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
| ip2k-* | iq2000-* \ | ip2k-* | iq2000-* \
| k1om-* \
| le32-* | le64-* \ | le32-* | le64-* \
| lm32-* \ | lm32-* \
| m32c-* | m32r-* | m32rle-* \ | m32c-* | m32r-* | m32rle-* \
@@ -400,8 +407,10 @@ case $basic_machine in
| mips64vr5900-* | mips64vr5900el-* \ | mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \ | mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \ | mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipsr5900-* | mipsr5900el-* \ | mipsr5900-* | mipsr5900el-* \
@@ -413,16 +422,19 @@ case $basic_machine in
| nios-* | nios2-* | nios2eb-* | nios2el-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \ | none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \ | open8-* \
| or1k*-* \
| orion-* \ | orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pru-* \
| pyramid-* \ | pyramid-* \
| riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \ | rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \ | sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
| tahoe-* \ | tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \ | tile*-* \
@@ -430,6 +442,8 @@ case $basic_machine in
| ubicom32-* \ | ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \ | vax-* \
| visium-* \
| wasm32-* \
| we32k-* \ | we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \ | xstormy16-* | xtensa*-* \
@@ -443,7 +457,7 @@ case $basic_machine in
# Recognize the various machine names and aliases which stand # Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS. # for a CPU type and a company and sometimes even an OS.
386bsd) 386bsd)
basic_machine=i386-unknown basic_machine=i386-pc
os=-bsd os=-bsd
;; ;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
@@ -477,7 +491,7 @@ case $basic_machine in
basic_machine=x86_64-pc basic_machine=x86_64-pc
;; ;;
amd64-*) amd64-*)
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
amdahl) amdahl)
basic_machine=580-amdahl basic_machine=580-amdahl
@@ -506,6 +520,9 @@ case $basic_machine in
basic_machine=i386-pc basic_machine=i386-pc
os=-aros os=-aros
;; ;;
asmjs)
basic_machine=asmjs-unknown
;;
aux) aux)
basic_machine=m68k-apple basic_machine=m68k-apple
os=-aux os=-aux
@@ -519,7 +536,7 @@ case $basic_machine in
os=-linux os=-linux
;; ;;
blackfin-*) blackfin-*)
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=-linux os=-linux
;; ;;
bluegene*) bluegene*)
@@ -527,13 +544,13 @@ case $basic_machine in
os=-cnk os=-cnk
;; ;;
c54x-*) c54x-*)
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
c55x-*) c55x-*)
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
c6x-*) c6x-*)
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
c90) c90)
basic_machine=c90-cray basic_machine=c90-cray
@@ -622,10 +639,18 @@ case $basic_machine in
basic_machine=rs6000-bull basic_machine=rs6000-bull
os=-bosx os=-bosx
;; ;;
dpx2* | dpx2*-bull) dpx2*)
basic_machine=m68k-bull basic_machine=m68k-bull
os=-sysv3 os=-sysv3
;; ;;
e500v[12])
basic_machine=powerpc-unknown
os=$os"spe"
;;
e500v[12]-*)
basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=$os"spe"
;;
ebmon29k) ebmon29k)
basic_machine=a29k-amd basic_machine=a29k-amd
os=-ebmon os=-ebmon
@@ -715,9 +740,6 @@ case $basic_machine in
hp9k8[0-9][0-9] | hp8[0-9][0-9]) hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp basic_machine=hppa1.0-hp
;; ;;
hppa-next)
os=-nextstep3
;;
hppaosf) hppaosf)
basic_machine=hppa1.1-hp basic_machine=hppa1.1-hp
os=-osf os=-osf
@@ -730,26 +752,26 @@ case $basic_machine in
basic_machine=i370-ibm basic_machine=i370-ibm
;; ;;
i*86v32) i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-sysv32 os=-sysv32
;; ;;
i*86v4*) i*86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-sysv4 os=-sysv4
;; ;;
i*86v) i*86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-sysv os=-sysv
;; ;;
i*86sol2) i*86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-solaris2 os=-solaris2
;; ;;
i386mach) i386mach)
basic_machine=i386-mach basic_machine=i386-mach
os=-mach os=-mach
;; ;;
i386-vsta | vsta) vsta)
basic_machine=i386-unknown basic_machine=i386-unknown
os=-vsta os=-vsta
;; ;;
@@ -767,17 +789,17 @@ case $basic_machine in
basic_machine=m68k-isi basic_machine=m68k-isi
os=-sysv os=-sysv
;; ;;
leon-*|leon[3-9]-*)
basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
;;
m68knommu) m68knommu)
basic_machine=m68k-unknown basic_machine=m68k-unknown
os=-linux os=-linux
;; ;;
m68knommu-*) m68knommu-*)
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=-linux os=-linux
;; ;;
m88k-omron*)
basic_machine=m88k-omron
;;
magnum | m3230) magnum | m3230)
basic_machine=mips-mips basic_machine=mips-mips
os=-sysv os=-sysv
@@ -794,7 +816,7 @@ case $basic_machine in
os=-mingw64 os=-mingw64
;; ;;
mingw32) mingw32)
basic_machine=i386-pc basic_machine=i686-pc
os=-mingw32 os=-mingw32
;; ;;
mingw32ce) mingw32ce)
@@ -809,10 +831,10 @@ case $basic_machine in
os=-mint os=-mint
;; ;;
mips3*-*) mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
;; ;;
mips3*) mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
;; ;;
monitor) monitor)
basic_machine=m68k-rom68k basic_machine=m68k-rom68k
@@ -822,15 +844,19 @@ case $basic_machine in
basic_machine=powerpc-unknown basic_machine=powerpc-unknown
os=-morphos os=-morphos
;; ;;
moxiebox)
basic_machine=moxie-unknown
os=-moxiebox
;;
msdos) msdos)
basic_machine=i386-pc basic_machine=i386-pc
os=-msdos os=-msdos
;; ;;
ms1-*) ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
;; ;;
msys) msys)
basic_machine=i386-pc basic_machine=i686-pc
os=-msys os=-msys
;; ;;
mvs) mvs)
@@ -869,7 +895,7 @@ case $basic_machine in
basic_machine=v70-nec basic_machine=v70-nec
os=-sysv os=-sysv
;; ;;
next | m*-next ) next | m*-next)
basic_machine=m68k-next basic_machine=m68k-next
case $os in case $os in
-nextstep* ) -nextstep* )
@@ -914,6 +940,12 @@ case $basic_machine in
nsr-tandem) nsr-tandem)
basic_machine=nsr-tandem basic_machine=nsr-tandem
;; ;;
nsv-tandem)
basic_machine=nsv-tandem
;;
nsx-tandem)
basic_machine=nsx-tandem
;;
op50n-* | op60c-*) op50n-* | op60c-*)
basic_machine=hppa1.1-oki basic_machine=hppa1.1-oki
os=-proelf os=-proelf
@@ -946,7 +978,7 @@ case $basic_machine in
os=-linux os=-linux
;; ;;
parisc-*) parisc-*)
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=-linux os=-linux
;; ;;
pbd) pbd)
@@ -962,7 +994,7 @@ case $basic_machine in
basic_machine=i386-pc basic_machine=i386-pc
;; ;;
pc98-*) pc98-*)
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
pentium | p5 | k5 | k6 | nexgen | viac3) pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc basic_machine=i586-pc
@@ -977,16 +1009,16 @@ case $basic_machine in
basic_machine=i786-pc basic_machine=i786-pc
;; ;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
pentiumpro-* | p6-* | 6x86-* | athlon-*) pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
pentium4-*) pentium4-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
pn) pn)
basic_machine=pn-gould basic_machine=pn-gould
@@ -996,23 +1028,23 @@ case $basic_machine in
ppc | ppcbe) basic_machine=powerpc-unknown ppc | ppcbe) basic_machine=powerpc-unknown
;; ;;
ppc-* | ppcbe-*) ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
ppcle | powerpclittle | ppc-le | powerpc-little) ppcle | powerpclittle)
basic_machine=powerpcle-unknown basic_machine=powerpcle-unknown
;; ;;
ppcle-* | powerpclittle-*) ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
ppc64) basic_machine=powerpc64-unknown ppc64) basic_machine=powerpc64-unknown
;; ;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little) ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown basic_machine=powerpc64le-unknown
;; ;;
ppc64le-* | powerpc64little-*) ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
ps2) ps2)
basic_machine=i386-ibm basic_machine=i386-ibm
@@ -1066,17 +1098,10 @@ case $basic_machine in
sequent) sequent)
basic_machine=i386-sequent basic_machine=i386-sequent
;; ;;
sh)
basic_machine=sh-hitachi
os=-hms
;;
sh5el) sh5el)
basic_machine=sh5le-unknown basic_machine=sh5le-unknown
;; ;;
sh64) simso-wrs)
basic_machine=sh64-unknown
;;
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs basic_machine=sparclite-wrs
os=-vxworks os=-vxworks
;; ;;
@@ -1095,7 +1120,7 @@ case $basic_machine in
os=-sysv4 os=-sysv4
;; ;;
strongarm-* | thumb-*) strongarm-* | thumb-*)
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;; ;;
sun2) sun2)
basic_machine=m68000-sun basic_machine=m68000-sun
@@ -1217,6 +1242,9 @@ case $basic_machine in
basic_machine=hppa1.1-winbond basic_machine=hppa1.1-winbond
os=-proelf os=-proelf
;; ;;
x64)
basic_machine=x86_64-pc
;;
xbox) xbox)
basic_machine=i686-pc basic_machine=i686-pc
os=-mingw32 os=-mingw32
@@ -1225,20 +1253,12 @@ case $basic_machine in
basic_machine=xps100-honeywell basic_machine=xps100-honeywell
;; ;;
xscale-* | xscalee[bl]-*) xscale-* | xscalee[bl]-*)
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
;; ;;
ymp) ymp)
basic_machine=ymp-cray basic_machine=ymp-cray
os=-unicos os=-unicos
;; ;;
z8k-*-coff)
basic_machine=z8k-unknown
os=-sim
;;
z80-*-coff)
basic_machine=z80-unknown
os=-sim
;;
none) none)
basic_machine=none-none basic_machine=none-none
os=-none os=-none
@@ -1267,10 +1287,6 @@ case $basic_machine in
vax) vax)
basic_machine=vax-dec basic_machine=vax-dec
;; ;;
pdp10)
# there are many clones, so DEC is not a safe bet
basic_machine=pdp10-unknown
;;
pdp11) pdp11)
basic_machine=pdp11-dec basic_machine=pdp11-dec
;; ;;
@@ -1280,9 +1296,6 @@ case $basic_machine in
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown basic_machine=sh-unknown
;; ;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra) cydra)
basic_machine=cydra-cydrome basic_machine=cydra-cydrome
;; ;;
@@ -1302,7 +1315,7 @@ case $basic_machine in
# Make sure to match an already-canonicalized machine name. # Make sure to match an already-canonicalized machine name.
;; ;;
*) *)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
exit 1 exit 1
;; ;;
esac esac
@@ -1310,10 +1323,10 @@ esac
# Here we canonicalize certain aliases for manufacturers. # Here we canonicalize certain aliases for manufacturers.
case $basic_machine in case $basic_machine in
*-digital*) *-digital*)
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
;; ;;
*-commodore*) *-commodore*)
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
;; ;;
*) *)
;; ;;
@@ -1324,8 +1337,8 @@ esac
if [ x"$os" != x"" ] if [ x"$os" != x"" ]
then then
case $os in case $os in
# First match some system type aliases # First match some system type aliases that might get confused
# that might get confused with valid system types. # with valid system types.
# -solaris* is a basic system type, with this one exception. # -solaris* is a basic system type, with this one exception.
-auroraux) -auroraux)
os=-auroraux os=-auroraux
@@ -1336,45 +1349,48 @@ case $os in
-solaris) -solaris)
os=-solaris2 os=-solaris2
;; ;;
-svr4*)
os=-sysv4
;;
-unixware*) -unixware*)
os=-sysv4.2uw os=-sysv4.2uw
;; ;;
-gnu/linux*) -gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;; ;;
# First accept the basic system types. # es1800 is here to avoid being matched by es* (a different OS)
-es1800*)
os=-ose
;;
# Now accept the basic system types.
# The portable systems comes first. # The portable systems comes first.
# Each alternative MUST END IN A *, to match a version number. # Each alternative MUST end in a * to match a version number.
# -sysv* is not here because it comes later, after sysvr4. # -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \ | -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \ | -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
| -bitrig* | -openbsd* | -solidbsd* \ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \ | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -morphos* | -superux* | -rtmk* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
| -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
| -midnightbsd*)
# Remember, each alternative MUST END IN *, to match a version number. # Remember, each alternative MUST END IN *, to match a version number.
;; ;;
-qnx*) -qnx*)
@@ -1391,12 +1407,12 @@ case $os in
-nto*) -nto*)
os=`echo $os | sed -e 's|nto|nto-qnx|'` os=`echo $os | sed -e 's|nto|nto-qnx|'`
;; ;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -sim | -xray | -os68k* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -windows* | -osx | -abug | -netware* | -os9* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;; ;;
-mac*) -mac*)
os=`echo $os | sed -e 's|mac|macos|'` os=`echo "$os" | sed -e 's|mac|macos|'`
;; ;;
-linux-dietlibc) -linux-dietlibc)
os=-linux-dietlibc os=-linux-dietlibc
@@ -1405,10 +1421,10 @@ case $os in
os=`echo $os | sed -e 's|linux|linux-gnu|'` os=`echo $os | sed -e 's|linux|linux-gnu|'`
;; ;;
-sunos5*) -sunos5*)
os=`echo $os | sed -e 's|sunos5|solaris2|'` os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
;; ;;
-sunos6*) -sunos6*)
os=`echo $os | sed -e 's|sunos6|solaris3|'` os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
;; ;;
-opened*) -opened*)
os=-openedition os=-openedition
@@ -1419,12 +1435,6 @@ case $os in
-wince*) -wince*)
os=-wince os=-wince
;; ;;
-osfrose*)
os=-osfrose
;;
-osf*)
os=-osf
;;
-utek*) -utek*)
os=-bsd os=-bsd
;; ;;
@@ -1449,7 +1459,7 @@ case $os in
-nova*) -nova*)
os=-rtmk-nova os=-rtmk-nova
;; ;;
-ns2 ) -ns2)
os=-nextstep2 os=-nextstep2
;; ;;
-nsk*) -nsk*)
@@ -1471,7 +1481,7 @@ case $os in
-oss*) -oss*)
os=-sysv3 os=-sysv3
;; ;;
-svr4) -svr4*)
os=-sysv4 os=-sysv4
;; ;;
-svr3) -svr3)
@@ -1486,32 +1496,38 @@ case $os in
-ose*) -ose*)
os=-ose os=-ose
;; ;;
-es1800*)
os=-ose
;;
-xenix)
os=-xenix
;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint os=-mint
;; ;;
-aros*)
os=-aros
;;
-zvmoe) -zvmoe)
os=-zvmoe os=-zvmoe
;; ;;
-dicos*) -dicos*)
os=-dicos os=-dicos
;; ;;
-pikeos*)
# Until real need of OS specific support for
# particular features comes up, bare metal
# configurations are quite functional.
case $basic_machine in
arm*)
os=-eabi
;;
*)
os=-elf
;;
esac
;;
-nacl*) -nacl*)
;; ;;
-ios)
;;
-none) -none)
;; ;;
*) *)
# Get rid of the `-' at the beginning of $os. # Get rid of the `-' at the beginning of $os.
os=`echo $os | sed 's/[^-]*-//'` os=`echo $os | sed 's/[^-]*-//'`
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
exit 1 exit 1
;; ;;
esac esac
@@ -1546,6 +1562,9 @@ case $basic_machine in
c4x-* | tic4x-*) c4x-* | tic4x-*)
os=-coff os=-coff
;; ;;
c8051-*)
os=-elf
;;
hexagon-*) hexagon-*)
os=-elf os=-elf
;; ;;
@@ -1589,9 +1608,6 @@ case $basic_machine in
mips*-*) mips*-*)
os=-elf os=-elf
;; ;;
or1k-*)
os=-elf
;;
or32-*) or32-*)
os=-coff os=-coff
;; ;;
@@ -1601,12 +1617,12 @@ case $basic_machine in
sparc-* | *-sun) sparc-* | *-sun)
os=-sunos4.1.1 os=-sunos4.1.1
;; ;;
pru-*)
os=-elf
;;
*-be) *-be)
os=-beos os=-beos
;; ;;
*-haiku)
os=-haiku
;;
*-ibm) *-ibm)
os=-aix os=-aix
;; ;;
@@ -1646,7 +1662,7 @@ case $basic_machine in
m88k-omron*) m88k-omron*)
os=-luna os=-luna
;; ;;
*-next ) *-next)
os=-nextstep os=-nextstep
;; ;;
*-sequent) *-sequent)
@@ -1661,9 +1677,6 @@ case $basic_machine in
i370-*) i370-*)
os=-mvs os=-mvs
;; ;;
*-next)
os=-nextstep3
;;
*-gould) *-gould)
os=-sysv os=-sysv
;; ;;
@@ -1773,15 +1786,15 @@ case $basic_machine in
vendor=stratus vendor=stratus
;; ;;
esac esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
;; ;;
esac esac
echo $basic_machine$os echo "$basic_machine$os"
exit exit
# Local variables: # Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'write-file-functions 'time-stamp)
# time-stamp-start: "timestamp='" # time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d" # time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'" # time-stamp-end: "'"
Vendored
+2361 -1446
View File
File diff suppressed because it is too large Load Diff
+122 -33
View File
@@ -1,16 +1,29 @@
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
AC_INIT AC_PREREQ([2.69])
AM_INIT_AUTOMAKE(shadow, 4.2.1) m4_define([libsubid_abi_major], 3)
m4_define([libsubid_abi_minor], 0)
m4_define([libsubid_abi_micro], 0)
m4_define([libsubid_abi], [libsubid_abi_major.libsubid_abi_minor.libsubid_abi_micro])
AC_INIT([shadow], [4.9], [pkg-shadow-devel@lists.alioth.debian.org], [],
[https://github.com/shadow-maint/shadow])
AM_INIT_AUTOMAKE([1.11 foreign dist-xz])
AC_CONFIG_MACRO_DIRS([m4])
AM_SILENT_RULES([yes])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AC_SUBST([LIBSUBID_ABI_MAJOR], [libsubid_abi_major])
AC_SUBST([LIBSUBID_ABI_MINOR], [libsubid_abi_minor])
AC_SUBST([LIBSUBID_ABI_MICRO], [libsubid_abi_micro])
AC_SUBST([LIBSUBID_ABI], [libsubid_abi])
dnl Some hacks... dnl Some hacks...
test "$prefix" = "NONE" && prefix="/usr" test "$prefix" = "NONE" && prefix="/usr"
test "$prefix" = "/usr" && exec_prefix="" test "$prefix" = "/usr" && exec_prefix=""
AC_GNU_SOURCE AC_GNU_SOURCE
AM_DISABLE_SHARED
AM_ENABLE_STATIC AM_ENABLE_STATIC
AM_ENABLE_SHARED
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
@@ -29,20 +42,21 @@ AC_HEADER_STDC
AC_HEADER_SYS_WAIT AC_HEADER_SYS_WAIT
AC_HEADER_STDBOOL AC_HEADER_STDBOOL
AC_CHECK_HEADERS(errno.h fcntl.h limits.h unistd.h sys/time.h utmp.h \ AC_CHECK_HEADERS(crypt.h errno.h fcntl.h limits.h unistd.h sys/time.h utmp.h \
utmpx.h termios.h termio.h sgtty.h sys/ioctl.h syslog.h paths.h \ utmpx.h termios.h termio.h sgtty.h sys/ioctl.h syslog.h paths.h \
utime.h ulimit.h sys/resource.h gshadow.h lastlog.h \ utime.h ulimit.h sys/capability.h sys/random.h sys/resource.h \
locale.h rpc/key_prot.h netdb.h acl/libacl.h attr/libattr.h \ gshadow.h lastlog.h locale.h rpc/key_prot.h netdb.h acl/libacl.h \
attr/error_context.h) attr/libattr.h attr/error_context.h)
dnl shadow now uses the libc's shadow implementation dnl shadow now uses the libc's shadow implementation
AC_CHECK_HEADER([shadow.h],,[AC_MSG_ERROR([You need a libc with shadow.h])]) AC_CHECK_HEADER([shadow.h],,[AC_MSG_ERROR([You need a libc with shadow.h])])
AC_CHECK_FUNCS(l64a fchmod fchown fsync futimes getgroups gethostname getspnam \ AC_CHECK_FUNCS(arc4random_buf l64a fchmod fchown fsync futimes getgroups \
gettimeofday getusershell getutent initgroups lchown lckpwdf lstat \ gethostname getentropy getrandom getspnam gettimeofday getusershell \
lutimes memcpy memset setgroups sigaction strchr updwtmp updwtmpx innetgr \ getutent initgroups lchown lckpwdf lstat lutimes memcpy memset \
getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r getaddrinfo \ setgroups sigaction strchr updwtmp updwtmpx innetgr getpwnam_r \
ruserok) getpwuid_r getgrnam_r getgrgid_r getspnam_r getaddrinfo ruserok \
dlopen)
AC_SYS_LARGEFILE AC_SYS_LARGEFILE
dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for typedefs, structures, and compiler characteristics.
@@ -71,12 +85,6 @@ AC_CHECK_MEMBERS([struct utmp.ut_type,
struct utmp.ut_time, struct utmp.ut_time,
struct utmp.ut_xtime, struct utmp.ut_xtime,
struct utmp.ut_tv],,,[[#include <utmp.h>]]) struct utmp.ut_tv],,,[[#include <utmp.h>]])
dnl There are dependencies:
dnl If UTMPX has to be used, the utmp structure shall have a ut_id field.
if test "$ac_cv_header_utmpx_h" = "yes" &&
test "$ac_cv_member_struct_utmp_ut_id" != "yes"; then
AC_MSG_ERROR(Systems with UTMPX and no ut_id field in the utmp structure are not supported)
fi
AC_CHECK_MEMBERS([struct utmpx.ut_name, AC_CHECK_MEMBERS([struct utmpx.ut_name,
struct utmpx.ut_host, struct utmpx.ut_host,
@@ -113,6 +121,9 @@ AC_REPLACE_FUNCS(sgetgrent sgetpwent sgetspent)
AC_REPLACE_FUNCS(snprintf strcasecmp strdup strerror strstr) AC_REPLACE_FUNCS(snprintf strcasecmp strdup strerror strstr)
AC_CHECK_FUNC(setpgrp) AC_CHECK_FUNC(setpgrp)
AC_CHECK_FUNC(secure_getenv, [AC_DEFINE(HAS_SECURE_GETENV,
1,
[Defined to 1 if you have the declaration of 'secure_getenv'])])
if test "$ac_cv_header_shadow_h" = "yes"; then if test "$ac_cv_header_shadow_h" = "yes"; then
AC_CACHE_CHECK(for working shadow group support, AC_CACHE_CHECK(for working shadow group support,
@@ -226,7 +237,7 @@ AC_ARG_ENABLE(account-tools-setuid,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-account-tools-setuid) *) AC_MSG_ERROR(bad value ${enableval} for --enable-account-tools-setuid)
;; ;;
esac], esac],
[enable_acct_tools_setuid="maybe"] [enable_acct_tools_setuid="no"]
) )
AC_ARG_ENABLE(utmpx, AC_ARG_ENABLE(utmpx,
@@ -247,12 +258,15 @@ AC_ARG_ENABLE(subordinate-ids,
[enable_subids="maybe"] [enable_subids="maybe"]
) )
AC_ARG_WITH(audit, AC_ARG_WITH(audit,
[AC_HELP_STRING([--with-audit], [use auditing support @<:@default=yes if found@:>@])], [AC_HELP_STRING([--with-audit], [use auditing support @<:@default=yes if found@:>@])],
[with_audit=$withval], [with_audit=maybe]) [with_audit=$withval], [with_audit=maybe])
AC_ARG_WITH(libpam, AC_ARG_WITH(libpam,
[AC_HELP_STRING([--with-libpam], [use libpam for PAM support @<:@default=yes if found@:>@])], [AC_HELP_STRING([--with-libpam], [use libpam for PAM support @<:@default=yes if found@:>@])],
[with_libpam=$withval], [with_libpam=maybe]) [with_libpam=$withval], [with_libpam=maybe])
AC_ARG_WITH(btrfs,
[AC_HELP_STRING([--with-btrfs], [add BtrFS support @<:@default=yes if found@:>@])],
[with_btrfs=$withval], [with_btrfs=maybe])
AC_ARG_WITH(selinux, AC_ARG_WITH(selinux,
[AC_HELP_STRING([--with-selinux], [use SELinux support @<:@default=yes if found@:>@])], [AC_HELP_STRING([--with-selinux], [use SELinux support @<:@default=yes if found@:>@])],
[with_selinux=$withval], [with_selinux=maybe]) [with_selinux=$withval], [with_selinux=maybe])
@@ -274,12 +288,24 @@ AC_ARG_WITH(libcrack,
AC_ARG_WITH(sha-crypt, AC_ARG_WITH(sha-crypt,
[AC_HELP_STRING([--with-sha-crypt], [allow the SHA256 and SHA512 password encryption algorithms @<:@default=yes@:>@])], [AC_HELP_STRING([--with-sha-crypt], [allow the SHA256 and SHA512 password encryption algorithms @<:@default=yes@:>@])],
[with_sha_crypt=$withval], [with_sha_crypt=yes]) [with_sha_crypt=$withval], [with_sha_crypt=yes])
AC_ARG_WITH(bcrypt,
[AC_HELP_STRING([--with-bcrypt], [allow the bcrypt password encryption algorithm @<:@default=no@:>@])],
[with_bcrypt=$withval], [with_bcrypt=no])
AC_ARG_WITH(yescrypt,
[AC_HELP_STRING([--with-yescrypt], [allow the yescrypt password encryption algorithm @<:@default=no@:>@])],
[with_yescrypt=$withval], [with_yescrypt=no])
AC_ARG_WITH(nscd, AC_ARG_WITH(nscd,
[AC_HELP_STRING([--with-nscd], [enable support for nscd @<:@default=yes@:>@])], [AC_HELP_STRING([--with-nscd], [enable support for nscd @<:@default=yes@:>@])],
[with_nscd=$withval], [with_nscd=yes]) [with_nscd=$withval], [with_nscd=yes])
AC_ARG_WITH(sssd,
[AC_HELP_STRING([--with-sssd], [enable support for flushing sssd caches @<:@default=yes@:>@])],
[with_sssd=$withval], [with_sssd=yes])
AC_ARG_WITH(group-name-max-length, AC_ARG_WITH(group-name-max-length,
[AC_HELP_STRING([--with-group-name-max-length], [set max group name length @<:@default=16@:>@])], [AC_HELP_STRING([--with-group-name-max-length], [set max group name length @<:@default=16@:>@])],
[with_group_name_max_length=$withval], [with_group_name_max_length=yes]) [with_group_name_max_length=$withval], [with_group_name_max_length=yes])
AC_ARG_WITH(su,
[AC_HELP_STRING([--with-su], [build and install su program and man page @<:@default=yes@:>@])],
[with_su=$withval], [with_su=yes])
if test "$with_group_name_max_length" = "no" ; then if test "$with_group_name_max_length" = "no" ; then
with_group_name_max_length=0 with_group_name_max_length=0
@@ -295,12 +321,31 @@ if test "$with_sha_crypt" = "yes"; then
AC_DEFINE(USE_SHA_CRYPT, 1, [Define to allow the SHA256 and SHA512 password encryption algorithms]) AC_DEFINE(USE_SHA_CRYPT, 1, [Define to allow the SHA256 and SHA512 password encryption algorithms])
fi fi
AM_CONDITIONAL(USE_BCRYPT, test "x$with_bcrypt" = "xyes")
if test "$with_bcrypt" = "yes"; then
AC_DEFINE(USE_BCRYPT, 1, [Define to allow the bcrypt password encryption algorithm])
fi
AM_CONDITIONAL(USE_YESCRYPT, test "x$with_yescrypt" = "xyes")
if test "$with_yescrypt" = "yes"; then
AC_DEFINE(USE_YESCRYPT, 1, [Define to allow the yescrypt password encryption algorithm])
fi
if test "$with_nscd" = "yes"; then if test "$with_nscd" = "yes"; then
AC_CHECK_FUNC(posix_spawn, AC_CHECK_FUNC(posix_spawn,
[AC_DEFINE(USE_NSCD, 1, [Define to support flushing of nscd caches])], [AC_DEFINE(USE_NSCD, 1, [Define to support flushing of nscd caches])],
[AC_MSG_ERROR([posix_spawn is needed for nscd support])]) [AC_MSG_ERROR([posix_spawn is needed for nscd support])])
fi fi
if test "$with_sssd" = "yes"; then
AC_CHECK_FUNC(posix_spawn,
[AC_DEFINE(USE_SSSD, 1, [Define to support flushing of sssd caches])],
[AC_MSG_ERROR([posix_spawn is needed for sssd support])])
fi
AS_IF([test "$with_su" != "no"], AC_DEFINE(WITH_SU, 1, [Build with su])])
AM_CONDITIONAL([WITH_SU], [test "x$with_su" != "xno"])
dnl Check for some functions in libc first, only if not found check for dnl Check for some functions in libc first, only if not found check for
dnl other libraries. This should prevent linking libnsl if not really dnl other libraries. This should prevent linking libnsl if not really
dnl needed (Linux glibc, Irix), but still link it if needed (Solaris). dnl needed (Linux glibc, Irix), but still link it if needed (Solaris).
@@ -309,6 +354,17 @@ AC_SEARCH_LIBS(inet_ntoa, inet)
AC_SEARCH_LIBS(socket, socket) AC_SEARCH_LIBS(socket, socket)
AC_SEARCH_LIBS(gethostbyname, nsl) AC_SEARCH_LIBS(gethostbyname, nsl)
AC_CHECK_LIB([econf],[econf_readDirs],[LIBECONF="-leconf"],[LIBECONF=""])
if test -n "$LIBECONF"; then
ECONF_CPPFLAGS="-DUSE_ECONF=1"
AC_ARG_ENABLE([vendordir],
AS_HELP_STRING([--enable-vendordir=DIR], [Directory for distribution provided configuration files]),,[])
fi
AC_SUBST(ECONF_CPPFLAGS)
AC_SUBST(LIBECONF)
AC_SUBST([VENDORDIR], [$enable_vendordir])
AM_CONDITIONAL([HAVE_VENDORDIR], [test "x$enable_vendordir" != x])
if test "$enable_shadowgrp" = "yes"; then if test "$enable_shadowgrp" = "yes"; then
AC_DEFINE(SHADOWGRP, 1, [Define to support the shadow group file.]) AC_DEFINE(SHADOWGRP, 1, [Define to support the shadow group file.])
fi fi
@@ -321,11 +377,12 @@ if test "$enable_man" = "yes"; then
AC_PATH_PROG([XSLTPROC], [xsltproc]) AC_PATH_PROG([XSLTPROC], [xsltproc])
if test -z "$XSLTPROC"; then if test -z "$XSLTPROC"; then
enable_man=no enable_man=no
AC_MSG_ERROR([xsltproc is missing.])
fi fi
dnl check for DocBook DTD and stylesheets in the local catalog. dnl check for DocBook DTD and stylesheets in the local catalog.
JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN], JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.5//EN],
[DocBook XML DTD V4.1.2], [], enable_man=no) [DocBook XML DTD V4.5], [], enable_man=no)
JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl], JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
[DocBook XSL Stylesheets >= 1.70.1], [], enable_man=no) [DocBook XSL Stylesheets >= 1.70.1], [], enable_man=no)
fi fi
@@ -335,16 +392,10 @@ if test "$enable_subids" != "no"; then
dnl dnl
dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc
dnl dnl
AC_RUN_IFELSE([AC_LANG_SOURCE([ AC_CHECK_SIZEOF([uid_t],, [#include "sys/types.h"])
#include <sys/types.h> AC_CHECK_SIZEOF([gid_t],, [#include "sys/types.h"])
int main(void) {
uid_t u;
gid_t g;
return (sizeof u < 4) || (sizeof g < 4);
}
])], [id32bit="yes"], [id32bit="no"])
if test "x$id32bit" = "xyes"; then if test "$ac_cv_sizeof_uid_t" -ge 4 && test "$ac_cv_sizeof_gid_t" -ge 4; then
AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.]) AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.])
enable_subids="yes" enable_subids="yes"
else else
@@ -360,6 +411,10 @@ AC_SUBST(LIBCRYPT)
AC_CHECK_LIB(crypt, crypt, [LIBCRYPT=-lcrypt], AC_CHECK_LIB(crypt, crypt, [LIBCRYPT=-lcrypt],
[AC_MSG_ERROR([crypt() not found])]) [AC_MSG_ERROR([crypt() not found])])
AC_SUBST(LIYESCRYPT)
AC_CHECK_LIB(crypt, crypt, [LIYESCRYPT=-lcrypt],
[AC_MSG_ERROR([crypt() not found])])
AC_SUBST(LIBACL) AC_SUBST(LIBACL)
if test "$with_acl" != "no"; then if test "$with_acl" != "no"; then
AC_CHECK_HEADERS(acl/libacl.h attr/error_context.h, [acl_header="yes"], [acl_header="no"]) AC_CHECK_HEADERS(acl/libacl.h attr/error_context.h, [acl_header="yes"], [acl_header="no"])
@@ -455,6 +510,20 @@ if test "$with_libcrack" = "yes"; then
AC_DEFINE(HAVE_LIBCRACK_PW, 1, [Defined if it includes *Pw functions.])) AC_DEFINE(HAVE_LIBCRACK_PW, 1, [Defined if it includes *Pw functions.]))
fi fi
if test "$with_btrfs" != "no"; then
AC_CHECK_HEADERS([sys/statfs.h linux/magic.h linux/btrfs_tree.h], \
[btrfs_headers="yes"], [btrfs_headers="no"])
if test "$btrfs_headers$with_btrfs" = "noyes" ; then
AC_MSG_ERROR([One of sys/statfs.h linux/magic.h linux/btrfs_tree.h is missing])
fi
if test "$btrfs_headers" = "yes" ; then
AC_DEFINE(WITH_BTRFS, 1, [Build shadow with BtrFS support])
with_btrfs="yes"
fi
fi
AM_CONDITIONAL(WITH_BTRFS, test x$with_btrfs = xyes)
AC_SUBST(LIBSELINUX) AC_SUBST(LIBSELINUX)
AC_SUBST(LIBSEMANAGE) AC_SUBST(LIBSEMANAGE)
if test "$with_selinux" != "no"; then if test "$with_selinux" != "no"; then
@@ -479,7 +548,7 @@ if test "$with_selinux" != "no"; then
AC_MSG_ERROR([libsemanage not found]) AC_MSG_ERROR([libsemanage not found])
fi fi
if test "$selinux_lib$semanage_lib" == "yesyes" ; then if test "$selinux_lib$semanage_lib" = "yesyes" ; then
AC_DEFINE(WITH_SELINUX, 1, AC_DEFINE(WITH_SELINUX, 1,
[Build shadow with SELinux support]) [Build shadow with SELinux support])
LIBSELINUX="-lselinux" LIBSELINUX="-lselinux"
@@ -569,7 +638,7 @@ if test "$with_libpam" = "yes"; then
LIBS=$save_libs LIBS=$save_libs
AC_DEFINE(USE_PAM, 1, [Define to support Pluggable Authentication Modules]) AC_DEFINE(USE_PAM, 1, [Define to support Pluggable Authentication Modules])
AC_DEFINE_UNQUOTED(SHADOW_PAM_CONVERSATION, [$pam_conv_function],[PAM converstation to use]) AC_DEFINE_UNQUOTED(SHADOW_PAM_CONVERSATION, [$pam_conv_function],[PAM conversation to use])
AM_CONDITIONAL(USE_PAM, [true]) AM_CONDITIONAL(USE_PAM, [true])
AC_MSG_CHECKING(use login and su access checking if PAM not used) AC_MSG_CHECKING(use login and su access checking if PAM not used)
@@ -599,6 +668,19 @@ if test "$enable_acct_tools_setuid" != "no"; then
fi fi
AM_CONDITIONAL(ACCT_TOOLS_SETUID, test "x$enable_acct_tools_setuid" = "xyes") AM_CONDITIONAL(ACCT_TOOLS_SETUID, test "x$enable_acct_tools_setuid" = "xyes")
AC_ARG_WITH(fcaps,
[AC_HELP_STRING([--with-fcaps], [use file capabilities instead of suid binaries for newuidmap/newgidmap @<:@default=no@:>@])],
[with_fcaps=$withval], [with_fcaps=no])
AM_CONDITIONAL(FCAPS, test "x$with_fcaps" = "xyes")
if test "x$with_fcaps" = "xyes"; then
AC_CHECK_PROGS(capcmd, "setcap")
if test "x$capcmd" = "x" ; then
AC_MSG_ERROR([setcap command not available])
fi
fi
AC_SUBST(LIBSKEY) AC_SUBST(LIBSKEY)
AC_SUBST(LIBMD) AC_SUBST(LIBMD)
if test "$with_skey" = "yes"; then if test "$with_skey" = "yes"; then
@@ -656,6 +738,7 @@ AC_CONFIG_FILES([
man/zh_TW/Makefile man/zh_TW/Makefile
libmisc/Makefile libmisc/Makefile
lib/Makefile lib/Makefile
libsubid/Makefile
src/Makefile src/Makefile
contrib/Makefile contrib/Makefile
etc/Makefile etc/Makefile
@@ -674,12 +757,18 @@ if test "$with_libpam" = "yes"; then
echo " suid account management tools: $enable_acct_tools_setuid" echo " suid account management tools: $enable_acct_tools_setuid"
fi fi
echo " SELinux support: $with_selinux" echo " SELinux support: $with_selinux"
echo " BtrFS support: $with_btrfs"
echo " ACL support: $with_acl" echo " ACL support: $with_acl"
echo " Extended Attributes support: $with_attr" echo " Extended Attributes support: $with_attr"
echo " tcb support (incomplete): $with_tcb" echo " tcb support (incomplete): $with_tcb"
echo " shadow group support: $enable_shadowgrp" echo " shadow group support: $enable_shadowgrp"
echo " S/Key support: $with_skey" echo " S/Key support: $with_skey"
echo " SHA passwords encryption: $with_sha_crypt" echo " SHA passwords encryption: $with_sha_crypt"
echo " bcrypt passwords encryption: $with_bcrypt"
echo " yescrypt passwords encryption: $with_yescrypt"
echo " nscd support: $with_nscd" echo " nscd support: $with_nscd"
echo " sssd support: $with_sssd"
echo " subordinate IDs support: $enable_subids" echo " subordinate IDs support: $enable_subids"
echo " use file caps: $with_fcaps"
echo " install su: $with_su"
echo echo
+38 -11
View File
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.13.3 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,17 @@
# This is a dummy Makefile.am to get automake work flawlessly, # This is a dummy Makefile.am to get automake work flawlessly,
# and also cooperate to make a distribution for `make dist' # and also cooperate to make a distribution for `make dist'
VPATH = @srcdir@ VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \ am__make_running_with_option = \
case $${target_option-} in \ case $${target_option-} in \
?) ;; \ ?) ;; \
@@ -81,12 +91,18 @@ POST_UNINSTALL = :
build_triplet = @build@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
subdir = contrib subdir = contrib
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/configure.in $(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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
@@ -111,6 +127,7 @@ am__can_run_installinfo = \
*) (install-info --version) >/dev/null 2>&1;; \ *) (install-info --version) >/dev/null 2>&1;; \
esac esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
@@ -134,10 +151,10 @@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
ECONF_CPPFLAGS = @ECONF_CPPFLAGS@
EGREP = @EGREP@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FGREP = @FGREP@ FGREP = @FGREP@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@ GMSGFMT_015 = @GMSGFMT_015@
GREP = @GREP@ GREP = @GREP@
@@ -156,6 +173,7 @@ LIBATTR = @LIBATTR@
LIBAUDIT = @LIBAUDIT@ LIBAUDIT = @LIBAUDIT@
LIBCRACK = @LIBCRACK@ LIBCRACK = @LIBCRACK@
LIBCRYPT = @LIBCRYPT@ LIBCRYPT = @LIBCRYPT@
LIBECONF = @LIBECONF@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@ LIBINTL = @LIBINTL@
LIBMD = @LIBMD@ LIBMD = @LIBMD@
@@ -165,13 +183,19 @@ LIBS = @LIBS@
LIBSELINUX = @LIBSELINUX@ LIBSELINUX = @LIBSELINUX@
LIBSEMANAGE = @LIBSEMANAGE@ LIBSEMANAGE = @LIBSEMANAGE@
LIBSKEY = @LIBSKEY@ LIBSKEY = @LIBSKEY@
LIBSUBID_ABI = @LIBSUBID_ABI@
LIBSUBID_ABI_MAJOR = @LIBSUBID_ABI_MAJOR@
LIBSUBID_ABI_MICRO = @LIBSUBID_ABI_MICRO@
LIBSUBID_ABI_MINOR = @LIBSUBID_ABI_MINOR@
LIBTCB = @LIBTCB@ LIBTCB = @LIBTCB@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@ LIPO = @LIPO@
LIYESCRYPT = @LIYESCRYPT@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@ LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@ LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@ MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -200,10 +224,10 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
USE_NLS = @USE_NLS@ USE_NLS = @USE_NLS@
VENDORDIR = @VENDORDIR@
VERSION = @VERSION@ VERSION = @VERSION@
XGETTEXT = @XGETTEXT@ XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
XMLCATALOG = @XMLCATALOG@ XMLCATALOG = @XMLCATALOG@
XML_CATALOG_FILE = @XML_CATALOG_FILE@ XML_CATALOG_FILE = @XML_CATALOG_FILE@
XSLTPROC = @XSLTPROC@ XSLTPROC = @XSLTPROC@
@@ -228,6 +252,7 @@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
builddir = @builddir@ builddir = @builddir@
capcmd = @capcmd@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
docdir = @docdir@ docdir = @docdir@
@@ -253,6 +278,7 @@ pdfdir = @pdfdir@
prefix = @prefix@ prefix = @prefix@
program_transform_name = @program_transform_name@ program_transform_name = @program_transform_name@
psdir = @psdir@ psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@ srcdir = @srcdir@
@@ -277,10 +303,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \ exit 1;; \
esac; \ esac; \
done; \ done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/Makefile'; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/Makefile'; \
$(am__cd) $(top_srcdir) && \ $(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu contrib/Makefile $(AUTOMAKE) --foreign contrib/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \ @case '$?' in \
*config.status*) \ *config.status*) \
@@ -455,6 +480,8 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags-am uninstall uninstall-am tags-am uninstall uninstall-am
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables. # 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. # Otherwise a system limit (for SysV at least) may be exceeded.
+1 -1
View File
@@ -20,7 +20,7 @@
** 1/28/95 ** 1/28/95
** shadow-adduser 1.3: ** shadow-adduser 1.3:
** **
** Basically a bug-fix on my additions in 1.2. Thanx to Terry Stewart ** Basically a bug-fix on my additions in 1.2. Thanks to Terry Stewart
** (stew@texas.net) for pointing out one of the many idiotic bugs I introduced. ** (stew@texas.net) for pointing out one of the many idiotic bugs I introduced.
** It was such a stupid bug that I would have never seen it myself. ** It was such a stupid bug that I would have never seen it myself.
** **
+1 -1
View File
@@ -34,7 +34,7 @@
** 1/28/95 ** 1/28/95
** shadow-adduser 1.3: ** shadow-adduser 1.3:
** **
** Basically a bug-fix on my additions in 1.2. Thanx to Terry Stewart ** Basically a bug-fix on my additions in 1.2. Thanks to Terry Stewart
** (stew@texas.net) for pointing out one of the many idiotic bugs I introduced. ** (stew@texas.net) for pointing out one of the many idiotic bugs I introduced.
** It was such a stupid bug that I would have never seen it myself. ** It was such a stupid bug that I would have never seen it myself.
** **
+1 -1
View File
@@ -32,7 +32,7 @@ def_home_dir=/home/users
# default shell # default shell
def_shell=/bin/tcsh def_shell=/bin/tcsh
# Defaul expiration date (mm/dd/yy) # Default expiration date (mm/dd/yy)
def_expire="" def_expire=""
# default dates # default dates
+1 -1
View File
@@ -480,7 +480,7 @@ X.B groupmems
\fB-D\fR | \fB-D\fR |
[\fB-g\fI group_name \fR] [\fB-g\fI group_name \fR]
X.SH DESCRIPTION X.SH DESCRIPTION
The \fBgroupmems\fR utility allows a user to administer his/her own The \fBgroupmems\fR utility allows a user to administer their own
group membership list without the requirement of superuser privileges. group membership list without the requirement of superuser privileges.
The \fBgroupmems\fR utility is for systems that configure its users to The \fBgroupmems\fR utility is for systems that configure its users to
be in their own name sake primary group (i.e., guest / guest). be in their own name sake primary group (i.e., guest / guest).
+1 -1
View File
@@ -2,7 +2,7 @@ Hello Marek,
I have created a diffile against the 980403 release that adds I have created a diffile against the 980403 release that adds
functionality to newusers for automatic handling of users with only functionality to newusers for automatic handling of users with only
anonomous ftp login (using the guestgroup feature in ftpaccess, which anonymous ftp login (using the guestgroup feature in ftpaccess, which
means that the users home directory looks like '/home/user/./'). It also means that the users home directory looks like '/home/user/./'). It also
adds a commandline argument to specify an initial directory structure adds a commandline argument to specify an initial directory structure
for such users, with a tarball normally containing the bin,lib,etc for such users, with a tarball normally containing the bin,lib,etc
+3 -3
View File
@@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# depcomp - compile a program generating dependencies as side-effects # depcomp - compile a program generating dependencies as side-effects
scriptversion=2013-05-30.07; # UTC scriptversion=2016-01-11.22; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc. # Copyright (C) 1999-2017 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@@ -786,6 +786,6 @@ exit 0
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC" # time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC" # time-stamp-end: "; # UTC"
# End: # End:
+38 -11
View File
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.13.3 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,17 @@
# This is a dummy Makefile.am to get automake work flawlessly, # This is a dummy Makefile.am to get automake work flawlessly,
# and also cooperate to make a distribution for `make dist' # and also cooperate to make a distribution for `make dist'
VPATH = @srcdir@ VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \ am__make_running_with_option = \
case $${target_option-} in \ case $${target_option-} in \
?) ;; \ ?) ;; \
@@ -81,12 +91,18 @@ POST_UNINSTALL = :
build_triplet = @build@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
subdir = doc subdir = doc
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/configure.in $(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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
@@ -111,6 +127,7 @@ am__can_run_installinfo = \
*) (install-info --version) >/dev/null 2>&1;; \ *) (install-info --version) >/dev/null 2>&1;; \
esac esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
@@ -134,10 +151,10 @@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
ECONF_CPPFLAGS = @ECONF_CPPFLAGS@
EGREP = @EGREP@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FGREP = @FGREP@ FGREP = @FGREP@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@ GMSGFMT_015 = @GMSGFMT_015@
GREP = @GREP@ GREP = @GREP@
@@ -156,6 +173,7 @@ LIBATTR = @LIBATTR@
LIBAUDIT = @LIBAUDIT@ LIBAUDIT = @LIBAUDIT@
LIBCRACK = @LIBCRACK@ LIBCRACK = @LIBCRACK@
LIBCRYPT = @LIBCRYPT@ LIBCRYPT = @LIBCRYPT@
LIBECONF = @LIBECONF@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@ LIBINTL = @LIBINTL@
LIBMD = @LIBMD@ LIBMD = @LIBMD@
@@ -165,13 +183,19 @@ LIBS = @LIBS@
LIBSELINUX = @LIBSELINUX@ LIBSELINUX = @LIBSELINUX@
LIBSEMANAGE = @LIBSEMANAGE@ LIBSEMANAGE = @LIBSEMANAGE@
LIBSKEY = @LIBSKEY@ LIBSKEY = @LIBSKEY@
LIBSUBID_ABI = @LIBSUBID_ABI@
LIBSUBID_ABI_MAJOR = @LIBSUBID_ABI_MAJOR@
LIBSUBID_ABI_MICRO = @LIBSUBID_ABI_MICRO@
LIBSUBID_ABI_MINOR = @LIBSUBID_ABI_MINOR@
LIBTCB = @LIBTCB@ LIBTCB = @LIBTCB@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@ LIPO = @LIPO@
LIYESCRYPT = @LIYESCRYPT@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@ LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@ LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@ MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -200,10 +224,10 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
USE_NLS = @USE_NLS@ USE_NLS = @USE_NLS@
VENDORDIR = @VENDORDIR@
VERSION = @VERSION@ VERSION = @VERSION@
XGETTEXT = @XGETTEXT@ XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
XMLCATALOG = @XMLCATALOG@ XMLCATALOG = @XMLCATALOG@
XML_CATALOG_FILE = @XML_CATALOG_FILE@ XML_CATALOG_FILE = @XML_CATALOG_FILE@
XSLTPROC = @XSLTPROC@ XSLTPROC = @XSLTPROC@
@@ -228,6 +252,7 @@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
builddir = @builddir@ builddir = @builddir@
capcmd = @capcmd@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
docdir = @docdir@ docdir = @docdir@
@@ -253,6 +278,7 @@ pdfdir = @pdfdir@
prefix = @prefix@ prefix = @prefix@
program_transform_name = @program_transform_name@ program_transform_name = @program_transform_name@
psdir = @psdir@ psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@ srcdir = @srcdir@
@@ -276,10 +302,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \ exit 1;; \
esac; \ esac; \
done; \ done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
$(am__cd) $(top_srcdir) && \ $(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/Makefile $(AUTOMAKE) --foreign doc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \ @case '$?' in \
*config.status*) \ *config.status*) \
@@ -454,6 +479,8 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags-am uninstall uninstall-am tags-am uninstall uninstall-am
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables. # 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. # Otherwise a system limit (for SysV at least) may be exceeded.
+1 -1
View File
@@ -15,7 +15,7 @@ Changes:
- code merged into lmain.c --cristiang - code merged into lmain.c --cristiang
TODO: - support groups in the limits file TODO: - support groups in the limits file
(only usernames are supported at this momment :-( ) (only usernames are supported at this moment :-( )
Setting user limits for shadow login program Setting user limits for shadow login program
+1 -2
View File
@@ -4,8 +4,7 @@
sysconf_DATA = login.defs sysconf_DATA = login.defs
defaultdir = $(sysconfdir)/default defaultdir = $(sysconfdir)/default
default_DATA = \ default_DATA =
useradd
nonpam_files = \ nonpam_files = \
limits \ limits \
+39 -14
View File
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.13.3 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@@ -18,7 +18,17 @@
# and also cooperate to make a distribution for `make dist' # and also cooperate to make a distribution for `make dist'
VPATH = @srcdir@ VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \ am__make_running_with_option = \
case $${target_option-} in \ case $${target_option-} in \
?) ;; \ ?) ;; \
@@ -82,12 +92,18 @@ POST_UNINSTALL = :
build_triplet = @build@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
subdir = etc subdir = etc
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/configure.in $(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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
@@ -177,6 +193,7 @@ am__define_uniq_tagged_files = \
ETAGS = etags ETAGS = etags
CTAGS = ctags CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS) DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \ am__relativize = \
dir0=`pwd`; \ dir0=`pwd`; \
@@ -225,10 +242,10 @@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
ECONF_CPPFLAGS = @ECONF_CPPFLAGS@
EGREP = @EGREP@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FGREP = @FGREP@ FGREP = @FGREP@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@ GMSGFMT_015 = @GMSGFMT_015@
GREP = @GREP@ GREP = @GREP@
@@ -247,6 +264,7 @@ LIBATTR = @LIBATTR@
LIBAUDIT = @LIBAUDIT@ LIBAUDIT = @LIBAUDIT@
LIBCRACK = @LIBCRACK@ LIBCRACK = @LIBCRACK@
LIBCRYPT = @LIBCRYPT@ LIBCRYPT = @LIBCRYPT@
LIBECONF = @LIBECONF@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@ LIBINTL = @LIBINTL@
LIBMD = @LIBMD@ LIBMD = @LIBMD@
@@ -256,13 +274,19 @@ LIBS = @LIBS@
LIBSELINUX = @LIBSELINUX@ LIBSELINUX = @LIBSELINUX@
LIBSEMANAGE = @LIBSEMANAGE@ LIBSEMANAGE = @LIBSEMANAGE@
LIBSKEY = @LIBSKEY@ LIBSKEY = @LIBSKEY@
LIBSUBID_ABI = @LIBSUBID_ABI@
LIBSUBID_ABI_MAJOR = @LIBSUBID_ABI_MAJOR@
LIBSUBID_ABI_MICRO = @LIBSUBID_ABI_MICRO@
LIBSUBID_ABI_MINOR = @LIBSUBID_ABI_MINOR@
LIBTCB = @LIBTCB@ LIBTCB = @LIBTCB@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@ LIPO = @LIPO@
LIYESCRYPT = @LIYESCRYPT@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@ LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@ LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@ MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -291,10 +315,10 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
USE_NLS = @USE_NLS@ USE_NLS = @USE_NLS@
VENDORDIR = @VENDORDIR@
VERSION = @VERSION@ VERSION = @VERSION@
XGETTEXT = @XGETTEXT@ XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
XMLCATALOG = @XMLCATALOG@ XMLCATALOG = @XMLCATALOG@
XML_CATALOG_FILE = @XML_CATALOG_FILE@ XML_CATALOG_FILE = @XML_CATALOG_FILE@
XSLTPROC = @XSLTPROC@ XSLTPROC = @XSLTPROC@
@@ -319,6 +343,7 @@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
builddir = @builddir@ builddir = @builddir@
capcmd = @capcmd@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
docdir = @docdir@ docdir = @docdir@
@@ -344,6 +369,7 @@ pdfdir = @pdfdir@
prefix = @prefix@ prefix = @prefix@
program_transform_name = @program_transform_name@ program_transform_name = @program_transform_name@
psdir = @psdir@ psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@ srcdir = @srcdir@
@@ -354,9 +380,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
sysconf_DATA = login.defs sysconf_DATA = login.defs
defaultdir = $(sysconfdir)/default defaultdir = $(sysconfdir)/default
default_DATA = \ default_DATA =
useradd
nonpam_files = \ nonpam_files = \
limits \ limits \
login.access login.access
@@ -381,10 +405,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \ exit 1;; \
esac; \ esac; \
done; \ done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu etc/Makefile'; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign etc/Makefile'; \
$(am__cd) $(top_srcdir) && \ $(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu etc/Makefile $(AUTOMAKE) --foreign etc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \ @case '$?' in \
*config.status*) \ *config.status*) \
@@ -749,6 +772,8 @@ uninstall-am: uninstall-defaultDATA uninstall-nonpamDATA \
uninstall-defaultDATA uninstall-nonpamDATA \ uninstall-defaultDATA uninstall-nonpamDATA \
uninstall-sysconfDATA uninstall-sysconfDATA
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables. # 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. # Otherwise a system limit (for SysV at least) may be exceeded.
+90 -6
View File
@@ -31,6 +31,15 @@ LOG_OK_LOGINS no
# #
LASTLOG_ENAB yes LASTLOG_ENAB yes
#
# Limit the highest user ID number for which the lastlog entries should
# be updated.
#
# No LASTLOG_UID_MAX means that there is no user ID limit for writing
# lastlog entries.
#
#LASTLOG_UID_MAX
# #
# Enable checking and display of mailbox status upon login. # Enable checking and display of mailbox status upon login.
# #
@@ -186,12 +195,17 @@ KILLCHAR 025
# Default initial "umask" value used by login(1) on non-PAM enabled systems. # Default initial "umask" value used by login(1) on non-PAM enabled systems.
# Default "umask" value for pam_umask(8) on PAM enabled systems. # Default "umask" value for pam_umask(8) on PAM enabled systems.
# UMASK is also used by useradd(8) and newusers(8) to set the mode for new # UMASK is also used by useradd(8) and newusers(8) to set the mode for new
# home directories. # home directories if HOME_MODE is not set.
# 022 is the default value, but 027, or even 077, could be considered # 022 is the default value, but 027, or even 077, could be considered
# for increased privacy. There is no One True Answer here: each sysadmin # for increased privacy. There is no One True Answer here: each sysadmin
# must make up his/her mind. # must make up their mind.
UMASK 022 UMASK 022
# HOME_MODE is used by useradd(8) and newusers(8) to set the mode for new
# home directories.
# If HOME_MODE is not set, the value of UMASK is used to create the mode.
#HOME_MODE 0700
# #
# Password aging controls: # Password aging controls:
# #
@@ -281,7 +295,7 @@ CHFN_AUTH yes
# any combination of letters "frwh" (full name, room number, work # any combination of letters "frwh" (full name, room number, work
# phone, home phone). If not defined, no changes are allowed. # phone, home phone). If not defined, no changes are allowed.
# For backward compatibility, "yes" = "rwh" and "no" = "frwh". # For backward compatibility, "yes" = "rwh" and "no" = "frwh".
# #
CHFN_RESTRICT rwh CHFN_RESTRICT rwh
# #
@@ -311,7 +325,10 @@ CHFN_RESTRICT rwh
# If set to MD5, MD5-based algorithm will be used for encrypting password # If set to MD5, MD5-based algorithm will be used for encrypting password
# If set to SHA256, SHA256-based algorithm will be used for encrypting password # If set to SHA256, SHA256-based algorithm will be used for encrypting password
# If set to SHA512, SHA512-based algorithm will be used for encrypting password # If set to SHA512, SHA512-based algorithm will be used for encrypting password
# If set to BCRYPT, BCRYPT-based algorithm will be used for encrypting password
# If set to YESCRYPT, YESCRYPT-based algorithm will be used for encrypting password
# If set to DES, DES-based algorithm will be used for encrypting password (default) # If set to DES, DES-based algorithm will be used for encrypting password (default)
# MD5 and DES should not be used for new hashes, see crypt(5) for recommendations.
# Overrides the MD5_CRYPT_ENAB option # Overrides the MD5_CRYPT_ENAB option
# #
# Note: If you use PAM, it is recommended to use a value consistent with # Note: If you use PAM, it is recommended to use a value consistent with
@@ -327,13 +344,42 @@ CHFN_RESTRICT rwh
# However, more CPU resources will be needed to authenticate users if # However, more CPU resources will be needed to authenticate users if
# this value is increased. # this value is increased.
# #
# If not specified, the libc will choose the default number of rounds (5000). # If not specified, the libc will choose the default number of rounds (5000),
# which is orders of magnitude too low for modern hardware.
# The values must be within the 1000-999999999 range. # The values must be within the 1000-999999999 range.
# If only one of the MIN or MAX values is set, then this value will be used. # If only one of the MIN or MAX values is set, then this value will be used.
# If MIN > MAX, the highest value will be used. # If MIN > MAX, the highest value will be used.
# #
# SHA_CRYPT_MIN_ROUNDS 5000 #SHA_CRYPT_MIN_ROUNDS 5000
# SHA_CRYPT_MAX_ROUNDS 5000 #SHA_CRYPT_MAX_ROUNDS 5000
#
# Only works if ENCRYPT_METHOD is set to BCRYPT.
#
# Define the number of BCRYPT rounds.
# With a lot of rounds, it is more difficult to brute-force the password.
# However, more CPU resources will be needed to authenticate users if
# this value is increased.
#
# If not specified, 13 rounds will be attempted.
# If only one of the MIN or MAX values is set, then this value will be used.
# If MIN > MAX, the highest value will be used.
#
#BCRYPT_MIN_ROUNDS 13
#BCRYPT_MAX_ROUNDS 13
#
# Only works if ENCRYPT_METHOD is set to YESCRYPT.
#
# Define the YESCRYPT cost factor.
# With a higher cost factor, it is more difficult to brute-force the password.
# However, more CPU time and more memory will be needed to authenticate users
# if this value is increased.
#
# If not specified, a cost factor of 5 will be used.
# The value must be within the 1-11 range.
#
#YESCRYPT_COST_FACTOR 5
# #
# List of groups to add to the user's supplementary group set # List of groups to add to the user's supplementary group set
@@ -352,6 +398,14 @@ CHFN_RESTRICT rwh
# #
DEFAULT_HOME yes DEFAULT_HOME yes
#
# The pwck(8) utility emits a warning for any system account with a home
# directory that does not exist. Some system accounts intentionally do
# not have a home directory. Such accounts may have this string as
# their home directory in /etc/passwd to avoid a spurious warning.
#
NONEXISTENT /nonexistent
# #
# If this file exists and is readable, login environment will be # If this file exists and is readable, login environment will be
# read from it. Every line should be in the form name=value. # read from it. Every line should be in the form name=value.
@@ -393,3 +447,33 @@ USERGROUPS_ENAB yes
# #
#CREATE_HOME yes #CREATE_HOME yes
#
# Force use shadow, even if shadow passwd & shadow group files are
# missing.
#
#FORCE_SHADOW yes
#
# Allow newuidmap and newgidmap when running under an alternative
# primary group.
#
#GRANT_AUX_GROUP_SUBIDS yes
#
# Prevents an empty password field to be interpreted as "no authentication
# required".
# Set to "yes" to prevent for all accounts
# Set to "superuser" to prevent for UID 0 / root (default)
# Set to "no" to not prevent for any account (dangerous, historical default)
PREVENT_NO_AUTH superuser
#
# Select the HMAC cryptography algorithm.
# Used in pam_timestamp module to calculate the keyed-hash message
# authentication code.
#
# Note: It is recommended to check hmac(3) to see the possible algorithms
# that are available in your system.
#
#HMAC_CRYPTO_ALGO SHA512
+5 -2
View File
@@ -6,8 +6,7 @@ pamd_files = \
chsh \ chsh \
groupmems \ groupmems \
login \ login \
passwd \ passwd
su
pamd_acct_tools_files = \ pamd_acct_tools_files = \
chage \ chage \
@@ -29,4 +28,8 @@ pamd_DATA += $(pamd_acct_tools_files)
endif endif
endif endif
if WITH_SU
pamd_files += su
endif
EXTRA_DIST = $(pamd_files) $(pamd_acct_tools_files) EXTRA_DIST = $(pamd_files) $(pamd_acct_tools_files)
+40 -19
View File
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.13.3 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@@ -18,7 +18,17 @@
# and also cooperate to make a distribution for `make dist' # and also cooperate to make a distribution for `make dist'
VPATH = @srcdir@ VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \ am__make_running_with_option = \
case $${target_option-} in \ case $${target_option-} in \
?) ;; \ ?) ;; \
@@ -82,13 +92,20 @@ POST_UNINSTALL = :
build_triplet = @build@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
@ACCT_TOOLS_SETUID_TRUE@@USE_PAM_TRUE@am__append_1 = $(pamd_acct_tools_files) @ACCT_TOOLS_SETUID_TRUE@@USE_PAM_TRUE@am__append_1 = $(pamd_acct_tools_files)
@WITH_SU_TRUE@am__append_2 = su
subdir = etc/pam.d subdir = etc/pam.d
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/configure.in $(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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
@@ -142,6 +159,7 @@ am__uninstall_files_from_dir = { \
am__installdirs = "$(DESTDIR)$(pamddir)" am__installdirs = "$(DESTDIR)$(pamddir)"
DATA = $(pamd_DATA) DATA = $(pamd_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
@@ -165,10 +183,10 @@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
ECONF_CPPFLAGS = @ECONF_CPPFLAGS@
EGREP = @EGREP@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FGREP = @FGREP@ FGREP = @FGREP@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@ GMSGFMT_015 = @GMSGFMT_015@
GREP = @GREP@ GREP = @GREP@
@@ -187,6 +205,7 @@ LIBATTR = @LIBATTR@
LIBAUDIT = @LIBAUDIT@ LIBAUDIT = @LIBAUDIT@
LIBCRACK = @LIBCRACK@ LIBCRACK = @LIBCRACK@
LIBCRYPT = @LIBCRYPT@ LIBCRYPT = @LIBCRYPT@
LIBECONF = @LIBECONF@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@ LIBINTL = @LIBINTL@
LIBMD = @LIBMD@ LIBMD = @LIBMD@
@@ -196,13 +215,19 @@ LIBS = @LIBS@
LIBSELINUX = @LIBSELINUX@ LIBSELINUX = @LIBSELINUX@
LIBSEMANAGE = @LIBSEMANAGE@ LIBSEMANAGE = @LIBSEMANAGE@
LIBSKEY = @LIBSKEY@ LIBSKEY = @LIBSKEY@
LIBSUBID_ABI = @LIBSUBID_ABI@
LIBSUBID_ABI_MAJOR = @LIBSUBID_ABI_MAJOR@
LIBSUBID_ABI_MICRO = @LIBSUBID_ABI_MICRO@
LIBSUBID_ABI_MINOR = @LIBSUBID_ABI_MINOR@
LIBTCB = @LIBTCB@ LIBTCB = @LIBTCB@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@ LIPO = @LIPO@
LIYESCRYPT = @LIYESCRYPT@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@ LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@ LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@ MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -231,10 +256,10 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
USE_NLS = @USE_NLS@ USE_NLS = @USE_NLS@
VENDORDIR = @VENDORDIR@
VERSION = @VERSION@ VERSION = @VERSION@
XGETTEXT = @XGETTEXT@ XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
XMLCATALOG = @XMLCATALOG@ XMLCATALOG = @XMLCATALOG@
XML_CATALOG_FILE = @XML_CATALOG_FILE@ XML_CATALOG_FILE = @XML_CATALOG_FILE@
XSLTPROC = @XSLTPROC@ XSLTPROC = @XSLTPROC@
@@ -259,6 +284,7 @@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
builddir = @builddir@ builddir = @builddir@
capcmd = @capcmd@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
docdir = @docdir@ docdir = @docdir@
@@ -284,6 +310,7 @@ pdfdir = @pdfdir@
prefix = @prefix@ prefix = @prefix@
program_transform_name = @program_transform_name@ program_transform_name = @program_transform_name@
psdir = @psdir@ psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@ srcdir = @srcdir@
@@ -292,14 +319,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
pamd_files = \ pamd_files = chfn chsh groupmems login passwd $(am__append_2)
chfn \
chsh \
groupmems \
login \
passwd \
su
pamd_acct_tools_files = \ pamd_acct_tools_files = \
chage \ chage \
chgpasswd \ chgpasswd \
@@ -327,10 +347,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \ exit 1;; \
esac; \ esac; \
done; \ done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu etc/pam.d/Makefile'; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign etc/pam.d/Makefile'; \
$(am__cd) $(top_srcdir) && \ $(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu etc/pam.d/Makefile $(AUTOMAKE) --foreign etc/pam.d/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \ @case '$?' in \
*config.status*) \ *config.status*) \
@@ -529,6 +548,8 @@ uninstall-am: uninstall-pamdDATA
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am tags-am uninstall uninstall-am uninstall-pamdDATA ps ps-am tags-am uninstall uninstall-am uninstall-pamdDATA
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables. # 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. # Otherwise a system limit (for SysV at least) may be exceeded.
-8
View File
@@ -1,8 +0,0 @@
# useradd defaults file
GROUP=1000
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
CREATE_MAIL_SPOOL=yes
+171 -190
View File
@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC scriptversion=2014-09-12.12; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
@@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
# This script is compatible with the BSD install script, but was written # This script is compatible with the BSD install script, but was written
# from scratch. # from scratch.
tab=' '
nl=' nl='
' '
IFS=" "" $nl" IFS=" $tab$nl"
# set DOITPROG to echo to test this script # Set DOITPROG to "echo" to test this script.
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-} doit=${DOITPROG-}
if test -z "$doit"; then doit_exec=${doit:-exec}
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path; # Put in absolute file names if you don't have them in your path;
# or use environment vars. # or use environment vars.
@@ -68,17 +64,6 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm} rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip} stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir= posix_mkdir=
# Desired mode of installed file. # Desired mode of installed file.
@@ -97,7 +82,7 @@ dir_arg=
dst_arg= dst_arg=
copy_on_change=false copy_on_change=false
no_target_directory= is_target_a_directory=possibly
usage="\ usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -137,46 +122,57 @@ while test $# -ne 0; do
-d) dir_arg=true;; -d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2" -g) chgrpcmd="$chgrpprog $2"
shift;; shift;;
--help) echo "$usage"; exit $?;; --help) echo "$usage"; exit $?;;
-m) mode=$2 -m) mode=$2
case $mode in case $mode in
*' '* | *' '* | *' *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
'* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2
echo "$0: invalid mode: $mode" >&2 exit 1;;
exit 1;; esac
esac shift;;
shift;;
-o) chowncmd="$chownprog $2" -o) chowncmd="$chownprog $2"
shift;; shift;;
-s) stripcmd=$stripprog;; -s) stripcmd=$stripprog;;
-t) dst_arg=$2 -t)
# Protect names problematic for 'test' and other utilities. is_target_a_directory=always
case $dst_arg in dst_arg=$2
-* | [=\(\)!]) dst_arg=./$dst_arg;; # Protect names problematic for 'test' and other utilities.
esac case $dst_arg in
shift;; -* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;; -T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;; --version) echo "$0 $scriptversion"; exit $?;;
--) shift --) shift
break;; break;;
-*) echo "$0: invalid option: $1" >&2 -*) echo "$0: invalid option: $1" >&2
exit 1;; exit 1;;
*) break;; *) break;;
esac esac
shift shift
done done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create. # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified. # When -t is used, the destination is already specified.
@@ -207,6 +203,15 @@ if test $# -eq 0; then
exit 0 exit 0
fi fi
if test -z "$dir_arg"; then
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
fi
if test -z "$dir_arg"; then if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret' do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1 trap "ret=129; $do_exit" 1
@@ -223,16 +228,16 @@ if test -z "$dir_arg"; then
*[0-7]) *[0-7])
if test -z "$stripcmd"; then if test -z "$stripcmd"; then
u_plus_rw= u_plus_rw=
else else
u_plus_rw='% 200' u_plus_rw='% 200'
fi fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*) *)
if test -z "$stripcmd"; then if test -z "$stripcmd"; then
u_plus_rw= u_plus_rw=
else else
u_plus_rw=,u+rw u_plus_rw=,u+rw
fi fi
cp_umask=$mode$u_plus_rw;; cp_umask=$mode$u_plus_rw;;
esac esac
@@ -269,41 +274,15 @@ do
# If destination is a directory, append the input filename; won't work # If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored. # if double slashes aren't ignored.
if test -d "$dst"; then if test -d "$dst"; then
if test -n "$no_target_directory"; then if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2 echo "$0: $dst_arg: Is a directory" >&2
exit 1 exit 1
fi fi
dstdir=$dst dstdir=$dst
dst=$dstdir/`basename "$src"` dst=$dstdir/`basename "$src"`
dstdir_status=0 dstdir_status=0
else else
# Prefer dirname, but fall back on a substitute if dirname fails. dstdir=`dirname "$dst"`
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir" test -d "$dstdir"
dstdir_status=$? dstdir_status=$?
fi fi
@@ -314,74 +293,81 @@ do
if test $dstdir_status != 0; then if test $dstdir_status != 0; then
case $posix_mkdir in case $posix_mkdir in
'') '')
# Create intermediate dirs using mode 755 as modified by the umask. # Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28. # This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask` umask=`umask`
case $stripcmd.$umask in case $stripcmd.$umask in
# Optimize common cases. # Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;; *[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7]) *[0-7])
mkdir_umask=`expr $umask + 22 \ mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \ - $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2 - $umask % 10 % 4 + $umask % 2
`;; `;;
*) mkdir_umask=$umask,go-w;; *) mkdir_umask=$umask,go-w;;
esac esac
# With -d, create the new directory with the user-specified mode. # With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask. # Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then if test -n "$dir_arg"; then
mkdir_mode=-m$mode mkdir_mode=-m$mode
else else
mkdir_mode= mkdir_mode=
fi fi
posix_mkdir=false posix_mkdir=false
case $umask in case $umask in
*[123567][0-7][0-7]) *[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which # POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0. # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;; ;;
*) *)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ # $RANDOM is not portable (e.g. dash); use it when possible to
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 # lower collision chance
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask && # As "mkdir -p" follows symlinks and we work in /tmp possibly; so
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 # create the $tmpdir first (and fail if unsuccessful) to make sure
then # that nobody tries to guess the $tmpdir name.
if test -z "$dir_arg" || { if (umask $mkdir_umask &&
# Check for POSIX incompatibilities with -m. $mkdirprog $mkdir_mode "$tmpdir" &&
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
# other-writable bit of parent directory when it shouldn't. then
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory. if test -z "$dir_arg" || {
ls_ld_tmpdir=`ls -ld "$tmpdir"` # Check for POSIX incompatibilities with -m.
case $ls_ld_tmpdir in # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
d????-?r-*) different_mode=700;; # other-writable bit of parent directory when it shouldn't.
d????-?--*) different_mode=755;; # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
*) false;; test_tmpdir="$tmpdir/a"
esac && ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
$mkdirprog -m$different_mode -p -- "$tmpdir" && { case $ls_ld_tmpdir in
ls_ld_tmpdir_1=`ls -ld "$tmpdir"` d????-?r-*) different_mode=700;;
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" d????-?--*) different_mode=755;;
} *) false;;
} esac &&
then posix_mkdir=: $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
fi ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
rmdir "$tmpdir/d" "$tmpdir" test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
else }
# Remove any dirs left behind by ancient mkdir implementations. }
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null then posix_mkdir=:
fi fi
trap '' 0;; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
esac;; else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi
trap '' 0;;
esac;;
esac esac
if if
$posix_mkdir && ( $posix_mkdir && (
umask $mkdir_umask && umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
) )
then : then :
else else
@@ -391,53 +377,51 @@ do
# directory the slow way, step by step, checking for races as we go. # directory the slow way, step by step, checking for races as we go.
case $dstdir in case $dstdir in
/*) prefix='/';; /*) prefix='/';;
[-=\(\)!]*) prefix='./';; [-=\(\)!]*) prefix='./';;
*) prefix='';; *) prefix='';;
esac esac
eval "$initialize_posix_glob"
oIFS=$IFS oIFS=$IFS
IFS=/ IFS=/
$posix_glob set -f set -f
set fnord $dstdir set fnord $dstdir
shift shift
$posix_glob set +f set +f
IFS=$oIFS IFS=$oIFS
prefixes= prefixes=
for d for d
do do
test X"$d" = X && continue test X"$d" = X && continue
prefix=$prefix$d prefix=$prefix$d
if test -d "$prefix"; then if test -d "$prefix"; then
prefixes= prefixes=
else else
if $posix_mkdir; then if $posix_mkdir; then
(umask=$mkdir_umask && (umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently. # Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1 test -d "$prefix" || exit 1
else else
case $prefix in case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;; *) qprefix=$prefix;;
esac esac
prefixes="$prefixes '$qprefix'" prefixes="$prefixes '$qprefix'"
fi fi
fi fi
prefix=$prefix/ prefix=$prefix/
done done
if test -n "$prefixes"; then if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently. # Don't fail if two instances are running concurrently.
(umask $mkdir_umask && (umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") || eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1 test -d "$dstdir" || exit 1
obsolete_mkdir_used=true obsolete_mkdir_used=true
fi fi
fi fi
fi fi
@@ -472,15 +456,12 @@ do
# If -C, don't bother to copy if it wouldn't change the file. # If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change && if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 && set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f && set +f &&
test "$old" = "$new" && test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then then
@@ -493,24 +474,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not # to itself, or perhaps because mv is so ancient that it does not
# support -f. # support -f.
{ {
# Now remove or move aside any old file at destination location. # Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some # We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other # systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new # reasons. In this case, the final cleanup might fail but the new
# file should still install successfully. # file should still install successfully.
{ {
test ! -f "$dst" || test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null || $doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} || } ||
{ echo "$0: cannot unlink or rename $dst" >&2 { echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1 (exit 1); exit 1
} }
} && } &&
# Now rename the file to the real destination. # Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst" $doit $mvcmd "$dsttmp" "$dst"
} }
fi || exit 1 fi || exit 1
+9 -1
View File
@@ -5,7 +5,10 @@ DEFS =
noinst_LTLIBRARIES = libshadow.la noinst_LTLIBRARIES = libshadow.la
libshadow_la_LDFLAGS = -version-info 0:0:0 libshadow_la_CPPFLAGS = $(ECONF_CPPFLAGS)
if HAVE_VENDORDIR
libshadow_la_CPPFLAGS += -DVENDORDIR=\"$(VENDORDIR)\"
endif
libshadow_la_SOURCES = \ libshadow_la_SOURCES = \
commonio.c \ commonio.c \
@@ -28,8 +31,11 @@ libshadow_la_SOURCES = \
groupio.h \ groupio.h \
gshadow.c \ gshadow.c \
lockpw.c \ lockpw.c \
nss.c \
nscd.c \ nscd.c \
nscd.h \ nscd.h \
sssd.c \
sssd.h \
pam_defs.h \ pam_defs.h \
port.c \ port.c \
port.h \ port.h \
@@ -39,6 +45,8 @@ libshadow_la_SOURCES = \
pwio.c \ pwio.c \
pwio.h \ pwio.h \
pwmem.c \ pwmem.c \
run_part.h \
run_part.c \
subordinateio.h \ subordinateio.h \
subordinateio.c \ subordinateio.c \
selinux.c \ selinux.c \
+354 -70
View File
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.13.3 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
@SET_MAKE@ @SET_MAKE@
VPATH = @srcdir@ VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \ am__make_running_with_option = \
case $${target_option-} in \ case $${target_option-} in \
?) ;; \ ?) ;; \
@@ -78,15 +88,21 @@ PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_triplet = @build@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
@WITH_TCB_TRUE@am__append_1 = tcbfuncs.c tcbfuncs.h @HAVE_VENDORDIR_TRUE@am__append_1 = -DVENDORDIR=\"$(VENDORDIR)\"
@WITH_TCB_TRUE@am__append_2 = tcbfuncs.c tcbfuncs.h
subdir = lib subdir = lib
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/configure.in $(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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
@@ -96,28 +112,36 @@ libshadow_la_LIBADD =
am__libshadow_la_SOURCES_DIST = commonio.c commonio.h defines.h \ am__libshadow_la_SOURCES_DIST = commonio.c commonio.h defines.h \
encrypt.c exitcodes.h faillog.h fields.c fputsx.c getdef.c \ encrypt.c exitcodes.h faillog.h fields.c fputsx.c getdef.c \
getdef.h get_gid.c getlong.c get_pid.c get_uid.c getulong.c \ getdef.h get_gid.c getlong.c get_pid.c get_uid.c getulong.c \
groupio.c groupmem.c groupio.h gshadow.c lockpw.c nscd.c \ groupio.c groupmem.c groupio.h gshadow.c lockpw.c nss.c nscd.c \
nscd.h pam_defs.h port.c port.h prototypes.h pwauth.c pwauth.h \ nscd.h sssd.c sssd.h pam_defs.h port.c port.h prototypes.h \
pwio.c pwio.h pwmem.c subordinateio.h subordinateio.c \ pwauth.c pwauth.h pwio.c pwio.h pwmem.c run_part.h run_part.c \
selinux.c semanage.c sgetgrent.c sgetpwent.c sgetspent.c \ subordinateio.h subordinateio.c selinux.c semanage.c \
sgroupio.c sgroupio.h shadow.c shadowio.c shadowio.h \ sgetgrent.c sgetpwent.c sgetspent.c sgroupio.c sgroupio.h \
shadowmem.c spawn.c utent.c tcbfuncs.c tcbfuncs.h shadow.c shadowio.c shadowio.h shadowmem.c spawn.c utent.c \
@WITH_TCB_TRUE@am__objects_1 = tcbfuncs.lo tcbfuncs.c tcbfuncs.h
am_libshadow_la_OBJECTS = commonio.lo encrypt.lo fields.lo fputsx.lo \ @WITH_TCB_TRUE@am__objects_1 = libshadow_la-tcbfuncs.lo
getdef.lo get_gid.lo getlong.lo get_pid.lo get_uid.lo \ am_libshadow_la_OBJECTS = libshadow_la-commonio.lo \
getulong.lo groupio.lo groupmem.lo gshadow.lo lockpw.lo \ libshadow_la-encrypt.lo libshadow_la-fields.lo \
nscd.lo port.lo pwauth.lo pwio.lo pwmem.lo subordinateio.lo \ libshadow_la-fputsx.lo libshadow_la-getdef.lo \
selinux.lo semanage.lo sgetgrent.lo sgetpwent.lo sgetspent.lo \ libshadow_la-get_gid.lo libshadow_la-getlong.lo \
sgroupio.lo shadow.lo shadowio.lo shadowmem.lo spawn.lo \ libshadow_la-get_pid.lo libshadow_la-get_uid.lo \
utent.lo $(am__objects_1) libshadow_la-getulong.lo libshadow_la-groupio.lo \
libshadow_la-groupmem.lo libshadow_la-gshadow.lo \
libshadow_la-lockpw.lo libshadow_la-nss.lo \
libshadow_la-nscd.lo libshadow_la-sssd.lo libshadow_la-port.lo \
libshadow_la-pwauth.lo libshadow_la-pwio.lo \
libshadow_la-pwmem.lo libshadow_la-run_part.lo \
libshadow_la-subordinateio.lo libshadow_la-selinux.lo \
libshadow_la-semanage.lo libshadow_la-sgetgrent.lo \
libshadow_la-sgetpwent.lo libshadow_la-sgetspent.lo \
libshadow_la-sgroupio.lo libshadow_la-shadow.lo \
libshadow_la-shadowio.lo libshadow_la-shadowmem.lo \
libshadow_la-spawn.lo libshadow_la-utent.lo $(am__objects_1)
libshadow_la_OBJECTS = $(am_libshadow_la_OBJECTS) libshadow_la_OBJECTS = $(am_libshadow_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@) AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent am__v_lt_0 = --silent
am__v_lt_1 = am__v_lt_1 =
libshadow_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libshadow_la_LDFLAGS) $(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@) AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false am__v_P_0 = false
@@ -178,6 +202,7 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)` done | $(am__uniquify_input)`
ETAGS = etags ETAGS = etags
CTAGS = ctags CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
@@ -201,10 +226,10 @@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
ECONF_CPPFLAGS = @ECONF_CPPFLAGS@
EGREP = @EGREP@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FGREP = @FGREP@ FGREP = @FGREP@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@ GMSGFMT_015 = @GMSGFMT_015@
GREP = @GREP@ GREP = @GREP@
@@ -223,6 +248,7 @@ LIBATTR = @LIBATTR@
LIBAUDIT = @LIBAUDIT@ LIBAUDIT = @LIBAUDIT@
LIBCRACK = @LIBCRACK@ LIBCRACK = @LIBCRACK@
LIBCRYPT = @LIBCRYPT@ LIBCRYPT = @LIBCRYPT@
LIBECONF = @LIBECONF@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@ LIBINTL = @LIBINTL@
LIBMD = @LIBMD@ LIBMD = @LIBMD@
@@ -232,13 +258,19 @@ LIBS = @LIBS@
LIBSELINUX = @LIBSELINUX@ LIBSELINUX = @LIBSELINUX@
LIBSEMANAGE = @LIBSEMANAGE@ LIBSEMANAGE = @LIBSEMANAGE@
LIBSKEY = @LIBSKEY@ LIBSKEY = @LIBSKEY@
LIBSUBID_ABI = @LIBSUBID_ABI@
LIBSUBID_ABI_MAJOR = @LIBSUBID_ABI_MAJOR@
LIBSUBID_ABI_MICRO = @LIBSUBID_ABI_MICRO@
LIBSUBID_ABI_MINOR = @LIBSUBID_ABI_MINOR@
LIBTCB = @LIBTCB@ LIBTCB = @LIBTCB@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@ LIPO = @LIPO@
LIYESCRYPT = @LIYESCRYPT@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@ LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@ LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@ MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -267,10 +299,10 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
USE_NLS = @USE_NLS@ USE_NLS = @USE_NLS@
VENDORDIR = @VENDORDIR@
VERSION = @VERSION@ VERSION = @VERSION@
XGETTEXT = @XGETTEXT@ XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
XMLCATALOG = @XMLCATALOG@ XMLCATALOG = @XMLCATALOG@
XML_CATALOG_FILE = @XML_CATALOG_FILE@ XML_CATALOG_FILE = @XML_CATALOG_FILE@
XSLTPROC = @XSLTPROC@ XSLTPROC = @XSLTPROC@
@@ -295,6 +327,7 @@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
builddir = @builddir@ builddir = @builddir@
capcmd = @capcmd@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
docdir = @docdir@ docdir = @docdir@
@@ -320,6 +353,7 @@ pdfdir = @pdfdir@
prefix = @prefix@ prefix = @prefix@
program_transform_name = @program_transform_name@ program_transform_name = @program_transform_name@
psdir = @psdir@ psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@ srcdir = @srcdir@
@@ -330,16 +364,17 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = 1.0 foreign AUTOMAKE_OPTIONS = 1.0 foreign
noinst_LTLIBRARIES = libshadow.la noinst_LTLIBRARIES = libshadow.la
libshadow_la_LDFLAGS = -version-info 0:0:0 libshadow_la_CPPFLAGS = $(ECONF_CPPFLAGS) $(am__append_1)
libshadow_la_SOURCES = commonio.c commonio.h defines.h encrypt.c \ libshadow_la_SOURCES = commonio.c commonio.h defines.h encrypt.c \
exitcodes.h faillog.h fields.c fputsx.c getdef.c getdef.h \ exitcodes.h faillog.h fields.c fputsx.c getdef.c getdef.h \
get_gid.c getlong.c get_pid.c get_uid.c getulong.c groupio.c \ get_gid.c getlong.c get_pid.c get_uid.c getulong.c groupio.c \
groupmem.c groupio.h gshadow.c lockpw.c nscd.c nscd.h \ groupmem.c groupio.h gshadow.c lockpw.c nss.c nscd.c nscd.h \
pam_defs.h port.c port.h prototypes.h pwauth.c pwauth.h pwio.c \ sssd.c sssd.h pam_defs.h port.c port.h prototypes.h pwauth.c \
pwio.h pwmem.c subordinateio.h subordinateio.c selinux.c \ pwauth.h pwio.c pwio.h pwmem.c run_part.h run_part.c \
semanage.c sgetgrent.c sgetpwent.c sgetspent.c sgroupio.c \ subordinateio.h subordinateio.c selinux.c semanage.c \
sgroupio.h shadow.c shadowio.c shadowio.h shadowmem.c spawn.c \ sgetgrent.c sgetpwent.c sgetspent.c sgroupio.c sgroupio.h \
utent.c $(am__append_1) shadow.c shadowio.c shadowio.h shadowmem.c spawn.c utent.c \
$(am__append_2)
# These files are unneeded for some reason, listed in # These files are unneeded for some reason, listed in
# order of appearance: # order of appearance:
@@ -365,7 +400,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/Makefile'; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/Makefile'; \
$(am__cd) $(top_srcdir) && \ $(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign lib/Makefile $(AUTOMAKE) --foreign lib/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \ @case '$?' in \
*config.status*) \ *config.status*) \
@@ -396,7 +430,7 @@ clean-noinstLTLIBRARIES:
} }
libshadow.la: $(libshadow_la_OBJECTS) $(libshadow_la_DEPENDENCIES) $(EXTRA_libshadow_la_DEPENDENCIES) libshadow.la: $(libshadow_la_OBJECTS) $(libshadow_la_DEPENDENCIES) $(EXTRA_libshadow_la_DEPENDENCIES)
$(AM_V_CCLD)$(libshadow_la_LINK) $(libshadow_la_OBJECTS) $(libshadow_la_LIBADD) $(LIBS) $(AM_V_CCLD)$(LINK) $(libshadow_la_OBJECTS) $(libshadow_la_LIBADD) $(LIBS)
mostlyclean-compile: mostlyclean-compile:
-rm -f *.$(OBJEXT) -rm -f *.$(OBJEXT)
@@ -404,52 +438,55 @@ mostlyclean-compile:
distclean-compile: distclean-compile:
-rm -f *.tab.c -rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/commonio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-commonio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/encrypt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-encrypt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fields.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-fields.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fputsx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-fputsx.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_gid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-get_gid.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_pid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-get_pid.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_uid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-get_uid.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdef.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-getdef.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getlong.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-getlong.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getulong.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-getulong.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/groupio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-groupio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/groupmem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-groupmem.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gshadow.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-gshadow.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lockpw.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-lockpw.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nscd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-nscd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/port.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-nss.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwauth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-port.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-pwauth.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwmem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-pwio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/selinux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-pwmem.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/semanage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-run_part.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgetgrent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-selinux.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgetpwent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-semanage.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgetspent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-sgetgrent.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgroupio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-sgetpwent.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shadow.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-sgetspent.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shadowio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-sgroupio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shadowmem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-shadow.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spawn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-shadowio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subordinateio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-shadowmem.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcbfuncs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-spawn.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-sssd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-subordinateio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-tcbfuncs.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshadow_la-utent.Plo@am__quote@
.c.o: .c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj: .c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo: .c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -458,6 +495,251 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
libshadow_la-commonio.lo: commonio.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-commonio.lo -MD -MP -MF $(DEPDIR)/libshadow_la-commonio.Tpo -c -o libshadow_la-commonio.lo `test -f 'commonio.c' || echo '$(srcdir)/'`commonio.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-commonio.Tpo $(DEPDIR)/libshadow_la-commonio.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='commonio.c' object='libshadow_la-commonio.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-commonio.lo `test -f 'commonio.c' || echo '$(srcdir)/'`commonio.c
libshadow_la-encrypt.lo: encrypt.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-encrypt.lo -MD -MP -MF $(DEPDIR)/libshadow_la-encrypt.Tpo -c -o libshadow_la-encrypt.lo `test -f 'encrypt.c' || echo '$(srcdir)/'`encrypt.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-encrypt.Tpo $(DEPDIR)/libshadow_la-encrypt.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='encrypt.c' object='libshadow_la-encrypt.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-encrypt.lo `test -f 'encrypt.c' || echo '$(srcdir)/'`encrypt.c
libshadow_la-fields.lo: fields.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-fields.lo -MD -MP -MF $(DEPDIR)/libshadow_la-fields.Tpo -c -o libshadow_la-fields.lo `test -f 'fields.c' || echo '$(srcdir)/'`fields.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-fields.Tpo $(DEPDIR)/libshadow_la-fields.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fields.c' object='libshadow_la-fields.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-fields.lo `test -f 'fields.c' || echo '$(srcdir)/'`fields.c
libshadow_la-fputsx.lo: fputsx.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-fputsx.lo -MD -MP -MF $(DEPDIR)/libshadow_la-fputsx.Tpo -c -o libshadow_la-fputsx.lo `test -f 'fputsx.c' || echo '$(srcdir)/'`fputsx.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-fputsx.Tpo $(DEPDIR)/libshadow_la-fputsx.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fputsx.c' object='libshadow_la-fputsx.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-fputsx.lo `test -f 'fputsx.c' || echo '$(srcdir)/'`fputsx.c
libshadow_la-getdef.lo: getdef.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-getdef.lo -MD -MP -MF $(DEPDIR)/libshadow_la-getdef.Tpo -c -o libshadow_la-getdef.lo `test -f 'getdef.c' || echo '$(srcdir)/'`getdef.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-getdef.Tpo $(DEPDIR)/libshadow_la-getdef.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='getdef.c' object='libshadow_la-getdef.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-getdef.lo `test -f 'getdef.c' || echo '$(srcdir)/'`getdef.c
libshadow_la-get_gid.lo: get_gid.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-get_gid.lo -MD -MP -MF $(DEPDIR)/libshadow_la-get_gid.Tpo -c -o libshadow_la-get_gid.lo `test -f 'get_gid.c' || echo '$(srcdir)/'`get_gid.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-get_gid.Tpo $(DEPDIR)/libshadow_la-get_gid.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_gid.c' object='libshadow_la-get_gid.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-get_gid.lo `test -f 'get_gid.c' || echo '$(srcdir)/'`get_gid.c
libshadow_la-getlong.lo: getlong.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-getlong.lo -MD -MP -MF $(DEPDIR)/libshadow_la-getlong.Tpo -c -o libshadow_la-getlong.lo `test -f 'getlong.c' || echo '$(srcdir)/'`getlong.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-getlong.Tpo $(DEPDIR)/libshadow_la-getlong.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='getlong.c' object='libshadow_la-getlong.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-getlong.lo `test -f 'getlong.c' || echo '$(srcdir)/'`getlong.c
libshadow_la-get_pid.lo: get_pid.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-get_pid.lo -MD -MP -MF $(DEPDIR)/libshadow_la-get_pid.Tpo -c -o libshadow_la-get_pid.lo `test -f 'get_pid.c' || echo '$(srcdir)/'`get_pid.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-get_pid.Tpo $(DEPDIR)/libshadow_la-get_pid.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_pid.c' object='libshadow_la-get_pid.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-get_pid.lo `test -f 'get_pid.c' || echo '$(srcdir)/'`get_pid.c
libshadow_la-get_uid.lo: get_uid.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-get_uid.lo -MD -MP -MF $(DEPDIR)/libshadow_la-get_uid.Tpo -c -o libshadow_la-get_uid.lo `test -f 'get_uid.c' || echo '$(srcdir)/'`get_uid.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-get_uid.Tpo $(DEPDIR)/libshadow_la-get_uid.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_uid.c' object='libshadow_la-get_uid.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-get_uid.lo `test -f 'get_uid.c' || echo '$(srcdir)/'`get_uid.c
libshadow_la-getulong.lo: getulong.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-getulong.lo -MD -MP -MF $(DEPDIR)/libshadow_la-getulong.Tpo -c -o libshadow_la-getulong.lo `test -f 'getulong.c' || echo '$(srcdir)/'`getulong.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-getulong.Tpo $(DEPDIR)/libshadow_la-getulong.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='getulong.c' object='libshadow_la-getulong.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-getulong.lo `test -f 'getulong.c' || echo '$(srcdir)/'`getulong.c
libshadow_la-groupio.lo: groupio.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-groupio.lo -MD -MP -MF $(DEPDIR)/libshadow_la-groupio.Tpo -c -o libshadow_la-groupio.lo `test -f 'groupio.c' || echo '$(srcdir)/'`groupio.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-groupio.Tpo $(DEPDIR)/libshadow_la-groupio.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='groupio.c' object='libshadow_la-groupio.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-groupio.lo `test -f 'groupio.c' || echo '$(srcdir)/'`groupio.c
libshadow_la-groupmem.lo: groupmem.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-groupmem.lo -MD -MP -MF $(DEPDIR)/libshadow_la-groupmem.Tpo -c -o libshadow_la-groupmem.lo `test -f 'groupmem.c' || echo '$(srcdir)/'`groupmem.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-groupmem.Tpo $(DEPDIR)/libshadow_la-groupmem.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='groupmem.c' object='libshadow_la-groupmem.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-groupmem.lo `test -f 'groupmem.c' || echo '$(srcdir)/'`groupmem.c
libshadow_la-gshadow.lo: gshadow.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-gshadow.lo -MD -MP -MF $(DEPDIR)/libshadow_la-gshadow.Tpo -c -o libshadow_la-gshadow.lo `test -f 'gshadow.c' || echo '$(srcdir)/'`gshadow.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-gshadow.Tpo $(DEPDIR)/libshadow_la-gshadow.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gshadow.c' object='libshadow_la-gshadow.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-gshadow.lo `test -f 'gshadow.c' || echo '$(srcdir)/'`gshadow.c
libshadow_la-lockpw.lo: lockpw.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-lockpw.lo -MD -MP -MF $(DEPDIR)/libshadow_la-lockpw.Tpo -c -o libshadow_la-lockpw.lo `test -f 'lockpw.c' || echo '$(srcdir)/'`lockpw.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-lockpw.Tpo $(DEPDIR)/libshadow_la-lockpw.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lockpw.c' object='libshadow_la-lockpw.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-lockpw.lo `test -f 'lockpw.c' || echo '$(srcdir)/'`lockpw.c
libshadow_la-nss.lo: nss.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-nss.lo -MD -MP -MF $(DEPDIR)/libshadow_la-nss.Tpo -c -o libshadow_la-nss.lo `test -f 'nss.c' || echo '$(srcdir)/'`nss.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-nss.Tpo $(DEPDIR)/libshadow_la-nss.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nss.c' object='libshadow_la-nss.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-nss.lo `test -f 'nss.c' || echo '$(srcdir)/'`nss.c
libshadow_la-nscd.lo: nscd.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-nscd.lo -MD -MP -MF $(DEPDIR)/libshadow_la-nscd.Tpo -c -o libshadow_la-nscd.lo `test -f 'nscd.c' || echo '$(srcdir)/'`nscd.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-nscd.Tpo $(DEPDIR)/libshadow_la-nscd.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nscd.c' object='libshadow_la-nscd.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-nscd.lo `test -f 'nscd.c' || echo '$(srcdir)/'`nscd.c
libshadow_la-sssd.lo: sssd.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-sssd.lo -MD -MP -MF $(DEPDIR)/libshadow_la-sssd.Tpo -c -o libshadow_la-sssd.lo `test -f 'sssd.c' || echo '$(srcdir)/'`sssd.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-sssd.Tpo $(DEPDIR)/libshadow_la-sssd.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sssd.c' object='libshadow_la-sssd.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-sssd.lo `test -f 'sssd.c' || echo '$(srcdir)/'`sssd.c
libshadow_la-port.lo: port.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-port.lo -MD -MP -MF $(DEPDIR)/libshadow_la-port.Tpo -c -o libshadow_la-port.lo `test -f 'port.c' || echo '$(srcdir)/'`port.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-port.Tpo $(DEPDIR)/libshadow_la-port.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='port.c' object='libshadow_la-port.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-port.lo `test -f 'port.c' || echo '$(srcdir)/'`port.c
libshadow_la-pwauth.lo: pwauth.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-pwauth.lo -MD -MP -MF $(DEPDIR)/libshadow_la-pwauth.Tpo -c -o libshadow_la-pwauth.lo `test -f 'pwauth.c' || echo '$(srcdir)/'`pwauth.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-pwauth.Tpo $(DEPDIR)/libshadow_la-pwauth.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pwauth.c' object='libshadow_la-pwauth.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-pwauth.lo `test -f 'pwauth.c' || echo '$(srcdir)/'`pwauth.c
libshadow_la-pwio.lo: pwio.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-pwio.lo -MD -MP -MF $(DEPDIR)/libshadow_la-pwio.Tpo -c -o libshadow_la-pwio.lo `test -f 'pwio.c' || echo '$(srcdir)/'`pwio.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-pwio.Tpo $(DEPDIR)/libshadow_la-pwio.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pwio.c' object='libshadow_la-pwio.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-pwio.lo `test -f 'pwio.c' || echo '$(srcdir)/'`pwio.c
libshadow_la-pwmem.lo: pwmem.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-pwmem.lo -MD -MP -MF $(DEPDIR)/libshadow_la-pwmem.Tpo -c -o libshadow_la-pwmem.lo `test -f 'pwmem.c' || echo '$(srcdir)/'`pwmem.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-pwmem.Tpo $(DEPDIR)/libshadow_la-pwmem.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pwmem.c' object='libshadow_la-pwmem.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-pwmem.lo `test -f 'pwmem.c' || echo '$(srcdir)/'`pwmem.c
libshadow_la-run_part.lo: run_part.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-run_part.lo -MD -MP -MF $(DEPDIR)/libshadow_la-run_part.Tpo -c -o libshadow_la-run_part.lo `test -f 'run_part.c' || echo '$(srcdir)/'`run_part.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-run_part.Tpo $(DEPDIR)/libshadow_la-run_part.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='run_part.c' object='libshadow_la-run_part.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-run_part.lo `test -f 'run_part.c' || echo '$(srcdir)/'`run_part.c
libshadow_la-subordinateio.lo: subordinateio.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-subordinateio.lo -MD -MP -MF $(DEPDIR)/libshadow_la-subordinateio.Tpo -c -o libshadow_la-subordinateio.lo `test -f 'subordinateio.c' || echo '$(srcdir)/'`subordinateio.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-subordinateio.Tpo $(DEPDIR)/libshadow_la-subordinateio.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='subordinateio.c' object='libshadow_la-subordinateio.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-subordinateio.lo `test -f 'subordinateio.c' || echo '$(srcdir)/'`subordinateio.c
libshadow_la-selinux.lo: selinux.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-selinux.lo -MD -MP -MF $(DEPDIR)/libshadow_la-selinux.Tpo -c -o libshadow_la-selinux.lo `test -f 'selinux.c' || echo '$(srcdir)/'`selinux.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-selinux.Tpo $(DEPDIR)/libshadow_la-selinux.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='selinux.c' object='libshadow_la-selinux.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-selinux.lo `test -f 'selinux.c' || echo '$(srcdir)/'`selinux.c
libshadow_la-semanage.lo: semanage.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-semanage.lo -MD -MP -MF $(DEPDIR)/libshadow_la-semanage.Tpo -c -o libshadow_la-semanage.lo `test -f 'semanage.c' || echo '$(srcdir)/'`semanage.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-semanage.Tpo $(DEPDIR)/libshadow_la-semanage.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='semanage.c' object='libshadow_la-semanage.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-semanage.lo `test -f 'semanage.c' || echo '$(srcdir)/'`semanage.c
libshadow_la-sgetgrent.lo: sgetgrent.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-sgetgrent.lo -MD -MP -MF $(DEPDIR)/libshadow_la-sgetgrent.Tpo -c -o libshadow_la-sgetgrent.lo `test -f 'sgetgrent.c' || echo '$(srcdir)/'`sgetgrent.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-sgetgrent.Tpo $(DEPDIR)/libshadow_la-sgetgrent.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sgetgrent.c' object='libshadow_la-sgetgrent.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-sgetgrent.lo `test -f 'sgetgrent.c' || echo '$(srcdir)/'`sgetgrent.c
libshadow_la-sgetpwent.lo: sgetpwent.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-sgetpwent.lo -MD -MP -MF $(DEPDIR)/libshadow_la-sgetpwent.Tpo -c -o libshadow_la-sgetpwent.lo `test -f 'sgetpwent.c' || echo '$(srcdir)/'`sgetpwent.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-sgetpwent.Tpo $(DEPDIR)/libshadow_la-sgetpwent.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sgetpwent.c' object='libshadow_la-sgetpwent.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-sgetpwent.lo `test -f 'sgetpwent.c' || echo '$(srcdir)/'`sgetpwent.c
libshadow_la-sgetspent.lo: sgetspent.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-sgetspent.lo -MD -MP -MF $(DEPDIR)/libshadow_la-sgetspent.Tpo -c -o libshadow_la-sgetspent.lo `test -f 'sgetspent.c' || echo '$(srcdir)/'`sgetspent.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-sgetspent.Tpo $(DEPDIR)/libshadow_la-sgetspent.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sgetspent.c' object='libshadow_la-sgetspent.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-sgetspent.lo `test -f 'sgetspent.c' || echo '$(srcdir)/'`sgetspent.c
libshadow_la-sgroupio.lo: sgroupio.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-sgroupio.lo -MD -MP -MF $(DEPDIR)/libshadow_la-sgroupio.Tpo -c -o libshadow_la-sgroupio.lo `test -f 'sgroupio.c' || echo '$(srcdir)/'`sgroupio.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-sgroupio.Tpo $(DEPDIR)/libshadow_la-sgroupio.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sgroupio.c' object='libshadow_la-sgroupio.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-sgroupio.lo `test -f 'sgroupio.c' || echo '$(srcdir)/'`sgroupio.c
libshadow_la-shadow.lo: shadow.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-shadow.lo -MD -MP -MF $(DEPDIR)/libshadow_la-shadow.Tpo -c -o libshadow_la-shadow.lo `test -f 'shadow.c' || echo '$(srcdir)/'`shadow.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-shadow.Tpo $(DEPDIR)/libshadow_la-shadow.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='shadow.c' object='libshadow_la-shadow.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-shadow.lo `test -f 'shadow.c' || echo '$(srcdir)/'`shadow.c
libshadow_la-shadowio.lo: shadowio.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-shadowio.lo -MD -MP -MF $(DEPDIR)/libshadow_la-shadowio.Tpo -c -o libshadow_la-shadowio.lo `test -f 'shadowio.c' || echo '$(srcdir)/'`shadowio.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-shadowio.Tpo $(DEPDIR)/libshadow_la-shadowio.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='shadowio.c' object='libshadow_la-shadowio.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-shadowio.lo `test -f 'shadowio.c' || echo '$(srcdir)/'`shadowio.c
libshadow_la-shadowmem.lo: shadowmem.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-shadowmem.lo -MD -MP -MF $(DEPDIR)/libshadow_la-shadowmem.Tpo -c -o libshadow_la-shadowmem.lo `test -f 'shadowmem.c' || echo '$(srcdir)/'`shadowmem.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-shadowmem.Tpo $(DEPDIR)/libshadow_la-shadowmem.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='shadowmem.c' object='libshadow_la-shadowmem.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-shadowmem.lo `test -f 'shadowmem.c' || echo '$(srcdir)/'`shadowmem.c
libshadow_la-spawn.lo: spawn.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-spawn.lo -MD -MP -MF $(DEPDIR)/libshadow_la-spawn.Tpo -c -o libshadow_la-spawn.lo `test -f 'spawn.c' || echo '$(srcdir)/'`spawn.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-spawn.Tpo $(DEPDIR)/libshadow_la-spawn.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spawn.c' object='libshadow_la-spawn.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-spawn.lo `test -f 'spawn.c' || echo '$(srcdir)/'`spawn.c
libshadow_la-utent.lo: utent.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-utent.lo -MD -MP -MF $(DEPDIR)/libshadow_la-utent.Tpo -c -o libshadow_la-utent.lo `test -f 'utent.c' || echo '$(srcdir)/'`utent.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-utent.Tpo $(DEPDIR)/libshadow_la-utent.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utent.c' object='libshadow_la-utent.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-utent.lo `test -f 'utent.c' || echo '$(srcdir)/'`utent.c
libshadow_la-tcbfuncs.lo: tcbfuncs.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libshadow_la-tcbfuncs.lo -MD -MP -MF $(DEPDIR)/libshadow_la-tcbfuncs.Tpo -c -o libshadow_la-tcbfuncs.lo `test -f 'tcbfuncs.c' || echo '$(srcdir)/'`tcbfuncs.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshadow_la-tcbfuncs.Tpo $(DEPDIR)/libshadow_la-tcbfuncs.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tcbfuncs.c' object='libshadow_la-tcbfuncs.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libshadow_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libshadow_la-tcbfuncs.lo `test -f 'tcbfuncs.c' || echo '$(srcdir)/'`tcbfuncs.c
mostlyclean-libtool: mostlyclean-libtool:
-rm -f *.lo -rm -f *.lo
@@ -667,6 +949,8 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am tags tags-am uninstall uninstall-am
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables. # 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. # Otherwise a system limit (for SysV at least) may be exceeded.
+98 -64
View File
@@ -45,6 +45,7 @@
#include <stdio.h> #include <stdio.h>
#include <signal.h> #include <signal.h>
#include "nscd.h" #include "nscd.h"
#include "sssd.h"
#ifdef WITH_TCB #ifdef WITH_TCB
#include <tcb.h> #include <tcb.h>
#endif /* WITH_TCB */ #endif /* WITH_TCB */
@@ -140,10 +141,10 @@ static int do_lock_file (const char *file, const char *lock, bool log)
int retval; int retval;
char buf[32]; char buf[32];
fd = open (file, O_CREAT | O_EXCL | O_WRONLY, 0600); fd = open (file, O_CREAT | O_TRUNC | O_WRONLY, 0600);
if (-1 == fd) { if (-1 == fd) {
if (log) { if (log) {
(void) fprintf (stderr, (void) fprintf (shadow_logfd,
"%s: %s: %s\n", "%s: %s: %s\n",
Prog, file, strerror (errno)); Prog, file, strerror (errno));
} }
@@ -155,8 +156,18 @@ static int do_lock_file (const char *file, const char *lock, bool log)
len = (ssize_t) strlen (buf) + 1; len = (ssize_t) strlen (buf) + 1;
if (write (fd, buf, (size_t) len) != len) { if (write (fd, buf, (size_t) len) != len) {
if (log) { if (log) {
(void) fprintf (stderr, (void) fprintf (shadow_logfd,
"%s: %s: %s\n", "%s: %s file write error: %s\n",
Prog, file, strerror (errno));
}
(void) close (fd);
unlink (file);
return 0;
}
if (fdatasync (fd) == -1) {
if (log) {
(void) fprintf (shadow_logfd,
"%s: %s file sync error: %s\n",
Prog, file, strerror (errno)); Prog, file, strerror (errno));
} }
(void) close (fd); (void) close (fd);
@@ -168,7 +179,7 @@ static int do_lock_file (const char *file, const char *lock, bool log)
if (link (file, lock) == 0) { if (link (file, lock) == 0) {
retval = check_link_count (file); retval = check_link_count (file);
if ((0==retval) && log) { if ((0==retval) && log) {
(void) fprintf (stderr, (void) fprintf (shadow_logfd,
"%s: %s: lock file already used\n", "%s: %s: lock file already used\n",
Prog, file); Prog, file);
} }
@@ -179,7 +190,7 @@ static int do_lock_file (const char *file, const char *lock, bool log)
fd = open (lock, O_RDWR); fd = open (lock, O_RDWR);
if (-1 == fd) { if (-1 == fd) {
if (log) { if (log) {
(void) fprintf (stderr, (void) fprintf (shadow_logfd,
"%s: %s: %s\n", "%s: %s: %s\n",
Prog, lock, strerror (errno)); Prog, lock, strerror (errno));
} }
@@ -191,7 +202,7 @@ static int do_lock_file (const char *file, const char *lock, bool log)
close (fd); close (fd);
if (len <= 0) { if (len <= 0) {
if (log) { if (log) {
(void) fprintf (stderr, (void) fprintf (shadow_logfd,
"%s: existing lock file %s without a PID\n", "%s: existing lock file %s without a PID\n",
Prog, lock); Prog, lock);
} }
@@ -202,7 +213,7 @@ static int do_lock_file (const char *file, const char *lock, bool log)
buf[len] = '\0'; buf[len] = '\0';
if (get_pid (buf, &pid) == 0) { if (get_pid (buf, &pid) == 0) {
if (log) { if (log) {
(void) fprintf (stderr, (void) fprintf (shadow_logfd,
"%s: existing lock file %s with an invalid PID '%s'\n", "%s: existing lock file %s with an invalid PID '%s'\n",
Prog, lock, buf); Prog, lock, buf);
} }
@@ -212,7 +223,7 @@ static int do_lock_file (const char *file, const char *lock, bool log)
} }
if (kill (pid, 0) == 0) { if (kill (pid, 0) == 0) {
if (log) { if (log) {
(void) fprintf (stderr, (void) fprintf (shadow_logfd,
"%s: lock %s already used by PID %lu\n", "%s: lock %s already used by PID %lu\n",
Prog, lock, (unsigned long) pid); Prog, lock, (unsigned long) pid);
} }
@@ -222,7 +233,7 @@ static int do_lock_file (const char *file, const char *lock, bool log)
} }
if (unlink (lock) != 0) { if (unlink (lock) != 0) {
if (log) { if (log) {
(void) fprintf (stderr, (void) fprintf (shadow_logfd,
"%s: cannot get lock %s: %s\n", "%s: cannot get lock %s: %s\n",
Prog, lock, strerror (errno)); Prog, lock, strerror (errno));
} }
@@ -234,13 +245,13 @@ static int do_lock_file (const char *file, const char *lock, bool log)
if (link (file, lock) == 0) { if (link (file, lock) == 0) {
retval = check_link_count (file); retval = check_link_count (file);
if ((0==retval) && log) { if ((0==retval) && log) {
(void) fprintf (stderr, (void) fprintf (shadow_logfd,
"%s: %s: lock file already used\n", "%s: %s: lock file already used\n",
Prog, file); Prog, file);
} }
} else { } else {
if (log) { if (log) {
(void) fprintf (stderr, (void) fprintf (shadow_logfd,
"%s: cannot get lock %s: %s\n", "%s: cannot get lock %s: %s\n",
Prog, lock, strerror (errno)); Prog, lock, strerror (errno));
} }
@@ -301,15 +312,12 @@ static int create_backup (const char *backup, FILE * fp)
struct utimbuf ub; struct utimbuf ub;
FILE *bkfp; FILE *bkfp;
int c; int c;
mode_t mask;
if (fstat (fileno (fp), &sb) != 0) { if (fstat (fileno (fp), &sb) != 0) {
return -1; return -1;
} }
mask = umask (077); bkfp = fopen_set_perms (backup, "w", &sb);
bkfp = fopen (backup, "w");
(void) umask (mask);
if (NULL == bkfp) { if (NULL == bkfp) {
return -1; return -1;
} }
@@ -328,8 +336,12 @@ static int create_backup (const char *backup, FILE * fp)
/* FIXME: unlink the backup file? */ /* FIXME: unlink the backup file? */
return -1; return -1;
} }
if ( (fsync (fileno (bkfp)) != 0) if (fsync (fileno (bkfp)) != 0) {
|| (fclose (bkfp) != 0)) { (void) fclose (bkfp);
/* FIXME: unlink the backup file? */
return -1;
}
if (fclose (bkfp) != 0) {
/* FIXME: unlink the backup file? */ /* FIXME: unlink the backup file? */
return -1; return -1;
} }
@@ -366,6 +378,7 @@ static void free_linked_list (struct commonio_db *db)
int commonio_setname (struct commonio_db *db, const char *name) int commonio_setname (struct commonio_db *db, const char *name)
{ {
snprintf (db->filename, sizeof (db->filename), "%s", name); snprintf (db->filename, sizeof (db->filename), "%s", name);
db->setname = true;
return 1; return 1;
} }
@@ -378,57 +391,77 @@ bool commonio_present (const struct commonio_db *db)
int commonio_lock_nowait (struct commonio_db *db, bool log) int commonio_lock_nowait (struct commonio_db *db, bool log)
{ {
char file[1024]; char* file = NULL;
char lock[1024]; char* lock = NULL;
size_t lock_file_len;
size_t file_len;
int err = 0;
if (db->locked) { if (db->locked) {
return 1; return 1;
} }
file_len = strlen(db->filename) + 11;/* %lu max size */
snprintf (file, sizeof file, "%s.%lu", lock_file_len = strlen(db->filename) + 6; /* sizeof ".lock" */
file = (char*)malloc(file_len);
if(file == NULL) {
goto cleanup_ENOMEM;
}
lock = (char*)malloc(lock_file_len);
if(lock == NULL) {
goto cleanup_ENOMEM;
}
snprintf (file, file_len, "%s.%lu",
db->filename, (unsigned long) getpid ()); db->filename, (unsigned long) getpid ());
snprintf (lock, sizeof lock, "%s.lock", db->filename); snprintf (lock, lock_file_len, "%s.lock", db->filename);
if (do_lock_file (file, lock, log) != 0) { if (do_lock_file (file, lock, log) != 0) {
db->locked = true; db->locked = true;
lock_count++; lock_count++;
return 1; err = 1;
} }
return 0; cleanup_ENOMEM:
if(file)
free(file);
if(lock)
free(lock);
return err;
} }
int commonio_lock (struct commonio_db *db) int commonio_lock (struct commonio_db *db)
{ {
int i;
#ifdef HAVE_LCKPWDF #ifdef HAVE_LCKPWDF
/* /*
* only if the system libc has a real lckpwdf() - the one from * Only if the system libc has a real lckpwdf() - the one from
* lockpw.c calls us and would cause infinite recursion! * lockpw.c calls us and would cause infinite recursion!
* It is also not used with the prefix option.
*/ */
if (!db->setname) {
/* /*
* Call lckpwdf() on the first lock. * Call lckpwdf() on the first lock.
* If it succeeds, call *_lock() only once * If it succeeds, call *_lock() only once
* (no retries, it should always succeed). * (no retries, it should always succeed).
*/ */
if (0 == lock_count) { if (0 == lock_count) {
if (lckpwdf () == -1) { if (lckpwdf () == -1) {
if (geteuid () != 0) { if (geteuid () != 0) {
(void) fprintf (stderr, (void) fprintf (shadow_logfd,
"%s: Permission denied.\n", "%s: Permission denied.\n",
Prog); Prog);
}
return 0; /* failure */
} }
return 0; /* failure */
} }
}
if (commonio_lock_nowait (db, true) != 0) { if (commonio_lock_nowait (db, true) != 0) {
return 1; /* success */ return 1; /* success */
} }
ulckpwdf (); ulckpwdf ();
return 0; /* failure */ return 0; /* failure */
#else /* !HAVE_LCKPWDF */ }
int i; #endif /* !HAVE_LCKPWDF */
/* /*
* lckpwdf() not used - do it the old way. * lckpwdf() not used - do it the old way.
@@ -449,13 +482,12 @@ int commonio_lock (struct commonio_db *db)
} }
/* no unnecessary retries on "permission denied" errors */ /* no unnecessary retries on "permission denied" errors */
if (geteuid () != 0) { if (geteuid () != 0) {
(void) fprintf (stderr, "%s: Permission denied.\n", (void) fprintf (shadow_logfd, "%s: Permission denied.\n",
Prog); Prog);
return 0; return 0;
} }
} }
return 0; /* failure */ return 0; /* failure */
#endif /* !HAVE_LCKPWDF */
} }
static void dec_lock_count (void) static void dec_lock_count (void)
@@ -468,6 +500,7 @@ static void dec_lock_count (void)
if (nscd_need_reload) { if (nscd_need_reload) {
nscd_flush_cache ("passwd"); nscd_flush_cache ("passwd");
nscd_flush_cache ("group"); nscd_flush_cache ("group");
sssd_flush_cache (SSSD_DB_PASSWD | SSSD_DB_GROUP);
nscd_need_reload = false; nscd_need_reload = false;
} }
#ifdef HAVE_LCKPWDF #ifdef HAVE_LCKPWDF
@@ -754,16 +787,16 @@ commonio_sort (struct commonio_db *db, int (*cmp) (const void *, const void *))
for (ptr = db->head; for (ptr = db->head;
(NULL != ptr) (NULL != ptr)
#if KEEP_NIS_AT_END #if KEEP_NIS_AT_END
&& (NULL != ptr->line) && ((NULL == ptr->line)
&& ( ('+' != ptr->line[0]) || (('+' != ptr->line[0])
&& ('-' != ptr->line[0])) && ('-' != ptr->line[0])))
#endif #endif
; ;
ptr = ptr->next) { ptr = ptr->next) {
n++; n++;
} }
#if KEEP_NIS_AT_END #if KEEP_NIS_AT_END
if ((NULL != ptr) && (NULL != ptr->line)) { if (NULL != ptr) {
nis = ptr; nis = ptr;
} }
#endif #endif
@@ -908,7 +941,6 @@ static int write_all (const struct commonio_db *db)
int commonio_close (struct commonio_db *db) int commonio_close (struct commonio_db *db)
/*@requires notnull db->fp@*/
{ {
char buf[1024]; char buf[1024];
int errors = 0; int errors = 0;
@@ -921,8 +953,10 @@ int commonio_close (struct commonio_db *db)
db->isopen = false; db->isopen = false;
if (!db->changed || db->readonly) { if (!db->changed || db->readonly) {
(void) fclose (db->fp); if (NULL != db->fp) {
db->fp = NULL; (void) fclose (db->fp);
db->fp = NULL;
}
goto success; goto success;
} }
@@ -944,7 +978,7 @@ int commonio_close (struct commonio_db *db)
snprintf (buf, sizeof buf, "%s-", db->filename); snprintf (buf, sizeof buf, "%s-", db->filename);
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
if (set_selinux_file_context (buf) != 0) { if (set_selinux_file_context (db->filename, S_IFREG) != 0) {
errors++; errors++;
} }
#endif #endif
@@ -968,17 +1002,16 @@ int commonio_close (struct commonio_db *db)
} else { } else {
/* /*
* Default permissions for new [g]shadow files. * Default permissions for new [g]shadow files.
* (passwd and group always exist...)
*/ */
sb.st_mode = 0400; sb.st_mode = db->st_mode;
sb.st_uid = 0; sb.st_uid = db->st_uid;
sb.st_gid = 0; sb.st_gid = db->st_gid;
} }
snprintf (buf, sizeof buf, "%s+", db->filename); snprintf (buf, sizeof buf, "%s+", db->filename);
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
if (set_selinux_file_context (buf) != 0) { if (set_selinux_file_context (db->filename, S_IFREG) != 0) {
errors++; errors++;
} }
#endif #endif
@@ -1080,7 +1113,8 @@ int commonio_update (struct commonio_db *db, const void *eptr)
p = find_entry_by_name (db, db->ops->getname (eptr)); p = find_entry_by_name (db, db->ops->getname (eptr));
if (NULL != p) { if (NULL != p) {
if (next_entry_by_name (db, p->next, db->ops->getname (eptr)) != NULL) { if (next_entry_by_name (db, p->next, db->ops->getname (eptr)) != NULL) {
fprintf (stderr, _("Multiple entries named '%s' in %s. Please fix this with pwck or grpck.\n"), db->ops->getname (eptr), db->filename); fprintf (shadow_logfd, _("Multiple entries named '%s' in %s. Please fix this with pwck or grpck.\n"), db->ops->getname (eptr), db->filename);
db->ops->free (nentry);
return 0; return 0;
} }
db->ops->free (p->eptr); db->ops->free (p->eptr);
@@ -1184,7 +1218,7 @@ int commonio_remove (struct commonio_db *db, const char *name)
return 0; return 0;
} }
if (next_entry_by_name (db, p->next, name) != NULL) { if (next_entry_by_name (db, p->next, name) != NULL) {
fprintf (stderr, _("Multiple entries named '%s' in %s. Please fix this with pwck or grpck.\n"), name, db->filename); fprintf (shadow_logfd, _("Multiple entries named '%s' in %s. Please fix this with pwck or grpck.\n"), name, db->filename);
return 0; return 0;
} }
+10 -7
View File
@@ -31,12 +31,8 @@
*/ */
/* $Id$ */ /* $Id$ */
#ifndef _COMMONIO_H #ifndef COMMONIO_H
#define _COMMONIO_H #define COMMONIO_H
#ifdef WITH_SELINUX
#include <selinux/selinux.h>
#endif
#include "defines.h" /* bool */ #include "defines.h" /* bool */
@@ -121,8 +117,14 @@ struct commonio_db {
/*@dependent@*/ /*@null@*/FILE *fp; /*@dependent@*/ /*@null@*/FILE *fp;
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
/*@null@*/security_context_t scontext; /*@null@*/char *scontext;
#endif #endif
/*
* Default permissions and owner for newly created data file.
*/
mode_t st_mode;
uid_t st_uid;
gid_t st_gid;
/* /*
* Head, tail, current position in linked list. * Head, tail, current position in linked list.
*/ */
@@ -137,6 +139,7 @@ struct commonio_db {
bool isopen:1; bool isopen:1;
bool locked:1; bool locked:1;
bool readonly:1; bool readonly:1;
bool setname:1;
}; };
extern int commonio_setname (struct commonio_db *, const char *); extern int commonio_setname (struct commonio_db *, const char *);
+17 -1
View File
@@ -4,6 +4,8 @@
#ifndef _DEFINES_H_ #ifndef _DEFINES_H_
#define _DEFINES_H_ #define _DEFINES_H_
#include "config.h"
#if HAVE_STDBOOL_H #if HAVE_STDBOOL_H
# include <stdbool.h> # include <stdbool.h>
#else #else
@@ -24,7 +26,7 @@ typedef unsigned char _Bool;
/* Take care of NLS matters. */ /* Take care of NLS matters. */
#ifdef S_SPLINT_S #ifdef S_SPLINT_S
extern char *setlocale(int categorie, const char *locale); extern char *setlocale(int categories, const char *locale);
# define LC_ALL (6) # define LC_ALL (6)
extern char * bindtextdomain (const char * domainname, const char * dirname); extern char * bindtextdomain (const char * domainname, const char * dirname);
extern char * textdomain (const char * domainname); extern char * textdomain (const char * domainname);
@@ -94,6 +96,14 @@ char *strchr (), *strrchr (), *strtok ();
# include <unistd.h> # include <unistd.h>
#endif #endif
/*
* crypt(3), crypt_gensalt(3), and their
* feature test macros may be defined in here.
*/
#if HAVE_CRYPT_H
# include <crypt.h>
#endif
#if TIME_WITH_SYS_TIME #if TIME_WITH_SYS_TIME
# include <sys/time.h> # include <sys/time.h>
# include <time.h> # include <time.h>
@@ -382,4 +392,10 @@ extern char *strerror ();
# endif # endif
#endif #endif
#ifdef HAVE_SECURE_GETENV
# define shadow_getenv(name) secure_getenv(name)
# else
# define shadow_getenv(name) getenv(name)
#endif
#endif /* _DEFINES_H_ */ #endif /* _DEFINES_H_ */
+7 -1
View File
@@ -65,12 +65,18 @@
case '1': case '1':
method = "MD5"; method = "MD5";
break; break;
case '2':
method = "BCRYPT";
break;
case '5': case '5':
method = "SHA256"; method = "SHA256";
break; break;
case '6': case '6':
method = "SHA512"; method = "SHA512";
break; break;
case 'y':
method = "YESCRYPT";
break;
default: default:
{ {
static char nummethod[4] = "$x$"; static char nummethod[4] = "$x$";
@@ -78,7 +84,7 @@
method = &nummethod[0]; method = &nummethod[0];
} }
} }
(void) fprintf (stderr, (void) fprintf (shadow_logfd,
_("crypt method not supported by libcrypt? (%s)\n"), _("crypt method not supported by libcrypt? (%s)\n"),
method); method);
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
+175 -42
View File
@@ -40,6 +40,9 @@
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#ifdef USE_ECONF
#include <libeconf.h>
#endif
#include "getdef.h" #include "getdef.h"
/* /*
* A configuration item definition. * A configuration item definition.
@@ -49,6 +52,43 @@ struct itemdef {
/*@null@*/char *value; /* value given, or NULL if no value */ /*@null@*/char *value; /* value given, or NULL if no value */
}; };
#define PAMDEFS \
{"CHFN_AUTH", NULL}, \
{"CHSH_AUTH", NULL}, \
{"CRACKLIB_DICTPATH", NULL}, \
{"ENV_HZ", NULL}, \
{"ENVIRON_FILE", NULL}, \
{"ENV_TZ", NULL}, \
{"FAILLOG_ENAB", NULL}, \
{"FTMP_FILE", NULL}, \
{"HMAC_CRYPTO_ALGO", NULL}, \
{"ISSUE_FILE", NULL}, \
{"LASTLOG_ENAB", NULL}, \
{"LOGIN_STRING", NULL}, \
{"MAIL_CHECK_ENAB", NULL}, \
{"MOTD_FILE", NULL}, \
{"NOLOGINS_FILE", NULL}, \
{"OBSCURE_CHECKS_ENAB", NULL}, \
{"PASS_ALWAYS_WARN", NULL}, \
{"PASS_CHANGE_TRIES", NULL}, \
{"PASS_MAX_LEN", NULL}, \
{"PASS_MIN_LEN", NULL}, \
{"PORTTIME_CHECKS_ENAB", NULL}, \
{"QUOTAS_ENAB", NULL}, \
{"SU_WHEEL_ONLY", NULL}, \
{"ULIMIT", NULL},
/*
* Items used in other tools (util-linux, etc.)
*/
#define FOREIGNDEFS \
{"ALWAYS_SET_PATH", NULL}, \
{"ENV_ROOTPATH", NULL}, \
{"LOGIN_KEEP_USERNAME", NULL}, \
{"LOGIN_PLAIN_PROMPT", NULL}, \
{"MOTD_FIRSTONLY", NULL}, \
#define NUMDEFS (sizeof(def_table)/sizeof(def_table[0])) #define NUMDEFS (sizeof(def_table)/sizeof(def_table[0]))
static struct itemdef def_table[] = { static struct itemdef def_table[] = {
{"CHFN_RESTRICT", NULL}, {"CHFN_RESTRICT", NULL},
@@ -64,8 +104,10 @@ static struct itemdef def_table[] = {
{"FAKE_SHELL", NULL}, {"FAKE_SHELL", NULL},
{"GID_MAX", NULL}, {"GID_MAX", NULL},
{"GID_MIN", NULL}, {"GID_MIN", NULL},
{"HOME_MODE", NULL},
{"HUSHLOGIN_FILE", NULL}, {"HUSHLOGIN_FILE", NULL},
{"KILLCHAR", NULL}, {"KILLCHAR", NULL},
{"LASTLOG_UID_MAX", NULL},
{"LOGIN_RETRIES", NULL}, {"LOGIN_RETRIES", NULL},
{"LOGIN_TIMEOUT", NULL}, {"LOGIN_TIMEOUT", NULL},
{"LOG_OK_LOGINS", NULL}, {"LOG_OK_LOGINS", NULL},
@@ -74,12 +116,20 @@ static struct itemdef def_table[] = {
{"MAIL_FILE", NULL}, {"MAIL_FILE", NULL},
{"MAX_MEMBERS_PER_GROUP", NULL}, {"MAX_MEMBERS_PER_GROUP", NULL},
{"MD5_CRYPT_ENAB", NULL}, {"MD5_CRYPT_ENAB", NULL},
{"NONEXISTENT", NULL},
{"PASS_MAX_DAYS", NULL}, {"PASS_MAX_DAYS", NULL},
{"PASS_MIN_DAYS", NULL}, {"PASS_MIN_DAYS", NULL},
{"PASS_WARN_AGE", NULL}, {"PASS_WARN_AGE", NULL},
#ifdef USE_SHA_CRYPT #ifdef USE_SHA_CRYPT
{"SHA_CRYPT_MAX_ROUNDS", NULL}, {"SHA_CRYPT_MAX_ROUNDS", NULL},
{"SHA_CRYPT_MIN_ROUNDS", NULL}, {"SHA_CRYPT_MIN_ROUNDS", NULL},
#endif
#ifdef USE_BCRYPT
{"BCRYPT_MAX_ROUNDS", NULL},
{"BCRYPT_MIN_ROUNDS", NULL},
#endif
#ifdef USE_YESCRYPT
{"YESCRYPT_COST_FACTOR", NULL},
#endif #endif
{"SUB_GID_COUNT", NULL}, {"SUB_GID_COUNT", NULL},
{"SUB_GID_MAX", NULL}, {"SUB_GID_MAX", NULL},
@@ -102,29 +152,7 @@ static struct itemdef def_table[] = {
{"USERDEL_CMD", NULL}, {"USERDEL_CMD", NULL},
{"USERGROUPS_ENAB", NULL}, {"USERGROUPS_ENAB", NULL},
#ifndef USE_PAM #ifndef USE_PAM
{"CHFN_AUTH", NULL}, PAMDEFS
{"CHSH_AUTH", NULL},
{"CRACKLIB_DICTPATH", NULL},
{"ENV_HZ", NULL},
{"ENVIRON_FILE", NULL},
{"ENV_TZ", NULL},
{"FAILLOG_ENAB", NULL},
{"FTMP_FILE", NULL},
{"ISSUE_FILE", NULL},
{"LASTLOG_ENAB", NULL},
{"LOGIN_STRING", NULL},
{"MAIL_CHECK_ENAB", NULL},
{"MOTD_FILE", NULL},
{"NOLOGINS_FILE", NULL},
{"OBSCURE_CHECKS_ENAB", NULL},
{"PASS_ALWAYS_WARN", NULL},
{"PASS_CHANGE_TRIES", NULL},
{"PASS_MAX_LEN", NULL},
{"PASS_MIN_LEN", NULL},
{"PORTTIME_CHECKS_ENAB", NULL},
{"QUOTAS_ENAB", NULL},
{"SU_WHEEL_ONLY", NULL},
{"ULIMIT", NULL},
#endif #endif
#ifdef USE_SYSLOG #ifdef USE_SYSLOG
{"SYSLOG_SG_ENAB", NULL}, {"SYSLOG_SG_ENAB", NULL},
@@ -135,14 +163,35 @@ static struct itemdef def_table[] = {
{"TCB_SYMLINKS", NULL}, {"TCB_SYMLINKS", NULL},
{"USE_TCB", NULL}, {"USE_TCB", NULL},
#endif #endif
{"FORCE_SHADOW", NULL},
{"GRANT_AUX_GROUP_SUBIDS", NULL},
{"PREVENT_NO_AUTH", NULL},
{NULL, NULL} {NULL, NULL}
}; };
#define NUMKNOWNDEFS (sizeof(knowndef_table)/sizeof(knowndef_table[0]))
static struct itemdef knowndef_table[] = {
#ifdef USE_PAM
PAMDEFS
#endif
FOREIGNDEFS
{NULL, NULL}
};
#ifdef USE_ECONF
#ifdef VENDORDIR
static const char* vendordir = VENDORDIR;
#else
static const char* vendordir = NULL;
#endif
static const char* sysconfdir = "/etc";
#else
#ifndef LOGINDEFS #ifndef LOGINDEFS
#define LOGINDEFS "/etc/login.defs" #define LOGINDEFS "/etc/login.defs"
#endif #endif
static char def_fname[] = LOGINDEFS; /* login config defs file */ static const char* def_fname = LOGINDEFS; /* login config defs file */
#endif
static bool def_loaded = false; /* are defs already loaded? */ static bool def_loaded = false; /* are defs already loaded? */
/* local function prototypes */ /* local function prototypes */
@@ -218,7 +267,7 @@ int getdef_num (const char *item, int dflt)
if ( (getlong (d->value, &val) == 0) if ( (getlong (d->value, &val) == 0)
|| (val > INT_MAX) || (val > INT_MAX)
|| (val < INT_MIN)) { || (val < INT_MIN)) {
fprintf (stderr, fprintf (shadow_logfd,
_("configuration error - cannot parse %s value: '%s'"), _("configuration error - cannot parse %s value: '%s'"),
item, d->value); item, d->value);
return dflt; return dflt;
@@ -253,7 +302,7 @@ unsigned int getdef_unum (const char *item, unsigned int dflt)
if ( (getlong (d->value, &val) == 0) if ( (getlong (d->value, &val) == 0)
|| (val < 0) || (val < 0)
|| (val > INT_MAX)) { || (val > INT_MAX)) {
fprintf (stderr, fprintf (shadow_logfd,
_("configuration error - cannot parse %s value: '%s'"), _("configuration error - cannot parse %s value: '%s'"),
item, d->value); item, d->value);
return dflt; return dflt;
@@ -286,7 +335,7 @@ long getdef_long (const char *item, long dflt)
} }
if (getlong (d->value, &val) == 0) { if (getlong (d->value, &val) == 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("configuration error - cannot parse %s value: '%s'"), _("configuration error - cannot parse %s value: '%s'"),
item, d->value); item, d->value);
return dflt; return dflt;
@@ -319,7 +368,7 @@ unsigned long getdef_ulong (const char *item, unsigned long dflt)
if (getulong (d->value, &val) == 0) { if (getulong (d->value, &val) == 0) {
/* FIXME: we should have a getulong */ /* FIXME: we should have a getulong */
fprintf (stderr, fprintf (shadow_logfd,
_("configuration error - cannot parse %s value: '%s'"), _("configuration error - cannot parse %s value: '%s'"),
item, d->value); item, d->value);
return dflt; return dflt;
@@ -357,7 +406,7 @@ int putdef_str (const char *name, const char *value)
cp = strdup (value); cp = strdup (value);
if (NULL == cp) { if (NULL == cp) {
(void) fputs (_("Could not allocate space for config info.\n"), (void) fputs (_("Could not allocate space for config info.\n"),
stderr); shadow_logfd);
SYSLOG ((LOG_ERR, "could not allocate space for config info")); SYSLOG ((LOG_ERR, "could not allocate space for config info"));
return -1; return -1;
} }
@@ -382,7 +431,6 @@ static /*@observer@*/ /*@null@*/struct itemdef *def_find (const char *name)
{ {
struct itemdef *ptr; struct itemdef *ptr;
/* /*
* Search into the table. * Search into the table.
*/ */
@@ -397,13 +445,51 @@ static /*@observer@*/ /*@null@*/struct itemdef *def_find (const char *name)
* Item was never found. * Item was never found.
*/ */
fprintf (stderr, for (ptr = knowndef_table; NULL != ptr->name; ptr++) {
if (strcmp (ptr->name, name) == 0) {
goto out;
}
}
fprintf (shadow_logfd,
_("configuration error - unknown item '%s' (notify administrator)\n"), _("configuration error - unknown item '%s' (notify administrator)\n"),
name); name);
SYSLOG ((LOG_CRIT, "unknown configuration item `%s'", name)); SYSLOG ((LOG_CRIT, "unknown configuration item `%s'", name));
out:
return (struct itemdef *) NULL; return (struct itemdef *) NULL;
} }
/*
* setdef_config_file - set the default configuration file path
*
* must be called prior to any def* calls.
*/
void setdef_config_file (const char* file)
{
#ifdef USE_ECONF
size_t len;
char* cp;
len = strlen(file) + strlen(sysconfdir) + 2;
cp = malloc(len);
if (cp == NULL)
exit (13);
snprintf(cp, len, "%s/%s", file, sysconfdir);
sysconfdir = cp;
#ifdef VENDORDIR
len = strlen(file) + strlen(vendordir) + 2;
cp = malloc(len);
if (cp == NULL)
exit (13);
snprintf(cp, len, "%s/%s", file, vendordir);
vendordir = cp;
#endif
#else
def_fname = file;
#endif
}
/* /*
* def_load - load configuration table * def_load - load configuration table
* *
@@ -412,20 +498,16 @@ static /*@observer@*/ /*@null@*/struct itemdef *def_find (const char *name)
static void def_load (void) static void def_load (void)
{ {
#ifdef USE_ECONF
econf_file *defs_file = NULL;
econf_err error;
char **keys;
size_t key_number;
#else
int i; int i;
FILE *fp; FILE *fp;
char buf[1024], *name, *value, *s; char buf[1024], *name, *value, *s;
#endif
/*
* Open the configuration definitions file.
*/
fp = fopen (def_fname, "r");
if (NULL == fp) {
int err = errno;
SYSLOG ((LOG_CRIT, "cannot open login definitions %s [%s]",
def_fname, strerror (err)));
exit (EXIT_FAILURE);
}
/* /*
* Set the initialized flag. * Set the initialized flag.
@@ -433,6 +515,56 @@ static void def_load (void)
*/ */
def_loaded = true; def_loaded = true;
#ifdef USE_ECONF
error = econf_readDirs (&defs_file, vendordir, sysconfdir, "login", "defs", " \t", "#");
if (error) {
if (error == ECONF_NOFILE)
return;
SYSLOG ((LOG_CRIT, "cannot open login definitions [%s]",
econf_errString(error)));
exit (EXIT_FAILURE);
}
if ((error = econf_getKeys(defs_file, NULL, &key_number, &keys))) {
SYSLOG ((LOG_CRIT, "cannot read login definitions [%s]",
econf_errString(error)));
exit (EXIT_FAILURE);
}
for (size_t i = 0; i < key_number; i++) {
char *value;
econf_getStringValue(defs_file, NULL, keys[i], &value);
/*
* Store the value in def_table.
*
* Ignore failures to load the login.defs file.
* The error was already reported to the user and to
* syslog. The tools will just use their default values.
*/
(void)putdef_str (keys[i], value);
}
econf_free (keys);
econf_free (defs_file);
#else
/*
* Open the configuration definitions file.
*/
fp = fopen (def_fname, "r");
if (NULL == fp) {
if (errno == ENOENT)
return;
int err = errno;
SYSLOG ((LOG_CRIT, "cannot open login definitions %s [%s]",
def_fname, strerror (err)));
exit (EXIT_FAILURE);
}
/* /*
* Go through all of the lines in the file. * Go through all of the lines in the file.
*/ */
@@ -482,6 +614,7 @@ static void def_load (void)
} }
(void) fclose (fp); (void) fclose (fp);
#endif
} }
+1
View File
@@ -40,6 +40,7 @@ extern unsigned long getdef_ulong (const char *, unsigned long);
extern unsigned int getdef_unum (const char *, unsigned int); extern unsigned int getdef_unum (const char *, unsigned int);
extern /*@observer@*/ /*@null@*/const char *getdef_str (const char *); extern /*@observer@*/ /*@null@*/const char *getdef_str (const char *);
extern int putdef_str (const char *, const char *); extern int putdef_str (const char *, const char *);
extern void setdef_config_file (const char* file);
/* default UMASK value if not specified in /etc/login.defs */ /* default UMASK value if not specified in /etc/login.defs */
#define GETDEF_DEFAULT_UMASK 022 #define GETDEF_DEFAULT_UMASK 022
+3 -6
View File
@@ -44,22 +44,19 @@
*/ */
int getulong (const char *numstr, /*@out@*/unsigned long int *result) int getulong (const char *numstr, /*@out@*/unsigned long int *result)
{ {
long long int val; unsigned long int val;
char *endptr; char *endptr;
errno = 0; errno = 0;
val = strtoll (numstr, &endptr, 0); val = strtoul (numstr, &endptr, 0);
if ( ('\0' == *numstr) if ( ('\0' == *numstr)
|| ('\0' != *endptr) || ('\0' != *endptr)
|| (ERANGE == errno) || (ERANGE == errno)
/*@+ignoresigns@*/
|| (val != (unsigned long int)val)
/*@=ignoresigns@*/
) { ) {
return 0; return 0;
} }
*result = (unsigned long int)val; *result = val;
return 1; return 1;
} }
+6 -3
View File
@@ -130,13 +130,17 @@ static /*@owned@*/struct commonio_db group_db = {
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
NULL, /* scontext */ NULL, /* scontext */
#endif #endif
0644, /* st_mode */
0, /* st_uid */
0, /* st_gid */
NULL, /* head */ NULL, /* head */
NULL, /* tail */ NULL, /* tail */
NULL, /* cursor */ NULL, /* cursor */
false, /* changed */ false, /* changed */
false, /* isopen */ false, /* isopen */
false, /* locked */ false, /* locked */
false /* readonly */ false, /* readonly */
false /* setname */
}; };
int gr_setdbname (const char *filename) int gr_setdbname (const char *filename)
@@ -335,8 +339,7 @@ static /*@null@*/struct commonio_entry *merge_group_entries (
errno = ENOMEM; errno = ENOMEM;
return NULL; return NULL;
} }
snprintf(new_line, new_line_len, "%s\n%s", gr1->line, gr2->line); snprintf(new_line, new_line_len + 1, "%s\n%s", gr1->line, gr2->line);
new_line[new_line_len] = '\0';
/* Concatenate the 2 list of members */ /* Concatenate the 2 list of members */
for (i=0; NULL != gptr1->gr_mem[i]; i++); for (i=0; NULL != gptr1->gr_mem[i]; i++);
+46 -20
View File
@@ -55,15 +55,14 @@
gr->gr_name = strdup (grent->gr_name); gr->gr_name = strdup (grent->gr_name);
/*@=mustfreeonly@*/ /*@=mustfreeonly@*/
if (NULL == gr->gr_name) { if (NULL == gr->gr_name) {
free(gr); gr_free(gr);
return NULL; return NULL;
} }
/*@-mustfreeonly@*/ /*@-mustfreeonly@*/
gr->gr_passwd = strdup (grent->gr_passwd); gr->gr_passwd = strdup (grent->gr_passwd);
/*@=mustfreeonly@*/ /*@=mustfreeonly@*/
if (NULL == gr->gr_passwd) { if (NULL == gr->gr_passwd) {
free(gr->gr_name); gr_free(gr);
free(gr);
return NULL; return NULL;
} }
@@ -73,21 +72,13 @@
gr->gr_mem = (char **) malloc ((i + 1) * sizeof (char *)); gr->gr_mem = (char **) malloc ((i + 1) * sizeof (char *));
/*@=mustfreeonly@*/ /*@=mustfreeonly@*/
if (NULL == gr->gr_mem) { if (NULL == gr->gr_mem) {
free(gr->gr_passwd); gr_free(gr);
free(gr->gr_name);
free(gr);
return NULL; return NULL;
} }
for (i = 0; grent->gr_mem[i]; i++) { for (i = 0; grent->gr_mem[i]; i++) {
gr->gr_mem[i] = strdup (grent->gr_mem[i]); gr->gr_mem[i] = strdup (grent->gr_mem[i]);
if (NULL == gr->gr_mem[i]) { if (NULL == gr->gr_mem[i]) {
int j; gr_free(gr);
for (j=0; j<i; j++)
free(gr->gr_mem[j]);
free(gr->gr_mem);
free(gr->gr_passwd);
free(gr->gr_name);
free(gr);
return NULL; return NULL;
} }
} }
@@ -96,6 +87,18 @@
return gr; return gr;
} }
void gr_free_members (struct group *grent)
{
if (NULL != grent->gr_mem) {
size_t i;
for (i = 0; NULL != grent->gr_mem[i]; i++) {
free (grent->gr_mem[i]);
}
free (grent->gr_mem);
grent->gr_mem = NULL;
}
}
void gr_free (/*@out@*/ /*@only@*/struct group *grent) void gr_free (/*@out@*/ /*@only@*/struct group *grent)
{ {
free (grent->gr_name); free (grent->gr_name);
@@ -103,13 +106,36 @@ void gr_free (/*@out@*/ /*@only@*/struct group *grent)
memzero (grent->gr_passwd, strlen (grent->gr_passwd)); memzero (grent->gr_passwd, strlen (grent->gr_passwd));
free (grent->gr_passwd); free (grent->gr_passwd);
} }
if (NULL != grent->gr_mem) { gr_free_members(grent);
size_t i;
for (i = 0; NULL != grent->gr_mem[i]; i++) {
free (grent->gr_mem[i]);
}
free (grent->gr_mem);
}
free (grent); free (grent);
} }
bool gr_append_member(struct group *grp, char *member)
{
int i;
if (NULL == grp->gr_mem || grp->gr_mem[0] == NULL) {
grp->gr_mem = (char **)malloc(2 * sizeof(char *));
if (!grp->gr_mem) {
return false;
}
grp->gr_mem[0] = strdup(member);
if (!grp->gr_mem[0]) {
return false;
}
grp->gr_mem[1] = NULL;
return true;
}
for (i = 0; grp->gr_mem[i]; i++) ;
grp->gr_mem = realloc(grp->gr_mem, (i + 2) * sizeof(char *));
if (NULL == grp->gr_mem) {
return false;
}
grp->gr_mem[i] = strdup(member);
if (NULL == grp->gr_mem[i]) {
return false;
}
grp->gr_mem[i + 1] = NULL;
return true;
}
+4 -4
View File
@@ -25,13 +25,13 @@ int nscd_flush_cache (const char *service)
if (run_command (cmd, spawnedArgs, spawnedEnv, &status) != 0) { if (run_command (cmd, spawnedArgs, spawnedEnv, &status) != 0) {
/* run_command writes its own more detailed message. */ /* run_command writes its own more detailed message. */
(void) fprintf (stderr, _(MSG_NSCD_FLUSH_CACHE_FAILED), Prog); (void) fprintf (shadow_logfd, _(MSG_NSCD_FLUSH_CACHE_FAILED), Prog);
return -1; return -1;
} }
code = WEXITSTATUS (status); code = WEXITSTATUS (status);
if (!WIFEXITED (status)) { if (!WIFEXITED (status)) {
(void) fprintf (stderr, (void) fprintf (shadow_logfd,
_("%s: nscd did not terminate normally (signal %d)\n"), _("%s: nscd did not terminate normally (signal %d)\n"),
Prog, WTERMSIG (status)); Prog, WTERMSIG (status));
return -1; return -1;
@@ -43,9 +43,9 @@ int nscd_flush_cache (const char *service)
/* nscd is installed, but it isn't active. */ /* nscd is installed, but it isn't active. */
return 0; return 0;
} else if (code != 0) { } else if (code != 0) {
(void) fprintf (stderr, _("%s: nscd exited with status %d\n"), (void) fprintf (shadow_logfd, _("%s: nscd exited with status %d\n"),
Prog, code); Prog, code);
(void) fprintf (stderr, _(MSG_NSCD_FLUSH_CACHE_FAILED), Prog); (void) fprintf (shadow_logfd, _(MSG_NSCD_FLUSH_CACHE_FAILED), Prog);
return -1; return -1;
} }
+149
View File
@@ -0,0 +1,149 @@
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <stdbool.h>
#include <string.h>
#include <strings.h>
#include <ctype.h>
#include <stdatomic.h>
#include "prototypes.h"
#include "../libsubid/subid.h"
#define NSSWITCH "/etc/nsswitch.conf"
// NSS plugin handling for subids
// If nsswitch has a line like
// subid: sssd
// then sssd will be consulted for subids. Unlike normal NSS dbs,
// only one db is supported at a time. That's open to debate, but
// the subids are a pretty limited resource, and local files seem
// bound to step on any other allocations leading to insecure
// conditions.
static atomic_flag nss_init_started;
static atomic_bool nss_init_completed;
static struct subid_nss_ops *subid_nss;
bool nss_is_initialized() {
return atomic_load(&nss_init_completed);
}
void nss_exit() {
if (nss_is_initialized() && subid_nss) {
dlclose(subid_nss->handle);
free(subid_nss);
subid_nss = NULL;
}
}
// nsswitch_path is an argument only to support testing.
void nss_init(char *nsswitch_path) {
FILE *nssfp = NULL;
char *line = NULL, *p, *token, *saveptr;
size_t len = 0;
if (atomic_flag_test_and_set(&nss_init_started)) {
// Another thread has started nss_init, wait for it to complete
while (!atomic_load(&nss_init_completed))
usleep(100);
return;
}
if (!nsswitch_path)
nsswitch_path = NSSWITCH;
// read nsswitch.conf to check for a line like:
// subid: files
nssfp = fopen(nsswitch_path, "r");
if (!nssfp) {
fprintf(shadow_logfd, "Failed opening %s: %m", nsswitch_path);
atomic_store(&nss_init_completed, true);
return;
}
while ((getline(&line, &len, nssfp)) != -1) {
if (line[0] == '\0' || line[0] == '#')
continue;
if (strlen(line) < 8)
continue;
if (strncasecmp(line, "subid:", 6) != 0)
continue;
p = &line[6];
while ((*p) && isspace(*p))
p++;
if (!*p)
continue;
for (token = strtok_r(p, " \n\t", &saveptr);
token;
token = strtok_r(NULL, " \n\t", &saveptr)) {
char libname[65];
void *h;
if (strcmp(token, "files") == 0) {
subid_nss = NULL;
goto done;
}
if (strlen(token) > 50) {
fprintf(shadow_logfd, "Subid NSS module name too long (longer than 50 characters): %s\n", token);
fprintf(shadow_logfd, "Using files\n");
subid_nss = NULL;
goto done;
}
snprintf(libname, 64, "libsubid_%s.so", token);
h = dlopen(libname, RTLD_LAZY);
if (!h) {
fprintf(shadow_logfd, "Error opening %s: %s\n", libname, dlerror());
fprintf(shadow_logfd, "Using files\n");
subid_nss = NULL;
goto done;
}
subid_nss = malloc(sizeof(*subid_nss));
if (!subid_nss) {
dlclose(h);
goto done;
}
subid_nss->has_range = dlsym(h, "shadow_subid_has_range");
if (!subid_nss->has_range) {
fprintf(shadow_logfd, "%s did not provide @has_range@\n", libname);
dlclose(h);
free(subid_nss);
subid_nss = NULL;
goto done;
}
subid_nss->list_owner_ranges = dlsym(h, "shadow_subid_list_owner_ranges");
if (!subid_nss->list_owner_ranges) {
fprintf(shadow_logfd, "%s did not provide @list_owner_ranges@\n", libname);
dlclose(h);
free(subid_nss);
subid_nss = NULL;
goto done;
}
subid_nss->find_subid_owners = dlsym(h, "shadow_subid_find_subid_owners");
if (!subid_nss->find_subid_owners) {
fprintf(shadow_logfd, "%s did not provide @find_subid_owners@\n", libname);
dlclose(h);
free(subid_nss);
subid_nss = NULL;
goto done;
}
subid_nss->handle = h;
goto done;
}
fprintf(shadow_logfd, "No usable subid NSS module found, using files\n");
// subid_nss has to be null here, but to ease reviews:
free(subid_nss);
subid_nss = NULL;
goto done;
}
done:
atomic_store(&nss_init_completed, true);
free(line);
if (nssfp) {
atexit(nss_exit);
fclose(nssfp);
}
}
struct subid_nss_ops *get_subid_nss_handle() {
nss_init(NULL);
return subid_nss;
}
+97 -10
View File
@@ -59,7 +59,8 @@
#include "defines.h" #include "defines.h"
#include "commonio.h" #include "commonio.h"
extern /*@observer@*/ const char *Prog; extern /*@observer@*/ const char *Prog; /* Program name showed in error messages */
extern FILE *shadow_logfd; /* file descripter to which error messages are printed */
/* addgrps.c */ /* addgrps.c */
#if defined (HAVE_SETGROUPS) && ! defined (USE_PAM) #if defined (HAVE_SETGROUPS) && ! defined (USE_PAM)
@@ -72,6 +73,14 @@ extern int expire (const struct passwd *, /*@null@*/const struct spwd *);
/* isexpired.c */ /* isexpired.c */
extern int isexpired (const struct passwd *, /*@null@*/const struct spwd *); extern int isexpired (const struct passwd *, /*@null@*/const struct spwd *);
/* btrfs.c */
#ifdef WITH_BTRFS
extern int btrfs_create_subvolume(const char *path);
extern int btrfs_remove_subvolume(const char *path);
extern int btrfs_is_subvolume(const char *path);
extern int is_btrfs(const char *path);
#endif
/* basename() renamed to Basename() to avoid libc name space confusion */ /* basename() renamed to Basename() to avoid libc name space confusion */
/* basename.c */ /* basename.c */
extern /*@observer@*/const char *Basename (const char *str); extern /*@observer@*/const char *Basename (const char *str);
@@ -153,12 +162,10 @@ extern int find_new_uid (bool sys_user,
#ifdef ENABLE_SUBIDS #ifdef ENABLE_SUBIDS
/* find_new_sub_gids.c */ /* find_new_sub_gids.c */
extern int find_new_sub_gids (const char *owner, extern int find_new_sub_gids (gid_t *range_start, unsigned long *range_count);
gid_t *range_start, unsigned long *range_count);
/* find_new_sub_uids.c */ /* find_new_sub_uids.c */
extern int find_new_sub_uids (const char *owner, extern int find_new_sub_uids (uid_t *range_start, unsigned long *range_count);
uid_t *range_start, unsigned long *range_count);
#endif /* ENABLE_SUBIDS */ #endif /* ENABLE_SUBIDS */
@@ -179,6 +186,9 @@ extern int getrange (char *range,
unsigned long *min, bool *has_min, unsigned long *min, bool *has_min,
unsigned long *max, bool *has_max); unsigned long *max, bool *has_max);
/* gettime.c */
extern time_t gettime ();
/* get_uid.c */ /* get_uid.c */
extern int get_uid (const char *uidstr, uid_t *uid); extern int get_uid (const char *uidstr, uid_t *uid);
@@ -197,7 +207,9 @@ extern void __gr_set_changed (void);
/* groupmem.c */ /* groupmem.c */
extern /*@null@*/ /*@only@*/struct group *__gr_dup (const struct group *grent); extern /*@null@*/ /*@only@*/struct group *__gr_dup (const struct group *grent);
extern void gr_free_members (struct group *grent);
extern void gr_free (/*@out@*/ /*@only@*/struct group *grent); extern void gr_free (/*@out@*/ /*@only@*/struct group *grent);
extern bool gr_append_member (struct group *grp, char *member);
/* hushed.c */ /* hushed.c */
extern bool hushed (const char *username); extern bool hushed (const char *username);
@@ -251,9 +263,65 @@ extern void motd (void);
/* myname.c */ /* myname.c */
extern /*@null@*//*@only@*/struct passwd *get_my_pwent (void); extern /*@null@*//*@only@*/struct passwd *get_my_pwent (void);
/* pam_pass_non_interractive.c */ /* nss.c */
#include <libsubid/subid.h>
extern void nss_init(char *nsswitch_path);
extern bool nss_is_initialized();
struct subid_nss_ops {
/*
* nss_has_range: does a user own a given subid range
*
* @owner: username
* @start: first subid in queried range
* @count: number of subids in queried range
* @idtype: subuid or subgid
* @result: true if @owner has been allocated the subid range.
*
* returns success if the module was able to determine an answer (true or false),
* else an error status.
*/
enum subid_status (*has_range)(const char *owner, unsigned long start, unsigned long count, enum subid_type idtype, bool *result);
/*
* nss_list_owner_ranges: list the subid ranges delegated to a user.
*
* @owner - string representing username being queried
* @id_type - subuid or subgid
* @ranges - pointer to an array of struct subid_range, or NULL. The
* returned array must be freed by the caller.
* @count - pointer to an integer into which the number of returned ranges
* is written.
* returns success if the module was able to determine an answer,
* else an error status.
*/
enum subid_status (*list_owner_ranges)(const char *owner, enum subid_type id_type, struct subid_range **ranges, int *count);
/*
* nss_find_subid_owners: find uids who own a given subuid or subgid.
*
* @id - the delegated id (subuid or subgid) being queried
* @id_type - subuid or subgid
* @uids - pointer to an array of uids which will be allocated by
* nss_find_subid_owners()
* @count - number of uids found
*
* returns success if the module was able to determine an answer,
* else an error status.
*/
enum subid_status (*find_subid_owners)(unsigned long id, enum subid_type id_type, uid_t **uids, int *count);
/* The dlsym handle to close */
void *handle;
};
extern struct subid_nss_ops *get_subid_nss_handle();
/* pam_pass_non_interactive.c */
#ifdef USE_PAM #ifdef USE_PAM
extern int do_pam_passwd_non_interractive (const char *pam_service, extern int do_pam_passwd_non_interactive (const char *pam_service,
const char *username, const char *username,
const char* password); const char* password);
#endif /* USE_PAM */ #endif /* USE_PAM */
@@ -271,6 +339,21 @@ extern void do_pam_passwd (const char *user, bool silent, bool change_expired);
/* port.c */ /* port.c */
extern bool isttytime (const char *, const char *, time_t); extern bool isttytime (const char *, const char *, time_t);
/* prefix_flag.c */
extern const char* process_prefix_flag (const char* short_opt, int argc, char **argv);
extern struct group *prefix_getgrnam(const char *name);
extern struct group *prefix_getgrgid(gid_t gid);
extern struct passwd *prefix_getpwuid(uid_t uid);
extern struct passwd *prefix_getpwnam(const char* name);
extern struct spwd *prefix_getspnam(const char* name);
extern struct group *prefix_getgr_nam_gid(const char *grname);
extern void prefix_setpwent();
extern struct passwd* prefix_getpwent();
extern void prefix_endpwent();
extern void prefix_setgrent();
extern struct group* prefix_getgrent();
extern void prefix_endgrent();
/* pwd2spwd.c */ /* pwd2spwd.c */
#ifndef USE_PAM #ifndef USE_PAM
extern struct spwd *pwd_to_spwd (const struct passwd *); extern struct spwd *pwd_to_spwd (const struct passwd *);
@@ -308,8 +391,9 @@ extern /*@observer@*/const char *crypt_make_salt (/*@null@*//*@observer@*/const
/* selinux.c */ /* selinux.c */
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
extern int set_selinux_file_context (const char *dst_name); extern int set_selinux_file_context (const char *dst_name, mode_t mode);
extern int reset_selinux_file_context (void); extern int reset_selinux_file_context (void);
extern int check_selinux_permit (const char *perm_name);
#endif #endif
/* semanage.c */ /* semanage.c */
@@ -398,17 +482,19 @@ extern int set_filesize_limit (int blocks);
extern int user_busy (const char *name, uid_t uid); extern int user_busy (const char *name, uid_t uid);
/* utmp.c */ /* utmp.c */
#ifndef USE_UTMPX
extern /*@null@*/struct utmp *get_current_utmp (void); extern /*@null@*/struct utmp *get_current_utmp (void);
extern struct utmp *prepare_utmp (const char *name, extern struct utmp *prepare_utmp (const char *name,
const char *line, const char *line,
const char *host, const char *host,
/*@null@*/const struct utmp *ut); /*@null@*/const struct utmp *ut);
extern int setutmp (struct utmp *ut); extern int setutmp (struct utmp *ut);
#ifdef USE_UTMPX #else
extern /*@null@*/struct utmpx *get_current_utmp (void);
extern struct utmpx *prepare_utmpx (const char *name, extern struct utmpx *prepare_utmpx (const char *name,
const char *line, const char *line,
const char *host, const char *host,
/*@null@*/const struct utmp *ut); /*@null@*/const struct utmpx *ut);
extern int setutmpx (struct utmpx *utx); extern int setutmpx (struct utmpx *utx);
#endif /* USE_UTMPX */ #endif /* USE_UTMPX */
@@ -419,6 +505,7 @@ extern bool valid (const char *, const struct passwd *);
extern /*@maynotreturn@*/ /*@only@*//*@out@*//*@notnull@*/char *xmalloc (size_t size) extern /*@maynotreturn@*/ /*@only@*//*@out@*//*@notnull@*/char *xmalloc (size_t size)
/*@ensures MaxSet(result) == (size - 1); @*/; /*@ensures MaxSet(result) == (size - 1); @*/;
extern /*@maynotreturn@*/ /*@only@*//*@notnull@*/char *xstrdup (const char *); extern /*@maynotreturn@*/ /*@only@*//*@notnull@*/char *xstrdup (const char *);
extern void xfree(void *ap);
/* xgetpwnam.c */ /* xgetpwnam.c */
extern /*@null@*/ /*@only@*/struct passwd *xgetpwnam (const char *); extern /*@null@*/ /*@only@*/struct passwd *xgetpwnam (const char *);
+5 -1
View File
@@ -105,13 +105,17 @@ static struct commonio_db passwd_db = {
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
NULL, /* scontext */ NULL, /* scontext */
#endif #endif
0644, /* st_mode */
0, /* st_uid */
0, /* st_gid */
NULL, /* head */ NULL, /* head */
NULL, /* tail */ NULL, /* tail */
NULL, /* cursor */ NULL, /* cursor */
false, /* changed */ false, /* changed */
false, /* isopen */ false, /* isopen */
false, /* locked */ false, /* locked */
false /* readonly */ false, /* readonly */
false /* setname */
}; };
int pw_setdbname (const char *filename) int pw_setdbname (const char *filename)
+5 -15
View File
@@ -56,45 +56,35 @@
pw->pw_name = strdup (pwent->pw_name); pw->pw_name = strdup (pwent->pw_name);
/*@=mustfreeonly@*/ /*@=mustfreeonly@*/
if (NULL == pw->pw_name) { if (NULL == pw->pw_name) {
free(pw); pw_free(pw);
return NULL; return NULL;
} }
/*@-mustfreeonly@*/ /*@-mustfreeonly@*/
pw->pw_passwd = strdup (pwent->pw_passwd); pw->pw_passwd = strdup (pwent->pw_passwd);
/*@=mustfreeonly@*/ /*@=mustfreeonly@*/
if (NULL == pw->pw_passwd) { if (NULL == pw->pw_passwd) {
free(pw->pw_name); pw_free(pw);
free(pw);
return NULL; return NULL;
} }
/*@-mustfreeonly@*/ /*@-mustfreeonly@*/
pw->pw_gecos = strdup (pwent->pw_gecos); pw->pw_gecos = strdup (pwent->pw_gecos);
/*@=mustfreeonly@*/ /*@=mustfreeonly@*/
if (NULL == pw->pw_gecos) { if (NULL == pw->pw_gecos) {
free(pw->pw_passwd); pw_free(pw);
free(pw->pw_name);
free(pw);
return NULL; return NULL;
} }
/*@-mustfreeonly@*/ /*@-mustfreeonly@*/
pw->pw_dir = strdup (pwent->pw_dir); pw->pw_dir = strdup (pwent->pw_dir);
/*@=mustfreeonly@*/ /*@=mustfreeonly@*/
if (NULL == pw->pw_dir) { if (NULL == pw->pw_dir) {
free(pw->pw_gecos); pw_free(pw);
free(pw->pw_passwd);
free(pw->pw_name);
free(pw);
return NULL; return NULL;
} }
/*@-mustfreeonly@*/ /*@-mustfreeonly@*/
pw->pw_shell = strdup (pwent->pw_shell); pw->pw_shell = strdup (pwent->pw_shell);
/*@=mustfreeonly@*/ /*@=mustfreeonly@*/
if (NULL == pw->pw_shell) { if (NULL == pw->pw_shell) {
free(pw->pw_dir); pw_free(pw);
free(pw->pw_gecos);
free(pw->pw_passwd);
free(pw->pw_name);
free(pw);
return NULL; return NULL;
} }
+102
View File
@@ -0,0 +1,102 @@
#include <dirent.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <lib/prototypes.h>
int run_part (char *script_path, char *name, char *action)
{
int pid;
int wait_status;
int pid_status;
char *args[] = { script_path, NULL };
pid=fork();
if (pid==-1){
perror ("Could not fork");
return 1;
}
if (pid==0) {
setenv ("ACTION",action,1);
setenv ("SUBJECT",name,1);
execv (script_path,args);
perror ("execv");
exit(1);
}
pid_status = wait (&wait_status);
if (pid_status == pid) {
return (wait_status);
}
perror ("waitpid");
return (1);
}
int run_parts (char *directory, char *name, char *action)
{
struct dirent **namelist;
int scanlist;
int n;
int execute_result;
scanlist = scandir (directory, &namelist, 0, alphasort);
if (scanlist<0) {
return (0);
}
for (n=0; n<scanlist; n++) {
int path_length;
struct stat sb;
path_length=strlen(directory) + strlen(namelist[n]->d_name) + 2;
char *s = (char*)malloc(path_length);
if (!s) {
printf ("could not allocate memory\n");
for (; n<scanlist; n++) {
free (namelist[n]);
}
free (namelist);
return (1);
}
snprintf (s, path_length, "%s/%s", directory, namelist[n]->d_name);
execute_result = 0;
if (stat (s, &sb) == -1) {
perror ("stat");
free (s);
for (; n<scanlist; n++) {
free (namelist[n]);
}
free (namelist);
return (1);
}
if (S_ISREG (sb.st_mode) || S_ISLNK (sb.st_mode)) {
execute_result = run_part (s, name, action);
}
free (s);
if (execute_result!=0) {
fprintf (shadow_logfd,
"%s: did not exit cleanly.\n",
namelist[n]->d_name);
for (; n<scanlist; n++) {
free (namelist[n]);
}
break;
}
free (namelist[n]);
}
free (namelist);
return (execute_result);
}
+2
View File
@@ -0,0 +1,2 @@
int run_part (char *script_path, char *name, char *action);
int run_parts (char *directory, char *name, char *action);
+137 -14
View File
@@ -31,14 +31,24 @@
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
#include <stdio.h>
#include "defines.h" #include "defines.h"
#include <selinux/selinux.h> #include <selinux/selinux.h>
#include <selinux/label.h>
#include "prototypes.h" #include "prototypes.h"
static bool selinux_checked = false; static bool selinux_checked = false;
static bool selinux_enabled; static bool selinux_enabled;
static /*@null@*/struct selabel_handle *selabel_hnd = NULL;
static void cleanup(void)
{
if (selabel_hnd) {
selabel_close(selabel_hnd);
selabel_hnd = NULL;
}
}
/* /*
* set_selinux_file_context - Set the security context before any file or * set_selinux_file_context - Set the security context before any file or
@@ -50,10 +60,8 @@ static bool selinux_enabled;
* Callers may have to Reset SELinux to create files with default * Callers may have to Reset SELinux to create files with default
* contexts with reset_selinux_file_context * contexts with reset_selinux_file_context
*/ */
int set_selinux_file_context (const char *dst_name) int set_selinux_file_context (const char *dst_name, mode_t mode)
{ {
/*@null@*/security_context_t scontext = NULL;
if (!selinux_checked) { if (!selinux_checked) {
selinux_enabled = is_selinux_enabled () > 0; selinux_enabled = is_selinux_enabled () > 0;
selinux_checked = true; selinux_checked = true;
@@ -61,18 +69,34 @@ int set_selinux_file_context (const char *dst_name)
if (selinux_enabled) { if (selinux_enabled) {
/* Get the default security context for this file */ /* Get the default security context for this file */
if (matchpathcon (dst_name, 0, &scontext) < 0) {
if (security_getenforce () != 0) { /*@null@*/char *fcontext_raw = NULL;
return 1; int r;
if (selabel_hnd == NULL) {
selabel_hnd = selabel_open(SELABEL_CTX_FILE, NULL, 0);
if (selabel_hnd == NULL) {
return security_getenforce () != 0;
} }
(void) atexit(cleanup);
} }
r = selabel_lookup_raw(selabel_hnd, &fcontext_raw, dst_name, mode);
if (r < 0) {
/* No context specified for the searched path */
if (errno == ENOENT) {
return 0;
}
return security_getenforce () != 0;
}
/* Set the security context for the next created file */ /* Set the security context for the next created file */
if (setfscreatecon (scontext) < 0) { r = setfscreatecon_raw (fcontext_raw);
if (security_getenforce () != 0) { freecon (fcontext_raw);
return 1; if (r < 0) {
} return security_getenforce () != 0;
} }
freecon (scontext);
} }
return 0; return 0;
} }
@@ -91,13 +115,112 @@ int reset_selinux_file_context (void)
selinux_checked = true; selinux_checked = true;
} }
if (selinux_enabled) { if (selinux_enabled) {
if (setfscreatecon (NULL) != 0) { if (setfscreatecon_raw (NULL) != 0) {
return 1; return security_getenforce () != 0;
} }
} }
return 0; return 0;
} }
/*
* Log callback for libselinux internal error reporting.
*/
__attribute__((__format__ (printf, 2, 3)))
static int selinux_log_cb (int type, const char *fmt, ...) {
va_list ap;
char *buf;
int r;
#ifdef WITH_AUDIT
static int selinux_audit_fd = -2;
#endif
va_start (ap, fmt);
r = vasprintf (&buf, fmt, ap);
va_end (ap);
if (r < 0) {
return 0;
}
#ifdef WITH_AUDIT
if (-2 == selinux_audit_fd) {
selinux_audit_fd = audit_open ();
if (-1 == selinux_audit_fd) {
/* You get these only when the kernel doesn't have
* audit compiled in. */
if ( (errno != EINVAL)
&& (errno != EPROTONOSUPPORT)
&& (errno != EAFNOSUPPORT)) {
(void) fputs (_("Cannot open audit interface.\n"),
shadow_logfd);
SYSLOG ((LOG_WARN, "Cannot open audit interface."));
}
}
}
if (-1 != selinux_audit_fd) {
if (SELINUX_AVC == type) {
if (audit_log_user_avc_message (selinux_audit_fd,
AUDIT_USER_AVC, buf, NULL, NULL,
NULL, 0) > 0) {
goto skip_syslog;
}
} else if (SELINUX_ERROR == type) {
if (audit_log_user_avc_message (selinux_audit_fd,
AUDIT_USER_SELINUX_ERR, buf, NULL, NULL,
NULL, 0) > 0) {
goto skip_syslog;
}
}
}
#endif
SYSLOG ((LOG_WARN, "libselinux: %s", buf));
skip_syslog:
free (buf);
return 0;
}
/*
* check_selinux_permit - Check whether SELinux grants the given
* operation
*
* Parameter is the SELinux permission name, e.g. rootok
*
* Returns 0 when permission is granted
* or something failed but running in
* permissive mode
*/
int check_selinux_permit (const char *perm_name)
{
char *user_context_raw;
int r;
if (0 == is_selinux_enabled ()) {
return 0;
}
selinux_set_callback (SELINUX_CB_LOG, (union selinux_callback) selinux_log_cb);
if (getprevcon_raw (&user_context_raw) != 0) {
fprintf (shadow_logfd,
_("%s: can not get previous SELinux process context: %s\n"),
Prog, strerror (errno));
SYSLOG ((LOG_WARN,
"can not get previous SELinux process context: %s",
strerror (errno)));
return (security_getenforce () != 0);
}
r = selinux_check_access (user_context_raw, user_context_raw, "passwd", perm_name, NULL);
freecon (user_context_raw);
return r;
}
#else /* !WITH_SELINUX */ #else /* !WITH_SELINUX */
extern int errno; /* warning: ANSI C forbids an empty source file */ extern int errno; /* warning: ANSI C forbids an empty source file */
#endif /* !WITH_SELINUX */ #endif /* !WITH_SELINUX */
+29 -29
View File
@@ -69,7 +69,7 @@ static void semanage_error_callback (unused void *varg,
switch (semanage_msg_get_level (handle)) { switch (semanage_msg_get_level (handle)) {
case SEMANAGE_MSG_ERR: case SEMANAGE_MSG_ERR:
case SEMANAGE_MSG_WARN: case SEMANAGE_MSG_WARN:
fprintf (stderr, _("[libsemanage]: %s\n"), message); fprintf (shadow_logfd, _("[libsemanage]: %s\n"), message);
break; break;
case SEMANAGE_MSG_INFO: case SEMANAGE_MSG_INFO:
/* nop */ /* nop */
@@ -87,7 +87,7 @@ static semanage_handle_t *semanage_init (void)
handle = semanage_handle_create (); handle = semanage_handle_create ();
if (NULL == handle) { if (NULL == handle) {
fprintf (stderr, fprintf (shadow_logfd,
_("Cannot create SELinux management handle\n")); _("Cannot create SELinux management handle\n"));
return NULL; return NULL;
} }
@@ -96,26 +96,26 @@ static semanage_handle_t *semanage_init (void)
ret = semanage_is_managed (handle); ret = semanage_is_managed (handle);
if (ret != 1) { if (ret != 1) {
fprintf (stderr, _("SELinux policy not managed\n")); fprintf (shadow_logfd, _("SELinux policy not managed\n"));
goto fail; goto fail;
} }
ret = semanage_access_check (handle); ret = semanage_access_check (handle);
if (ret < SEMANAGE_CAN_READ) { if (ret < SEMANAGE_CAN_READ) {
fprintf (stderr, _("Cannot read SELinux policy store\n")); fprintf (shadow_logfd, _("Cannot read SELinux policy store\n"));
goto fail; goto fail;
} }
ret = semanage_connect (handle); ret = semanage_connect (handle);
if (ret != 0) { if (ret != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("Cannot establish SELinux management connection\n")); _("Cannot establish SELinux management connection\n"));
goto fail; goto fail;
} }
ret = semanage_begin_transaction (handle); ret = semanage_begin_transaction (handle);
if (ret != 0) { if (ret != 0) {
fprintf (stderr, _("Cannot begin SELinux transaction\n")); fprintf (shadow_logfd, _("Cannot begin SELinux transaction\n"));
goto fail; goto fail;
} }
@@ -137,7 +137,7 @@ static int semanage_user_mod (semanage_handle_t *handle,
semanage_seuser_query (handle, key, &seuser); semanage_seuser_query (handle, key, &seuser);
if (NULL == seuser) { if (NULL == seuser) {
fprintf (stderr, fprintf (shadow_logfd,
_("Could not query seuser for %s\n"), login_name); _("Could not query seuser for %s\n"), login_name);
ret = 1; ret = 1;
goto done; goto done;
@@ -145,7 +145,7 @@ static int semanage_user_mod (semanage_handle_t *handle,
ret = semanage_seuser_set_mlsrange (handle, seuser, DEFAULT_SERANGE); ret = semanage_seuser_set_mlsrange (handle, seuser, DEFAULT_SERANGE);
if (ret != 0) { if (ret != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("Could not set serange for %s\n"), login_name); _("Could not set serange for %s\n"), login_name);
ret = 1; ret = 1;
goto done; goto done;
@@ -153,7 +153,7 @@ static int semanage_user_mod (semanage_handle_t *handle,
ret = semanage_seuser_set_sename (handle, seuser, seuser_name); ret = semanage_seuser_set_sename (handle, seuser, seuser_name);
if (ret != 0) { if (ret != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("Could not set sename for %s\n"), _("Could not set sename for %s\n"),
login_name); login_name);
ret = 1; ret = 1;
@@ -162,7 +162,7 @@ static int semanage_user_mod (semanage_handle_t *handle,
ret = semanage_seuser_modify_local (handle, key, seuser); ret = semanage_seuser_modify_local (handle, key, seuser);
if (ret != 0) { if (ret != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("Could not modify login mapping for %s\n"), _("Could not modify login mapping for %s\n"),
login_name); login_name);
ret = 1; ret = 1;
@@ -186,7 +186,7 @@ static int semanage_user_add (semanage_handle_t *handle,
ret = semanage_seuser_create (handle, &seuser); ret = semanage_seuser_create (handle, &seuser);
if (ret != 0) { if (ret != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("Cannot create SELinux login mapping for %s\n"), _("Cannot create SELinux login mapping for %s\n"),
login_name); login_name);
ret = 1; ret = 1;
@@ -195,14 +195,14 @@ static int semanage_user_add (semanage_handle_t *handle,
ret = semanage_seuser_set_name (handle, seuser, login_name); ret = semanage_seuser_set_name (handle, seuser, login_name);
if (ret != 0) { if (ret != 0) {
fprintf (stderr, _("Could not set name for %s\n"), login_name); fprintf (shadow_logfd, _("Could not set name for %s\n"), login_name);
ret = 1; ret = 1;
goto done; goto done;
} }
ret = semanage_seuser_set_mlsrange (handle, seuser, DEFAULT_SERANGE); ret = semanage_seuser_set_mlsrange (handle, seuser, DEFAULT_SERANGE);
if (ret != 0) { if (ret != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("Could not set serange for %s\n"), _("Could not set serange for %s\n"),
login_name); login_name);
ret = 1; ret = 1;
@@ -211,7 +211,7 @@ static int semanage_user_add (semanage_handle_t *handle,
ret = semanage_seuser_set_sename (handle, seuser, seuser_name); ret = semanage_seuser_set_sename (handle, seuser, seuser_name);
if (ret != 0) { if (ret != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("Could not set SELinux user for %s\n"), _("Could not set SELinux user for %s\n"),
login_name); login_name);
ret = 1; ret = 1;
@@ -220,7 +220,7 @@ static int semanage_user_add (semanage_handle_t *handle,
ret = semanage_seuser_modify_local (handle, key, seuser); ret = semanage_seuser_modify_local (handle, key, seuser);
if (ret != 0) { if (ret != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("Could not add login mapping for %s\n"), _("Could not add login mapping for %s\n"),
login_name); login_name);
ret = 1; ret = 1;
@@ -248,21 +248,21 @@ int set_seuser (const char *login_name, const char *seuser_name)
handle = semanage_init (); handle = semanage_init ();
if (NULL == handle) { if (NULL == handle) {
fprintf (stderr, _("Cannot init SELinux management\n")); fprintf (shadow_logfd, _("Cannot init SELinux management\n"));
ret = 1; ret = 1;
goto done; goto done;
} }
ret = semanage_seuser_key_create (handle, login_name, &key); ret = semanage_seuser_key_create (handle, login_name, &key);
if (ret != 0) { if (ret != 0) {
fprintf (stderr, _("Cannot create SELinux user key\n")); fprintf (shadow_logfd, _("Cannot create SELinux user key\n"));
ret = 1; ret = 1;
goto done; goto done;
} }
ret = semanage_seuser_exists (handle, key, &seuser_exists); ret = semanage_seuser_exists (handle, key, &seuser_exists);
if (ret < 0) { if (ret < 0) {
fprintf (stderr, _("Cannot verify the SELinux user\n")); fprintf (shadow_logfd, _("Cannot verify the SELinux user\n"));
ret = 1; ret = 1;
goto done; goto done;
} }
@@ -270,7 +270,7 @@ int set_seuser (const char *login_name, const char *seuser_name)
if (0 != seuser_exists) { if (0 != seuser_exists) {
ret = semanage_user_mod (handle, key, login_name, seuser_name); ret = semanage_user_mod (handle, key, login_name, seuser_name);
if (ret != 0) { if (ret != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("Cannot modify SELinux user mapping\n")); _("Cannot modify SELinux user mapping\n"));
ret = 1; ret = 1;
goto done; goto done;
@@ -278,7 +278,7 @@ int set_seuser (const char *login_name, const char *seuser_name)
} else { } else {
ret = semanage_user_add (handle, key, login_name, seuser_name); ret = semanage_user_add (handle, key, login_name, seuser_name);
if (ret != 0) { if (ret != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("Cannot add SELinux user mapping\n")); _("Cannot add SELinux user mapping\n"));
ret = 1; ret = 1;
goto done; goto done;
@@ -287,7 +287,7 @@ int set_seuser (const char *login_name, const char *seuser_name)
ret = semanage_commit (handle); ret = semanage_commit (handle);
if (ret < 0) { if (ret < 0) {
fprintf (stderr, _("Cannot commit SELinux transaction\n")); fprintf (shadow_logfd, _("Cannot commit SELinux transaction\n"));
ret = 1; ret = 1;
goto done; goto done;
} }
@@ -310,27 +310,27 @@ int del_seuser (const char *login_name)
handle = semanage_init (); handle = semanage_init ();
if (NULL == handle) { if (NULL == handle) {
fprintf (stderr, _("Cannot init SELinux management\n")); fprintf (shadow_logfd, _("Cannot init SELinux management\n"));
ret = 1; ret = 1;
goto done; goto done;
} }
ret = semanage_seuser_key_create (handle, login_name, &key); ret = semanage_seuser_key_create (handle, login_name, &key);
if (ret != 0) { if (ret != 0) {
fprintf (stderr, _("Cannot create SELinux user key\n")); fprintf (shadow_logfd, _("Cannot create SELinux user key\n"));
ret = 1; ret = 1;
goto done; goto done;
} }
ret = semanage_seuser_exists (handle, key, &exists); ret = semanage_seuser_exists (handle, key, &exists);
if (ret < 0) { if (ret < 0) {
fprintf (stderr, _("Cannot verify the SELinux user\n")); fprintf (shadow_logfd, _("Cannot verify the SELinux user\n"));
ret = 1; ret = 1;
goto done; goto done;
} }
if (0 == exists) { if (0 == exists) {
fprintf (stderr, fprintf (shadow_logfd,
_("Login mapping for %s is not defined, OK if default mapping was used\n"), _("Login mapping for %s is not defined, OK if default mapping was used\n"),
login_name); login_name);
ret = 0; /* probably default mapping */ ret = 0; /* probably default mapping */
@@ -339,13 +339,13 @@ int del_seuser (const char *login_name)
ret = semanage_seuser_exists_local (handle, key, &exists); ret = semanage_seuser_exists_local (handle, key, &exists);
if (ret < 0) { if (ret < 0) {
fprintf (stderr, _("Cannot verify the SELinux user\n")); fprintf (shadow_logfd, _("Cannot verify the SELinux user\n"));
ret = 1; ret = 1;
goto done; goto done;
} }
if (0 == exists) { if (0 == exists) {
fprintf (stderr, fprintf (shadow_logfd,
_("Login mapping for %s is defined in policy, cannot be deleted\n"), _("Login mapping for %s is defined in policy, cannot be deleted\n"),
login_name); login_name);
ret = 0; /* Login mapping defined in policy can't be deleted */ ret = 0; /* Login mapping defined in policy can't be deleted */
@@ -354,7 +354,7 @@ int del_seuser (const char *login_name)
ret = semanage_seuser_del_local (handle, key); ret = semanage_seuser_del_local (handle, key);
if (ret != 0) { if (ret != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("Could not delete login mapping for %s"), _("Could not delete login mapping for %s"),
login_name); login_name);
ret = 1; ret = 1;
@@ -363,7 +363,7 @@ int del_seuser (const char *login_name)
ret = semanage_commit (handle); ret = semanage_commit (handle);
if (ret < 0) { if (ret < 0) {
fprintf (stderr, _("Cannot commit SELinux transaction\n")); fprintf (shadow_logfd, _("Cannot commit SELinux transaction\n"));
ret = 1; ret = 1;
goto done; goto done;
} }
+1 -1
View File
@@ -136,7 +136,7 @@ struct group *sgetgrent (const char *buf)
cp++; cp++;
} }
} }
if (i < (NFIELDS - 1) || *grpfields[2] == '\0') { if (i < (NFIELDS - 1) || *grpfields[2] == '\0' || cp != NULL) {
return (struct group *) 0; return (struct group *) 0;
} }
grent.gr_name = grpfields[0]; grent.gr_name = grpfields[0];
+5
View File
@@ -90,6 +90,11 @@ struct passwd *sgetpwent (const char *buf)
} }
} }
/* something at the end, columns over shot */
if( cp != NULL ) {
return( NULL );
}
/* /*
* There must be exactly NFIELDS colon separated fields or * There must be exactly NFIELDS colon separated fields or
* the entry is invalid. Also, the UID and GID must be non-blank. * the entry is invalid. Also, the UID and GID must be non-blank.
-1
View File
@@ -52,7 +52,6 @@ struct spwd *sgetspent (const char *string)
static struct spwd spwd; static struct spwd spwd;
char *fields[FIELDS]; char *fields[FIELDS];
char *cp; char *cp;
char *cpp;
int i; int i;
/* /*
+8 -1
View File
@@ -40,6 +40,7 @@
#include "prototypes.h" #include "prototypes.h"
#include "defines.h" #include "defines.h"
#include "commonio.h" #include "commonio.h"
#include "getdef.h"
#include "sgroupio.h" #include "sgroupio.h"
/*@null@*/ /*@only@*/struct sgrp *__sgr_dup (const struct sgrp *sgent) /*@null@*/ /*@only@*/struct sgrp *__sgr_dup (const struct sgrp *sgent)
@@ -228,13 +229,17 @@ static struct commonio_db gshadow_db = {
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
NULL, /* scontext */ NULL, /* scontext */
#endif #endif
0400, /* st_mode */
0, /* st_uid */
0, /* st_gid */
NULL, /* head */ NULL, /* head */
NULL, /* tail */ NULL, /* tail */
NULL, /* cursor */ NULL, /* cursor */
false, /* changed */ false, /* changed */
false, /* isopen */ false, /* isopen */
false, /* locked */ false, /* locked */
false /* readonly */ false, /* readonly */
false /* setname */
}; };
int sgr_setdbname (const char *filename) int sgr_setdbname (const char *filename)
@@ -249,6 +254,8 @@ int sgr_setdbname (const char *filename)
bool sgr_file_present (void) bool sgr_file_present (void)
{ {
if (getdef_bool ("FORCE_SHADOW"))
return true;
return commonio_present (&gshadow_db); return commonio_present (&gshadow_db);
} }
-3
View File
@@ -130,7 +130,6 @@ static struct spwd *my_sgetspent (const char *string)
static struct spwd spwd; static struct spwd spwd;
char *fields[FIELDS]; char *fields[FIELDS];
char *cp; char *cp;
char *cpp;
int i; int i;
/* /*
@@ -389,7 +388,6 @@ struct spwd *getspent (void)
#ifdef USE_NIS #ifdef USE_NIS
int nis_1_user = 0; int nis_1_user = 0;
struct spwd *val; struct spwd *val;
char buf[BUFSIZ];
#endif #endif
if (NULL == shadow) { if (NULL == shadow) {
setspent (); setspent ();
@@ -484,7 +482,6 @@ struct spwd *getspnam (const char *name)
struct spwd *sp; struct spwd *sp;
#ifdef USE_NIS #ifdef USE_NIS
char buf[BUFSIZ];
static char save_name[16]; static char save_name[16];
bool nis_disabled = false; bool nis_disabled = false;
#endif #endif
+8 -1
View File
@@ -40,6 +40,7 @@
#include <shadow.h> #include <shadow.h>
#include <stdio.h> #include <stdio.h>
#include "commonio.h" #include "commonio.h"
#include "getdef.h"
#include "shadowio.h" #include "shadowio.h"
#ifdef WITH_TCB #ifdef WITH_TCB
#include <tcb.h> #include <tcb.h>
@@ -104,13 +105,17 @@ static struct commonio_db shadow_db = {
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
NULL, /* scontext */ NULL, /* scontext */
#endif /* WITH_SELINUX */ #endif /* WITH_SELINUX */
0400, /* st_mode */
0, /* st_uid */
0, /* st_gid */
NULL, /* head */ NULL, /* head */
NULL, /* tail */ NULL, /* tail */
NULL, /* cursor */ NULL, /* cursor */
false, /* changed */ false, /* changed */
false, /* isopen */ false, /* isopen */
false, /* locked */ false, /* locked */
false /* readonly */ false, /* readonly */
false /* setname */
}; };
int spw_setdbname (const char *filename) int spw_setdbname (const char *filename)
@@ -125,6 +130,8 @@ int spw_setdbname (const char *filename)
bool spw_file_present (void) bool spw_file_present (void)
{ {
if (getdef_bool ("FORCE_SHADOW"))
return true;
return commonio_present (&shadow_db); return commonio_present (&shadow_db);
} }
+2 -2
View File
@@ -31,8 +31,8 @@
*/ */
/* $Id$ */ /* $Id$ */
#ifndef _SHADOWIO_H #ifndef SHADOWIO_H
#define _SHADOWIO_H #define SHADOWIO_H
#include "defines.h" #include "defines.h"
+7 -5
View File
@@ -48,7 +48,7 @@ int run_command (const char *cmd, const char *argv[],
} }
(void) fflush (stdout); (void) fflush (stdout);
(void) fflush (stderr); (void) fflush (shadow_logfd);
pid = fork (); pid = fork ();
if (0 == pid) { if (0 == pid) {
@@ -57,22 +57,24 @@ int run_command (const char *cmd, const char *argv[],
if (ENOENT == errno) { if (ENOENT == errno) {
exit (E_CMD_NOTFOUND); exit (E_CMD_NOTFOUND);
} }
fprintf (stderr, "%s: cannot execute %s: %s\n", fprintf (shadow_logfd, "%s: cannot execute %s: %s\n",
Prog, cmd, strerror (errno)); Prog, cmd, strerror (errno));
exit (E_CMD_NOEXEC); exit (E_CMD_NOEXEC);
} else if ((pid_t)-1 == pid) { } else if ((pid_t)-1 == pid) {
fprintf (stderr, "%s: cannot execute %s: %s\n", fprintf (shadow_logfd, "%s: cannot execute %s: %s\n",
Prog, cmd, strerror (errno)); Prog, cmd, strerror (errno));
return -1; return -1;
} }
do { do {
wpid = waitpid (pid, status, 0); wpid = waitpid (pid, status, 0);
if ((pid_t)-1 == wpid && errno == ECHILD)
break;
} while ( ((pid_t)-1 == wpid && errno == EINTR) } while ( ((pid_t)-1 == wpid && errno == EINTR)
|| (wpid != pid)); || ((pid_t)-1 != wpid && wpid != pid));
if ((pid_t)-1 == wpid) { if ((pid_t)-1 == wpid) {
fprintf (stderr, "%s: waitpid (status: %d): %s\n", fprintf (shadow_logfd, "%s: waitpid (status: %d): %s\n",
Prog, *status, strerror (errno)); Prog, *status, strerror (errno));
return -1; return -1;
} }
+73
View File
@@ -0,0 +1,73 @@
/* Author: Peter Vrabec <pvrabec@redhat.com> */
#include <config.h>
#ifdef USE_SSSD
#include <stdio.h>
#include <sys/wait.h>
#include <sys/types.h>
#include "exitcodes.h"
#include "defines.h"
#include "prototypes.h"
#include "sssd.h"
#define MSG_SSSD_FLUSH_CACHE_FAILED "%s: Failed to flush the sssd cache."
int sssd_flush_cache (int dbflags)
{
int status, code, rv;
const char *cmd = "/usr/sbin/sss_cache";
char *sss_cache_args = NULL;
const char *spawnedArgs[] = {"sss_cache", NULL, NULL};
const char *spawnedEnv[] = {NULL};
int i = 0;
sss_cache_args = malloc(4);
if (sss_cache_args == NULL) {
return -1;
}
sss_cache_args[i++] = '-';
if (dbflags & SSSD_DB_PASSWD) {
sss_cache_args[i++] = 'U';
}
if (dbflags & SSSD_DB_GROUP) {
sss_cache_args[i++] = 'G';
}
sss_cache_args[i++] = '\0';
if (i == 2) {
/* Neither passwd nor group, nothing to do */
free(sss_cache_args);
return 0;
}
spawnedArgs[1] = sss_cache_args;
rv = run_command (cmd, spawnedArgs, spawnedEnv, &status);
free(sss_cache_args);
if (rv != 0) {
/* run_command writes its own more detailed message. */
SYSLOG ((LOG_WARN, MSG_SSSD_FLUSH_CACHE_FAILED, Prog));
return -1;
}
code = WEXITSTATUS (status);
if (!WIFEXITED (status)) {
SYSLOG ((LOG_WARN, "%s: sss_cache did not terminate normally (signal %d)",
Prog, WTERMSIG (status)));
return -1;
} else if (code == E_CMD_NOTFOUND) {
/* sss_cache is not installed, or it is installed but uses an
interpreter that is missing. Probably the former. */
return 0;
} else if (code != 0) {
SYSLOG ((LOG_WARN, "%s: sss_cache exited with status %d", Prog, code));
SYSLOG ((LOG_WARN, MSG_SSSD_FLUSH_CACHE_FAILED, Prog));
return -1;
}
return 0;
}
#else /* USE_SSSD */
extern int errno; /* warning: ANSI C forbids an empty source file */
#endif /* USE_SSSD */
+17
View File
@@ -0,0 +1,17 @@
#ifndef _SSSD_H_
#define _SSSD_H_
#define SSSD_DB_PASSWD 0x001
#define SSSD_DB_GROUP 0x002
/*
* sssd_flush_cache - flush specified service buffer in sssd cache
*/
#ifdef USE_SSSD
extern int sssd_flush_cache (int dbflags);
#else
#define sssd_flush_cache(service) (0)
#endif
#endif
+461 -23
View File
@@ -11,14 +11,11 @@
#include <stdio.h> #include <stdio.h>
#include "commonio.h" #include "commonio.h"
#include "subordinateio.h" #include "subordinateio.h"
#include "../libsubid/subid.h"
struct subordinate_range { #include <sys/types.h>
const char *owner; #include <pwd.h>
unsigned long start; #include <ctype.h>
unsigned long count; #include <fcntl.h>
};
#define NFIELDS 3
/* /*
* subordinate_dup: create a duplicate range * subordinate_dup: create a duplicate range
@@ -76,7 +73,7 @@ static void *subordinate_parse (const char *line)
static char rangebuf[1024]; static char rangebuf[1024];
int i; int i;
char *cp; char *cp;
char *fields[NFIELDS]; char *fields[SUBID_NFIELDS];
/* /*
* Copy the string to a temporary buffer so the substrings can * Copy the string to a temporary buffer so the substrings can
@@ -91,7 +88,7 @@ static void *subordinate_parse (const char *line)
* field. The fields are converted into NUL terminated strings. * field. The fields are converted into NUL terminated strings.
*/ */
for (cp = rangebuf, i = 0; (i < NFIELDS) && (NULL != cp); i++) { for (cp = rangebuf, i = 0; (i < SUBID_NFIELDS) && (NULL != cp); i++) {
fields[i] = cp; fields[i] = cp;
while (('\0' != *cp) && (':' != *cp)) { while (('\0' != *cp) && (':' != *cp)) {
cp++; cp++;
@@ -106,10 +103,10 @@ static void *subordinate_parse (const char *line)
} }
/* /*
* There must be exactly NFIELDS colon separated fields or * There must be exactly SUBID_NFIELDS colon separated fields or
* the entry is invalid. Also, fields must be non-blank. * the entry is invalid. Also, fields must be non-blank.
*/ */
if (i != NFIELDS || *fields[0] == '\0' || *fields[1] == '\0' || *fields[2] == '\0') if (i != SUBID_NFIELDS || *fields[0] == '\0' || *fields[1] == '\0' || *fields[2] == '\0')
return NULL; return NULL;
range.owner = fields[0]; range.owner = fields[0];
if (getulong (fields[1], &range.start) == 0) if (getulong (fields[1], &range.start) == 0)
@@ -150,11 +147,6 @@ static struct commonio_ops subordinate_ops = {
NULL, /* close_hook */ NULL, /* close_hook */
}; };
static /*@observer@*/ /*@null*/const struct subordinate_range *subordinate_next(struct commonio_db *db)
{
return (const struct subordinate_range *)commonio_next (db);
}
/* /*
* range_exists: Check whether @owner owns any ranges * range_exists: Check whether @owner owns any ranges
* *
@@ -179,7 +171,7 @@ static const bool range_exists(struct commonio_db *db, const char *owner)
* subuid @val. * subuid @val.
* *
* @db: database to query * @db: database to query
* @owner: owning uid being queuried * @owner: owning uid being queried
* @val: subuid being searched for. * @val: subuid being searched for.
* *
* Returns a range of subuids belonging to @owner and including the subuid * Returns a range of subuids belonging to @owner and including the subuid
@@ -189,6 +181,15 @@ static const struct subordinate_range *find_range(struct commonio_db *db,
const char *owner, unsigned long val) const char *owner, unsigned long val)
{ {
const struct subordinate_range *range; const struct subordinate_range *range;
/*
* Search for exact username/group specification
*
* This is the original method - go fast through the db, doing only
* exact username/group string comparison. Therefore we leave it as-is
* for the time being, in order to keep it equally fast as it was
* before.
*/
commonio_rewind(db); commonio_rewind(db);
while ((range = commonio_next(db)) != NULL) { while ((range = commonio_next(db)) != NULL) {
unsigned long first = range->start; unsigned long first = range->start;
@@ -200,6 +201,76 @@ static const struct subordinate_range *find_range(struct commonio_db *db,
if ((val >= first) && (val <= last)) if ((val >= first) && (val <= last))
return range; return range;
} }
/*
* We only do special handling for these two files
*/
if ((0 != strcmp(db->filename, "/etc/subuid")) && (0 != strcmp(db->filename, "/etc/subgid")))
return NULL;
/*
* Search loop above did not produce any result. Let's rerun it,
* but this time try to match actual UIDs. The first entry that
* matches is considered a success.
* (It may be specified as literal UID or as another username which
* has the same UID as the username we are looking for.)
*/
struct passwd *pwd;
uid_t owner_uid;
char owner_uid_string[33] = "";
/* Get UID of the username we are looking for */
pwd = getpwnam(owner);
if (NULL == pwd) {
/* Username not defined in /etc/passwd, or error occured during lookup */
return NULL;
}
owner_uid = pwd->pw_uid;
sprintf(owner_uid_string, "%lu", (unsigned long int)owner_uid);
commonio_rewind(db);
while ((range = commonio_next(db)) != NULL) {
unsigned long first = range->start;
unsigned long last = first + range->count - 1;
/* For performance reasons check range before using getpwnam() */
if ((val < first) || (val > last)) {
continue;
}
/*
* Range matches. Check if range owner is specified
* as numeric UID and if it matches.
*/
if (0 == strcmp(range->owner, owner_uid_string)) {
return range;
}
/*
* Ok, this range owner is not specified as numeric UID
* we are looking for. It may be specified as another
* UID or as a literal username.
*
* If specified as another UID, the call to getpwnam()
* will return NULL.
*
* If specified as literal username, we will get its
* UID and compare that to UID we are looking for.
*/
const struct passwd *range_owner_pwd;
range_owner_pwd = getpwnam(range->owner);
if (NULL == range_owner_pwd) {
continue;
}
if (owner_uid == range_owner_pwd->pw_uid) {
return range;
}
}
return NULL; return NULL;
} }
@@ -238,6 +309,35 @@ static bool have_range(struct commonio_db *db,
return false; return false;
} }
static bool append_range(struct subid_range **ranges, const struct subordinate_range *new, int n)
{
if (!*ranges) {
*ranges = malloc(sizeof(struct subid_range));
if (!*ranges)
return false;
} else {
struct subid_range *alloced;
alloced = realloc(*ranges, (n + 1) * (sizeof(struct subid_range)));
if (!alloced)
return false;
*ranges = alloced;
}
(*ranges)[n].start = new->start;
(*ranges)[n].count = new->count;
return true;
}
void free_subordinate_ranges(struct subordinate_range **ranges, int count)
{
int i;
if (!ranges)
return;
for (i = 0; i < count; i++)
subordinate_free(ranges[i]);
free(ranges);
}
/* /*
* subordinate_range_cmp: compare uid ranges * subordinate_range_cmp: compare uid ranges
* *
@@ -337,7 +437,7 @@ fail:
* @start: the first uid in the owned range * @start: the first uid in the owned range
* @count: the number of uids in the range * @count: the number of uids in the range
* *
* Return 1 if the range is already present or on succcess. On error * Return 1 if the range is already present or on success. On error
* return 0 and set errno appropriately. * return 0 and set errno appropriately.
*/ */
static int add_range(struct commonio_db *db, static int add_range(struct commonio_db *db,
@@ -460,13 +560,17 @@ static struct commonio_db subordinate_uid_db = {
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
NULL, /* scontext */ NULL, /* scontext */
#endif #endif
0644, /* st_mode */
0, /* st_uid */
0, /* st_gid */
NULL, /* head */ NULL, /* head */
NULL, /* tail */ NULL, /* tail */
NULL, /* cursor */ NULL, /* cursor */
false, /* changed */ false, /* changed */
false, /* isopen */ false, /* isopen */
false, /* locked */ false, /* locked */
false /* readonly */ false, /* readonly */
false /* setname */
}; };
int sub_uid_setdbname (const char *filename) int sub_uid_setdbname (const char *filename)
@@ -494,23 +598,37 @@ int sub_uid_open (int mode)
return commonio_open (&subordinate_uid_db, mode); return commonio_open (&subordinate_uid_db, mode);
} }
bool sub_uid_assigned(const char *owner) bool local_sub_uid_assigned(const char *owner)
{ {
return range_exists (&subordinate_uid_db, owner); return range_exists (&subordinate_uid_db, owner);
} }
bool have_sub_uids(const char *owner, uid_t start, unsigned long count) bool have_sub_uids(const char *owner, uid_t start, unsigned long count)
{ {
struct subid_nss_ops *h;
bool found;
enum subid_status status;
h = get_subid_nss_handle();
if (h) {
status = h->has_range(owner, start, count, ID_TYPE_UID, &found);
if (status == SUBID_STATUS_SUCCESS && found)
return true;
return false;
}
return have_range (&subordinate_uid_db, owner, start, count); return have_range (&subordinate_uid_db, owner, start, count);
} }
int sub_uid_add (const char *owner, uid_t start, unsigned long count) int sub_uid_add (const char *owner, uid_t start, unsigned long count)
{ {
if (get_subid_nss_handle())
return -EOPNOTSUPP;
return add_range (&subordinate_uid_db, owner, start, count); return add_range (&subordinate_uid_db, owner, start, count);
} }
int sub_uid_remove (const char *owner, uid_t start, unsigned long count) int sub_uid_remove (const char *owner, uid_t start, unsigned long count)
{ {
if (get_subid_nss_handle())
return -EOPNOTSUPP;
return remove_range (&subordinate_uid_db, owner, start, count); return remove_range (&subordinate_uid_db, owner, start, count);
} }
@@ -538,13 +656,17 @@ static struct commonio_db subordinate_gid_db = {
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
NULL, /* scontext */ NULL, /* scontext */
#endif #endif
0644, /* st_mode */
0, /* st_uid */
0, /* st_gid */
NULL, /* head */ NULL, /* head */
NULL, /* tail */ NULL, /* tail */
NULL, /* cursor */ NULL, /* cursor */
false, /* changed */ false, /* changed */
false, /* isopen */ false, /* isopen */
false, /* locked */ false, /* locked */
false /* readonly */ false, /* readonly */
false /* setname */
}; };
int sub_gid_setdbname (const char *filename) int sub_gid_setdbname (const char *filename)
@@ -574,21 +696,35 @@ int sub_gid_open (int mode)
bool have_sub_gids(const char *owner, gid_t start, unsigned long count) bool have_sub_gids(const char *owner, gid_t start, unsigned long count)
{ {
struct subid_nss_ops *h;
bool found;
enum subid_status status;
h = get_subid_nss_handle();
if (h) {
status = h->has_range(owner, start, count, ID_TYPE_GID, &found);
if (status == SUBID_STATUS_SUCCESS && found)
return true;
return false;
}
return have_range(&subordinate_gid_db, owner, start, count); return have_range(&subordinate_gid_db, owner, start, count);
} }
bool sub_gid_assigned(const char *owner) bool local_sub_gid_assigned(const char *owner)
{ {
return range_exists (&subordinate_gid_db, owner); return range_exists (&subordinate_gid_db, owner);
} }
int sub_gid_add (const char *owner, gid_t start, unsigned long count) int sub_gid_add (const char *owner, gid_t start, unsigned long count)
{ {
if (get_subid_nss_handle())
return -EOPNOTSUPP;
return add_range (&subordinate_gid_db, owner, start, count); return add_range (&subordinate_gid_db, owner, start, count);
} }
int sub_gid_remove (const char *owner, gid_t start, unsigned long count) int sub_gid_remove (const char *owner, gid_t start, unsigned long count)
{ {
if (get_subid_nss_handle())
return -EOPNOTSUPP;
return remove_range (&subordinate_gid_db, owner, start, count); return remove_range (&subordinate_gid_db, owner, start, count);
} }
@@ -608,6 +744,308 @@ gid_t sub_gid_find_free_range(gid_t min, gid_t max, unsigned long count)
start = find_free_range (&subordinate_gid_db, min, max, count); start = find_free_range (&subordinate_gid_db, min, max, count);
return start == ULONG_MAX ? (gid_t) -1 : start; return start == ULONG_MAX ? (gid_t) -1 : start;
} }
/*
* int list_owner_ranges(const char *owner, enum subid_type id_type, struct subordinate_range ***ranges)
*
* @owner: username
* @id_type: UID or GUID
* @ranges: pointer to array of ranges into which results will be placed.
*
* Fills in the subuid or subgid ranges which are owned by the specified
* user. Username may be a username or a string representation of a
* UID number. If id_type is UID, then subuids are returned, else
* subgids are given.
* Returns the number of ranges found, or < 0 on error.
*
* The caller must free the subordinate range list.
*/
int list_owner_ranges(const char *owner, enum subid_type id_type, struct subid_range **in_ranges)
{
// TODO - need to handle owner being either uid or username
struct subid_range *ranges = NULL;
const struct subordinate_range *range;
struct commonio_db *db;
enum subid_status status;
int count = 0;
struct subid_nss_ops *h;
*in_ranges = NULL;
h = get_subid_nss_handle();
if (h) {
status = h->list_owner_ranges(owner, id_type, in_ranges, &count);
if (status == SUBID_STATUS_SUCCESS)
return count;
return -1;
}
switch (id_type) {
case ID_TYPE_UID:
if (!sub_uid_open(O_RDONLY)) {
return -1;
}
db = &subordinate_uid_db;
break;
case ID_TYPE_GID:
if (!sub_gid_open(O_RDONLY)) {
return -1;
}
db = &subordinate_gid_db;
break;
default:
return -1;
}
commonio_rewind(db);
while ((range = commonio_next(db)) != NULL) {
if (0 == strcmp(range->owner, owner)) {
if (!append_range(&ranges, range, count++)) {
free(ranges);
ranges = NULL;
count = -1;
goto out;
}
}
}
out:
if (id_type == ID_TYPE_UID)
sub_uid_close();
else
sub_gid_close();
*in_ranges = ranges;
return count;
}
static bool all_digits(const char *str)
{
int i;
for (i = 0; str[i] != '\0'; i++)
if (!isdigit(str[i]))
return false;
return true;
}
static int append_uids(uid_t **uids, const char *owner, int n)
{
uid_t owner_uid;
uid_t *ret;
int i;
if (all_digits(owner)) {
i = sscanf(owner, "%d", &owner_uid);
if (i != 1) {
// should not happen
free(*uids);
*uids = NULL;
return -1;
}
} else {
struct passwd *pwd = getpwnam(owner);
if (NULL == pwd) {
/* Username not defined in /etc/passwd, or error occured during lookup */
free(*uids);
*uids = NULL;
return -1;
}
owner_uid = pwd->pw_uid;
}
for (i = 0; i < n; i++) {
if (owner_uid == (*uids)[i])
return n;
}
ret = realloc(*uids, (n + 1) * sizeof(uid_t));
if (!ret) {
free(*uids);
return -1;
}
ret[n] = owner_uid;
*uids = ret;
return n+1;
}
int find_subid_owners(unsigned long id, enum subid_type id_type, uid_t **uids)
{
const struct subordinate_range *range;
struct subid_nss_ops *h;
enum subid_status status;
struct commonio_db *db;
int n = 0;
h = get_subid_nss_handle();
if (h) {
status = h->find_subid_owners(id, id_type, uids, &n);
// Several ways we could handle the error cases here.
if (status != SUBID_STATUS_SUCCESS)
return -1;
return n;
}
switch (id_type) {
case ID_TYPE_UID:
if (!sub_uid_open(O_RDONLY)) {
return -1;
}
db = &subordinate_uid_db;
break;
case ID_TYPE_GID:
if (!sub_gid_open(O_RDONLY)) {
return -1;
}
db = &subordinate_gid_db;
break;
default:
return -1;
}
*uids = NULL;
commonio_rewind(db);
while ((range = commonio_next(db)) != NULL) {
if (id >= range->start && id < range->start + range-> count) {
n = append_uids(uids, range->owner, n);
if (n < 0)
break;
}
}
if (id_type == ID_TYPE_UID)
sub_uid_close();
else
sub_gid_close();
return n;
}
bool new_subid_range(struct subordinate_range *range, enum subid_type id_type, bool reuse)
{
struct commonio_db *db;
const struct subordinate_range *r;
bool ret;
if (get_subid_nss_handle())
return false;
switch (id_type) {
case ID_TYPE_UID:
if (!sub_uid_lock()) {
printf("Failed loging subuids (errno %d)\n", errno);
return false;
}
if (!sub_uid_open(O_CREAT | O_RDWR)) {
printf("Failed opening subuids (errno %d)\n", errno);
sub_uid_unlock();
return false;
}
db = &subordinate_uid_db;
break;
case ID_TYPE_GID:
if (!sub_gid_lock()) {
printf("Failed loging subgids (errno %d)\n", errno);
return false;
}
if (!sub_gid_open(O_CREAT | O_RDWR)) {
printf("Failed opening subgids (errno %d)\n", errno);
sub_gid_unlock();
return false;
}
db = &subordinate_gid_db;
break;
default:
return false;
}
commonio_rewind(db);
if (reuse) {
while ((r = commonio_next(db)) != NULL) {
// TODO account for username vs uid_t
if (0 != strcmp(r->owner, range->owner))
continue;
if (r->count >= range->count) {
range->count = r->count;
range->start = r->start;
return true;
}
}
}
range->start = find_free_range(db, range->start, ULONG_MAX, range->count);
if (range->start == ULONG_MAX) {
ret = false;
goto out;
}
ret = add_range(db, range->owner, range->start, range->count) == 1;
out:
if (id_type == ID_TYPE_UID) {
sub_uid_close();
sub_uid_unlock();
} else {
sub_gid_close();
sub_gid_unlock();
}
return ret;
}
bool release_subid_range(struct subordinate_range *range, enum subid_type id_type)
{
struct commonio_db *db;
bool ret;
if (get_subid_nss_handle())
return false;
switch (id_type) {
case ID_TYPE_UID:
if (!sub_uid_lock()) {
printf("Failed loging subuids (errno %d)\n", errno);
return false;
}
if (!sub_uid_open(O_CREAT | O_RDWR)) {
printf("Failed opening subuids (errno %d)\n", errno);
sub_uid_unlock();
return false;
}
db = &subordinate_uid_db;
break;
case ID_TYPE_GID:
if (!sub_gid_lock()) {
printf("Failed loging subgids (errno %d)\n", errno);
return false;
}
if (!sub_gid_open(O_CREAT | O_RDWR)) {
printf("Failed opening subgids (errno %d)\n", errno);
sub_gid_unlock();
return false;
}
db = &subordinate_gid_db;
break;
default:
return false;
}
ret = remove_range(db, range->owner, range->start, range->count) == 1;
if (id_type == ID_TYPE_UID) {
sub_uid_close();
sub_uid_unlock();
} else {
sub_gid_close();
sub_gid_unlock();
}
return ret;
}
#else /* !ENABLE_SUBIDS */ #else /* !ENABLE_SUBIDS */
extern int errno; /* warning: ANSI C forbids an empty source file */ extern int errno; /* warning: ANSI C forbids an empty source file */
#endif /* !ENABLE_SUBIDS */ #endif /* !ENABLE_SUBIDS */
+9 -2
View File
@@ -11,10 +11,12 @@
#include <sys/types.h> #include <sys/types.h>
#include "../libsubid/subid.h"
extern int sub_uid_close(void); extern int sub_uid_close(void);
extern bool have_sub_uids(const char *owner, uid_t start, unsigned long count); extern bool have_sub_uids(const char *owner, uid_t start, unsigned long count);
extern bool sub_uid_file_present (void); extern bool sub_uid_file_present (void);
extern bool sub_uid_assigned(const char *owner); extern bool local_sub_uid_assigned(const char *owner);
extern int sub_uid_lock (void); extern int sub_uid_lock (void);
extern int sub_uid_setdbname (const char *filename); extern int sub_uid_setdbname (const char *filename);
extern /*@observer@*/const char *sub_uid_dbname (void); extern /*@observer@*/const char *sub_uid_dbname (void);
@@ -23,11 +25,16 @@ extern int sub_uid_unlock (void);
extern int sub_uid_add (const char *owner, uid_t start, unsigned long count); extern int sub_uid_add (const char *owner, uid_t start, unsigned long count);
extern int sub_uid_remove (const char *owner, uid_t start, unsigned long count); extern int sub_uid_remove (const char *owner, uid_t start, unsigned long count);
extern uid_t sub_uid_find_free_range(uid_t min, uid_t max, unsigned long count); extern uid_t sub_uid_find_free_range(uid_t min, uid_t max, unsigned long count);
extern int list_owner_ranges(const char *owner, enum subid_type id_type, struct subid_range **ranges);
extern bool new_subid_range(struct subordinate_range *range, enum subid_type id_type, bool reuse);
extern bool release_subid_range(struct subordinate_range *range, enum subid_type id_type);
extern int find_subid_owners(unsigned long id, enum subid_type id_type, uid_t **uids);
extern void free_subordinate_ranges(struct subordinate_range **ranges, int count);
extern int sub_gid_close(void); extern int sub_gid_close(void);
extern bool have_sub_gids(const char *owner, gid_t start, unsigned long count); extern bool have_sub_gids(const char *owner, gid_t start, unsigned long count);
extern bool sub_gid_file_present (void); extern bool sub_gid_file_present (void);
extern bool sub_gid_assigned(const char *owner); extern bool local_sub_gid_assigned(const char *owner);
extern int sub_gid_lock (void); extern int sub_gid_lock (void);
extern int sub_gid_setdbname (const char *filename); extern int sub_gid_setdbname (const char *filename);
extern /*@observer@*/const char *sub_gid_dbname (void); extern /*@observer@*/const char *sub_gid_dbname (void);
+32 -32
View File
@@ -72,8 +72,8 @@ shadowtcb_status shadowtcb_gain_priv (void)
* to exit soon. * to exit soon.
*/ */
#define OUT_OF_MEMORY do { \ #define OUT_OF_MEMORY do { \
fprintf (stderr, _("%s: out of memory\n"), Prog); \ fprintf (shadow_logfd, _("%s: out of memory\n"), Prog); \
(void) fflush (stderr); \ (void) fflush (shadow_logfd); \
} while (false) } while (false)
/* Returns user's tcb directory path relative to TCB_DIR. */ /* Returns user's tcb directory path relative to TCB_DIR. */
@@ -116,7 +116,7 @@ static /*@null@*/ char *shadowtcb_path_rel_existing (const char *name)
return NULL; return NULL;
} }
if (lstat (path, &st) != 0) { if (lstat (path, &st) != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot stat %s: %s\n"), _("%s: Cannot stat %s: %s\n"),
Prog, path, strerror (errno)); Prog, path, strerror (errno));
free (path); free (path);
@@ -132,7 +132,7 @@ static /*@null@*/ char *shadowtcb_path_rel_existing (const char *name)
return rval; return rval;
} }
if (!S_ISLNK (st.st_mode)) { if (!S_ISLNK (st.st_mode)) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: %s is neither a directory, nor a symlink.\n"), _("%s: %s is neither a directory, nor a symlink.\n"),
Prog, path); Prog, path);
free (path); free (path);
@@ -140,7 +140,7 @@ static /*@null@*/ char *shadowtcb_path_rel_existing (const char *name)
} }
ret = readlink (path, link, sizeof (link) - 1); ret = readlink (path, link, sizeof (link) - 1);
if (-1 == ret) { if (-1 == ret) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot read symbolic link %s: %s\n"), _("%s: Cannot read symbolic link %s: %s\n"),
Prog, path, strerror (errno)); Prog, path, strerror (errno));
free (path); free (path);
@@ -149,7 +149,7 @@ static /*@null@*/ char *shadowtcb_path_rel_existing (const char *name)
free (path); free (path);
if ((size_t)ret >= sizeof(link) - 1) { if ((size_t)ret >= sizeof(link) - 1) {
link[sizeof(link) - 1] = '\0'; link[sizeof(link) - 1] = '\0';
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Suspiciously long symlink: %s\n"), _("%s: Suspiciously long symlink: %s\n"),
Prog, link); Prog, link);
return NULL; return NULL;
@@ -207,7 +207,7 @@ static shadowtcb_status mkdir_leading (const char *name, uid_t uid)
} }
ptr = path; ptr = path;
if (stat (TCB_DIR, &st) != 0) { if (stat (TCB_DIR, &st) != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot stat %s: %s\n"), _("%s: Cannot stat %s: %s\n"),
Prog, TCB_DIR, strerror (errno)); Prog, TCB_DIR, strerror (errno));
goto out_free_path; goto out_free_path;
@@ -219,19 +219,19 @@ static shadowtcb_status mkdir_leading (const char *name, uid_t uid)
return SHADOWTCB_FAILURE; return SHADOWTCB_FAILURE;
} }
if ((mkdir (dir, 0700) != 0) && (errno != EEXIST)) { if ((mkdir (dir, 0700) != 0) && (errno != EEXIST)) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot create directory %s: %s\n"), _("%s: Cannot create directory %s: %s\n"),
Prog, dir, strerror (errno)); Prog, dir, strerror (errno));
goto out_free_dir; goto out_free_dir;
} }
if (chown (dir, 0, st.st_gid) != 0) { if (chown (dir, 0, st.st_gid) != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot change owner of %s: %s\n"), _("%s: Cannot change owner of %s: %s\n"),
Prog, dir, strerror (errno)); Prog, dir, strerror (errno));
goto out_free_dir; goto out_free_dir;
} }
if (chmod (dir, 0711) != 0) { if (chmod (dir, 0711) != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot change mode of %s: %s\n"), _("%s: Cannot change mode of %s: %s\n"),
Prog, dir, strerror (errno)); Prog, dir, strerror (errno));
goto out_free_dir; goto out_free_dir;
@@ -261,7 +261,7 @@ static shadowtcb_status unlink_suffs (const char *user)
return SHADOWTCB_FAILURE; return SHADOWTCB_FAILURE;
} }
if ((unlink (tmp) != 0) && (errno != ENOENT)) { if ((unlink (tmp) != 0) && (errno != ENOENT)) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: unlink: %s: %s\n"), _("%s: unlink: %s: %s\n"),
Prog, tmp, strerror (errno)); Prog, tmp, strerror (errno));
free (tmp); free (tmp);
@@ -286,7 +286,7 @@ static shadowtcb_status rmdir_leading (char *path)
} }
if (rmdir (dir) != 0) { if (rmdir (dir) != 0) {
if (errno != ENOTEMPTY) { if (errno != ENOTEMPTY) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot remove directory %s: %s\n"), _("%s: Cannot remove directory %s: %s\n"),
Prog, dir, strerror (errno)); Prog, dir, strerror (errno));
ret = SHADOWTCB_FAILURE; ret = SHADOWTCB_FAILURE;
@@ -315,7 +315,7 @@ static shadowtcb_status move_dir (const char *user_newname, uid_t user_newid)
goto out_free_nomem; goto out_free_nomem;
} }
if (stat (olddir, &oldmode) != 0) { if (stat (olddir, &oldmode) != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot stat %s: %s\n"), _("%s: Cannot stat %s: %s\n"),
Prog, olddir, strerror (errno)); Prog, olddir, strerror (errno));
goto out_free; goto out_free;
@@ -342,7 +342,7 @@ static shadowtcb_status move_dir (const char *user_newname, uid_t user_newid)
goto out_free; goto out_free;
} }
if (rename (real_old_dir, real_new_dir) != 0) { if (rename (real_old_dir, real_new_dir) != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot rename %s to %s: %s\n"), _("%s: Cannot rename %s to %s: %s\n"),
Prog, real_old_dir, real_new_dir, strerror (errno)); Prog, real_old_dir, real_new_dir, strerror (errno));
goto out_free; goto out_free;
@@ -351,7 +351,7 @@ static shadowtcb_status move_dir (const char *user_newname, uid_t user_newid)
goto out_free; goto out_free;
} }
if ((unlink (olddir) != 0) && (errno != ENOENT)) { if ((unlink (olddir) != 0) && (errno != ENOENT)) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot remove %s: %s\n"), _("%s: Cannot remove %s: %s\n"),
Prog, olddir, strerror (errno)); Prog, olddir, strerror (errno));
goto out_free; goto out_free;
@@ -365,7 +365,7 @@ static shadowtcb_status move_dir (const char *user_newname, uid_t user_newid)
} }
if ( (strcmp (real_new_dir, newdir) != 0) if ( (strcmp (real_new_dir, newdir) != 0)
&& (symlink (real_new_dir_rel, newdir) != 0)) { && (symlink (real_new_dir_rel, newdir) != 0)) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot create symbolic link %s: %s\n"), _("%s: Cannot create symbolic link %s: %s\n"),
Prog, real_new_dir_rel, strerror (errno)); Prog, real_new_dir_rel, strerror (errno));
goto out_free; goto out_free;
@@ -464,37 +464,37 @@ shadowtcb_status shadowtcb_move (/*@NULL@*/const char *user_newname, uid_t user_
return SHADOWTCB_FAILURE; return SHADOWTCB_FAILURE;
} }
if (stat (tcbdir, &dirmode) != 0) { if (stat (tcbdir, &dirmode) != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot stat %s: %s\n"), _("%s: Cannot stat %s: %s\n"),
Prog, tcbdir, strerror (errno)); Prog, tcbdir, strerror (errno));
goto out_free; goto out_free;
} }
if (chown (tcbdir, 0, 0) != 0) { if (chown (tcbdir, 0, 0) != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot change owners of %s: %s\n"), _("%s: Cannot change owners of %s: %s\n"),
Prog, tcbdir, strerror (errno)); Prog, tcbdir, strerror (errno));
goto out_free; goto out_free;
} }
if (chmod (tcbdir, 0700) != 0) { if (chmod (tcbdir, 0700) != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot change mode of %s: %s\n"), _("%s: Cannot change mode of %s: %s\n"),
Prog, tcbdir, strerror (errno)); Prog, tcbdir, strerror (errno));
goto out_free; goto out_free;
} }
if (lstat (shadow, &filemode) != 0) { if (lstat (shadow, &filemode) != 0) {
if (errno != ENOENT) { if (errno != ENOENT) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot lstat %s: %s\n"), _("%s: Cannot lstat %s: %s\n"),
Prog, shadow, strerror (errno)); Prog, shadow, strerror (errno));
goto out_free; goto out_free;
} }
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Warning, user %s has no tcb shadow file.\n"), _("%s: Warning, user %s has no tcb shadow file.\n"),
Prog, user_newname); Prog, user_newname);
} else { } else {
if (!S_ISREG (filemode.st_mode) || if (!S_ISREG (filemode.st_mode) ||
filemode.st_nlink != 1) { filemode.st_nlink != 1) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Emergency: %s's tcb shadow is not a " _("%s: Emergency: %s's tcb shadow is not a "
"regular file with st_nlink=1.\n" "regular file with st_nlink=1.\n"
"The account is left locked.\n"), "The account is left locked.\n"),
@@ -502,13 +502,13 @@ shadowtcb_status shadowtcb_move (/*@NULL@*/const char *user_newname, uid_t user_
goto out_free; goto out_free;
} }
if (chown (shadow, user_newid, filemode.st_gid) != 0) { if (chown (shadow, user_newid, filemode.st_gid) != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot change owner of %s: %s\n"), _("%s: Cannot change owner of %s: %s\n"),
Prog, shadow, strerror (errno)); Prog, shadow, strerror (errno));
goto out_free; goto out_free;
} }
if (chmod (shadow, filemode.st_mode & 07777) != 0) { if (chmod (shadow, filemode.st_mode & 07777) != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot change mode of %s: %s\n"), _("%s: Cannot change mode of %s: %s\n"),
Prog, shadow, strerror (errno)); Prog, shadow, strerror (errno));
goto out_free; goto out_free;
@@ -518,7 +518,7 @@ shadowtcb_status shadowtcb_move (/*@NULL@*/const char *user_newname, uid_t user_
goto out_free; goto out_free;
} }
if (chown (tcbdir, user_newid, dirmode.st_gid) != 0) { if (chown (tcbdir, user_newid, dirmode.st_gid) != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot change owner of %s: %s\n"), _("%s: Cannot change owner of %s: %s\n"),
Prog, tcbdir, strerror (errno)); Prog, tcbdir, strerror (errno));
goto out_free; goto out_free;
@@ -543,7 +543,7 @@ shadowtcb_status shadowtcb_create (const char *name, uid_t uid)
return SHADOWTCB_SUCCESS; return SHADOWTCB_SUCCESS;
} }
if (stat (TCB_DIR, &tcbdir_stat) != 0) { if (stat (TCB_DIR, &tcbdir_stat) != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot stat %s: %s\n"), _("%s: Cannot stat %s: %s\n"),
Prog, TCB_DIR, strerror (errno)); Prog, TCB_DIR, strerror (errno));
return SHADOWTCB_FAILURE; return SHADOWTCB_FAILURE;
@@ -563,39 +563,39 @@ shadowtcb_status shadowtcb_create (const char *name, uid_t uid)
return SHADOWTCB_FAILURE; return SHADOWTCB_FAILURE;
} }
if (mkdir (dir, 0700) != 0) { if (mkdir (dir, 0700) != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: mkdir: %s: %s\n"), _("%s: mkdir: %s: %s\n"),
Prog, dir, strerror (errno)); Prog, dir, strerror (errno));
goto out_free; goto out_free;
} }
fd = open (shadow, O_RDWR | O_CREAT | O_TRUNC, 0600); fd = open (shadow, O_RDWR | O_CREAT | O_TRUNC, 0600);
if (fd < 0) { if (fd < 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot open %s: %s\n"), _("%s: Cannot open %s: %s\n"),
Prog, shadow, strerror (errno)); Prog, shadow, strerror (errno));
goto out_free; goto out_free;
} }
close (fd); close (fd);
if (chown (shadow, 0, authgid) != 0) { if (chown (shadow, 0, authgid) != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot change owner of %s: %s\n"), _("%s: Cannot change owner of %s: %s\n"),
Prog, shadow, strerror (errno)); Prog, shadow, strerror (errno));
goto out_free; goto out_free;
} }
if (chmod (shadow, (mode_t) ((authgid == shadowgid) ? 0600 : 0640)) != 0) { if (chmod (shadow, (mode_t) ((authgid == shadowgid) ? 0600 : 0640)) != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot change mode of %s: %s\n"), _("%s: Cannot change mode of %s: %s\n"),
Prog, shadow, strerror (errno)); Prog, shadow, strerror (errno));
goto out_free; goto out_free;
} }
if (chown (dir, 0, authgid) != 0) { if (chown (dir, 0, authgid) != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot change owner of %s: %s\n"), _("%s: Cannot change owner of %s: %s\n"),
Prog, dir, strerror (errno)); Prog, dir, strerror (errno));
goto out_free; goto out_free;
} }
if (chmod (dir, (mode_t) ((authgid == shadowgid) ? 02700 : 02710)) != 0) { if (chmod (dir, (mode_t) ((authgid == shadowgid) ? 02700 : 02710)) != 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Cannot change mode of %s: %s\n"), _("%s: Cannot change mode of %s: %s\n"),
Prog, dir, strerror (errno)); Prog, dir, strerror (errno));
goto out_free; goto out_free;
+11 -4
View File
@@ -1,11 +1,11 @@
EXTRA_DIST = .indent.pro xgetXXbyYY.c EXTRA_DIST = .indent.pro xgetXXbyYY.c
INCLUDES = -I$(top_srcdir)/lib AM_CPPFLAGS = -I$(top_srcdir)/lib $(ECONF_CPPFLAGS)
noinst_LIBRARIES = libmisc.a noinst_LTLIBRARIES = libmisc.la
libmisc_a_SOURCES = \ libmisc_la_SOURCES = \
addgrps.c \ addgrps.c \
age.c \ age.c \
audit_help.c \ audit_help.c \
@@ -31,6 +31,7 @@ libmisc_a_SOURCES = \
getdate.y \ getdate.y \
getgr_nam_gid.c \ getgr_nam_gid.c \
getrange.c \ getrange.c \
gettime.c \
hushed.c \ hushed.c \
idmapping.h \ idmapping.h \
idmapping.c \ idmapping.c \
@@ -43,7 +44,8 @@ libmisc_a_SOURCES = \
myname.c \ myname.c \
obscure.c \ obscure.c \
pam_pass.c \ pam_pass.c \
pam_pass_non_interractive.c \ pam_pass_non_interactive.c \
prefix_flag.c \
pwd2spwd.c \ pwd2spwd.c \
pwdcheck.c \ pwdcheck.c \
pwd_init.c \ pwd_init.c \
@@ -70,3 +72,8 @@ libmisc_a_SOURCES = \
xgetspnam.c \ xgetspnam.c \
xmalloc.c \ xmalloc.c \
yesno.c yesno.c
if WITH_BTRFS
libmisc_la_SOURCES += btrfs.c
endif
+173 -190
View File
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.13.3 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
@SET_MAKE@ @SET_MAKE@
VPATH = @srcdir@ VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \ am__make_running_with_option = \
case $${target_option-} in \ case $${target_option-} in \
?) ;; \ ?) ;; \
@@ -78,50 +88,59 @@ PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_triplet = @build@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
@WITH_BTRFS_TRUE@am__append_1 = btrfs.c
subdir = libmisc subdir = libmisc
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am getdate.c \
$(top_srcdir)/depcomp $(top_srcdir)/ylwrap
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/configure.in $(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/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES) LTLIBRARIES = $(noinst_LTLIBRARIES)
ARFLAGS = cru libmisc_la_LIBADD =
AM_V_AR = $(am__v_AR_@AM_V@) am__libmisc_la_SOURCES_DIST = addgrps.c age.c audit_help.c basename.c \
am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) chkname.c chkname.h chowndir.c chowntty.c cleanup.c \
am__v_AR_0 = @echo " AR " $@; cleanup_group.c cleanup_user.c console.c copydir.c entry.c \
am__v_AR_1 = env.c failure.c failure.h find_new_gid.c find_new_uid.c \
libmisc_a_AR = $(AR) $(ARFLAGS) find_new_sub_gids.c find_new_sub_uids.c getdate.h getdate.y \
libmisc_a_LIBADD = getgr_nam_gid.c getrange.c gettime.c hushed.c idmapping.h \
am_libmisc_a_OBJECTS = addgrps.$(OBJEXT) age.$(OBJEXT) \ idmapping.c isexpired.c limits.c list.c log.c loginprompt.c \
audit_help.$(OBJEXT) basename.$(OBJEXT) chkname.$(OBJEXT) \ mail.c motd.c myname.c obscure.c pam_pass.c \
chowndir.$(OBJEXT) chowntty.$(OBJEXT) cleanup.$(OBJEXT) \ pam_pass_non_interactive.c prefix_flag.c pwd2spwd.c pwdcheck.c \
cleanup_group.$(OBJEXT) cleanup_user.$(OBJEXT) \ pwd_init.c remove_tree.c rlogin.c root_flag.c salt.c setugid.c \
console.$(OBJEXT) copydir.$(OBJEXT) entry.$(OBJEXT) \ setupenv.c shell.c strtoday.c sub.c sulog.c ttytype.c tz.c \
env.$(OBJEXT) failure.$(OBJEXT) find_new_gid.$(OBJEXT) \ ulimit.c user_busy.c utmp.c valid.c xgetpwnam.c xgetpwuid.c \
find_new_uid.$(OBJEXT) find_new_sub_gids.$(OBJEXT) \ xgetgrnam.c xgetgrgid.c xgetspnam.c xmalloc.c yesno.c btrfs.c
find_new_sub_uids.$(OBJEXT) getdate.$(OBJEXT) \ @WITH_BTRFS_TRUE@am__objects_1 = btrfs.lo
getgr_nam_gid.$(OBJEXT) getrange.$(OBJEXT) hushed.$(OBJEXT) \ am_libmisc_la_OBJECTS = addgrps.lo age.lo audit_help.lo basename.lo \
idmapping.$(OBJEXT) isexpired.$(OBJEXT) limits.$(OBJEXT) \ chkname.lo chowndir.lo chowntty.lo cleanup.lo cleanup_group.lo \
list.$(OBJEXT) log.$(OBJEXT) loginprompt.$(OBJEXT) \ cleanup_user.lo console.lo copydir.lo entry.lo env.lo \
mail.$(OBJEXT) motd.$(OBJEXT) myname.$(OBJEXT) \ failure.lo find_new_gid.lo find_new_uid.lo \
obscure.$(OBJEXT) pam_pass.$(OBJEXT) \ find_new_sub_gids.lo find_new_sub_uids.lo getdate.lo \
pam_pass_non_interractive.$(OBJEXT) pwd2spwd.$(OBJEXT) \ getgr_nam_gid.lo getrange.lo gettime.lo hushed.lo idmapping.lo \
pwdcheck.$(OBJEXT) pwd_init.$(OBJEXT) remove_tree.$(OBJEXT) \ isexpired.lo limits.lo list.lo log.lo loginprompt.lo mail.lo \
rlogin.$(OBJEXT) root_flag.$(OBJEXT) salt.$(OBJEXT) \ motd.lo myname.lo obscure.lo pam_pass.lo \
setugid.$(OBJEXT) setupenv.$(OBJEXT) shell.$(OBJEXT) \ pam_pass_non_interactive.lo prefix_flag.lo pwd2spwd.lo \
strtoday.$(OBJEXT) sub.$(OBJEXT) sulog.$(OBJEXT) \ pwdcheck.lo pwd_init.lo remove_tree.lo rlogin.lo root_flag.lo \
ttytype.$(OBJEXT) tz.$(OBJEXT) ulimit.$(OBJEXT) \ salt.lo setugid.lo setupenv.lo shell.lo strtoday.lo sub.lo \
user_busy.$(OBJEXT) utmp.$(OBJEXT) valid.$(OBJEXT) \ sulog.lo ttytype.lo tz.lo ulimit.lo user_busy.lo utmp.lo \
xgetpwnam.$(OBJEXT) xgetpwuid.$(OBJEXT) xgetgrnam.$(OBJEXT) \ valid.lo xgetpwnam.lo xgetpwuid.lo xgetgrnam.lo xgetgrgid.lo \
xgetgrgid.$(OBJEXT) xgetspnam.$(OBJEXT) xmalloc.$(OBJEXT) \ xgetspnam.lo xmalloc.lo yesno.lo $(am__objects_1)
yesno.$(OBJEXT) libmisc_la_OBJECTS = $(am_libmisc_la_OBJECTS)
libmisc_a_OBJECTS = $(am_libmisc_a_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
AM_V_P = $(am__v_P_@AM_V@) AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false am__v_P_0 = false
@@ -140,10 +159,6 @@ am__depfiles_maybe = depfiles
am__mv = mv -f am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
@@ -171,8 +186,8 @@ am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@)
am__v_YACC_0 = @echo " YACC " $@; am__v_YACC_0 = @echo " YACC " $@;
am__v_YACC_1 = am__v_YACC_1 =
YLWRAP = $(top_srcdir)/ylwrap YLWRAP = $(top_srcdir)/ylwrap
SOURCES = $(libmisc_a_SOURCES) SOURCES = $(libmisc_la_SOURCES)
DIST_SOURCES = $(libmisc_a_SOURCES) DIST_SOURCES = $(am__libmisc_la_SOURCES_DIST)
am__can_run_installinfo = \ am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \ case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \ n|no|NO) false;; \
@@ -197,6 +212,8 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)` done | $(am__uniquify_input)`
ETAGS = etags ETAGS = etags
CTAGS = ctags CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
$(top_srcdir)/ylwrap getdate.c
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
@@ -220,10 +237,10 @@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
ECONF_CPPFLAGS = @ECONF_CPPFLAGS@
EGREP = @EGREP@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FGREP = @FGREP@ FGREP = @FGREP@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@ GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@ GMSGFMT_015 = @GMSGFMT_015@
GREP = @GREP@ GREP = @GREP@
@@ -242,6 +259,7 @@ LIBATTR = @LIBATTR@
LIBAUDIT = @LIBAUDIT@ LIBAUDIT = @LIBAUDIT@
LIBCRACK = @LIBCRACK@ LIBCRACK = @LIBCRACK@
LIBCRYPT = @LIBCRYPT@ LIBCRYPT = @LIBCRYPT@
LIBECONF = @LIBECONF@
LIBICONV = @LIBICONV@ LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@ LIBINTL = @LIBINTL@
LIBMD = @LIBMD@ LIBMD = @LIBMD@
@@ -251,13 +269,19 @@ LIBS = @LIBS@
LIBSELINUX = @LIBSELINUX@ LIBSELINUX = @LIBSELINUX@
LIBSEMANAGE = @LIBSEMANAGE@ LIBSEMANAGE = @LIBSEMANAGE@
LIBSKEY = @LIBSKEY@ LIBSKEY = @LIBSKEY@
LIBSUBID_ABI = @LIBSUBID_ABI@
LIBSUBID_ABI_MAJOR = @LIBSUBID_ABI_MAJOR@
LIBSUBID_ABI_MICRO = @LIBSUBID_ABI_MICRO@
LIBSUBID_ABI_MINOR = @LIBSUBID_ABI_MINOR@
LIBTCB = @LIBTCB@ LIBTCB = @LIBTCB@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@ LIPO = @LIPO@
LIYESCRYPT = @LIYESCRYPT@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@ LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@ LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@ MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -286,10 +310,10 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRIP = @STRIP@ STRIP = @STRIP@
USE_NLS = @USE_NLS@ USE_NLS = @USE_NLS@
VENDORDIR = @VENDORDIR@
VERSION = @VERSION@ VERSION = @VERSION@
XGETTEXT = @XGETTEXT@ XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
XMLCATALOG = @XMLCATALOG@ XMLCATALOG = @XMLCATALOG@
XML_CATALOG_FILE = @XML_CATALOG_FILE@ XML_CATALOG_FILE = @XML_CATALOG_FILE@
XSLTPROC = @XSLTPROC@ XSLTPROC = @XSLTPROC@
@@ -314,6 +338,7 @@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
builddir = @builddir@ builddir = @builddir@
capcmd = @capcmd@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
docdir = @docdir@ docdir = @docdir@
@@ -339,6 +364,7 @@ pdfdir = @pdfdir@
prefix = @prefix@ prefix = @prefix@
program_transform_name = @program_transform_name@ program_transform_name = @program_transform_name@
psdir = @psdir@ psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@ srcdir = @srcdir@
@@ -348,74 +374,21 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
EXTRA_DIST = .indent.pro xgetXXbyYY.c EXTRA_DIST = .indent.pro xgetXXbyYY.c
INCLUDES = -I$(top_srcdir)/lib AM_CPPFLAGS = -I$(top_srcdir)/lib $(ECONF_CPPFLAGS)
noinst_LIBRARIES = libmisc.a noinst_LTLIBRARIES = libmisc.la
libmisc_a_SOURCES = \ libmisc_la_SOURCES = addgrps.c age.c audit_help.c basename.c chkname.c \
addgrps.c \ chkname.h chowndir.c chowntty.c cleanup.c cleanup_group.c \
age.c \ cleanup_user.c console.c copydir.c entry.c env.c failure.c \
audit_help.c \ failure.h find_new_gid.c find_new_uid.c find_new_sub_gids.c \
basename.c \ find_new_sub_uids.c getdate.h getdate.y getgr_nam_gid.c \
chkname.c \ getrange.c gettime.c hushed.c idmapping.h idmapping.c \
chkname.h \ isexpired.c limits.c list.c log.c loginprompt.c mail.c motd.c \
chowndir.c \ myname.c obscure.c pam_pass.c pam_pass_non_interactive.c \
chowntty.c \ prefix_flag.c pwd2spwd.c pwdcheck.c pwd_init.c remove_tree.c \
cleanup.c \ rlogin.c root_flag.c salt.c setugid.c setupenv.c shell.c \
cleanup_group.c \ strtoday.c sub.c sulog.c ttytype.c tz.c ulimit.c user_busy.c \
cleanup_user.c \ utmp.c valid.c xgetpwnam.c xgetpwuid.c xgetgrnam.c xgetgrgid.c \
console.c \ xgetspnam.c xmalloc.c yesno.c $(am__append_1)
copydir.c \
entry.c \
env.c \
failure.c \
failure.h \
find_new_gid.c \
find_new_uid.c \
find_new_sub_gids.c \
find_new_sub_uids.c \
getdate.h \
getdate.y \
getgr_nam_gid.c \
getrange.c \
hushed.c \
idmapping.h \
idmapping.c \
isexpired.c \
limits.c \
list.c log.c \
loginprompt.c \
mail.c \
motd.c \
myname.c \
obscure.c \
pam_pass.c \
pam_pass_non_interractive.c \
pwd2spwd.c \
pwdcheck.c \
pwd_init.c \
remove_tree.c \
rlogin.c \
root_flag.c \
salt.c \
setugid.c \
setupenv.c \
shell.c \
strtoday.c \
sub.c \
sulog.c \
ttytype.c \
tz.c \
ulimit.c \
user_busy.c \
utmp.c \
valid.c \
xgetpwnam.c \
xgetpwuid.c \
xgetgrnam.c \
xgetgrgid.c \
xgetspnam.c \
xmalloc.c \
yesno.c
all: all-am all: all-am
.SUFFIXES: .SUFFIXES:
@@ -429,10 +402,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \ exit 1;; \
esac; \ esac; \
done; \ done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libmisc/Makefile'; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libmisc/Makefile'; \
$(am__cd) $(top_srcdir) && \ $(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu libmisc/Makefile $(AUTOMAKE) --foreign libmisc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \ @case '$?' in \
*config.status*) \ *config.status*) \
@@ -451,13 +423,19 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps): $(am__aclocal_m4_deps):
clean-noinstLIBRARIES: clean-noinstLTLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@list='$(noinst_LTLIBRARIES)'; \
locs=`for p in $$list; do echo $$p; done | \
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
sort -u`; \
test -z "$$locs" || { \
echo rm -f $${locs}; \
rm -f $${locs}; \
}
libmisc.a: $(libmisc_a_OBJECTS) $(libmisc_a_DEPENDENCIES) $(EXTRA_libmisc_a_DEPENDENCIES) libmisc.la: $(libmisc_la_OBJECTS) $(libmisc_la_DEPENDENCIES) $(EXTRA_libmisc_la_DEPENDENCIES)
$(AM_V_at)-rm -f libmisc.a $(AM_V_CCLD)$(LINK) $(libmisc_la_OBJECTS) $(libmisc_la_LIBADD) $(LIBS)
$(AM_V_AR)$(libmisc_a_AR) libmisc.a $(libmisc_a_OBJECTS) $(libmisc_a_LIBADD)
$(AM_V_at)$(RANLIB) libmisc.a
mostlyclean-compile: mostlyclean-compile:
-rm -f *.$(OBJEXT) -rm -f *.$(OBJEXT)
@@ -465,81 +443,84 @@ mostlyclean-compile:
distclean-compile: distclean-compile:
-rm -f *.tab.c -rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addgrps.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addgrps.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/age.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/age.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audit_help.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audit_help.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chkname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btrfs.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chowndir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chkname.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chowntty.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chowndir.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cleanup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chowntty.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cleanup_group.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cleanup.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cleanup_user.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cleanup_group.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/console.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cleanup_user.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copydir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/console.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entry.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copydir.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/env.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entry.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/failure.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/env.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find_new_gid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/failure.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find_new_sub_gids.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find_new_gid.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find_new_sub_uids.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find_new_sub_gids.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find_new_uid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find_new_sub_uids.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find_new_uid.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgr_nam_gid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdate.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getrange.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgr_nam_gid.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hushed.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getrange.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmapping.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettime.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isexpired.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hushed.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/limits.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idmapping.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isexpired.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/limits.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loginprompt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/motd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loginprompt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/myname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/obscure.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/motd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_pass.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/myname.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_pass_non_interractive.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/obscure.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwd2spwd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_pass.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwd_init.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_pass_non_interactive.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwdcheck.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prefix_flag.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remove_tree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwd2spwd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rlogin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwd_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/root_flag.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwdcheck.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/salt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remove_tree.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setugid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rlogin.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setupenv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/root_flag.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shell.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/salt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoday.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setugid.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sub.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setupenv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sulog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shell.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttytype.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoday.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tz.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sub.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulimit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sulog.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/user_busy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttytype.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tz.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/valid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulimit.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetgrgid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/user_busy.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetgrnam.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utmp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetpwnam.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/valid.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetpwuid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetgrgid.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetspnam.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetgrnam.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetpwnam.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yesno.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetpwuid.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetspnam.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yesno.Plo@am__quote@
.c.o: .c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj: .c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo: .c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -641,7 +622,7 @@ distdir: $(DISTFILES)
done done
check-am: all-am check-am: all-am
check: check-am check: check-am
all-am: Makefile $(LIBRARIES) all-am: Makefile $(LTLIBRARIES)
installdirs: installdirs:
install: install-am install: install-am
install-exec: install-exec-am install-exec: install-exec-am
@@ -676,7 +657,7 @@ maintainer-clean-generic:
-rm -f getdate.c -rm -f getdate.c
clean: clean-am clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
mostlyclean-am mostlyclean-am
distclean: distclean-am distclean: distclean-am
@@ -748,7 +729,7 @@ uninstall-am:
.MAKE: install-am install-strip .MAKE: install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstLIBRARIES cscopelist-am ctags \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
ctags-am distclean distclean-compile distclean-generic \ ctags-am distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \ distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \ html-am info info-am install install-am install-data \
@@ -761,6 +742,8 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am tags tags-am uninstall uninstall-am
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables. # 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. # Otherwise a system limit (for SysV at least) may be exceeded.
+7 -3
View File
@@ -57,6 +57,7 @@ int add_groups (const char *list)
bool added; bool added;
char *token; char *token;
char buf[1024]; char buf[1024];
int ret;
if (strlen (list) >= sizeof (buf)) { if (strlen (list) >= sizeof (buf)) {
errno = EINVAL; errno = EINVAL;
@@ -93,7 +94,7 @@ int add_groups (const char *list)
grp = getgrnam (token); /* local, no need for xgetgrnam */ grp = getgrnam (token); /* local, no need for xgetgrnam */
if (NULL == grp) { if (NULL == grp) {
fprintf (stderr, _("Warning: unknown group %s\n"), fprintf (shadow_logfd, _("Warning: unknown group %s\n"),
token); token);
continue; continue;
} }
@@ -105,7 +106,7 @@ int add_groups (const char *list)
} }
if (ngroups >= sysconf (_SC_NGROUPS_MAX)) { if (ngroups >= sysconf (_SC_NGROUPS_MAX)) {
fputs (_("Warning: too many groups\n"), stderr); fputs (_("Warning: too many groups\n"), shadow_logfd);
break; break;
} }
tmp = (gid_t *) realloc (grouplist, (size_t)(ngroups + 1) * sizeof (GETGROUPS_T)); tmp = (gid_t *) realloc (grouplist, (size_t)(ngroups + 1) * sizeof (GETGROUPS_T));
@@ -120,9 +121,12 @@ int add_groups (const char *list)
} }
if (added) { if (added) {
return setgroups ((size_t)ngroups, grouplist); ret = setgroups ((size_t)ngroups, grouplist);
free (grouplist);
return ret;
} }
free (grouplist);
return 0; return 0;
} }
#else /* HAVE_SETGROUPS && !USE_PAM */ #else /* HAVE_SETGROUPS && !USE_PAM */
+1 -1
View File
@@ -59,7 +59,7 @@ void audit_help_open (void)
return; return;
} }
(void) fputs (_("Cannot open audit interface - aborting.\n"), (void) fputs (_("Cannot open audit interface - aborting.\n"),
stderr); shadow_logfd);
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} }
} }
+110
View File
@@ -0,0 +1,110 @@
#include <linux/btrfs_tree.h>
#include <linux/magic.h>
#include <sys/statfs.h>
#include <stdbool.h>
#include "prototypes.h"
static bool path_exists(const char *p)
{
struct stat sb;
return stat(p, &sb) == 0;
}
static const char *btrfs_cmd(void)
{
const char *btrfs_paths[] = {"/sbin/btrfs",
"/bin/btrfs", "/usr/sbin/btrfs", "/usr/bin/btrfs", NULL};
const char *p;
int i;
for (i = 0, p = btrfs_paths[i]; p; i++, p = btrfs_paths[i])
if (path_exists(p))
return p;
return NULL;
}
static int run_btrfs_subvolume_cmd(const char *subcmd, const char *arg1, const char *arg2)
{
int status = 0;
const char *cmd = btrfs_cmd();
const char *argv[] = {
"btrfs",
"subvolume",
subcmd,
arg1,
arg2,
NULL
};
if (access(cmd, X_OK)) {
return 1;
}
if (run_command(cmd, argv, NULL, &status))
return -1;
return status;
}
int btrfs_create_subvolume(const char *path)
{
return run_btrfs_subvolume_cmd("create", path, NULL);
}
int btrfs_remove_subvolume(const char *path)
{
return run_btrfs_subvolume_cmd("delete", "-C", path);
}
/* Adapted from btrfsprogs */
/*
* This intentionally duplicates btrfs_util_is_subvolume_fd() instead of opening
* a file descriptor and calling it, because fstat() and fstatfs() don't accept
* file descriptors opened with O_PATH on old kernels (before v3.6 and before
* v3.12, respectively), but stat() and statfs() can be called on a path that
* the user doesn't have read or write permissions to.
*
* returns:
* 1 - btrfs subvolume
* 0 - not btrfs subvolume
* -1 - error
*/
int btrfs_is_subvolume(const char *path)
{
struct stat st;
int ret;
ret = is_btrfs(path);
if (ret <= 0)
return ret;
ret = stat(path, &st);
if (ret == -1)
return -1;
if (st.st_ino != BTRFS_FIRST_FREE_OBJECTID || !S_ISDIR(st.st_mode)) {
return 0;
}
return 1;
}
/* Adapted from btrfsprogs */
int is_btrfs(const char *path)
{
struct statfs sfs;
int ret;
ret = statfs(path, &sfs);
if (ret == -1)
return -1;
return sfs.f_type == BTRFS_SUPER_MAGIC;
}
+7
View File
@@ -46,11 +46,18 @@
#include "defines.h" #include "defines.h"
#include "chkname.h" #include "chkname.h"
int allow_bad_names = false;
static bool is_valid_name (const char *name) static bool is_valid_name (const char *name)
{ {
if (allow_bad_names) {
return true;
}
/* /*
* User/group names must match [a-z_][a-z0-9_-]*[$] * User/group names must match [a-z_][a-z0-9_-]*[$]
*/ */
if (('\0' == *name) || if (('\0' == *name) ||
!((('a' <= *name) && ('z' >= *name)) || ('_' == *name))) { !((('a' <= *name) && ('z' >= *name)) || ('_' == *name))) {
return false; return false;
+2 -1
View File
@@ -62,6 +62,7 @@ void chown_tty (const struct passwd *info)
grent = getgr_nam_gid (getdef_str ("TTYGROUP")); grent = getgr_nam_gid (getdef_str ("TTYGROUP"));
if (NULL != grent) { if (NULL != grent) {
gid = grent->gr_gid; gid = grent->gr_gid;
gr_free (grent);
} else { } else {
gid = info->pw_gid; gid = info->pw_gid;
} }
@@ -75,7 +76,7 @@ void chown_tty (const struct passwd *info)
|| (fchmod (STDIN_FILENO, (mode_t)getdef_num ("TTYPERM", 0600)) != 0)) { || (fchmod (STDIN_FILENO, (mode_t)getdef_num ("TTYPERM", 0600)) != 0)) {
int err = errno; int err = errno;
fprintf (stderr, fprintf (shadow_logfd,
_("Unable to change owner or mode of tty stdin: %s"), _("Unable to change owner or mode of tty stdin: %s"),
strerror (err)); strerror (err));
SYSLOG ((LOG_WARN, SYSLOG ((LOG_WARN,
+2 -2
View File
@@ -203,7 +203,7 @@ void cleanup_report_del_group_gshadow (void *group_name)
void cleanup_unlock_group (unused void *arg) void cleanup_unlock_group (unused void *arg)
{ {
if (gr_unlock () == 0) { if (gr_unlock () == 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: failed to unlock %s\n"), _("%s: failed to unlock %s\n"),
Prog, gr_dbname ()); Prog, gr_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ())); SYSLOG ((LOG_ERR, "failed to unlock %s", gr_dbname ()));
@@ -223,7 +223,7 @@ void cleanup_unlock_group (unused void *arg)
void cleanup_unlock_gshadow (unused void *arg) void cleanup_unlock_gshadow (unused void *arg)
{ {
if (sgr_unlock () == 0) { if (sgr_unlock () == 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: failed to unlock %s\n"), _("%s: failed to unlock %s\n"),
Prog, sgr_dbname ()); Prog, sgr_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", sgr_dbname ())); SYSLOG ((LOG_ERR, "failed to unlock %s", sgr_dbname ()));
+2 -2
View File
@@ -120,7 +120,7 @@ void cleanup_report_add_user_shadow (void *user_name)
void cleanup_unlock_passwd (unused void *arg) void cleanup_unlock_passwd (unused void *arg)
{ {
if (pw_unlock () == 0) { if (pw_unlock () == 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: failed to unlock %s\n"), _("%s: failed to unlock %s\n"),
Prog, pw_dbname ()); Prog, pw_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", pw_dbname ())); SYSLOG ((LOG_ERR, "failed to unlock %s", pw_dbname ()));
@@ -139,7 +139,7 @@ void cleanup_unlock_passwd (unused void *arg)
void cleanup_unlock_shadow (unused void *arg) void cleanup_unlock_shadow (unused void *arg)
{ {
if (spw_unlock () == 0) { if (spw_unlock () == 0) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: failed to unlock %s\n"), _("%s: failed to unlock %s\n"),
Prog, spw_dbname ()); Prog, spw_dbname ());
SYSLOG ((LOG_ERR, "failed to unlock %s", spw_dbname ())); SYSLOG ((LOG_ERR, "failed to unlock %s", spw_dbname ()));
+3 -2
View File
@@ -50,7 +50,7 @@ static bool is_listed (const char *cfgin, const char *tty, bool def);
static bool is_listed (const char *cfgin, const char *tty, bool def) static bool is_listed (const char *cfgin, const char *tty, bool def)
{ {
FILE *fp; FILE *fp;
char buf[200], *s; char buf[1024], *s;
const char *cons; const char *cons;
/* /*
@@ -70,7 +70,8 @@ static bool is_listed (const char *cfgin, const char *tty, bool def)
if (*cons != '/') { if (*cons != '/') {
char *pbuf; char *pbuf;
strcpy (buf, cons); strncpy (buf, cons, sizeof (buf));
buf[sizeof (buf) - 1] = '\0';
pbuf = &buf[0]; pbuf = &buf[0];
while ((s = strtok (pbuf, ":")) != NULL) { while ((s = strtok (pbuf, ":")) != NULL) {
if (strcmp (s, tty) == 0) { if (strcmp (s, tty) == 0) {
+15 -9
View File
@@ -125,11 +125,11 @@ static void error_acl (struct error_context *ctx, const char *fmt, ...)
} }
va_start (ap, fmt); va_start (ap, fmt);
(void) fprintf (stderr, _("%s: "), Prog); (void) fprintf (shadow_logfd, _("%s: "), Prog);
if (vfprintf (stderr, fmt, ap) != 0) { if (vfprintf (shadow_logfd, fmt, ap) != 0) {
(void) fputs (_(": "), stderr); (void) fputs (_(": "), shadow_logfd);
} }
(void) fprintf (stderr, "%s\n", strerror (errno)); (void) fprintf (shadow_logfd, "%s\n", strerror (errno));
va_end (ap); va_end (ap);
} }
@@ -248,7 +248,7 @@ int copy_tree (const char *src_root, const char *dst_root,
} }
if (!S_ISDIR (sb.st_mode)) { if (!S_ISDIR (sb.st_mode)) {
fprintf (stderr, fprintf (shadow_logfd,
"%s: %s is not a directory", "%s: %s is not a directory",
Prog, src_root); Prog, src_root);
return -1; return -1;
@@ -484,7 +484,7 @@ static int copy_dir (const char *src, const char *dst,
*/ */
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
if (set_selinux_file_context (dst) != 0) { if (set_selinux_file_context (dst, S_IFDIR) != 0) {
return -1; return -1;
} }
#endif /* WITH_SELINUX */ #endif /* WITH_SELINUX */
@@ -605,7 +605,7 @@ static int copy_symlink (const char *src, const char *dst,
} }
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
if (set_selinux_file_context (dst) != 0) { if (set_selinux_file_context (dst, S_IFLNK) != 0) {
free (oldlink); free (oldlink);
return -1; return -1;
} }
@@ -684,7 +684,7 @@ static int copy_special (const char *src, const char *dst,
int err = 0; int err = 0;
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
if (set_selinux_file_context (dst) != 0) { if (set_selinux_file_context (dst, statp->st_mode & S_IFMT) != 0) {
return -1; return -1;
} }
#endif /* WITH_SELINUX */ #endif /* WITH_SELINUX */
@@ -744,7 +744,8 @@ static int copy_file (const char *src, const char *dst,
return -1; return -1;
} }
#ifdef WITH_SELINUX #ifdef WITH_SELINUX
if (set_selinux_file_context (dst) != 0) { if (set_selinux_file_context (dst, S_IFREG) != 0) {
(void) close (ifd);
return -1; return -1;
} }
#endif /* WITH_SELINUX */ #endif /* WITH_SELINUX */
@@ -771,12 +772,16 @@ static int copy_file (const char *src, const char *dst,
&& (errno != 0)) && (errno != 0))
#endif /* WITH_ATTR */ #endif /* WITH_ATTR */
) { ) {
if (ofd >= 0) {
(void) close (ofd);
}
(void) close (ifd); (void) close (ifd);
return -1; return -1;
} }
while ((cnt = read (ifd, buf, sizeof buf)) > 0) { while ((cnt = read (ifd, buf, sizeof buf)) > 0) {
if (write (ofd, buf, (size_t)cnt) != cnt) { if (write (ofd, buf, (size_t)cnt) != cnt) {
(void) close (ofd);
(void) close (ifd); (void) close (ifd);
return -1; return -1;
} }
@@ -786,6 +791,7 @@ static int copy_file (const char *src, const char *dst,
#ifdef HAVE_FUTIMES #ifdef HAVE_FUTIMES
if (futimes (ofd, mt) != 0) { if (futimes (ofd, mt) != 0) {
(void) close (ofd);
return -1; return -1;
} }
#endif /* HAVE_FUTIMES */ #endif /* HAVE_FUTIMES */
+1 -1
View File
@@ -171,7 +171,7 @@ void addenv (const char *string, /*@null@*/const char *value)
} }
newenvp = __newenvp; newenvp = __newenvp;
} else { } else {
(void) fputs (_("Environment overflow\n"), stderr); (void) fputs (_("Environment overflow\n"), shadow_logfd);
newenvc--; newenvc--;
free (newenvp[newenvc]); free (newenvp[newenvc]);
} }
+1 -1
View File
@@ -98,7 +98,7 @@ void failure (uid_t uid, const char *tty, struct faillog *fl)
fl->fail_cnt++; fl->fail_cnt++;
} }
strncpy (fl->fail_line, tty, sizeof fl->fail_line); strncpy (fl->fail_line, tty, sizeof (fl->fail_line) - 1);
(void) time (&fl->fail_time); (void) time (&fl->fail_time);
/* /*
+1 -1
View File
@@ -69,7 +69,7 @@ extern int failcheck (uid_t uid, struct faillog *fl, bool failed);
extern void failprint (const struct faillog *); extern void failprint (const struct faillog *);
/* /*
* failtmp - update the cummulative failure log * failtmp - update the cumulative failure log
* *
* failtmp updates the (struct utmp) formatted failure log which * failtmp updates the (struct utmp) formatted failure log which
* maintains a record of all login failures. * maintains a record of all login failures.
+412 -123
View File
@@ -1,6 +1,7 @@
/* /*
* Copyright (c) 1991 - 1994, Julianne Frances Haugh * Copyright (c) 1991 - 1994, Julianne Frances Haugh
* Copyright (c) 2008 - 2011, Nicolas François * Copyright (c) 2008 - 2011, Nicolas François
* Copyright (c) 2014, Red Hat, Inc.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -38,6 +39,117 @@
#include "groupio.h" #include "groupio.h"
#include "getdef.h" #include "getdef.h"
/*
* get_ranges - Get the minimum and maximum ID ranges for the search
*
* This function will return the minimum and maximum ranges for IDs
*
* 0: The function completed successfully
* EINVAL: The provided ranges are impossible (such as maximum < minimum)
*
* preferred_min: The special-case minimum value for a specifically-
* requested ID, which may be lower than the standard min_id
*/
static int get_ranges (bool sys_group, gid_t *min_id, gid_t *max_id,
gid_t *preferred_min)
{
gid_t gid_def_max = 0;
if (sys_group) {
/* System groups */
/* A requested ID is allowed to be below the autoselect range */
*preferred_min = (gid_t) 1;
/* Get the minimum ID range from login.defs or default to 101 */
*min_id = (gid_t) getdef_ulong ("SYS_GID_MIN", 101UL);
/*
* If SYS_GID_MAX is unspecified, we should assume it to be one
* less than the GID_MIN (which is reserved for non-system accounts)
*/
gid_def_max = (gid_t) getdef_ulong ("GID_MIN", 1000UL) - 1;
*max_id = (gid_t) getdef_ulong ("SYS_GID_MAX",
(unsigned long) gid_def_max);
/* Check that the ranges make sense */
if (*max_id < *min_id) {
(void) fprintf (shadow_logfd,
_("%s: Invalid configuration: SYS_GID_MIN (%lu), "
"GID_MIN (%lu), SYS_GID_MAX (%lu)\n"),
Prog, (unsigned long) *min_id,
getdef_ulong ("GID_MIN", 1000UL),
(unsigned long) *max_id);
return EINVAL;
}
} else {
/* Non-system groups */
/* Get the values from login.defs or use reasonable defaults */
*min_id = (gid_t) getdef_ulong ("GID_MIN", 1000UL);
*max_id = (gid_t) getdef_ulong ("GID_MAX", 60000UL);
/*
* The preferred minimum should match the standard ID minimum
* for non-system groups.
*/
*preferred_min = *min_id;
/* Check that the ranges make sense */
if (*max_id < *min_id) {
(void) fprintf (shadow_logfd,
_("%s: Invalid configuration: GID_MIN (%lu), "
"GID_MAX (%lu)\n"),
Prog, (unsigned long) *min_id,
(unsigned long) *max_id);
return EINVAL;
}
}
return 0;
}
/*
* check_gid - See if the requested GID is available
*
* On success, return 0
* If the ID is in use, return EEXIST
* If the ID is outside the range, return ERANGE
* In other cases, return errno from getgrgid()
*/
static int check_gid (const gid_t gid,
const gid_t gid_min,
const gid_t gid_max,
bool *used_gids)
{
/* First test that the preferred ID is in the range */
if (gid < gid_min || gid > gid_max) {
return ERANGE;
}
/*
* Check whether we already detected this GID
* using the gr_next() loop
*/
if (used_gids != NULL && used_gids[gid]) {
return EEXIST;
}
/* Check if the GID exists according to NSS */
errno = 0;
if (prefix_getgrgid (gid) != NULL) {
return EEXIST;
} else {
/* getgrgid() was NULL
* we have to ignore errors as temporary
* failures of remote user identity services
* would completely block user/group creation
*/
}
/* If we've made it here, the GID must be available */
return 0;
}
/* /*
* find_new_gid - Find a new unused GID. * find_new_gid - Find a new unused GID.
* *
@@ -49,161 +161,338 @@
* Return 0 on success, -1 if no unused GIDs are available. * Return 0 on success, -1 if no unused GIDs are available.
*/ */
int find_new_gid (bool sys_group, int find_new_gid (bool sys_group,
gid_t *gid, gid_t *gid,
/*@null@*/gid_t const *preferred_gid) /*@null@*/gid_t const *preferred_gid)
{ {
const struct group *grp;
gid_t gid_min, gid_max, group_id;
bool *used_gids; bool *used_gids;
const struct group *grp;
gid_t gid_min, gid_max, preferred_min;
gid_t id;
gid_t lowest_found, highest_found;
int result;
int nospam = 0;
assert (gid != NULL); assert(gid != NULL);
if (!sys_group) { /*
gid_min = (gid_t) getdef_ulong ("GID_MIN", 1000UL); * First, figure out what ID range is appropriate for
gid_max = (gid_t) getdef_ulong ("GID_MAX", 60000UL); * automatic assignment
if (gid_max < gid_min) { */
(void) fprintf (stderr, result = get_ranges (sys_group, &gid_min, &gid_max, &preferred_min);
_("%s: Invalid configuration: GID_MIN (%lu), GID_MAX (%lu)\n"), if (result == EINVAL) {
Prog, (unsigned long) gid_min, (unsigned long) gid_max); return -1;
return -1; }
}
} else { /* Check if the preferred GID is available */
gid_min = (gid_t) getdef_ulong ("SYS_GID_MIN", 101UL); if (preferred_gid) {
gid_max = (gid_t) getdef_ulong ("GID_MIN", 1000UL) - 1; result = check_gid (*preferred_gid, preferred_min, gid_max, NULL);
gid_max = (gid_t) getdef_ulong ("SYS_GID_MAX", (unsigned long) gid_max); if (result == 0) {
if (gid_max < gid_min) { /*
(void) fprintf (stderr, * Make sure the GID isn't queued for use already
_("%s: Invalid configuration: SYS_GID_MIN (%lu), GID_MIN (%lu), SYS_GID_MAX (%lu)\n"), */
Prog, (unsigned long) gid_min, getdef_ulong ("GID_MIN", 1000UL), (unsigned long) gid_max); if (gr_locate_gid (*preferred_gid) == NULL) {
*gid = *preferred_gid;
return 0;
}
/*
* gr_locate_gid() found the GID in an as-yet uncommitted
* entry. We'll proceed below and auto-set a GID.
*/
} else if (result == EEXIST || result == ERANGE) {
/*
* Continue on below. At this time, we won't
* treat these two cases differently.
*/
} else {
/*
* An unexpected error occurred. We should report
* this and fail the group creation.
* This differs from the automatic creation
* behavior below, since if a specific GID was
* requested and generated an error, the user is
* more likely to want to stop and address the
* issue.
*/
fprintf (shadow_logfd,
_("%s: Encountered error attempting to use "
"preferred GID: %s\n"),
Prog, strerror (result));
return -1; return -1;
} }
} }
/*
* Search the entire group file,
* looking for the next unused value.
*
* We first check the local database with gr_rewind/gr_next to find
* all local values that are in use.
*
* We then compare the next free value to all databases (local and
* remote) and iterate until we find a free one. If there are free
* values beyond the lowest (system groups) or highest (non-system
* groups), we will prefer those and avoid potentially reclaiming a
* deleted group (which can be a security issue, since it may grant
* access to files belonging to that former group).
*
* If there are no GIDs available at the end of the search, we will
* have no choice but to iterate through the range looking for gaps.
*
*/
/* Create an array to hold all of the discovered GIDs */
used_gids = malloc (sizeof (bool) * (gid_max +1)); used_gids = malloc (sizeof (bool) * (gid_max +1));
if (NULL == used_gids) { if (NULL == used_gids) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: failed to allocate memory: %s\n"), _("%s: failed to allocate memory: %s\n"),
Prog, strerror (errno)); Prog, strerror (errno));
return -1; return -1;
} }
memset (used_gids, false, sizeof (bool) * (gid_max + 1)); memset (used_gids, false, sizeof (bool) * (gid_max + 1));
if ( (NULL != preferred_gid) /* First look for the lowest and highest value in the local database */
&& (*preferred_gid >= gid_min) (void) gr_rewind ();
&& (*preferred_gid <= gid_max) highest_found = gid_min;
/* Check if the user exists according to NSS */ lowest_found = gid_max;
&& (getgrgid (*preferred_gid) == NULL) while ((grp = gr_next ()) != NULL) {
/* Check also the local database in case of uncommitted /*
* changes */ * Does this entry have a lower GID than the lowest we've found
&& (gr_locate_gid (*preferred_gid) == NULL)) { * so far?
*gid = *preferred_gid;
free (used_gids);
return 0;
}
/*
* Search the entire group file,
* looking for the largest unused value.
*
* We check the list of groups according to NSS (setgrent/getgrent),
* but we also check the local database (gr_rewind/gr_next) in case
* some groups were created but the changes were not committed yet.
*/
if (sys_group) {
gid_t id;
/* setgrent / getgrent / endgrent can be very slow with
* LDAP configurations (and many accounts).
* Since there is a limited amount of IDs to be tested
* for system accounts, we just check the existence
* of IDs with getgrgid.
*/ */
group_id = gid_max; if ((grp->gr_gid <= lowest_found) && (grp->gr_gid >= gid_min)) {
for (id = gid_max; id >= gid_min; id--) { lowest_found = grp->gr_gid - 1;
if (getgrgid (id) != NULL) {
group_id = id - 1;
used_gids[id] = true;
}
} }
(void) gr_rewind (); /*
while ((grp = gr_next ()) != NULL) { * Does this entry have a higher GID than the highest we've found
if ((grp->gr_gid <= group_id) && (grp->gr_gid >= gid_min)) { * so far?
group_id = grp->gr_gid - 1; */
} if ((grp->gr_gid >= highest_found) && (grp->gr_gid <= gid_max)) {
/* create index of used GIDs */ highest_found = grp->gr_gid + 1;
if (grp->gr_gid <= gid_max) {
used_gids[grp->gr_gid] = true;
}
} }
} else {
group_id = gid_min;
setgrent ();
while ((grp = getgrent ()) != NULL) {
if ((grp->gr_gid >= group_id) && (grp->gr_gid <= gid_max)) {
group_id = grp->gr_gid + 1;
}
/* create index of used GIDs */
if (grp->gr_gid <= gid_max) {
used_gids[grp->gr_gid] = true;
}
}
endgrent ();
(void) gr_rewind (); /* create index of used GIDs */
while ((grp = gr_next ()) != NULL) { if (grp->gr_gid >= gid_min
if ((grp->gr_gid >= group_id) && (grp->gr_gid <= gid_max)) { && grp->gr_gid <= gid_max) {
group_id = grp->gr_gid + 1;
} used_gids[grp->gr_gid] = true;
/* create index of used GIDs */
if (grp->gr_gid <= gid_max) {
used_gids[grp->gr_gid] = true;
}
} }
} }
/*
* If a group (resp. system group) with GID equal to GID_MAX (resp.
* GID_MIN) exists, the above algorithm will give us GID_MAX+1
* (resp. GID_MIN-1) even if not unique. Search for the first free
* GID starting with GID_MIN (resp. GID_MAX).
*/
if (sys_group) { if (sys_group) {
if (group_id < gid_min) { /*
for (group_id = gid_max; group_id >= gid_min; group_id--) { * For system groups, we want to start from the
if (false == used_gids[group_id]) { * top of the range and work downwards.
break; */
}
} /*
if (group_id < gid_min) { * At the conclusion of the gr_next() search, we will either
fprintf (stderr, * have a presumed-free GID or we will be at GID_MIN - 1.
_("%s: Can't get unique system GID (no more available GIDs)\n"), */
Prog); if (lowest_found < gid_min) {
SYSLOG ((LOG_WARN, /*
"no more available GID on the system")); * In this case, a GID is in use at GID_MIN.
*
* We will reset the search to GID_MAX and proceed down
* through all the GIDs (skipping those we detected with
* used_gids) for a free one. It is a known issue that
* this may result in reusing a previously-deleted GID,
* so administrators should be instructed to use this
* auto-detection with care (and prefer to assign GIDs
* explicitly).
*/
lowest_found = gid_max;
}
/* Search through all of the IDs in the range */
for (id = lowest_found; id >= gid_min; id--) {
result = check_gid (id, gid_min, gid_max, used_gids);
if (result == 0) {
/* This GID is available. Return it. */
*gid = id;
free (used_gids); free (used_gids);
return -1; return 0;
} else if (result == EEXIST) {
/* This GID is in use, we'll continue to the next */
} else {
/*
* An unexpected error occurred.
*
* Only report it the first time to avoid spamming
* the logs
*
*/
if (!nospam) {
fprintf (shadow_logfd,
_("%s: Can't get unique system GID (%s). "
"Suppressing additional messages.\n"),
Prog, strerror (result));
SYSLOG ((LOG_ERR,
"Error checking available GIDs: %s",
strerror (result)));
nospam = 1;
}
/*
* We will continue anyway. Hopefully a later GID
* will work properly.
*/
} }
} }
} else {
if (group_id > gid_max) { /*
for (group_id = gid_min; group_id <= gid_max; group_id++) { * If we get all the way through the loop, try again from GID_MAX,
if (false == used_gids[group_id]) { * unless that was where we previously started. (NOTE: the worst-case
break; * scenario here is that we will run through (GID_MAX - GID_MIN - 1)
* cycles *again* if we fall into this case with lowest_found as
* GID_MAX - 1, all groups in the range in use and maintained by
* network services such as LDAP.)
*/
if (lowest_found != gid_max) {
for (id = gid_max; id >= gid_min; id--) {
result = check_gid (id, gid_min, gid_max, used_gids);
if (result == 0) {
/* This GID is available. Return it. */
*gid = id;
free (used_gids);
return 0;
} else if (result == EEXIST) {
/* This GID is in use, we'll continue to the next */
} else {
/*
* An unexpected error occurred.
*
* Only report it the first time to avoid spamming
* the logs
*
*/
if (!nospam) {
fprintf (shadow_logfd,
_("%s: Can't get unique system GID (%s). "
"Suppressing additional messages.\n"),
Prog, strerror (result));
SYSLOG ((LOG_ERR,
"Error checking available GIDs: %s",
strerror (result)));
nospam = 1;
}
/*
* We will continue anyway. Hopefully a later GID
* will work properly.
*/
} }
} }
if (group_id > gid_max) { }
fprintf (stderr, } else { /* !sys_group */
_("%s: Can't get unique GID (no more available GIDs)\n"), /*
Prog); * For non-system groups, we want to start from the
SYSLOG ((LOG_WARN, "no more available GID on the system")); * bottom of the range and work upwards.
*/
/*
* At the conclusion of the gr_next() search, we will either
* have a presumed-free GID or we will be at GID_MAX + 1.
*/
if (highest_found > gid_max) {
/*
* In this case, a GID is in use at GID_MAX.
*
* We will reset the search to GID_MIN and proceed up
* through all the GIDs (skipping those we detected with
* used_gids) for a free one. It is a known issue that
* this may result in reusing a previously-deleted GID,
* so administrators should be instructed to use this
* auto-detection with care (and prefer to assign GIDs
* explicitly).
*/
highest_found = gid_min;
}
/* Search through all of the IDs in the range */
for (id = highest_found; id <= gid_max; id++) {
result = check_gid (id, gid_min, gid_max, used_gids);
if (result == 0) {
/* This GID is available. Return it. */
*gid = id;
free (used_gids); free (used_gids);
return -1; return 0;
} else if (result == EEXIST) {
/* This GID is in use, we'll continue to the next */
} else {
/*
* An unexpected error occurred.
*
* Only report it the first time to avoid spamming
* the logs
*
*/
if (!nospam) {
fprintf (shadow_logfd,
_("%s: Can't get unique GID (%s). "
"Suppressing additional messages.\n"),
Prog, strerror (result));
SYSLOG ((LOG_ERR,
"Error checking available GIDs: %s",
strerror (result)));
nospam = 1;
}
/*
* We will continue anyway. Hopefully a later GID
* will work properly.
*/
}
}
/*
* If we get all the way through the loop, try again from GID_MIN,
* unless that was where we previously started. (NOTE: the worst-case
* scenario here is that we will run through (GID_MAX - GID_MIN - 1)
* cycles *again* if we fall into this case with highest_found as
* GID_MIN + 1, all groups in the range in use and maintained by
* network services such as LDAP.)
*/
if (highest_found != gid_min) {
for (id = gid_min; id <= gid_max; id++) {
result = check_gid (id, gid_min, gid_max, used_gids);
if (result == 0) {
/* This GID is available. Return it. */
*gid = id;
free (used_gids);
return 0;
} else if (result == EEXIST) {
/* This GID is in use, we'll continue to the next */
} else {
/*
* An unexpected error occurred.
*
* Only report it the first time to avoid spamming
* the logs
*
*/
if (!nospam) {
fprintf (shadow_logfd,
_("%s: Can't get unique GID (%s). "
"Suppressing additional messages.\n"),
Prog, strerror (result));
SYSLOG ((LOG_ERR,
"Error checking available GIDs: %s",
strerror (result)));
nospam = 1;
}
/*
* We will continue anyway. Hopefully a later GID
* will work properly.
*/
}
} }
} }
} }
/* The code reached here and found no available IDs in the range */
fprintf (shadow_logfd,
_("%s: Can't get unique GID (no more available GIDs)\n"),
Prog);
SYSLOG ((LOG_WARN, "no more available GIDs on the system"));
free (used_gids); free (used_gids);
*gid = group_id; return -1;
return 0;
} }
+3 -4
View File
@@ -46,8 +46,7 @@
* *
* Return 0 on success, -1 if no unused GIDs are available. * Return 0 on success, -1 if no unused GIDs are available.
*/ */
int find_new_sub_gids (const char *owner, int find_new_sub_gids (gid_t *range_start, unsigned long *range_count)
gid_t *range_start, unsigned long *range_count)
{ {
unsigned long min, max; unsigned long min, max;
unsigned long count; unsigned long count;
@@ -61,7 +60,7 @@ int find_new_sub_gids (const char *owner,
count = getdef_ulong ("SUB_GID_COUNT", 65536); count = getdef_ulong ("SUB_GID_COUNT", 65536);
if (min > max || count >= max || (min + count - 1) > max) { if (min > max || count >= max || (min + count - 1) > max) {
(void) fprintf (stderr, (void) fprintf (shadow_logfd,
_("%s: Invalid configuration: SUB_GID_MIN (%lu)," _("%s: Invalid configuration: SUB_GID_MIN (%lu),"
" SUB_GID_MAX (%lu), SUB_GID_COUNT (%lu)\n"), " SUB_GID_MAX (%lu), SUB_GID_COUNT (%lu)\n"),
Prog, min, max, count); Prog, min, max, count);
@@ -70,7 +69,7 @@ int find_new_sub_gids (const char *owner,
start = sub_gid_find_free_range(min, max, count); start = sub_gid_find_free_range(min, max, count);
if (start == (gid_t)-1) { if (start == (gid_t)-1) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Can't get unique subordinate GID range\n"), _("%s: Can't get unique subordinate GID range\n"),
Prog); Prog);
SYSLOG ((LOG_WARN, "no more available subordinate GIDs on the system")); SYSLOG ((LOG_WARN, "no more available subordinate GIDs on the system"));
+3 -4
View File
@@ -46,8 +46,7 @@
* *
* Return 0 on success, -1 if no unused UIDs are available. * Return 0 on success, -1 if no unused UIDs are available.
*/ */
int find_new_sub_uids (const char *owner, int find_new_sub_uids (uid_t *range_start, unsigned long *range_count)
uid_t *range_start, unsigned long *range_count)
{ {
unsigned long min, max; unsigned long min, max;
unsigned long count; unsigned long count;
@@ -61,7 +60,7 @@ int find_new_sub_uids (const char *owner,
count = getdef_ulong ("SUB_UID_COUNT", 65536); count = getdef_ulong ("SUB_UID_COUNT", 65536);
if (min > max || count >= max || (min + count - 1) > max) { if (min > max || count >= max || (min + count - 1) > max) {
(void) fprintf (stderr, (void) fprintf (shadow_logfd,
_("%s: Invalid configuration: SUB_UID_MIN (%lu)," _("%s: Invalid configuration: SUB_UID_MIN (%lu),"
" SUB_UID_MAX (%lu), SUB_UID_COUNT (%lu)\n"), " SUB_UID_MAX (%lu), SUB_UID_COUNT (%lu)\n"),
Prog, min, max, count); Prog, min, max, count);
@@ -70,7 +69,7 @@ int find_new_sub_uids (const char *owner,
start = sub_uid_find_free_range(min, max, count); start = sub_uid_find_free_range(min, max, count);
if (start == (uid_t)-1) { if (start == (uid_t)-1) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: Can't get unique subordinate UID range\n"), _("%s: Can't get unique subordinate UID range\n"),
Prog); Prog);
SYSLOG ((LOG_WARN, "no more available subordinate UIDs on the system")); SYSLOG ((LOG_WARN, "no more available subordinate UIDs on the system"));
+412 -123
View File
@@ -1,6 +1,7 @@
/* /*
* Copyright (c) 1991 - 1994, Julianne Frances Haugh * Copyright (c) 1991 - 1994, Julianne Frances Haugh
* Copyright (c) 2008 - 2011, Nicolas François * Copyright (c) 2008 - 2011, Nicolas François
* Copyright (c) 2014, Red Hat, Inc.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -38,6 +39,117 @@
#include "pwio.h" #include "pwio.h"
#include "getdef.h" #include "getdef.h"
/*
* get_ranges - Get the minimum and maximum ID ranges for the search
*
* This function will return the minimum and maximum ranges for IDs
*
* 0: The function completed successfully
* EINVAL: The provided ranges are impossible (such as maximum < minimum)
*
* preferred_min: The special-case minimum value for a specifically-
* requested ID, which may be lower than the standard min_id
*/
static int get_ranges (bool sys_user, uid_t *min_id, uid_t *max_id,
uid_t *preferred_min)
{
uid_t uid_def_max = 0;
if (sys_user) {
/* System users */
/* A requested ID is allowed to be below the autoselect range */
*preferred_min = (uid_t) 1;
/* Get the minimum ID range from login.defs or default to 101 */
*min_id = (uid_t) getdef_ulong ("SYS_UID_MIN", 101UL);
/*
* If SYS_UID_MAX is unspecified, we should assume it to be one
* less than the UID_MIN (which is reserved for non-system accounts)
*/
uid_def_max = (uid_t) getdef_ulong ("UID_MIN", 1000UL) - 1;
*max_id = (uid_t) getdef_ulong ("SYS_UID_MAX",
(unsigned long) uid_def_max);
/* Check that the ranges make sense */
if (*max_id < *min_id) {
(void) fprintf (shadow_logfd,
_("%s: Invalid configuration: SYS_UID_MIN (%lu), "
"UID_MIN (%lu), SYS_UID_MAX (%lu)\n"),
Prog, (unsigned long) *min_id,
getdef_ulong ("UID_MIN", 1000UL),
(unsigned long) *max_id);
return EINVAL;
}
} else {
/* Non-system users */
/* Get the values from login.defs or use reasonable defaults */
*min_id = (uid_t) getdef_ulong ("UID_MIN", 1000UL);
*max_id = (uid_t) getdef_ulong ("UID_MAX", 60000UL);
/*
* The preferred minimum should match the standard ID minimum
* for non-system users.
*/
*preferred_min = *min_id;
/* Check that the ranges make sense */
if (*max_id < *min_id) {
(void) fprintf (shadow_logfd,
_("%s: Invalid configuration: UID_MIN (%lu), "
"UID_MAX (%lu)\n"),
Prog, (unsigned long) *min_id,
(unsigned long) *max_id);
return EINVAL;
}
}
return 0;
}
/*
* check_uid - See if the requested UID is available
*
* On success, return 0
* If the ID is in use, return EEXIST
* If the ID is outside the range, return ERANGE
* In other cases, return errno from getpwuid()
*/
static int check_uid(const uid_t uid,
const uid_t uid_min,
const uid_t uid_max,
bool *used_uids)
{
/* First test that the preferred ID is in the range */
if (uid < uid_min || uid > uid_max) {
return ERANGE;
}
/*
* Check whether we already detected this UID
* using the pw_next() loop
*/
if (used_uids != NULL && used_uids[uid]) {
return EEXIST;
}
/* Check if the UID exists according to NSS */
errno = 0;
if (prefix_getpwuid(uid) != NULL) {
return EEXIST;
} else {
/* getpwuid() was NULL
* we have to ignore errors as temporary
* failures of remote user identity services
* would completely block user/group creation
*/
}
/* If we've made it here, the UID must be available */
return 0;
}
/* /*
* find_new_uid - Find a new unused UID. * find_new_uid - Find a new unused UID.
* *
@@ -48,162 +160,339 @@
* *
* Return 0 on success, -1 if no unused UIDs are available. * Return 0 on success, -1 if no unused UIDs are available.
*/ */
int find_new_uid (bool sys_user, int find_new_uid(bool sys_user,
uid_t *uid, uid_t *uid,
/*@null@*/uid_t const *preferred_uid) /*@null@*/uid_t const *preferred_uid)
{ {
const struct passwd *pwd;
uid_t uid_min, uid_max, user_id;
bool *used_uids; bool *used_uids;
const struct passwd *pwd;
uid_t uid_min, uid_max, preferred_min;
uid_t id;
uid_t lowest_found, highest_found;
int result;
int nospam = 0;
assert (uid != NULL); assert (uid != NULL);
if (!sys_user) { /*
uid_min = (uid_t) getdef_ulong ("UID_MIN", 1000UL); * First, figure out what ID range is appropriate for
uid_max = (uid_t) getdef_ulong ("UID_MAX", 60000UL); * automatic assignment
if (uid_max < uid_min) { */
(void) fprintf (stderr, result = get_ranges (sys_user, &uid_min, &uid_max, &preferred_min);
_("%s: Invalid configuration: UID_MIN (%lu), UID_MAX (%lu)\n"), if (result == EINVAL) {
Prog, (unsigned long) uid_min, (unsigned long) uid_max); return -1;
return -1; }
}
} else { /* Check if the preferred UID is available */
uid_min = (uid_t) getdef_ulong ("SYS_UID_MIN", 101UL); if (preferred_uid) {
uid_max = (uid_t) getdef_ulong ("UID_MIN", 1000UL) - 1; result = check_uid (*preferred_uid, preferred_min, uid_max, NULL);
uid_max = (uid_t) getdef_ulong ("SYS_UID_MAX", (unsigned long) uid_max); if (result == 0) {
if (uid_max < uid_min) { /*
(void) fprintf (stderr, * Make sure the UID isn't queued for use already
_("%s: Invalid configuration: SYS_UID_MIN (%lu), UID_MIN (%lu), SYS_UID_MAX (%lu)\n"), */
Prog, (unsigned long) uid_min, getdef_ulong ("UID_MIN", 1000UL), (unsigned long) uid_max); if (pw_locate_uid (*preferred_uid) == NULL) {
*uid = *preferred_uid;
return 0;
}
/*
* pw_locate_uid() found the UID in an as-yet uncommitted
* entry. We'll proceed below and auto-set an UID.
*/
} else if (result == EEXIST || result == ERANGE) {
/*
* Continue on below. At this time, we won't
* treat these two cases differently.
*/
} else {
/*
* An unexpected error occurred. We should report
* this and fail the user creation.
* This differs from the automatic creation
* behavior below, since if a specific UID was
* requested and generated an error, the user is
* more likely to want to stop and address the
* issue.
*/
fprintf (shadow_logfd,
_("%s: Encountered error attempting to use "
"preferred UID: %s\n"),
Prog, strerror (result));
return -1; return -1;
} }
} }
/*
* Search the entire passwd file,
* looking for the next unused value.
*
* We first check the local database with pw_rewind/pw_next to find
* all local values that are in use.
*
* We then compare the next free value to all databases (local and
* remote) and iterate until we find a free one. If there are free
* values beyond the lowest (system users) or highest (non-system
* users), we will prefer those and avoid potentially reclaiming a
* deleted user (which can be a security issue, since it may grant
* access to files belonging to that former user).
*
* If there are no UIDs available at the end of the search, we will
* have no choice but to iterate through the range looking for gaps.
*
*/
/* Create an array to hold all of the discovered UIDs */
used_uids = malloc (sizeof (bool) * (uid_max +1)); used_uids = malloc (sizeof (bool) * (uid_max +1));
if (NULL == used_uids) { if (NULL == used_uids) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: failed to allocate memory: %s\n"), _("%s: failed to allocate memory: %s\n"),
Prog, strerror (errno)); Prog, strerror (errno));
return -1; return -1;
} }
memset (used_uids, false, sizeof (bool) * (uid_max + 1)); memset (used_uids, false, sizeof (bool) * (uid_max + 1));
if ( (NULL != preferred_uid) /* First look for the lowest and highest value in the local database */
&& (*preferred_uid >= uid_min) (void) pw_rewind ();
&& (*preferred_uid <= uid_max) highest_found = uid_min;
/* Check if the user exists according to NSS */ lowest_found = uid_max;
&& (getpwuid (*preferred_uid) == NULL) while ((pwd = pw_next ()) != NULL) {
/* Check also the local database in case of uncommitted /*
* changes */ * Does this entry have a lower UID than the lowest we've found
&& (pw_locate_uid (*preferred_uid) == NULL)) { * so far?
*uid = *preferred_uid;
free (used_uids);
return 0;
}
/*
* Search the entire password file,
* looking for the largest unused value.
*
* We check the list of users according to NSS (setpwent/getpwent),
* but we also check the local database (pw_rewind/pw_next) in case
* some users were created but the changes were not committed yet.
*/
if (sys_user) {
uid_t id;
/* setpwent / getpwent / endpwent can be very slow with
* LDAP configurations (and many accounts).
* Since there is a limited amount of IDs to be tested
* for system accounts, we just check the existence
* of IDs with getpwuid.
*/ */
user_id = uid_max; if ((pwd->pw_uid <= lowest_found) && (pwd->pw_uid >= uid_min)) {
for (id = uid_max; id >= uid_min; id--) { lowest_found = pwd->pw_uid - 1;
if (getpwuid (id) != NULL) {
user_id = id - 1;
used_uids[id] = true;
}
} }
(void) pw_rewind (); /*
while ((pwd = pw_next ()) != NULL) { * Does this entry have a higher UID than the highest we've found
if ((pwd->pw_uid <= user_id) && (pwd->pw_uid >= uid_min)) { * so far?
user_id = pwd->pw_uid - 1; */
} if ((pwd->pw_uid >= highest_found) && (pwd->pw_uid <= uid_max)) {
/* create index of used UIDs */ highest_found = pwd->pw_uid + 1;
if (pwd->pw_uid <= uid_max) {
used_uids[pwd->pw_uid] = true;
}
} }
} else {
user_id = uid_min;
setpwent ();
while ((pwd = getpwent ()) != NULL) {
if ((pwd->pw_uid >= user_id) && (pwd->pw_uid <= uid_max)) {
user_id = pwd->pw_uid + 1;
}
/* create index of used UIDs */
if (pwd->pw_uid <= uid_max) {
used_uids[pwd->pw_uid] = true;
}
}
endpwent ();
(void) pw_rewind (); /* create index of used UIDs */
while ((pwd = pw_next ()) != NULL) { if (pwd->pw_uid >= uid_min
if ((pwd->pw_uid >= user_id) && (pwd->pw_uid <= uid_max)) { && pwd->pw_uid <= uid_max) {
user_id = pwd->pw_uid + 1;
} used_uids[pwd->pw_uid] = true;
/* create index of used UIDs */
if (pwd->pw_uid <= uid_max) {
used_uids[pwd->pw_uid] = true;
}
} }
} }
/*
* If a user (resp. system user) with UID equal to UID_MAX (resp.
* UID_MIN) exists, the above algorithm will give us UID_MAX+1
* (resp. UID_MIN-1) even if not unique. Search for the first free
* UID starting with UID_MIN (resp. UID_MAX).
*/
if (sys_user) { if (sys_user) {
if (user_id < uid_min) { /*
for (user_id = uid_max; user_id >= uid_min; user_id--) { * For system users, we want to start from the
if (false == used_uids[user_id]) { * top of the range and work downwards.
break; */
}
} /*
if (user_id < uid_min ) { * At the conclusion of the pw_next() search, we will either
fprintf (stderr, * have a presumed-free UID or we will be at UID_MIN - 1.
_("%s: Can't get unique system UID (no more available UIDs)\n"), */
Prog); if (lowest_found < uid_min) {
SYSLOG ((LOG_WARN, /*
"no more available UID on the system")); * In this case, an UID is in use at UID_MIN.
*
* We will reset the search to UID_MAX and proceed down
* through all the UIDs (skipping those we detected with
* used_uids) for a free one. It is a known issue that
* this may result in reusing a previously-deleted UID,
* so administrators should be instructed to use this
* auto-detection with care (and prefer to assign UIDs
* explicitly).
*/
lowest_found = uid_max;
}
/* Search through all of the IDs in the range */
for (id = lowest_found; id >= uid_min; id--) {
result = check_uid (id, uid_min, uid_max, used_uids);
if (result == 0) {
/* This UID is available. Return it. */
*uid = id;
free (used_uids); free (used_uids);
return -1; return 0;
} else if (result == EEXIST) {
/* This UID is in use, we'll continue to the next */
} else {
/*
* An unexpected error occurred.
*
* Only report it the first time to avoid spamming
* the logs
*
*/
if (!nospam) {
fprintf (shadow_logfd,
_("%s: Can't get unique system UID (%s). "
"Suppressing additional messages.\n"),
Prog, strerror (result));
SYSLOG ((LOG_ERR,
"Error checking available UIDs: %s",
strerror (result)));
nospam = 1;
}
/*
* We will continue anyway. Hopefully a later UID
* will work properly.
*/
} }
} }
} else {
if (user_id > uid_max) { /*
for (user_id = uid_min; user_id <= uid_max; user_id++) { * If we get all the way through the loop, try again from UID_MAX,
if (false == used_uids[user_id]) { * unless that was where we previously started. (NOTE: the worst-case
break; * scenario here is that we will run through (UID_MAX - UID_MIN - 1)
* cycles *again* if we fall into this case with lowest_found as
* UID_MAX - 1, all users in the range in use and maintained by
* network services such as LDAP.)
*/
if (lowest_found != uid_max) {
for (id = uid_max; id >= uid_min; id--) {
result = check_uid (id, uid_min, uid_max, used_uids);
if (result == 0) {
/* This UID is available. Return it. */
*uid = id;
free (used_uids);
return 0;
} else if (result == EEXIST) {
/* This UID is in use, we'll continue to the next */
} else {
/*
* An unexpected error occurred.
*
* Only report it the first time to avoid spamming
* the logs
*
*/
if (!nospam) {
fprintf (shadow_logfd,
_("%s: Can't get unique system UID (%s). "
"Suppressing additional messages.\n"),
Prog, strerror (result));
SYSLOG((LOG_ERR,
"Error checking available UIDs: %s",
strerror (result)));
nospam = 1;
}
/*
* We will continue anyway. Hopefully a later UID
* will work properly.
*/
} }
} }
if (user_id > uid_max) { }
fprintf (stderr, } else { /* !sys_user */
_("%s: Can't get unique UID (no more available UIDs)\n"), /*
Prog); * For non-system users, we want to start from the
SYSLOG ((LOG_WARN, "no more available UID on the system")); * bottom of the range and work upwards.
*/
/*
* At the conclusion of the pw_next() search, we will either
* have a presumed-free UID or we will be at UID_MAX + 1.
*/
if (highest_found > uid_max) {
/*
* In this case, a UID is in use at UID_MAX.
*
* We will reset the search to UID_MIN and proceed up
* through all the UIDs (skipping those we detected with
* used_uids) for a free one. It is a known issue that
* this may result in reusing a previously-deleted UID,
* so administrators should be instructed to use this
* auto-detection with care (and prefer to assign UIDs
* explicitly).
*/
highest_found = uid_min;
}
/* Search through all of the IDs in the range */
for (id = highest_found; id <= uid_max; id++) {
result = check_uid (id, uid_min, uid_max, used_uids);
if (result == 0) {
/* This UID is available. Return it. */
*uid = id;
free (used_uids); free (used_uids);
return -1; return 0;
} else if (result == EEXIST) {
/* This UID is in use, we'll continue to the next */
} else {
/*
* An unexpected error occurred.
*
* Only report it the first time to avoid spamming
* the logs
*
*/
if (!nospam) {
fprintf (shadow_logfd,
_("%s: Can't get unique UID (%s). "
"Suppressing additional messages.\n"),
Prog, strerror (result));
SYSLOG ((LOG_ERR,
"Error checking available UIDs: %s",
strerror (result)));
nospam = 1;
}
/*
* We will continue anyway. Hopefully a later UID
* will work properly.
*/
}
}
/*
* If we get all the way through the loop, try again from UID_MIN,
* unless that was where we previously started. (NOTE: the worst-case
* scenario here is that we will run through (UID_MAX - UID_MIN - 1)
* cycles *again* if we fall into this case with highest_found as
* UID_MIN + 1, all users in the range in use and maintained by
* network services such as LDAP.)
*/
if (highest_found != uid_min) {
for (id = uid_min; id <= uid_max; id++) {
result = check_uid (id, uid_min, uid_max, used_uids);
if (result == 0) {
/* This UID is available. Return it. */
*uid = id;
free (used_uids);
return 0;
} else if (result == EEXIST) {
/* This UID is in use, we'll continue to the next */
} else {
/*
* An unexpected error occurred.
*
* Only report it the first time to avoid spamming
* the logs
*
*/
if (!nospam) {
fprintf (shadow_logfd,
_("%s: Can't get unique UID (%s). "
"Suppressing additional messages.\n"),
Prog, strerror (result));
SYSLOG ((LOG_ERR,
"Error checking available UIDs: %s",
strerror (result)));
nospam = 1;
}
/*
* We will continue anyway. Hopefully a later UID
* will work properly.
*/
}
} }
} }
} }
/* The code reached here and found no available IDs in the range */
fprintf (shadow_logfd,
_("%s: Can't get unique UID (no more available UIDs)\n"),
Prog);
SYSLOG ((LOG_WARN, "no more available UIDs on the system"));
free (used_uids); free (used_uids);
*uid = user_id; return -1;
return 0;
} }
+55 -53
View File
@@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 3.0.2. */ /* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison implementation for Yacc-like parsers in C /* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@
#define YYBISON 1 #define YYBISON 1
/* Bison version. */ /* Bison version. */
#define YYBISON_VERSION "3.0.2" #define YYBISON_VERSION "3.0.4"
/* Skeleton name. */ /* Skeleton name. */
#define YYSKELETON_NAME "yacc.c" #define YYSKELETON_NAME "yacc.c"
@@ -131,7 +131,7 @@
#endif #endif
/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc), /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
as well as gratuitiously global symbol names, so we can have multiple as well as gratuitously global symbol names, so we can have multiple
yacc generated parsers in the same program. Note that these are only yacc generated parsers in the same program. Note that these are only
the variables produced by yacc. If other parser generators (bison, the variables produced by yacc. If other parser generators (bison,
byacc, etc) produce additional global names that conflict at link time, byacc, etc) produce additional global names that conflict at link time,
@@ -303,7 +303,7 @@ extern int yydebug;
/* Value type. */ /* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE YYSTYPE;
union YYSTYPE union YYSTYPE
{ {
#line 172 "getdate.y" /* yacc.c:355 */ #line 172 "getdate.y" /* yacc.c:355 */
@@ -313,6 +313,8 @@ union YYSTYPE
#line 315 "getdate.c" /* yacc.c:355 */ #line 315 "getdate.c" /* yacc.c:355 */
}; };
typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
#endif #endif
@@ -326,7 +328,7 @@ int yyparse (void);
/* Copy the second part of user declarations. */ /* Copy the second part of user declarations. */
#line 330 "getdate.c" /* yacc.c:358 */ #line 332 "getdate.c" /* yacc.c:358 */
#ifdef short #ifdef short
# undef short # undef short
@@ -1445,7 +1447,7 @@ yyreduce:
{ {
yyHaveTime++; yyHaveTime++;
} }
#line 1449 "getdate.c" /* yacc.c:1646 */ #line 1451 "getdate.c" /* yacc.c:1646 */
break; break;
case 5: case 5:
@@ -1453,7 +1455,7 @@ yyreduce:
{ {
yyHaveZone++; yyHaveZone++;
} }
#line 1457 "getdate.c" /* yacc.c:1646 */ #line 1459 "getdate.c" /* yacc.c:1646 */
break; break;
case 6: case 6:
@@ -1461,7 +1463,7 @@ yyreduce:
{ {
yyHaveDate++; yyHaveDate++;
} }
#line 1465 "getdate.c" /* yacc.c:1646 */ #line 1467 "getdate.c" /* yacc.c:1646 */
break; break;
case 7: case 7:
@@ -1469,7 +1471,7 @@ yyreduce:
{ {
yyHaveDay++; yyHaveDay++;
} }
#line 1473 "getdate.c" /* yacc.c:1646 */ #line 1475 "getdate.c" /* yacc.c:1646 */
break; break;
case 8: case 8:
@@ -1477,7 +1479,7 @@ yyreduce:
{ {
yyHaveRel++; yyHaveRel++;
} }
#line 1481 "getdate.c" /* yacc.c:1646 */ #line 1483 "getdate.c" /* yacc.c:1646 */
break; break;
case 10: case 10:
@@ -1488,7 +1490,7 @@ yyreduce:
yySeconds = 0; yySeconds = 0;
yyMeridian = (yyvsp[0].Meridian); yyMeridian = (yyvsp[0].Meridian);
} }
#line 1492 "getdate.c" /* yacc.c:1646 */ #line 1494 "getdate.c" /* yacc.c:1646 */
break; break;
case 11: case 11:
@@ -1499,7 +1501,7 @@ yyreduce:
yySeconds = 0; yySeconds = 0;
yyMeridian = (yyvsp[0].Meridian); yyMeridian = (yyvsp[0].Meridian);
} }
#line 1503 "getdate.c" /* yacc.c:1646 */ #line 1505 "getdate.c" /* yacc.c:1646 */
break; break;
case 12: case 12:
@@ -1513,7 +1515,7 @@ yyreduce:
? -(yyvsp[0].Number) % 100 + (-(yyvsp[0].Number) / 100) * 60 ? -(yyvsp[0].Number) % 100 + (-(yyvsp[0].Number) / 100) * 60
: - ((yyvsp[0].Number) % 100 + ((yyvsp[0].Number) / 100) * 60)); : - ((yyvsp[0].Number) % 100 + ((yyvsp[0].Number) / 100) * 60));
} }
#line 1517 "getdate.c" /* yacc.c:1646 */ #line 1519 "getdate.c" /* yacc.c:1646 */
break; break;
case 13: case 13:
@@ -1524,7 +1526,7 @@ yyreduce:
yySeconds = (yyvsp[-1].Number); yySeconds = (yyvsp[-1].Number);
yyMeridian = (yyvsp[0].Meridian); yyMeridian = (yyvsp[0].Meridian);
} }
#line 1528 "getdate.c" /* yacc.c:1646 */ #line 1530 "getdate.c" /* yacc.c:1646 */
break; break;
case 14: case 14:
@@ -1539,7 +1541,7 @@ yyreduce:
? -(yyvsp[0].Number) % 100 + (-(yyvsp[0].Number) / 100) * 60 ? -(yyvsp[0].Number) % 100 + (-(yyvsp[0].Number) / 100) * 60
: - ((yyvsp[0].Number) % 100 + ((yyvsp[0].Number) / 100) * 60)); : - ((yyvsp[0].Number) % 100 + ((yyvsp[0].Number) / 100) * 60));
} }
#line 1543 "getdate.c" /* yacc.c:1646 */ #line 1545 "getdate.c" /* yacc.c:1646 */
break; break;
case 15: case 15:
@@ -1547,7 +1549,7 @@ yyreduce:
{ {
yyTimezone = (yyvsp[0].Number); yyTimezone = (yyvsp[0].Number);
} }
#line 1551 "getdate.c" /* yacc.c:1646 */ #line 1553 "getdate.c" /* yacc.c:1646 */
break; break;
case 16: case 16:
@@ -1555,7 +1557,7 @@ yyreduce:
{ {
yyTimezone = (yyvsp[0].Number) - 60; yyTimezone = (yyvsp[0].Number) - 60;
} }
#line 1559 "getdate.c" /* yacc.c:1646 */ #line 1561 "getdate.c" /* yacc.c:1646 */
break; break;
case 17: case 17:
@@ -1563,7 +1565,7 @@ yyreduce:
{ {
yyTimezone = (yyvsp[-1].Number) - 60; yyTimezone = (yyvsp[-1].Number) - 60;
} }
#line 1567 "getdate.c" /* yacc.c:1646 */ #line 1569 "getdate.c" /* yacc.c:1646 */
break; break;
case 18: case 18:
@@ -1572,7 +1574,7 @@ yyreduce:
yyDayOrdinal = 1; yyDayOrdinal = 1;
yyDayNumber = (yyvsp[0].Number); yyDayNumber = (yyvsp[0].Number);
} }
#line 1576 "getdate.c" /* yacc.c:1646 */ #line 1578 "getdate.c" /* yacc.c:1646 */
break; break;
case 19: case 19:
@@ -1581,7 +1583,7 @@ yyreduce:
yyDayOrdinal = 1; yyDayOrdinal = 1;
yyDayNumber = (yyvsp[-1].Number); yyDayNumber = (yyvsp[-1].Number);
} }
#line 1585 "getdate.c" /* yacc.c:1646 */ #line 1587 "getdate.c" /* yacc.c:1646 */
break; break;
case 20: case 20:
@@ -1590,7 +1592,7 @@ yyreduce:
yyDayOrdinal = (yyvsp[-1].Number); yyDayOrdinal = (yyvsp[-1].Number);
yyDayNumber = (yyvsp[0].Number); yyDayNumber = (yyvsp[0].Number);
} }
#line 1594 "getdate.c" /* yacc.c:1646 */ #line 1596 "getdate.c" /* yacc.c:1646 */
break; break;
case 21: case 21:
@@ -1599,7 +1601,7 @@ yyreduce:
yyMonth = (yyvsp[-2].Number); yyMonth = (yyvsp[-2].Number);
yyDay = (yyvsp[0].Number); yyDay = (yyvsp[0].Number);
} }
#line 1603 "getdate.c" /* yacc.c:1646 */ #line 1605 "getdate.c" /* yacc.c:1646 */
break; break;
case 22: case 22:
@@ -1622,7 +1624,7 @@ yyreduce:
yyYear = (yyvsp[0].Number); yyYear = (yyvsp[0].Number);
} }
} }
#line 1626 "getdate.c" /* yacc.c:1646 */ #line 1628 "getdate.c" /* yacc.c:1646 */
break; break;
case 23: case 23:
@@ -1633,7 +1635,7 @@ yyreduce:
yyMonth = -(yyvsp[-1].Number); yyMonth = -(yyvsp[-1].Number);
yyDay = -(yyvsp[0].Number); yyDay = -(yyvsp[0].Number);
} }
#line 1637 "getdate.c" /* yacc.c:1646 */ #line 1639 "getdate.c" /* yacc.c:1646 */
break; break;
case 24: case 24:
@@ -1644,7 +1646,7 @@ yyreduce:
yyMonth = (yyvsp[-1].Number); yyMonth = (yyvsp[-1].Number);
yyYear = -(yyvsp[0].Number); yyYear = -(yyvsp[0].Number);
} }
#line 1648 "getdate.c" /* yacc.c:1646 */ #line 1650 "getdate.c" /* yacc.c:1646 */
break; break;
case 25: case 25:
@@ -1653,7 +1655,7 @@ yyreduce:
yyMonth = (yyvsp[-1].Number); yyMonth = (yyvsp[-1].Number);
yyDay = (yyvsp[0].Number); yyDay = (yyvsp[0].Number);
} }
#line 1657 "getdate.c" /* yacc.c:1646 */ #line 1659 "getdate.c" /* yacc.c:1646 */
break; break;
case 26: case 26:
@@ -1663,7 +1665,7 @@ yyreduce:
yyDay = (yyvsp[-2].Number); yyDay = (yyvsp[-2].Number);
yyYear = (yyvsp[0].Number); yyYear = (yyvsp[0].Number);
} }
#line 1667 "getdate.c" /* yacc.c:1646 */ #line 1669 "getdate.c" /* yacc.c:1646 */
break; break;
case 27: case 27:
@@ -1672,7 +1674,7 @@ yyreduce:
yyMonth = (yyvsp[0].Number); yyMonth = (yyvsp[0].Number);
yyDay = (yyvsp[-1].Number); yyDay = (yyvsp[-1].Number);
} }
#line 1676 "getdate.c" /* yacc.c:1646 */ #line 1678 "getdate.c" /* yacc.c:1646 */
break; break;
case 28: case 28:
@@ -1682,7 +1684,7 @@ yyreduce:
yyDay = (yyvsp[-2].Number); yyDay = (yyvsp[-2].Number);
yyYear = (yyvsp[0].Number); yyYear = (yyvsp[0].Number);
} }
#line 1686 "getdate.c" /* yacc.c:1646 */ #line 1688 "getdate.c" /* yacc.c:1646 */
break; break;
case 29: case 29:
@@ -1695,7 +1697,7 @@ yyreduce:
yyRelMonth = -yyRelMonth; yyRelMonth = -yyRelMonth;
yyRelYear = -yyRelYear; yyRelYear = -yyRelYear;
} }
#line 1699 "getdate.c" /* yacc.c:1646 */ #line 1701 "getdate.c" /* yacc.c:1646 */
break; break;
case 31: case 31:
@@ -1703,7 +1705,7 @@ yyreduce:
{ {
yyRelYear += (yyvsp[-1].Number) * (yyvsp[0].Number); yyRelYear += (yyvsp[-1].Number) * (yyvsp[0].Number);
} }
#line 1707 "getdate.c" /* yacc.c:1646 */ #line 1709 "getdate.c" /* yacc.c:1646 */
break; break;
case 32: case 32:
@@ -1711,7 +1713,7 @@ yyreduce:
{ {
yyRelYear += (yyvsp[-1].Number) * (yyvsp[0].Number); yyRelYear += (yyvsp[-1].Number) * (yyvsp[0].Number);
} }
#line 1715 "getdate.c" /* yacc.c:1646 */ #line 1717 "getdate.c" /* yacc.c:1646 */
break; break;
case 33: case 33:
@@ -1719,7 +1721,7 @@ yyreduce:
{ {
yyRelYear++; yyRelYear++;
} }
#line 1723 "getdate.c" /* yacc.c:1646 */ #line 1725 "getdate.c" /* yacc.c:1646 */
break; break;
case 34: case 34:
@@ -1727,7 +1729,7 @@ yyreduce:
{ {
yyRelMonth += (yyvsp[-1].Number) * (yyvsp[0].Number); yyRelMonth += (yyvsp[-1].Number) * (yyvsp[0].Number);
} }
#line 1731 "getdate.c" /* yacc.c:1646 */ #line 1733 "getdate.c" /* yacc.c:1646 */
break; break;
case 35: case 35:
@@ -1735,7 +1737,7 @@ yyreduce:
{ {
yyRelMonth += (yyvsp[-1].Number) * (yyvsp[0].Number); yyRelMonth += (yyvsp[-1].Number) * (yyvsp[0].Number);
} }
#line 1739 "getdate.c" /* yacc.c:1646 */ #line 1741 "getdate.c" /* yacc.c:1646 */
break; break;
case 36: case 36:
@@ -1743,7 +1745,7 @@ yyreduce:
{ {
yyRelMonth++; yyRelMonth++;
} }
#line 1747 "getdate.c" /* yacc.c:1646 */ #line 1749 "getdate.c" /* yacc.c:1646 */
break; break;
case 37: case 37:
@@ -1751,7 +1753,7 @@ yyreduce:
{ {
yyRelDay += (yyvsp[-1].Number) * (yyvsp[0].Number); yyRelDay += (yyvsp[-1].Number) * (yyvsp[0].Number);
} }
#line 1755 "getdate.c" /* yacc.c:1646 */ #line 1757 "getdate.c" /* yacc.c:1646 */
break; break;
case 38: case 38:
@@ -1759,7 +1761,7 @@ yyreduce:
{ {
yyRelDay += (yyvsp[-1].Number) * (yyvsp[0].Number); yyRelDay += (yyvsp[-1].Number) * (yyvsp[0].Number);
} }
#line 1763 "getdate.c" /* yacc.c:1646 */ #line 1765 "getdate.c" /* yacc.c:1646 */
break; break;
case 39: case 39:
@@ -1767,7 +1769,7 @@ yyreduce:
{ {
yyRelDay++; yyRelDay++;
} }
#line 1771 "getdate.c" /* yacc.c:1646 */ #line 1773 "getdate.c" /* yacc.c:1646 */
break; break;
case 40: case 40:
@@ -1775,7 +1777,7 @@ yyreduce:
{ {
yyRelHour += (yyvsp[-1].Number) * (yyvsp[0].Number); yyRelHour += (yyvsp[-1].Number) * (yyvsp[0].Number);
} }
#line 1779 "getdate.c" /* yacc.c:1646 */ #line 1781 "getdate.c" /* yacc.c:1646 */
break; break;
case 41: case 41:
@@ -1783,7 +1785,7 @@ yyreduce:
{ {
yyRelHour += (yyvsp[-1].Number) * (yyvsp[0].Number); yyRelHour += (yyvsp[-1].Number) * (yyvsp[0].Number);
} }
#line 1787 "getdate.c" /* yacc.c:1646 */ #line 1789 "getdate.c" /* yacc.c:1646 */
break; break;
case 42: case 42:
@@ -1791,7 +1793,7 @@ yyreduce:
{ {
yyRelHour++; yyRelHour++;
} }
#line 1795 "getdate.c" /* yacc.c:1646 */ #line 1797 "getdate.c" /* yacc.c:1646 */
break; break;
case 43: case 43:
@@ -1799,7 +1801,7 @@ yyreduce:
{ {
yyRelMinutes += (yyvsp[-1].Number) * (yyvsp[0].Number); yyRelMinutes += (yyvsp[-1].Number) * (yyvsp[0].Number);
} }
#line 1803 "getdate.c" /* yacc.c:1646 */ #line 1805 "getdate.c" /* yacc.c:1646 */
break; break;
case 44: case 44:
@@ -1807,7 +1809,7 @@ yyreduce:
{ {
yyRelMinutes += (yyvsp[-1].Number) * (yyvsp[0].Number); yyRelMinutes += (yyvsp[-1].Number) * (yyvsp[0].Number);
} }
#line 1811 "getdate.c" /* yacc.c:1646 */ #line 1813 "getdate.c" /* yacc.c:1646 */
break; break;
case 45: case 45:
@@ -1815,7 +1817,7 @@ yyreduce:
{ {
yyRelMinutes++; yyRelMinutes++;
} }
#line 1819 "getdate.c" /* yacc.c:1646 */ #line 1821 "getdate.c" /* yacc.c:1646 */
break; break;
case 46: case 46:
@@ -1823,7 +1825,7 @@ yyreduce:
{ {
yyRelSeconds += (yyvsp[-1].Number) * (yyvsp[0].Number); yyRelSeconds += (yyvsp[-1].Number) * (yyvsp[0].Number);
} }
#line 1827 "getdate.c" /* yacc.c:1646 */ #line 1829 "getdate.c" /* yacc.c:1646 */
break; break;
case 47: case 47:
@@ -1831,7 +1833,7 @@ yyreduce:
{ {
yyRelSeconds += (yyvsp[-1].Number) * (yyvsp[0].Number); yyRelSeconds += (yyvsp[-1].Number) * (yyvsp[0].Number);
} }
#line 1835 "getdate.c" /* yacc.c:1646 */ #line 1837 "getdate.c" /* yacc.c:1646 */
break; break;
case 48: case 48:
@@ -1839,7 +1841,7 @@ yyreduce:
{ {
yyRelSeconds++; yyRelSeconds++;
} }
#line 1843 "getdate.c" /* yacc.c:1646 */ #line 1845 "getdate.c" /* yacc.c:1646 */
break; break;
case 49: case 49:
@@ -1874,7 +1876,7 @@ yyreduce:
} }
} }
} }
#line 1878 "getdate.c" /* yacc.c:1646 */ #line 1880 "getdate.c" /* yacc.c:1646 */
break; break;
case 50: case 50:
@@ -1882,7 +1884,7 @@ yyreduce:
{ {
(yyval.Meridian) = MER24; (yyval.Meridian) = MER24;
} }
#line 1886 "getdate.c" /* yacc.c:1646 */ #line 1888 "getdate.c" /* yacc.c:1646 */
break; break;
case 51: case 51:
@@ -1890,11 +1892,11 @@ yyreduce:
{ {
(yyval.Meridian) = (yyvsp[0].Meridian); (yyval.Meridian) = (yyvsp[0].Meridian);
} }
#line 1894 "getdate.c" /* yacc.c:1646 */ #line 1896 "getdate.c" /* yacc.c:1646 */
break; break;
#line 1898 "getdate.c" /* yacc.c:1646 */ #line 1900 "getdate.c" /* yacc.c:1646 */
default: break; default: break;
} }
/* User semantic actions sometimes alter yychar, and that requires /* User semantic actions sometimes alter yychar, and that requires
+1 -1
View File
@@ -66,7 +66,7 @@
#endif #endif
/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc), /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
as well as gratuitiously global symbol names, so we can have multiple as well as gratuitously global symbol names, so we can have multiple
yacc generated parsers in the same program. Note that these are only yacc generated parsers in the same program. Note that these are only
the variables produced by yacc. If other parser generators (bison, the variables produced by yacc. If other parser generators (bison,
byacc, etc) produce additional global names that conflict at link time, byacc, etc) produce additional global names that conflict at link time,
+89
View File
@@ -0,0 +1,89 @@
/*
* Copyright (c) 2017, Chris Lamb
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the copyright holders or contributors may not be used to
* endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <config.h>
#ident "$Id$"
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include "defines.h"
#include "prototypes.h"
/*
* gettime() returns the time as the number of seconds since the Epoch
*
* Like time(), gettime() returns the time as the number of seconds since the
* Epoch, 1970-01-01 00:00:00 +0000 (UTC), except that if the SOURCE_DATE_EPOCH
* environment variable is exported it will use that instead.
*/
/*@observer@*/time_t gettime ()
{
char *endptr;
char *source_date_epoch;
time_t fallback;
unsigned long long epoch;
fallback = time (NULL);
source_date_epoch = shadow_getenv ("SOURCE_DATE_EPOCH");
if (!source_date_epoch)
return fallback;
errno = 0;
epoch = strtoull (source_date_epoch, &endptr, 10);
if ((errno == ERANGE && (epoch == ULLONG_MAX || epoch == 0))
|| (errno != 0 && epoch == 0)) {
fprintf (shadow_logfd,
_("Environment variable $SOURCE_DATE_EPOCH: strtoull: %s\n"),
strerror(errno));
} else if (endptr == source_date_epoch) {
fprintf (shadow_logfd,
_("Environment variable $SOURCE_DATE_EPOCH: No digits were found: %s\n"),
endptr);
} else if (*endptr != '\0') {
fprintf (shadow_logfd,
_("Environment variable $SOURCE_DATE_EPOCH: Trailing garbage: %s\n"),
endptr);
} else if (epoch > ULONG_MAX) {
fprintf (shadow_logfd,
_("Environment variable $SOURCE_DATE_EPOCH: value must be smaller than or equal to %lu but was found to be: %llu\n"),
ULONG_MAX, epoch);
} else if (epoch > fallback) {
fprintf (shadow_logfd,
_("Environment variable $SOURCE_DATE_EPOCH: value must be smaller than or equal to the current time (%lu) but was found to be: %llu\n"),
fallback, epoch);
} else {
/* Valid */
return (time_t)epoch;
}
return fallback;
}
+122 -14
View File
@@ -36,6 +36,10 @@
#include <stdio.h> #include <stdio.h>
#include "prototypes.h" #include "prototypes.h"
#include "idmapping.h" #include "idmapping.h"
#if HAVE_SYS_CAPABILITY_H
#include <sys/prctl.h>
#include <sys/capability.h>
#endif
struct map_range *get_map_ranges(int ranges, int argc, char **argv) struct map_range *get_map_ranges(int ranges, int argc, char **argv)
{ {
@@ -43,19 +47,19 @@ struct map_range *get_map_ranges(int ranges, int argc, char **argv)
int idx, argidx; int idx, argidx;
if (ranges < 0 || argc < 0) { if (ranges < 0 || argc < 0) {
fprintf(stderr, "%s: error calculating number of arguments\n", Prog); fprintf(shadow_logfd, "%s: error calculating number of arguments\n", Prog);
return NULL; return NULL;
} }
if (ranges != ((argc + 2) / 3)) { if (ranges != ((argc + 2) / 3)) {
fprintf(stderr, "%s: ranges: %u is wrong for argc: %d\n", Prog, ranges, argc); fprintf(shadow_logfd, "%s: ranges: %u is wrong for argc: %d\n", Prog, ranges, argc);
return NULL; return NULL;
} }
if ((ranges * 3) > argc) { if ((ranges * 3) > argc) {
fprintf(stderr, "ranges: %u argc: %d\n", fprintf(shadow_logfd, "ranges: %u argc: %d\n",
ranges, argc); ranges, argc);
fprintf(stderr, fprintf(shadow_logfd,
_( "%s: Not enough arguments to form %u mappings\n"), _( "%s: Not enough arguments to form %u mappings\n"),
Prog, ranges); Prog, ranges);
return NULL; return NULL;
@@ -63,20 +67,47 @@ struct map_range *get_map_ranges(int ranges, int argc, char **argv)
mappings = calloc(ranges, sizeof(*mappings)); mappings = calloc(ranges, sizeof(*mappings));
if (!mappings) { if (!mappings) {
fprintf(stderr, _( "%s: Memory allocation failure\n"), fprintf(shadow_logfd, _( "%s: Memory allocation failure\n"),
Prog); Prog);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
/* Gather up the ranges from the command line */ /* Gather up the ranges from the command line */
mapping = mappings; mapping = mappings;
for (idx = 0; idx < ranges; idx++, argidx += 3, mapping++) { for (idx = 0, argidx = 0; idx < ranges; idx++, argidx += 3, mapping++) {
if (!getulong(argv[argidx + 0], &mapping->upper)) if (!getulong(argv[argidx + 0], &mapping->upper)) {
free(mappings);
return NULL; return NULL;
if (!getulong(argv[argidx + 1], &mapping->lower)) }
if (!getulong(argv[argidx + 1], &mapping->lower)) {
free(mappings);
return NULL; return NULL;
if (!getulong(argv[argidx + 2], &mapping->count)) }
if (!getulong(argv[argidx + 2], &mapping->count)) {
free(mappings);
return NULL; return NULL;
}
if (ULONG_MAX - mapping->upper <= mapping->count || ULONG_MAX - mapping->lower <= mapping->count) {
fprintf(shadow_logfd, _( "%s: subuid overflow detected.\n"), Prog);
exit(EXIT_FAILURE);
}
if (mapping->upper > UINT_MAX ||
mapping->lower > UINT_MAX ||
mapping->count > UINT_MAX) {
fprintf(shadow_logfd, _( "%s: subuid overflow detected.\n"), Prog);
exit(EXIT_FAILURE);
}
if (mapping->lower + mapping->count > UINT_MAX ||
mapping->upper + mapping->count > UINT_MAX) {
fprintf(shadow_logfd, _( "%s: subuid overflow detected.\n"), Prog);
exit(EXIT_FAILURE);
}
if (mapping->lower + mapping->count < mapping->lower ||
mapping->upper + mapping->count < mapping->upper) {
/* this one really shouldn't be possible given previous checks */
fprintf(shadow_logfd, _( "%s: subuid overflow detected.\n"), Prog);
exit(EXIT_FAILURE);
}
} }
return mappings; return mappings;
} }
@@ -92,9 +123,42 @@ struct map_range *get_map_ranges(int ranges, int argc, char **argv)
*/ */
#define ULONG_DIGITS ((((sizeof(unsigned long) * CHAR_BIT) + 9)/10)*3) #define ULONG_DIGITS ((((sizeof(unsigned long) * CHAR_BIT) + 9)/10)*3)
#if HAVE_SYS_CAPABILITY_H
static inline bool maps_lower_root(int cap, int ranges, struct map_range *mappings)
{
int idx;
struct map_range *mapping;
if (cap != CAP_SETUID)
return false;
mapping = mappings;
for (idx = 0; idx < ranges; idx++, mapping++) {
if (mapping->lower == 0)
return true;
}
return false;
}
#endif
/*
* The ruid refers to the caller's uid and is used to reset the effective uid
* back to the callers real uid.
* This clutch mainly exists for setuid-based new{g,u}idmap binaries that are
* called in contexts where all capabilities other than the necessary
* CAP_SET{G,U}ID capabilities are dropped. Since the kernel will require
* assurance that the caller holds CAP_SYS_ADMIN over the target user namespace
* the only way it can confirm is in this case is if the effective uid is
* equivalent to the uid owning the target user namespace.
* Note, we only support this when a) new{g,u}idmap is not called by root and
* b) if the caller's uid and the uid retrieved via system appropriate means
* (shadow file or other) are identical. Specifically, this does not support
* when the root user calls the new{g,u}idmap binary for an unprivileged user.
* If this is wanted: use file capabilities!
*/
void write_mapping(int proc_dir_fd, int ranges, struct map_range *mappings, void write_mapping(int proc_dir_fd, int ranges, struct map_range *mappings,
const char *map_file) const char *map_file, uid_t ruid)
{ {
int idx; int idx;
struct map_range *mapping; struct map_range *mapping;
@@ -102,6 +166,49 @@ void write_mapping(int proc_dir_fd, int ranges, struct map_range *mappings,
char *buf, *pos; char *buf, *pos;
int fd; int fd;
#if HAVE_SYS_CAPABILITY_H
int cap;
struct __user_cap_header_struct hdr = {_LINUX_CAPABILITY_VERSION_3, 0};
struct __user_cap_data_struct data[2] = {{0}};
if (strcmp(map_file, "uid_map") == 0) {
cap = CAP_SETUID;
} else if (strcmp(map_file, "gid_map") == 0) {
cap = CAP_SETGID;
} else {
fprintf(shadow_logfd, _("%s: Invalid map file %s specified\n"), Prog, map_file);
exit(EXIT_FAILURE);
}
/* Align setuid- and fscaps-based new{g,u}idmap behavior. */
if (geteuid() == 0 && geteuid() != ruid) {
if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) < 0) {
fprintf(shadow_logfd, _("%s: Could not prctl(PR_SET_KEEPCAPS)\n"), Prog);
exit(EXIT_FAILURE);
}
if (seteuid(ruid) < 0) {
fprintf(shadow_logfd, _("%s: Could not seteuid to %d\n"), Prog, ruid);
exit(EXIT_FAILURE);
}
}
/* Lockdown new{g,u}idmap by dropping all unneeded capabilities. */
memset(data, 0, sizeof(data));
data[0].effective = CAP_TO_MASK(cap);
/*
* When uid 0 from the ancestor userns is supposed to be mapped into
* the child userns we need to retain CAP_SETFCAP.
*/
if (maps_lower_root(cap, ranges, mappings))
data[0].effective |= CAP_TO_MASK(CAP_SETFCAP);
data[0].permitted = data[0].effective;
if (capset(&hdr, data) < 0) {
fprintf(shadow_logfd, _("%s: Could not set caps\n"), Prog);
exit(EXIT_FAILURE);
}
#endif
bufsize = ranges * ((ULONG_DIGITS + 1) * 3); bufsize = ranges * ((ULONG_DIGITS + 1) * 3);
pos = buf = xmalloc(bufsize); pos = buf = xmalloc(bufsize);
@@ -115,23 +222,24 @@ void write_mapping(int proc_dir_fd, int ranges, struct map_range *mappings,
mapping->lower, mapping->lower,
mapping->count); mapping->count);
if ((written <= 0) || (written >= (bufsize - (pos - buf)))) { if ((written <= 0) || (written >= (bufsize - (pos - buf)))) {
fprintf(stderr, _("%s: snprintf failed!\n"), Prog); fprintf(shadow_logfd, _("%s: snprintf failed!\n"), Prog);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
pos += written; pos += written;
} }
/* Write the mapping to the maping file */ /* Write the mapping to the mapping file */
fd = openat(proc_dir_fd, map_file, O_WRONLY); fd = openat(proc_dir_fd, map_file, O_WRONLY);
if (fd < 0) { if (fd < 0) {
fprintf(stderr, _("%s: open of %s failed: %s\n"), fprintf(shadow_logfd, _("%s: open of %s failed: %s\n"),
Prog, map_file, strerror(errno)); Prog, map_file, strerror(errno));
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
if (write(fd, buf, pos - buf) != (pos - buf)) { if (write(fd, buf, pos - buf) != (pos - buf)) {
fprintf(stderr, _("%s: write to %s failed: %s\n"), fprintf(shadow_logfd, _("%s: write to %s failed: %s\n"),
Prog, map_file, strerror(errno)); Prog, map_file, strerror(errno));
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
close(fd); close(fd);
free(buf);
} }
+3 -1
View File
@@ -38,7 +38,9 @@ struct map_range {
extern struct map_range *get_map_ranges(int ranges, int argc, char **argv); extern struct map_range *get_map_ranges(int ranges, int argc, char **argv);
extern void write_mapping(int proc_dir_fd, int ranges, extern void write_mapping(int proc_dir_fd, int ranges,
struct map_range *mappings, const char *map_file); struct map_range *mappings, const char *map_file, uid_t ruid);
extern void nss_init(char *nsswitch_path);
#endif /* _ID_MAPPING_H_ */ #endif /* _ID_MAPPING_H_ */
+1 -1
View File
@@ -548,7 +548,7 @@ void setup_limits (const struct passwd *info)
#ifdef LIMITS #ifdef LIMITS
if (info->pw_uid != 0) { if (info->pw_uid != 0) {
if ((setup_user_limits (info->pw_name) & LOGIN_ERROR_LOGIN) != 0) { if ((setup_user_limits (info->pw_name) & LOGIN_ERROR_LOGIN) != 0) {
(void) fputs (_("Too many logins.\n"), stderr); (void) fputs (_("Too many logins.\n"), shadow_logfd);
(void) sleep (2); /* XXX: Should be FAIL_DELAY */ (void) sleep (2); /* XXX: Should be FAIL_DELAY */
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} }
+1
View File
@@ -241,6 +241,7 @@ bool is_on_list (char *const *list, const char *member)
if ('\0' == *members) { if ('\0' == *members) {
*array = (char *) 0; *array = (char *) 0;
free (members);
return array; return array;
} }
+2 -2
View File
@@ -100,9 +100,9 @@ void dolastlog (
ll_time = newlog.ll_time; ll_time = newlog.ll_time;
(void) time (&ll_time); (void) time (&ll_time);
newlog.ll_time = ll_time; newlog.ll_time = ll_time;
strncpy (newlog.ll_line, line, sizeof newlog.ll_line); strncpy (newlog.ll_line, line, sizeof (newlog.ll_line) - 1);
#if HAVE_LL_HOST #if HAVE_LL_HOST
strncpy (newlog.ll_host, host, sizeof newlog.ll_host); strncpy (newlog.ll_host, host, sizeof (newlog.ll_host) - 1);
#endif #endif
if ( (lseek (fd, offset, SEEK_SET) != offset) if ( (lseek (fd, offset, SEEK_SET) != offset)
|| (write (fd, (const void *) &newlog, sizeof newlog) != (ssize_t) sizeof newlog) || (write (fd, (const void *) &newlog, sizeof newlog) != (ssize_t) sizeof newlog)
+3
View File
@@ -62,6 +62,9 @@
if ((NULL != pw) && (pw->pw_uid == ruid)) { if ((NULL != pw) && (pw->pw_uid == ruid)) {
return pw; return pw;
} }
if (NULL != pw) {
pw_free (pw);
}
} }
return xgetpwuid (ruid); return xgetpwuid (ruid);
+6
View File
@@ -268,6 +268,12 @@ static /*@observer@*//*@null@*/const char *obscure_msg (
#ifdef USE_SHA_CRYPT #ifdef USE_SHA_CRYPT
|| (strcmp (result, "SHA256") == 0) || (strcmp (result, "SHA256") == 0)
|| (strcmp (result, "SHA512") == 0) || (strcmp (result, "SHA512") == 0)
#endif
#ifdef USE_BCRYPT
|| (strcmp (result, "BCRYPT") == 0)
#endif
#ifdef USE_YESCRYPT
|| (strcmp (result, "YESCRYPT") == 0)
#endif #endif
) { ) {
return NULL; return NULL;
+4 -4
View File
@@ -59,20 +59,20 @@ void do_pam_passwd (const char *user, bool silent, bool change_expired)
ret = pam_start ("passwd", user, &conv, &pamh); ret = pam_start ("passwd", user, &conv, &pamh);
if (ret != PAM_SUCCESS) { if (ret != PAM_SUCCESS) {
fprintf (stderr, fprintf (shadow_logfd,
_("passwd: pam_start() failed, error %d\n"), ret); _("passwd: pam_start() failed, error %d\n"), ret);
exit (10); /* XXX */ exit (10); /* XXX */
} }
ret = pam_chauthtok (pamh, flags); ret = pam_chauthtok (pamh, flags);
if (ret != PAM_SUCCESS) { if (ret != PAM_SUCCESS) {
fprintf (stderr, _("passwd: %s\n"), pam_strerror (pamh, ret)); fprintf (shadow_logfd, _("passwd: %s\n"), pam_strerror (pamh, ret));
fputs (_("passwd: password unchanged\n"), stderr); fputs (_("passwd: password unchanged\n"), shadow_logfd);
pam_end (pamh, ret); pam_end (pamh, ret);
exit (10); /* XXX */ exit (10); /* XXX */
} }
fputs (_("passwd: password updated successfully\n"), stderr); fputs (_("passwd: password updated successfully\n"), shadow_logfd);
(void) pam_end (pamh, PAM_SUCCESS); (void) pam_end (pamh, PAM_SUCCESS);
} }
#else /* !USE_PAM */ #else /* !USE_PAM */
@@ -76,7 +76,7 @@ static int ni_conv (int num_msg,
switch (msg[count]->msg_style) { switch (msg[count]->msg_style) {
case PAM_PROMPT_ECHO_ON: case PAM_PROMPT_ECHO_ON:
fprintf (stderr, fprintf (shadow_logfd,
_("%s: PAM modules requesting echoing are not supported.\n"), _("%s: PAM modules requesting echoing are not supported.\n"),
Prog); Prog);
goto failed_conversation; goto failed_conversation;
@@ -88,7 +88,7 @@ static int ni_conv (int num_msg,
break; break;
case PAM_ERROR_MSG: case PAM_ERROR_MSG:
if ( (NULL == msg[count]->msg) if ( (NULL == msg[count]->msg)
|| (fprintf (stderr, "%s\n", msg[count]->msg) <0)) { || (fprintf (shadow_logfd, "%s\n", msg[count]->msg) <0)) {
goto failed_conversation; goto failed_conversation;
} }
responses[count].resp = NULL; responses[count].resp = NULL;
@@ -101,7 +101,7 @@ static int ni_conv (int num_msg,
responses[count].resp = NULL; responses[count].resp = NULL;
break; break;
default: default:
(void) fprintf (stderr, (void) fprintf (shadow_logfd,
_("%s: conversation type %d not supported.\n"), _("%s: conversation type %d not supported.\n"),
Prog, msg[count]->msg_style); Prog, msg[count]->msg_style);
goto failed_conversation; goto failed_conversation;
@@ -134,7 +134,7 @@ failed_conversation:
* *
* Return 0 on success, 1 on failure. * Return 0 on success, 1 on failure.
*/ */
int do_pam_passwd_non_interractive (const char *pam_service, int do_pam_passwd_non_interactive (const char *pam_service,
const char *username, const char *username,
const char* password) const char* password)
{ {
@@ -143,7 +143,7 @@ int do_pam_passwd_non_interractive (const char *pam_service,
ret = pam_start (pam_service, username, &non_interactive_pam_conv, &pamh); ret = pam_start (pam_service, username, &non_interactive_pam_conv, &pamh);
if (ret != PAM_SUCCESS) { if (ret != PAM_SUCCESS) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: (user %s) pam_start failure %d\n"), _("%s: (user %s) pam_start failure %d\n"),
Prog, username, ret); Prog, username, ret);
return 1; return 1;
@@ -152,7 +152,7 @@ int do_pam_passwd_non_interractive (const char *pam_service,
non_interactive_password = password; non_interactive_password = password;
ret = pam_chauthtok (pamh, 0); ret = pam_chauthtok (pamh, 0);
if (ret != PAM_SUCCESS) { if (ret != PAM_SUCCESS) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: (user %s) pam_chauthtok() failed, error:\n" _("%s: (user %s) pam_chauthtok() failed, error:\n"
"%s\n"), "%s\n"),
Prog, username, pam_strerror (pamh, ret)); Prog, username, pam_strerror (pamh, ret));
+359
View File
@@ -0,0 +1,359 @@
/*
* Copyright (c) 2011 , Julian Pidancet
* Copyright (c) 2011 , Nicolas François
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the copyright holders or contributors may not be used to
* endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <config.h>
#ident "$Id$"
#include <stdio.h>
#include <assert.h>
#include "defines.h"
#include "prototypes.h"
/*@-exitarg@*/
#include "exitcodes.h"
#include "groupio.h"
#include "pwio.h"
#ifdef SHADOWGRP
#include "sgroupio.h"
#endif
#include "shadowio.h"
#ifdef ENABLE_SUBIDS
#include "subordinateio.h"
#endif /* ENABLE_SUBIDS */
#include "getdef.h"
static char *passwd_db_file = NULL;
static char *spw_db_file = NULL;
static char *group_db_file = NULL;
static char *sgroup_db_file = NULL;
static char *suid_db_file = NULL;
static char *sgid_db_file = NULL;
static char *def_conf_file = NULL;
static FILE* fp_pwent = NULL;
static FILE* fp_grent = NULL;
/*
* process_prefix_flag - prefix all paths if given the --prefix option
*
* This shall be called before accessing the passwd, group, shadow,
* gshadow, useradd's default, login.defs files (non exhaustive list)
* or authenticating the caller.
*
* The audit, syslog, or locale files shall be open before
*/
extern const char* process_prefix_flag (const char* short_opt, int argc, char **argv)
{
/*
* Parse the command line options.
*/
int i;
const char *prefix = NULL, *val;
for (i = 0; i < argc; i++) {
val = NULL;
if ( (strcmp (argv[i], "--prefix") == 0)
|| ((strncmp (argv[i], "--prefix=", 9) == 0)
&& (val = argv[i] + 9))
|| (strcmp (argv[i], short_opt) == 0)) {
if (NULL != prefix) {
fprintf (shadow_logfd,
_("%s: multiple --prefix options\n"),
Prog);
exit (E_BAD_ARG);
}
if (val) {
prefix = val;
} else if (i + 1 == argc) {
fprintf (shadow_logfd,
_("%s: option '%s' requires an argument\n"),
Prog, argv[i]);
exit (E_BAD_ARG);
} else {
prefix = argv[++ i];
}
}
}
if (prefix != NULL) {
if ( prefix[0] == '\0' || !strcmp(prefix, "/"))
return ""; /* if prefix is "/" then we ignore the flag option */
/* should we prevent symbolic link from being used as a prefix? */
if ( prefix[0] != '/') {
fprintf (shadow_logfd,
_("%s: prefix must be an absolute path\n"),
Prog);
exit (E_BAD_ARG);
}
size_t len;
len = strlen(prefix) + strlen(PASSWD_FILE) + 2;
passwd_db_file = xmalloc(len);
snprintf(passwd_db_file, len, "%s/%s", prefix, PASSWD_FILE);
pw_setdbname(passwd_db_file);
len = strlen(prefix) + strlen(GROUP_FILE) + 2;
group_db_file = xmalloc(len);
snprintf(group_db_file, len, "%s/%s", prefix, GROUP_FILE);
gr_setdbname(group_db_file);
#ifdef SHADOWGRP
len = strlen(prefix) + strlen(SGROUP_FILE) + 2;
sgroup_db_file = xmalloc(len);
snprintf(sgroup_db_file, len, "%s/%s", prefix, SGROUP_FILE);
sgr_setdbname(sgroup_db_file);
#endif
#ifdef USE_NIS
__setspNIS(0); /* disable NIS for now, at least until it is properly supporting a "prefix" */
#endif
len = strlen(prefix) + strlen(SHADOW_FILE) + 2;
spw_db_file = xmalloc(len);
snprintf(spw_db_file, len, "%s/%s", prefix, SHADOW_FILE);
spw_setdbname(spw_db_file);
#ifdef ENABLE_SUBIDS
len = strlen(prefix) + strlen("/etc/subuid") + 2;
suid_db_file = xmalloc(len);
snprintf(suid_db_file, len, "%s/%s", prefix, "/etc/subuid");
sub_uid_setdbname(suid_db_file);
len = strlen(prefix) + strlen("/etc/subgid") + 2;
sgid_db_file = xmalloc(len);
snprintf(sgid_db_file, len, "%s/%s", prefix, "/etc/subgid");
sub_gid_setdbname(sgid_db_file);
#endif
#ifdef USE_ECONF
setdef_config_file(prefix);
#else
len = strlen(prefix) + strlen("/etc/login.defs") + 2;
def_conf_file = xmalloc(len);
snprintf(def_conf_file, len, "%s/%s", prefix, "/etc/login.defs");
setdef_config_file(def_conf_file);
#endif
}
if (prefix == NULL)
return "";
return prefix;
}
extern struct group *prefix_getgrnam(const char *name)
{
if (group_db_file) {
FILE* fg;
struct group * grp = NULL;
fg = fopen(group_db_file, "rt");
if(!fg)
return NULL;
while((grp = fgetgrent(fg)) != NULL) {
if(!strcmp(name, grp->gr_name))
break;
}
fclose(fg);
return grp;
}
return getgrnam(name);
}
extern struct group *prefix_getgrgid(gid_t gid)
{
if (group_db_file) {
FILE* fg;
struct group * grp = NULL;
fg = fopen(group_db_file, "rt");
if(!fg)
return NULL;
while((grp = fgetgrent(fg)) != NULL) {
if(gid == grp->gr_gid)
break;
}
fclose(fg);
return grp;
}
return getgrgid(gid);
}
extern struct passwd *prefix_getpwuid(uid_t uid)
{
if (passwd_db_file) {
FILE* fg;
struct passwd *pwd = NULL;
fg = fopen(passwd_db_file, "rt");
if(!fg)
return NULL;
while((pwd = fgetpwent(fg)) != NULL) {
if(uid == pwd->pw_uid)
break;
}
fclose(fg);
return pwd;
}
else {
return getpwuid(uid);
}
}
extern struct passwd *prefix_getpwnam(const char* name)
{
if (passwd_db_file) {
FILE* fg;
struct passwd *pwd = NULL;
fg = fopen(passwd_db_file, "rt");
if(!fg)
return NULL;
while((pwd = fgetpwent(fg)) != NULL) {
if(!strcmp(name, pwd->pw_name))
break;
}
fclose(fg);
return pwd;
}
else {
return getpwnam(name);
}
}
extern struct spwd *prefix_getspnam(const char* name)
{
if (spw_db_file) {
FILE* fg;
struct spwd *sp = NULL;
fg = fopen(spw_db_file, "rt");
if(!fg)
return NULL;
while((sp = fgetspent(fg)) != NULL) {
if(!strcmp(name, sp->sp_namp))
break;
}
fclose(fg);
return sp;
}
else {
return getspnam(name);
}
}
extern void prefix_setpwent()
{
if(!passwd_db_file) {
setpwent();
return;
}
if (fp_pwent)
fclose (fp_pwent);
fp_pwent = fopen(passwd_db_file, "rt");
if(!fp_pwent)
return;
}
extern struct passwd* prefix_getpwent()
{
if(!passwd_db_file) {
return getpwent();
}
return fgetpwent(fp_pwent);
}
extern void prefix_endpwent()
{
if(!passwd_db_file) {
endpwent();
return;
}
if (fp_pwent)
fclose(fp_pwent);
fp_pwent = NULL;
}
extern void prefix_setgrent()
{
if(!group_db_file) {
setgrent();
return;
}
if (fp_grent)
fclose (fp_grent);
fp_grent = fopen(group_db_file, "rt");
if(!fp_grent)
return;
}
extern struct group* prefix_getgrent()
{
if(!group_db_file) {
return getgrent();
}
return fgetgrent(fp_grent);
}
extern void prefix_endgrent()
{
if(!group_db_file) {
endgrent();
return;
}
if (fp_grent)
fclose(fp_grent);
fp_grent = NULL;
}
extern struct group *prefix_getgr_nam_gid(const char *grname)
{
long long int gid;
char *endptr;
struct group *g;
if (NULL == grname) {
return NULL;
}
if (group_db_file) {
errno = 0;
gid = strtoll (grname, &endptr, 10);
if ( ('\0' != *grname)
&& ('\0' == *endptr)
&& (ERANGE != errno)
&& (gid == (gid_t)gid)) {
return prefix_getgrgid ((gid_t) gid);
}
g = prefix_getgrnam (grname);
return g ? __gr_dup(g) : NULL;
}
else
return getgr_nam_gid(grname);
}
+1 -2
View File
@@ -40,7 +40,6 @@
#include "prototypes.h" #include "prototypes.h"
#include "defines.h" #include "defines.h"
#include <pwd.h> #include <pwd.h>
extern time_t time (time_t *);
/* /*
* pwd_to_spwd - create entries for new spwd structure * pwd_to_spwd - create entries for new spwd structure
@@ -66,7 +65,7 @@ struct spwd *pwd_to_spwd (const struct passwd *pw)
*/ */
sp.sp_min = 0; sp.sp_min = 0;
sp.sp_max = (10000L * DAY) / SCALE; sp.sp_max = (10000L * DAY) / SCALE;
sp.sp_lstchg = (long) time ((time_t *) 0) / SCALE; sp.sp_lstchg = (long) gettime () / SCALE;
if (0 == sp.sp_lstchg) { if (0 == sp.sp_lstchg) {
/* Better disable aging than requiring a password /* Better disable aging than requiring a password
* change */ * change */
+1 -1
View File
@@ -51,7 +51,7 @@ void passwd_check (const char *user, const char *passwd, unused const char *prog
if (pw_auth (passwd, user, PW_LOGIN, (char *) 0) != 0) { if (pw_auth (passwd, user, PW_LOGIN, (char *) 0) != 0) {
SYSLOG ((LOG_WARN, "incorrect password for `%s'", user)); SYSLOG ((LOG_WARN, "incorrect password for `%s'", user));
(void) sleep (1); (void) sleep (1);
fprintf (stderr, _("Incorrect password for %s.\n"), user); fprintf (shadow_logfd, _("Incorrect password for %s.\n"), user);
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} }
} }
+16 -10
View File
@@ -56,25 +56,31 @@ extern void process_root_flag (const char* short_opt, int argc, char **argv)
* Parse the command line options. * Parse the command line options.
*/ */
int i; int i;
const char *newroot = NULL; const char *newroot = NULL, *val;
for (i = 0; i < argc; i++) { for (i = 0; i < argc; i++) {
val = NULL;
if ( (strcmp (argv[i], "--root") == 0) if ( (strcmp (argv[i], "--root") == 0)
|| ((strncmp (argv[i], "--root=", 7) == 0)
&& (val = argv[i] + 7))
|| (strcmp (argv[i], short_opt) == 0)) { || (strcmp (argv[i], short_opt) == 0)) {
if (NULL != newroot) { if (NULL != newroot) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: multiple --root options\n"), _("%s: multiple --root options\n"),
Prog); Prog);
exit (E_BAD_ARG); exit (E_BAD_ARG);
} }
if (i + 1 == argc) { if (val) {
fprintf (stderr, newroot = val;
} else if (i + 1 == argc) {
fprintf (shadow_logfd,
_("%s: option '%s' requires an argument\n"), _("%s: option '%s' requires an argument\n"),
Prog, argv[i]); Prog, argv[i]);
exit (E_BAD_ARG); exit (E_BAD_ARG);
} else {
newroot = argv[++ i];
} }
newroot = argv[i + 1];
} }
} }
@@ -88,34 +94,34 @@ static void change_root (const char* newroot)
/* Drop privileges */ /* Drop privileges */
if ( (setregid (getgid (), getgid ()) != 0) if ( (setregid (getgid (), getgid ()) != 0)
|| (setreuid (getuid (), getuid ()) != 0)) { || (setreuid (getuid (), getuid ()) != 0)) {
fprintf (stderr, _("%s: failed to drop privileges (%s)\n"), fprintf (shadow_logfd, _("%s: failed to drop privileges (%s)\n"),
Prog, strerror (errno)); Prog, strerror (errno));
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} }
if ('/' != newroot[0]) { if ('/' != newroot[0]) {
fprintf (stderr, fprintf (shadow_logfd,
_("%s: invalid chroot path '%s'\n"), _("%s: invalid chroot path '%s'\n"),
Prog, newroot); Prog, newroot);
exit (E_BAD_ARG); exit (E_BAD_ARG);
} }
if (access (newroot, F_OK) != 0) { if (access (newroot, F_OK) != 0) {
fprintf(stderr, fprintf(shadow_logfd,
_("%s: cannot access chroot directory %s: %s\n"), _("%s: cannot access chroot directory %s: %s\n"),
Prog, newroot, strerror (errno)); Prog, newroot, strerror (errno));
exit (E_BAD_ARG); exit (E_BAD_ARG);
} }
if (chdir (newroot) != 0) { if (chdir (newroot) != 0) {
fprintf(stderr, fprintf(shadow_logfd,
_("%s: cannot chdir to chroot directory %s: %s\n"), _("%s: cannot chdir to chroot directory %s: %s\n"),
Prog, newroot, strerror (errno)); Prog, newroot, strerror (errno));
exit (E_BAD_ARG); exit (E_BAD_ARG);
} }
if (chroot (newroot) != 0) { if (chroot (newroot) != 0) {
fprintf(stderr, fprintf(shadow_logfd,
_("%s: unable to chroot to directory %s: %s\n"), _("%s: unable to chroot to directory %s: %s\n"),
Prog, newroot, strerror (errno)); Prog, newroot, strerror (errno));
exit (E_BAD_ARG); exit (E_BAD_ARG);
+383 -88
View File
@@ -11,24 +11,100 @@
#ident "$Id$" #ident "$Id$"
#include <sys/time.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h> #include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if HAVE_SYS_RANDOM_H
#include <sys/random.h>
#endif
#include "prototypes.h" #include "prototypes.h"
#include "defines.h" #include "defines.h"
#include "getdef.h" #include "getdef.h"
/* local function prototypes */ #if (defined CRYPT_GENSALT_IMPLEMENTS_AUTO_ENTROPY && \
static void seedRNG (void); CRYPT_GENSALT_IMPLEMENTS_AUTO_ENTROPY)
static /*@observer@*/const char *gensalt (size_t salt_size); #define USE_XCRYPT_GENSALT 1
#ifdef USE_SHA_CRYPT #else
static long shadow_random (long min, long max); #define USE_XCRYPT_GENSALT 0
static /*@observer@*/const char *SHA_salt_rounds (/*@null@*/int *prefered_rounds); #endif
#endif /* USE_SHA_CRYPT */
#ifndef HAVE_L64A /* Add the salt prefix. */
static /*@observer@*/char *l64a(long value) #define MAGNUM(array,ch) (array)[0]=(array)[2]='$',(array)[1]=(ch),(array)[3]='\0'
#ifdef USE_BCRYPT
/* Use $2b$ as prefix for compatibility with OpenBSD's bcrypt. */
#define BCRYPTMAGNUM(array) (array)[0]=(array)[3]='$',(array)[1]='2',(array)[2]='b',(array)[4]='\0'
#define BCRYPT_SALT_SIZE 22
/* Default number of rounds if not explicitly specified. */
#define B_ROUNDS_DEFAULT 13
/* Minimum number of rounds. */
#define B_ROUNDS_MIN 4
/* Maximum number of rounds. */
#define B_ROUNDS_MAX 31
#endif /* USE_BCRYPT */
#ifdef USE_SHA_CRYPT
/* Fixed salt len for sha{256,512}crypt. */
#define SHA_CRYPT_SALT_SIZE 16
/* Default number of rounds if not explicitly specified. */
#define SHA_ROUNDS_DEFAULT 5000
/* Minimum number of rounds. */
#define SHA_ROUNDS_MIN 1000
/* Maximum number of rounds. */
#define SHA_ROUNDS_MAX 999999999
#endif
#ifdef USE_YESCRYPT
/*
* Default number of base64 characters used for the salt.
* 24 characters gives a 144 bits (18 bytes) salt. Unlike the more
* traditional 128 bits (16 bytes) salt, this 144 bits salt is always
* represented by the same number of base64 characters without padding
* issue, even with a non-standard base64 encoding scheme.
*/
#define YESCRYPT_SALT_SIZE 24
/* Default cost if not explicitly specified. */
#define Y_COST_DEFAULT 5
/* Minimum cost. */
#define Y_COST_MIN 1
/* Maximum cost. */
#define Y_COST_MAX 11
#endif
/* Fixed salt len for md5crypt. */
#define MD5_CRYPT_SALT_SIZE 8
/* Generate salt of size salt_size. */
#define MAX_SALT_SIZE 44
#define MIN_SALT_SIZE 8
/* Maximum size of the generated salt string. */
#define GENSALT_SETTING_SIZE 100
/* local function prototypes */
static long read_random_bytes (void);
#if !USE_XCRYPT_GENSALT
static /*@observer@*/const char *gensalt (size_t salt_size);
#endif /* !USE_XCRYPT_GENSALT */
#if defined(USE_SHA_CRYPT) || defined(USE_BCRYPT)
static long shadow_random (long min, long max);
#endif /* USE_SHA_CRYPT || USE_BCRYPT */
#ifdef USE_SHA_CRYPT
static /*@observer@*/const unsigned long SHA_get_salt_rounds (/*@null@*/int *prefered_rounds);
static /*@observer@*/void SHA_salt_rounds_to_buf (char *buf, unsigned long rounds);
#endif /* USE_SHA_CRYPT */
#ifdef USE_BCRYPT
static /*@observer@*/const unsigned long BCRYPT_get_salt_rounds (/*@null@*/int *prefered_rounds);
static /*@observer@*/void BCRYPT_salt_rounds_to_buf (char *buf, unsigned long rounds);
#endif /* USE_BCRYPT */
#ifdef USE_YESCRYPT
static /*@observer@*/const unsigned long YESCRYPT_get_salt_cost (/*@null@*/int *prefered_cost);
static /*@observer@*/void YESCRYPT_salt_cost_to_buf (char *buf, unsigned long cost);
#endif /* USE_YESCRYPT */
#if !USE_XCRYPT_GENSALT && !defined(HAVE_L64A)
static /*@observer@*/char *l64a (long value)
{ {
static char buf[8]; static char buf[8];
char *s = buf; char *s = buf;
@@ -59,32 +135,58 @@ static /*@observer@*/char *l64a(long value)
*s = '\0'; *s = '\0';
return(buf); return buf;
} }
#endif /* !HAVE_L64A */ #endif /* !USE_XCRYPT_GENSALT && !defined(HAVE_L64A) */
static void seedRNG (void) /* Read sizeof (long) random bytes from /dev/urandom. */
static long read_random_bytes (void)
{ {
struct timeval tv; long randval = 0;
static int seeded = 0;
if (0 == seeded) { #ifdef HAVE_ARC4RANDOM_BUF
(void) gettimeofday (&tv, NULL); /* arc4random_buf, if it exists, can never fail. */
srandom (tv.tv_sec ^ tv.tv_usec ^ getpid ()); arc4random_buf (&randval, sizeof (randval));
seeded = 1; goto end;
#elif defined(HAVE_GETENTROPY)
/* getentropy may exist but lack kernel support. */
if (getentropy (&randval, sizeof (randval))) {
goto fail;
} }
goto end;
#elif defined(HAVE_GETRANDOM)
/* Likewise getrandom. */
if ((size_t) getrandom (&randval, sizeof (randval), 0) != sizeof (randval)) {
goto fail;
}
goto end;
#else
FILE *f = fopen ("/dev/urandom", "r");
if (fread (&randval, sizeof (randval), 1, f) != 1) {
fclose(f);
goto fail;
}
fclose(f);
goto end;
#endif
fail:
fprintf (shadow_logfd,
_("Unable to obtain random bytes.\n"));
exit (1);
end:
return randval;
} }
/* #if defined(USE_SHA_CRYPT) || defined(USE_BCRYPT)
* Add the salt prefix.
*/
#define MAGNUM(array,ch) (array)[0]=(array)[2]='$',(array)[1]=(ch),(array)[3]='\0'
#ifdef USE_SHA_CRYPT
/* It is not clear what is the maximum value of random().
* We assume 2^31-1.*/
#define RANDOM_MAX 0x7FFFFFFF
/* /*
* Return a random number between min and max (both included). * Return a random number between min and max (both included).
* *
@@ -94,8 +196,9 @@ static long shadow_random (long min, long max)
{ {
double drand; double drand;
long ret; long ret;
seedRNG ();
drand = (double) (max - min + 1) * random () / RANDOM_MAX; drand = (double) (read_random_bytes () & RAND_MAX) / (double) RAND_MAX;
drand *= (double) (max - min + 1);
/* On systems were this is not random() range is lower, we favor /* On systems were this is not random() range is lower, we favor
* higher numbers of salt. */ * higher numbers of salt. */
ret = (long) (max + 1 - drand); ret = (long) (max + 1 - drand);
@@ -105,28 +208,20 @@ static long shadow_random (long min, long max)
} }
return ret; return ret;
} }
#endif /* USE_SHA_CRYPT || USE_BCRYPT */
/* Default number of rounds if not explicitly specified. */ #ifdef USE_SHA_CRYPT
#define ROUNDS_DEFAULT 5000 /* Return the the rounds number for the SHA crypt methods. */
/* Minimum number of rounds. */ static /*@observer@*/const unsigned long SHA_get_salt_rounds (/*@null@*/int *prefered_rounds)
#define ROUNDS_MIN 1000
/* Maximum number of rounds. */
#define ROUNDS_MAX 999999999
/*
* Return a salt prefix specifying the rounds number for the SHA crypt methods.
*/
static /*@observer@*/const char *SHA_salt_rounds (/*@null@*/int *prefered_rounds)
{ {
static char rounds_prefix[18]; /* Max size: rounds=999999999$ */ unsigned long rounds;
long rounds;
if (NULL == prefered_rounds) { if (NULL == prefered_rounds) {
long min_rounds = getdef_long ("SHA_CRYPT_MIN_ROUNDS", -1); long min_rounds = getdef_long ("SHA_CRYPT_MIN_ROUNDS", -1);
long max_rounds = getdef_long ("SHA_CRYPT_MAX_ROUNDS", -1); long max_rounds = getdef_long ("SHA_CRYPT_MAX_ROUNDS", -1);
if ((-1 == min_rounds) && (-1 == max_rounds)) { if ((-1 == min_rounds) && (-1 == max_rounds)) {
return ""; rounds = SHA_ROUNDS_DEFAULT;
} }
if (-1 == min_rounds) { if (-1 == min_rounds) {
@@ -141,54 +236,208 @@ static /*@observer@*/const char *SHA_salt_rounds (/*@null@*/int *prefered_rounds
max_rounds = min_rounds; max_rounds = min_rounds;
} }
rounds = shadow_random (min_rounds, max_rounds); rounds = (unsigned long) shadow_random (min_rounds, max_rounds);
} else if (0 == *prefered_rounds) { } else if (0 == *prefered_rounds) {
return ""; rounds = SHA_ROUNDS_DEFAULT;
} else { } else {
rounds = *prefered_rounds; rounds = (unsigned long) *prefered_rounds;
} }
/* Sanity checks. The libc should also check this, but this /* Sanity checks. The libc should also check this, but this
* protects against a rounds_prefix overflow. */ * protects against a rounds_prefix overflow. */
if (rounds < ROUNDS_MIN) { if (rounds < SHA_ROUNDS_MIN) {
rounds = ROUNDS_MIN; rounds = SHA_ROUNDS_MIN;
} }
if (rounds > ROUNDS_MAX) { if (rounds > SHA_ROUNDS_MAX) {
rounds = ROUNDS_MAX; rounds = SHA_ROUNDS_MAX;
} }
(void) snprintf (rounds_prefix, sizeof rounds_prefix, return rounds;
"rounds=%ld$", rounds); }
return rounds_prefix; /*
* Fill a salt prefix specifying the rounds number for the SHA crypt methods
* to a buffer.
*/
static /*@observer@*/void SHA_salt_rounds_to_buf (char *buf, unsigned long rounds)
{
const size_t buf_begin = strlen (buf);
/* Nothing to do here if SHA_ROUNDS_DEFAULT is used. */
if (rounds == SHA_ROUNDS_DEFAULT) {
return;
}
/*
* Check if the result buffer is long enough.
* We are going to write a maximum of 17 bytes,
* plus one byte for the terminator.
* rounds=XXXXXXXXX$
* 00000000011111111
* 12345678901234567
*/
assert (GENSALT_SETTING_SIZE > buf_begin + 17);
(void) snprintf (buf + buf_begin, 18, "rounds=%lu$", rounds);
} }
#endif /* USE_SHA_CRYPT */ #endif /* USE_SHA_CRYPT */
/* #ifdef USE_BCRYPT
* Generate salt of size salt_size. /* Return the the rounds number for the BCRYPT method. */
*/ static /*@observer@*/const unsigned long BCRYPT_get_salt_rounds (/*@null@*/int *prefered_rounds)
#define MAX_SALT_SIZE 16 {
#define MIN_SALT_SIZE 8 unsigned long rounds;
if (NULL == prefered_rounds) {
long min_rounds = getdef_long ("BCRYPT_MIN_ROUNDS", -1);
long max_rounds = getdef_long ("BCRYPT_MAX_ROUNDS", -1);
if ((-1 == min_rounds) && (-1 == max_rounds)) {
rounds = B_ROUNDS_DEFAULT;
} else {
if (-1 == min_rounds) {
min_rounds = max_rounds;
}
if (-1 == max_rounds) {
max_rounds = min_rounds;
}
if (min_rounds > max_rounds) {
max_rounds = min_rounds;
}
rounds = (unsigned long) shadow_random (min_rounds, max_rounds);
}
} else if (0 == *prefered_rounds) {
rounds = B_ROUNDS_DEFAULT;
} else {
rounds = (unsigned long) *prefered_rounds;
}
/* Sanity checks. */
if (rounds < B_ROUNDS_MIN) {
rounds = B_ROUNDS_MIN;
}
#if USE_XCRYPT_GENSALT
if (rounds > B_ROUNDS_MAX) {
rounds = B_ROUNDS_MAX;
}
#else /* USE_XCRYPT_GENSALT */
/*
* Use 19 as an upper bound for now,
* because musl doesn't allow rounds >= 20.
*/
if (rounds > 19) {
/* rounds = B_ROUNDS_MAX; */
rounds = 19;
}
#endif /* USE_XCRYPT_GENSALT */
return rounds;
}
/*
* Fill a salt prefix specifying the rounds number for the BCRYPT method
* to a buffer.
*/
static /*@observer@*/void BCRYPT_salt_rounds_to_buf (char *buf, unsigned long rounds)
{
const size_t buf_begin = strlen (buf);
/*
* Check if the result buffer is long enough.
* We are going to write three bytes,
* plus one byte for the terminator.
* XX$
* 000
* 123
*/
assert (GENSALT_SETTING_SIZE > buf_begin + 3);
(void) snprintf (buf + buf_begin, 4, "%2.2lu$", rounds);
}
#endif /* USE_BCRYPT */
#ifdef USE_YESCRYPT
/* Return the the cost number for the YESCRYPT method. */
static /*@observer@*/const unsigned long YESCRYPT_get_salt_cost (/*@null@*/int *prefered_cost)
{
unsigned long cost;
if (NULL == prefered_cost) {
cost = getdef_num ("YESCRYPT_COST_FACTOR", Y_COST_DEFAULT);
} else if (0 == *prefered_cost) {
cost = Y_COST_DEFAULT;
} else {
cost = (unsigned long) *prefered_cost;
}
/* Sanity checks. */
if (cost < Y_COST_MIN) {
cost = Y_COST_MIN;
}
if (cost > Y_COST_MAX) {
cost = Y_COST_MAX;
}
return cost;
}
/*
* Fill a salt prefix specifying the cost for the YESCRYPT method
* to a buffer.
*/
static /*@observer@*/void YESCRYPT_salt_cost_to_buf (char *buf, unsigned long cost)
{
const size_t buf_begin = strlen (buf);
/*
* Check if the result buffer is long enough.
* We are going to write four bytes,
* plus one byte for the terminator.
* jXX$
* 0000
* 1234
*/
assert (GENSALT_SETTING_SIZE > buf_begin + 4);
buf[buf_begin + 0] = 'j';
if (cost < 3) {
buf[buf_begin + 1] = 0x36 + cost;
} else if (cost < 6) {
buf[buf_begin + 1] = 0x34 + cost;
} else {
buf[buf_begin + 1] = 0x3b + cost;
}
buf[buf_begin + 2] = cost >= 3 ? 'T' : '5';
buf[buf_begin + 3] = '$';
buf[buf_begin + 4] = '\0';
}
#endif /* USE_YESCRYPT */
#if !USE_XCRYPT_GENSALT
static /*@observer@*/const char *gensalt (size_t salt_size) static /*@observer@*/const char *gensalt (size_t salt_size)
{ {
static char salt[32]; static char salt[MAX_SALT_SIZE + 6];
salt[0] = '\0'; memset (salt, '\0', MAX_SALT_SIZE + 6);
assert (salt_size >= MIN_SALT_SIZE && assert (salt_size >= MIN_SALT_SIZE &&
salt_size <= MAX_SALT_SIZE); salt_size <= MAX_SALT_SIZE);
seedRNG (); strcat (salt, l64a (read_random_bytes ()));
strcat (salt, l64a (random()));
do { do {
strcat (salt, l64a (random())); strcat (salt, l64a (read_random_bytes ()));
} while (strlen (salt) < salt_size); } while (strlen (salt) < salt_size);
salt[salt_size] = '\0'; salt[salt_size] = '\0';
return salt; return salt;
} }
#endif /* !USE_XCRYPT_GENSALT */
/* /*
* Generate 8 base64 ASCII characters of random salt. If MD5_CRYPT_ENAB * Generate 8 base64 ASCII characters of random salt. If MD5_CRYPT_ENAB
@@ -198,26 +447,23 @@ static /*@observer@*/const char *gensalt (size_t salt_size)
* Other methods can be set with ENCRYPT_METHOD * Other methods can be set with ENCRYPT_METHOD
* *
* The method can be forced with the meth parameter. * The method can be forced with the meth parameter.
* If NULL, the method will be defined according to the MD5_CRYPT_ENAB and * If NULL, the method will be defined according to the ENCRYPT_METHOD
* ENCRYPT_METHOD login.defs variables. * variable, and if not set according to the MD5_CRYPT_ENAB variable,
* which can both be set inside the login.defs file.
* *
* If meth is specified, an additional parameter can be provided. * If meth is specified, an additional parameter can be provided.
* * For the SHA256 and SHA512 method, this specifies the number of rounds * * For the SHA256 and SHA512 method, this specifies the number of rounds
* (if not NULL). * (if not NULL).
* * For the YESCRYPT method, this specifies the cost factor (if not NULL).
*/ */
/*@observer@*/const char *crypt_make_salt (/*@null@*//*@observer@*/const char *meth, /*@null@*/void *arg) /*@observer@*/const char *crypt_make_salt (/*@null@*//*@observer@*/const char *meth, /*@null@*/void *arg)
{ {
/* Max result size for the SHA methods: static char result[GENSALT_SETTING_SIZE];
* +3 $5$ size_t salt_len = MAX_SALT_SIZE;
* +17 rounds=999999999$
* +16 salt
* +1 \0
*/
static char result[40];
size_t salt_len = 8;
const char *method; const char *method;
unsigned long rounds = 0;
result[0] = '\0'; memset (result, '\0', GENSALT_SETTING_SIZE);
if (NULL != meth) if (NULL != meth)
method = meth; method = meth;
@@ -230,31 +476,80 @@ static /*@observer@*/const char *gensalt (size_t salt_size)
if (0 == strcmp (method, "MD5")) { if (0 == strcmp (method, "MD5")) {
MAGNUM(result, '1'); MAGNUM(result, '1');
salt_len = MD5_CRYPT_SALT_SIZE;
rounds = 0;
#ifdef USE_BCRYPT
} else if (0 == strcmp (method, "BCRYPT")) {
BCRYPTMAGNUM(result);
salt_len = BCRYPT_SALT_SIZE;
rounds = BCRYPT_get_salt_rounds ((int *) arg);
BCRYPT_salt_rounds_to_buf (result, rounds);
#endif /* USE_BCRYPT */
#ifdef USE_YESCRYPT
} else if (0 == strcmp (method, "YESCRYPT")) {
MAGNUM(result, 'y');
salt_len = YESCRYPT_SALT_SIZE;
rounds = YESCRYPT_get_salt_cost ((int *) arg);
YESCRYPT_salt_cost_to_buf (result, rounds);
#endif /* USE_YESCRYPT */
#ifdef USE_SHA_CRYPT #ifdef USE_SHA_CRYPT
} else if (0 == strcmp (method, "SHA256")) { } else if (0 == strcmp (method, "SHA256")) {
MAGNUM(result, '5'); MAGNUM(result, '5');
strcat(result, SHA_salt_rounds((int *)arg)); salt_len = SHA_CRYPT_SALT_SIZE;
salt_len = (size_t) shadow_random (8, 16); rounds = SHA_get_salt_rounds ((int *) arg);
SHA_salt_rounds_to_buf (result, rounds);
} else if (0 == strcmp (method, "SHA512")) { } else if (0 == strcmp (method, "SHA512")) {
MAGNUM(result, '6'); MAGNUM(result, '6');
strcat(result, SHA_salt_rounds((int *)arg)); salt_len = SHA_CRYPT_SALT_SIZE;
salt_len = (size_t) shadow_random (8, 16); rounds = SHA_get_salt_rounds ((int *) arg);
SHA_salt_rounds_to_buf (result, rounds);
#endif /* USE_SHA_CRYPT */ #endif /* USE_SHA_CRYPT */
} else if (0 != strcmp (method, "DES")) { } else if (0 != strcmp (method, "DES")) {
fprintf (stderr, fprintf (shadow_logfd,
_("Invalid ENCRYPT_METHOD value: '%s'.\n" _("Invalid ENCRYPT_METHOD value: '%s'.\n"
"Defaulting to DES.\n"), "Defaulting to DES.\n"),
method); method);
result[0] = '\0'; salt_len = MAX_SALT_SIZE;
rounds = 0;
memset (result, '\0', GENSALT_SETTING_SIZE);
} }
#if USE_XCRYPT_GENSALT
/* /*
* Concatenate a pseudo random salt. * Prepare DES setting for crypt_gensalt(), if result
* has not been filled with anything previously.
*/ */
assert (sizeof (result) > strlen (result) + salt_len); if ('\0' == result[0]) {
/* Avoid -Wunused-but-set-variable. */
salt_len = GENSALT_SETTING_SIZE - 1;
rounds = 0;
memset (result, '.', salt_len);
result[salt_len] = '\0';
}
char *retval = crypt_gensalt (result, rounds, NULL, 0);
/* Should not happen, but... */
if (NULL == retval) {
fprintf (shadow_logfd,
_("Unable to generate a salt from setting "
"\"%s\", check your settings in "
"ENCRYPT_METHOD and the corresponding "
"configuration for your selected hash "
"method.\n"), result);
exit (1);
}
return retval;
#else /* USE_XCRYPT_GENSALT */
/* Check if the result buffer is long enough. */
assert (GENSALT_SETTING_SIZE > strlen (result) + salt_len);
/* Concatenate a pseudo random salt. */
strncat (result, gensalt (salt_len), strncat (result, gensalt (salt_len),
sizeof (result) - strlen (result) - 1); GENSALT_SETTING_SIZE - strlen (result) - 1);
return result; return result;
#endif /* USE_XCRYPT_GENSALT */
} }
+2 -2
View File
@@ -171,7 +171,7 @@ static void read_env_file (const char *filename)
cp++; cp++;
goto d_quote; goto d_quote;
} }
eise if (*cp == '\0') { else if (*cp == '\0') {
/* end of string */ /* end of string */
goto finished; goto finished;
} else { } else {
@@ -219,7 +219,7 @@ void setup_env (struct passwd *info)
static char temp_pw_dir[] = "/"; static char temp_pw_dir[] = "/";
if (!getdef_bool ("DEFAULT_HOME") || chdir ("/") == -1) { if (!getdef_bool ("DEFAULT_HOME") || chdir ("/") == -1) {
fprintf (stderr, _("Unable to cd to '%s'\n"), fprintf (shadow_logfd, _("Unable to cd to '%s'\n"),
info->pw_dir); info->pw_dir);
SYSLOG ((LOG_WARN, SYSLOG ((LOG_WARN,
"unable to cd to `%s' for user `%s'\n", "unable to cd to `%s' for user `%s'\n",
+1 -1
View File
@@ -126,7 +126,7 @@ static char *date_formats[] = {
#else #else
/* /*
* days and juldays are used to compute the number of days in the * days and juldays are used to compute the number of days in the
* current month, and the cummulative number of days in the preceding * current month, and the cumulative number of days in the preceding
* months. they are declared so that january is 1, not 0. * months. they are declared so that january is 1, not 0.
*/ */
static short days[13] = { 0, static short days[13] = { 0,
+54 -13
View File
@@ -39,6 +39,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <dirent.h> #include <dirent.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h>
#include "defines.h" #include "defines.h"
#include "prototypes.h" #include "prototypes.h"
#ifdef ENABLE_SUBIDS #ifdef ENABLE_SUBIDS
@@ -95,7 +96,7 @@ static int user_busy_utmp (const char *name)
continue; continue;
} }
fprintf (stderr, fprintf (shadow_logfd,
_("%s: user %s is currently logged in\n"), _("%s: user %s is currently logged in\n"),
Prog, name); Prog, name);
return 1; return 1;
@@ -106,6 +107,31 @@ static int user_busy_utmp (const char *name)
#endif /* !__linux__ */ #endif /* !__linux__ */
#ifdef __linux__ #ifdef __linux__
#ifdef ENABLE_SUBIDS
#define in_parentuid_range(uid) ((uid) >= parentuid && (uid) < parentuid + range)
static int different_namespace (const char *sname)
{
/* 41: /proc/xxxxxxxxxx/task/xxxxxxxxxx/ns/user + \0 */
char path[41];
char buf[512], buf2[512];
ssize_t llen1, llen2;
snprintf (path, 41, "/proc/%s/ns/user", sname);
if ((llen1 = readlink (path, buf, sizeof(buf))) == -1)
return 0;
if ((llen2 = readlink ("/proc/self/ns/user", buf2, sizeof(buf2))) == -1)
return 0;
if (llen1 == llen2 && memcmp (buf, buf2, llen1) == 0)
return 0; /* same namespace */
return 1;
}
#endif /* ENABLE_SUBIDS */
static int check_status (const char *name, const char *sname, uid_t uid) static int check_status (const char *name, const char *sname, uid_t uid)
{ {
/* 40: /proc/xxxxxxxxxx/task/xxxxxxxxxx/status + \0 */ /* 40: /proc/xxxxxxxxxx/task/xxxxxxxxxx/status + \0 */
@@ -114,7 +140,6 @@ static int check_status (const char *name, const char *sname, uid_t uid)
FILE *sfile; FILE *sfile;
snprintf (status, 40, "/proc/%s/status", sname); snprintf (status, 40, "/proc/%s/status", sname);
status[39] = '\0';
sfile = fopen (status, "r"); sfile = fopen (status, "r");
if (NULL == sfile) { if (NULL == sfile) {
@@ -123,26 +148,29 @@ static int check_status (const char *name, const char *sname, uid_t uid)
while (fgets (line, sizeof (line), sfile) == line) { while (fgets (line, sizeof (line), sfile) == line) {
if (strncmp (line, "Uid:\t", 5) == 0) { if (strncmp (line, "Uid:\t", 5) == 0) {
unsigned long ruid, euid, suid; unsigned long ruid, euid, suid;
assert (uid == (unsigned long) uid); assert (uid == (unsigned long) uid);
(void) fclose (sfile);
if (sscanf (line, if (sscanf (line,
"Uid:\t%lu\t%lu\t%lu\n", "Uid:\t%lu\t%lu\t%lu\n",
&ruid, &euid, &suid) == 3) { &ruid, &euid, &suid) == 3) {
if ( (ruid == (unsigned long) uid) if ( (ruid == (unsigned long) uid)
|| (euid == (unsigned long) uid) || (euid == (unsigned long) uid)
|| (suid == (unsigned long) uid) || (suid == (unsigned long) uid) ) {
#ifdef ENABLE_SUBIDS
|| have_sub_uids(name, ruid, 1)
|| have_sub_uids(name, euid, 1)
|| have_sub_uids(name, suid, 1)
#endif /* ENABLE_SUBIDS */
) {
(void) fclose (sfile);
return 1; return 1;
} }
#ifdef ENABLE_SUBIDS
if ( different_namespace (sname)
&& ( have_sub_uids(name, ruid, 1)
|| have_sub_uids(name, euid, 1)
|| have_sub_uids(name, suid, 1))
) {
return 1;
}
#endif /* ENABLE_SUBIDS */
} else { } else {
/* Ignore errors. This is just a best effort. */ /* Ignore errors. This is just a best effort. */
} }
(void) fclose (sfile);
return 0; return 0;
} }
} }
@@ -170,11 +198,17 @@ static int user_busy_processes (const char *name, uid_t uid)
proc = opendir ("/proc"); proc = opendir ("/proc");
if (proc == NULL) { if (proc == NULL) {
perror ("opendir /proc"); perror ("opendir /proc");
#ifdef ENABLE_SUBIDS
sub_uid_close();
#endif
return 0; return 0;
} }
if (stat ("/", &sbroot) != 0) { if (stat ("/", &sbroot) != 0) {
perror ("stat (\"/\")"); perror ("stat (\"/\")");
(void) closedir (proc); (void) closedir (proc);
#ifdef ENABLE_SUBIDS
sub_uid_close();
#endif
return 0; return 0;
} }
@@ -212,7 +246,10 @@ static int user_busy_processes (const char *name, uid_t uid)
if (check_status (name, tmp_d_name, uid) != 0) { if (check_status (name, tmp_d_name, uid) != 0) {
(void) closedir (proc); (void) closedir (proc);
fprintf (stderr, #ifdef ENABLE_SUBIDS
sub_uid_close();
#endif
fprintf (shadow_logfd,
_("%s: user %s is currently used by process %d\n"), _("%s: user %s is currently used by process %d\n"),
Prog, name, pid); Prog, name, pid);
return 1; return 1;
@@ -232,7 +269,11 @@ static int user_busy_processes (const char *name, uid_t uid)
} }
if (check_status (name, task_path+6, uid) != 0) { if (check_status (name, task_path+6, uid) != 0) {
(void) closedir (proc); (void) closedir (proc);
fprintf (stderr, (void) closedir (task_dir);
#ifdef ENABLE_SUBIDS
sub_uid_close();
#endif
fprintf (shadow_logfd,
_("%s: user %s is currently used by process %d\n"), _("%s: user %s is currently used by process %d\n"),
Prog, name, pid); Prog, name, pid);
return 1; return 1;
+42 -10
View File
@@ -35,10 +35,10 @@
#include "defines.h" #include "defines.h"
#include "prototypes.h" #include "prototypes.h"
#include <utmp.h>
#ifdef USE_UTMPX #ifdef USE_UTMPX
#include <utmpx.h> #include <utmpx.h>
#else
#include <utmp.h>
#endif #endif
#include <assert.h> #include <assert.h>
@@ -88,7 +88,7 @@ static bool is_my_tty (const char *tty)
* session * session
* *
* The utmp file is scanned for an entry with the same process ID. * The utmp file is scanned for an entry with the same process ID.
* The line enterred by the *getty / telnetd, etc. should also match * The line entered by the *getty / telnetd, etc. should also match
* the current terminal. * the current terminal.
* *
* When an entry is returned by get_current_utmp, and if the utmp * When an entry is returned by get_current_utmp, and if the utmp
@@ -97,6 +97,7 @@ static bool is_my_tty (const char *tty)
* *
* Return NULL if no entries exist in utmp for the current process. * Return NULL if no entries exist in utmp for the current process.
*/ */
#ifndef USE_UTMPX
/*@null@*/ /*@only@*/struct utmp *get_current_utmp (void) /*@null@*/ /*@only@*/struct utmp *get_current_utmp (void)
{ {
struct utmp *ut; struct utmp *ut;
@@ -130,6 +131,36 @@ static bool is_my_tty (const char *tty)
return ret; return ret;
} }
#else
/*@null@*/ /*@only*/struct utmpx *get_current_utmp(void)
{
struct utmpx *ut;
struct utmpx *ret = NULL;
setutxent ();
/* Find the utmpx entry for this PID. */
while ((ut = getutxent ()) != NULL) {
if ( (ut->ut_pid == getpid ())
&& ('\0' != ut->ut_id[0])
&& ( (LOGIN_PROCESS == ut->ut_type)
|| (USER_PROCESS == ut->ut_type))
&& is_my_tty (ut->ut_line)) {
break;
}
}
if (NULL != ut) {
ret = (struct utmpx *) xmalloc (sizeof (*ret));
memcpy (ret, ut, sizeof (*ret));
}
endutxent ();
return ret;
}
#endif
#ifndef USE_PAM #ifndef USE_PAM
/* /*
@@ -166,6 +197,7 @@ static void updwtmpx (const char *filename, const struct utmpx *utx)
#endif /* ! USE_PAM */ #endif /* ! USE_PAM */
#ifndef USE_UTMPX
/* /*
* prepare_utmp - prepare an utmp entry so that it can be logged in a * prepare_utmp - prepare an utmp entry so that it can be logged in a
* utmp/wtmp file. * utmp/wtmp file.
@@ -225,25 +257,25 @@ static void updwtmpx (const char *filename, const struct utmpx *utx)
utent->ut_type = USER_PROCESS; utent->ut_type = USER_PROCESS;
#endif /* HAVE_STRUCT_UTMP_UT_TYPE */ #endif /* HAVE_STRUCT_UTMP_UT_TYPE */
utent->ut_pid = getpid (); utent->ut_pid = getpid ();
strncpy (utent->ut_line, line, sizeof (utent->ut_line)); strncpy (utent->ut_line, line, sizeof (utent->ut_line) - 1);
#ifdef HAVE_STRUCT_UTMP_UT_ID #ifdef HAVE_STRUCT_UTMP_UT_ID
if (NULL != ut) { if (NULL != ut) {
strncpy (utent->ut_id, ut->ut_id, sizeof (utent->ut_id)); strncpy (utent->ut_id, ut->ut_id, sizeof (utent->ut_id));
} else { } else {
/* XXX - assumes /dev/tty?? */ /* XXX - assumes /dev/tty?? */
strncpy (utent->ut_id, line + 3, sizeof (utent->ut_id)); strncpy (utent->ut_id, line + 3, sizeof (utent->ut_id) - 1);
} }
#endif /* HAVE_STRUCT_UTMP_UT_ID */ #endif /* HAVE_STRUCT_UTMP_UT_ID */
#ifdef HAVE_STRUCT_UTMP_UT_NAME #ifdef HAVE_STRUCT_UTMP_UT_NAME
strncpy (utent->ut_name, name, sizeof (utent->ut_name)); strncpy (utent->ut_name, name, sizeof (utent->ut_name));
#endif /* HAVE_STRUCT_UTMP_UT_NAME */ #endif /* HAVE_STRUCT_UTMP_UT_NAME */
#ifdef HAVE_STRUCT_UTMP_UT_USER #ifdef HAVE_STRUCT_UTMP_UT_USER
strncpy (utent->ut_user, name, sizeof (utent->ut_user)); strncpy (utent->ut_user, name, sizeof (utent->ut_user) - 1);
#endif /* HAVE_STRUCT_UTMP_UT_USER */ #endif /* HAVE_STRUCT_UTMP_UT_USER */
if (NULL != hostname) { if (NULL != hostname) {
struct addrinfo *info = NULL; struct addrinfo *info = NULL;
#ifdef HAVE_STRUCT_UTMP_UT_HOST #ifdef HAVE_STRUCT_UTMP_UT_HOST
strncpy (utent->ut_host, hostname, sizeof (utent->ut_host)); strncpy (utent->ut_host, hostname, sizeof (utent->ut_host) - 1);
#endif /* HAVE_STRUCT_UTMP_UT_HOST */ #endif /* HAVE_STRUCT_UTMP_UT_HOST */
#ifdef HAVE_STRUCT_UTMP_UT_SYSLEN #ifdef HAVE_STRUCT_UTMP_UT_SYSLEN
utent->ut_syslen = MIN (strlen (hostname), utent->ut_syslen = MIN (strlen (hostname),
@@ -325,14 +357,14 @@ int setutmp (struct utmp *ut)
return err; return err;
} }
#ifdef USE_UTMPX #else
/* /*
* prepare_utmpx - the UTMPX version for prepare_utmp * prepare_utmpx - the UTMPX version for prepare_utmp
*/ */
/*@only@*/struct utmpx *prepare_utmpx (const char *name, /*@only@*/struct utmpx *prepare_utmpx (const char *name,
const char *line, const char *line,
const char *host, const char *host,
/*@null@*/const struct utmp *ut) /*@null@*/const struct utmpx *ut)
{ {
struct timeval tv; struct timeval tv;
char *hostname = NULL; char *hostname = NULL;
@@ -398,7 +430,7 @@ int setutmp (struct utmp *ut)
struct sockaddr_in *sa = struct sockaddr_in *sa =
(struct sockaddr_in *) info->ai_addr; (struct sockaddr_in *) info->ai_addr;
#ifdef HAVE_STRUCT_UTMPX_UT_ADDR #ifdef HAVE_STRUCT_UTMPX_UT_ADDR
memcpy (utxent->ut_addr, memcpy (&utxent->ut_addr,
&(sa->sin_addr), &(sa->sin_addr),
MIN (sizeof (utxent->ut_addr), MIN (sizeof (utxent->ut_addr),
sizeof (sa->sin_addr))); sizeof (sa->sin_addr)));

Some files were not shown because too many files have changed in this diff Show More