[svn-upgrade] Integrating new upstream version, shadow (4.0.5)

This commit is contained in:
nekral-guest
2007-10-07 11:45:40 +00:00
parent e637799f9b
commit b0e078d9c8
177 changed files with 59452 additions and 14990 deletions

View File

@@ -2,13 +2,12 @@
AUTOMAKE_OPTIONS = 1.0 foreign
DEFS =
INCLUDES =
lib_LTLIBRARIES = libshadow.la
libshadow_la_LDFLAGS = -version-info 0:0:0
libshadow_la_LIBADD = $(INTLLIBS) $(LIBCRYPT) $(LIBSKEY) $(LIBMD) \
$(top_builddir)/libmisc/libmisc.la
libshadow_la_LIBADD = $(INTLLIBS) $(LIBCRYPT) $(LIBSKEY) $(LIBMD) $(LIBSELINUX) \
$(top_builddir)/libmisc/libmisc.a
libshadow_la_SOURCES = \
commonio.c \

View File

@@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.7.8 from Makefile.am.
# Makefile.in generated by automake 1.9.2 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,6 +14,8 @@
@SET_MAKE@
SOURCES = $(libshadow_la_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -21,7 +23,6 @@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
@@ -35,7 +36,52 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = lib
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(libdir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
am__DEPENDENCIES_1 =
libshadow_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(top_builddir)/libmisc/libmisc.a
am_libshadow_la_OBJECTS = commonio.lo encrypt.lo fputsx.lo getdef.lo \
getpass.lo groupio.lo gshadow.lo lockpw.lo nscd.lo port.lo \
pwauth.lo pwio.lo rad64.lo sgetgrent.lo sgetpwent.lo \
sgroupio.lo shadow.lo shadowio.lo utent.lo
libshadow_la_OBJECTS = $(am_libshadow_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libshadow_la_SOURCES)
DIST_SOURCES = $(libshadow_la_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
@@ -55,7 +101,6 @@ CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS =
DEPDIR = @DEPDIR@
ECHO = @ECHO@
@@ -81,6 +126,7 @@ LIBMD = @LIBMD@
LIBOBJS = @LIBOBJS@
LIBPAM = @LIBPAM@
LIBS = @LIBS@
LIBSELINUX = @LIBSELINUX@
LIBSKEY = @LIBSKEY@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
@@ -125,6 +171,8 @@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
@@ -145,6 +193,7 @@ libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
@@ -152,16 +201,11 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
AUTOMAKE_OPTIONS = 1.0 foreign
INCLUDES =
lib_LTLIBRARIES = libshadow.la
libshadow_la_LDFLAGS = -version-info 0:0:0
libshadow_la_LIBADD = $(INTLLIBS) $(LIBCRYPT) $(LIBSKEY) $(LIBMD) \
$(top_builddir)/libmisc/libmisc.la
libshadow_la_LIBADD = $(INTLLIBS) $(LIBCRYPT) $(LIBSKEY) $(LIBMD) $(LIBSELINUX) \
$(top_builddir)/libmisc/libmisc.a
libshadow_la_SOURCES = \
commonio.c \
@@ -200,14 +244,12 @@ libshadow_la_SOURCES = \
snprintf.h \
utent.c
EXTRA_libshadow_la_SOURCESS = grent.c pwent.c mkdir.c rename.c rmdir.c \
strdup.c strcasecmp.c strerror.c strstr.c putgrent.c \
putpwent.c putspent.c sgetgrent.c sgetpwent.c sgetspent.c \
snprintf.c md5.c md5crypt.c
# These files are unneeded for some reason, listed in
# order of appearance:
#
@@ -221,78 +263,63 @@ EXTRA_DIST = \
grpack.c gspack.c pwpack.c sppack.c \
gshadow_.h shadow_.h lastlog_.h snprintf.h
subdir = lib
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
LTLIBRARIES = $(lib_LTLIBRARIES)
libshadow_la_DEPENDENCIES = $(top_builddir)/libmisc/libmisc.la
am_libshadow_la_OBJECTS = commonio.lo encrypt.lo fputsx.lo getdef.lo \
getpass.lo groupio.lo gshadow.lo lockpw.lo nscd.lo port.lo \
pwauth.lo pwio.lo rad64.lo sgetgrent.lo sgetpwent.lo \
sgroupio.lo shadow.lo shadowio.lo utent.lo
libshadow_la_OBJECTS = $(am_libshadow_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/commonio.Plo ./$(DEPDIR)/encrypt.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/fputsx.Plo ./$(DEPDIR)/getdef.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/getpass.Plo ./$(DEPDIR)/groupio.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/gshadow.Plo ./$(DEPDIR)/lockpw.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/nscd.Plo ./$(DEPDIR)/port.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/pwauth.Plo ./$(DEPDIR)/pwio.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/rad64.Plo ./$(DEPDIR)/sgetgrent.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/sgetpwent.Plo ./$(DEPDIR)/sgroupio.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/shadow.Plo ./$(DEPDIR)/shadowio.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/utent.Plo
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(libshadow_la_SOURCES)
DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
SOURCES = $(libshadow_la_SOURCES)
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign lib/Makefile
Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
libLTLIBRARIES_INSTALL = $(INSTALL)
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(libdir)
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f"; \
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f; \
f=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
else :; fi; \
done
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
p="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
p=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" = "$$p" && dir=.; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
@@ -300,7 +327,7 @@ libshadow.la: $(libshadow_la_OBJECTS) $(libshadow_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libshadow_la_LDFLAGS) $(libshadow_la_OBJECTS) $(libshadow_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT) core *.core
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@@ -326,37 +353,25 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utent.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCC_TRUE@ fi
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCC_TRUE@ fi
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCC_TRUE@ fi
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -368,14 +383,6 @@ distclean-libtool:
-rm -f libtool
uninstall-info-am:
ETAGS = etags
ETAGSFLAGS =
CTAGS = ctags
CTAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
@@ -384,6 +391,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@@ -395,10 +403,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@@ -421,10 +430,6 @@ GTAGS:
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
@@ -438,7 +443,7 @@ distdir: $(DISTFILES)
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
@@ -456,9 +461,10 @@ distdir: $(DISTFILES)
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(libdir)
for dir in "$(DESTDIR)$(libdir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -470,7 +476,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -478,7 +484,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -498,6 +504,8 @@ dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
@@ -535,8 +543,8 @@ uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am info info-am install \
install-am install-data install-data-am install-exec \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am \
install-libLTLIBRARIES install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \

View File

@@ -2,7 +2,7 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: commonio.c,v 1.23 2003/05/12 06:12:06 kloczek Exp $")
RCSID("$Id: commonio.c,v 1.25 2004/10/11 04:40:29 kloczek Exp $")
#include "defines.h"
#include <sys/stat.h>
@@ -16,7 +16,10 @@ RCSID("$Id: commonio.c,v 1.23 2003/05/12 06:12:06 kloczek Exp $")
#ifdef HAVE_SHADOW_H
#include <shadow.h>
#endif
#ifdef WITH_SELINUX
#include <selinux/selinux.h>
static security_context_t old_context=NULL;
#endif
#include "commonio.h"
/* local function prototypes */
@@ -168,12 +171,13 @@ create_backup(const char *backup, FILE *fp)
return -1;
/* TODO: faster copy, not one-char-at-a-time. --marekm */
rewind(fp);
while ((c = getc(fp)) != EOF) {
if (putc(c, bkfp) == EOF)
break;
}
if (c != EOF || fflush(bkfp)) {
c = 0;
if (fseek(fp, 0, SEEK_SET) == 0)
while ((c = getc(fp)) != EOF) {
if (putc(c, bkfp) == EOF)
break;
}
if (c != EOF || ferror(fp) || fflush(bkfp)) {
fclose(bkfp);
return -1;
}
@@ -408,6 +412,7 @@ commonio_open(struct commonio_db *db, int mode)
void *eptr;
int flags = mode;
int buflen;
int saved_errno;
mode &= ~O_CREAT;
@@ -438,10 +443,19 @@ commonio_open(struct commonio_db *db, int mode)
return 0;
}
#ifdef WITH_SELINUX
db->scontext=NULL;
if (is_selinux_enabled() && (! db->readonly)) {
if (fgetfilecon(fileno(db->fp),&db->scontext) < 0) {
goto cleanup_errno;
}
}
#endif
buflen = BUFLEN;
buf = (char *) malloc(buflen);
if (!buf)
goto cleanup;
goto cleanup_ENOMEM;
while (db->ops->fgets(buf, buflen, db->fp)) {
while (!(cp = strrchr(buf, '\n')) && !feof(db->fp)) {
@@ -480,8 +494,12 @@ commonio_open(struct commonio_db *db, int mode)
add_one_entry(db, p);
}
db->isopen = 1;
free(buf);
if (ferror(db->fp))
goto cleanup_errno;
db->isopen = 1;
return 1;
cleanup_entry:
@@ -491,11 +509,20 @@ cleanup_line:
free(line);
cleanup_buf:
free(buf);
cleanup:
cleanup_ENOMEM:
errno = ENOMEM;
cleanup_errno:
saved_errno = errno;
free_linked_list(db);
#ifdef WITH_SELINUX
if (db->scontext!= NULL) {
freecon(db->scontext);
db->scontext=NULL;
}
#endif
fclose(db->fp);
db->fp = NULL;
errno = ENOMEM;
errno = saved_errno;
return 0;
}
@@ -628,6 +655,19 @@ commonio_close(struct commonio_db *db)
goto fail;
}
#ifdef WITH_SELINUX
if (db->scontext != NULL) {
int stat=getfscreatecon(&old_context);
if (stat< 0) {
errors++;
goto fail;
}
if (setfscreatecon(db->scontext)<0) {
errors++;
goto fail;
}
}
#endif
/*
* Create backup file.
*/
@@ -684,14 +724,26 @@ commonio_close(struct commonio_db *db)
goto fail;
nscd_need_reload = 1;
success:
free_linked_list(db);
return 1;
goto success;
fail:
errors++;
success:
#ifdef WITH_SELINUX
if (db->scontext != NULL) {
if (setfscreatecon(old_context)<0) {
errors++;
}
if (old_context != NULL) {
freecon(old_context);
old_context=NULL;
}
freecon(db->scontext);
db->scontext=NULL;
}
#endif
free_linked_list(db);
return 0;
return errors==0;
}

View File

@@ -1,5 +1,8 @@
/* $Id: commonio.h,v 1.7 2001/08/14 21:09:54 malekith Exp $ */
/* $Id: commonio.h,v 1.8 2004/10/11 04:40:29 kloczek Exp $ */
#ifdef WITH_SELINUX
#include <selinux/selinux.h>
#endif
/*
* Linked list entry.
*/
@@ -70,6 +73,9 @@ struct commonio_db {
*/
FILE *fp;
#ifdef WITH_SELINUX
security_context_t scontext;
#endif
/*
* Head, tail, current position in linked list.
*/

View File

@@ -1,4 +1,4 @@
/* $Id: defines.h,v 1.21 2003/05/03 16:14:23 kloczek Exp $ */
/* $Id: defines.h,v 1.22 2004/10/23 14:09:31 kloczek Exp $ */
/* some useful defines */
#ifndef _DEFINES_H_
@@ -11,9 +11,6 @@
#if HAVE_LOCALE_H
# include <locale.h>
#endif
#if !HAVE_SETLOCALE
# define setlocale(Category, Locale) /* empty */
#endif
#define gettext_noop(String) (String)
/* #define gettext_def(String) "#define String" */
@@ -146,7 +143,7 @@ char *strchr(), *strrchr(), *strtok();
/* cleaner than lots of #ifdefs everywhere - use this as follows:
SYSLOG((LOG_CRIT, "user %s cracked root", user)); */
#if HAVE_SETLOCALE
#if ENABLE_NLS
/* Temporarily set LC_TIME to "C" to avoid strange dates in syslog.
This is a workaround for a more general syslog(d) design problem -
syslogd should log the current system time for each event, and not
@@ -165,9 +162,9 @@ char *strchr(), *strrchr(), *strtok();
free(saved_locale); \
} \
} while (0)
#else /* !HAVE_SETLOCALE */
#else /* !ENABLE_NLS */
#define SYSLOG(x) syslog x
#endif /* !HAVE_SETLOCALE */
#endif /* !ENABLE_NLS */
#else /* !USE_SYSLOG */

View File

@@ -30,11 +30,12 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: getdef.c,v 1.18 2003/05/12 02:40:08 kloczek Exp $")
RCSID("$Id: getdef.c,v 1.19 2004/06/03 00:27:19 kloczek Exp $")
#include "prototypes.h"
#include "defines.h"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include "getdef.h"
@@ -349,7 +350,7 @@ def_load(void)
if ((fp = fopen(def_fname, "r")) == NULL) {
SYSLOG((LOG_CRIT, "cannot open login definitions %s [%m]",
def_fname));
return;
exit(1);
}
/*
@@ -392,6 +393,13 @@ def_load(void)
*/
putdef_str(name, value);
}
if (ferror(fp)) {
SYSLOG((LOG_CRIT, "cannot read login definitions %s [%m]",
def_fname));
exit(1);
}
(void) fclose(fp);
}