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

This commit is contained in:
nekral-guest
2007-10-07 11:45:23 +00:00
parent 4903ce068e
commit effd479bff
431 changed files with 56747 additions and 47326 deletions

View File

@@ -2,22 +2,18 @@
AUTOMAKE_OPTIONS = 1.0 foreign
DEFS =
INCLUDES = -I$(top_srcdir)
INCLUDES =
lib_LTLIBRARIES = libshadow.la
libshadow_la_LDFLAGS = -version-info 0:0:0
libshadow_la_LIBADD = $(INTLLIBS) $(LIBCRYPT) $(LIBTCFS) $(LIBSKEY) $(LIBMD) \
libshadow_la_LIBADD = $(INTLLIBS) $(LIBCRYPT) $(LIBSKEY) $(LIBMD) \
$(top_builddir)/libmisc/libmisc.la
libshadow_la_SOURCES = \
commonio.c \
commonio.h \
defines.h \
dialchk.c \
dialchk.h \
dialup.c \
dialup.h \
encrypt.c \
faillog.h \
fputsx.c \
@@ -29,6 +25,8 @@ libshadow_la_SOURCES = \
gshadow.c \
lockpw.c \
md5.h \
nscd.c \
nscd.h \
pam_defs.h \
port.c \
port.h \
@@ -47,8 +45,6 @@ libshadow_la_SOURCES = \
shadowio.c \
shadowio.h \
snprintf.h \
tcfsio.c \
tcfsio.h \
utent.c
EXTRA_libshadow_la_SOURCESS = grent.c pwent.c mkdir.c rename.c rmdir.c \

View File

@@ -1,6 +1,7 @@
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
# Makefile.in generated by automake 1.7.8 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,109 +14,152 @@
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AS = @AS@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
DATADIRNAME = @DATADIRNAME@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS =
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GENCAT = @GENCAT@
GLIBC21 = @GLIBC21@
GMOFILES = @GMOFILES@
F77 = @F77@
FFLAGS = @FFLAGS@
GMSGFMT = @GMSGFMT@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LDFLAGS = @LDFLAGS@
LIBCRACK = @LIBCRACK@
LIBCRYPT = @LIBCRYPT@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBMD = @LIBMD@
LIBOBJS = @LIBOBJS@
LIBPAM = @LIBPAM@
LIBS = @LIBS@
LIBSKEY = @LIBSKEY@
LIBTCFS = @LIBTCFS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
MSGMERGE = @MSGMERGE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
POSUB = @POSUB@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
AUTOMAKE_OPTIONS = 1.0 foreign
DEFS =
INCLUDES = -I$(top_srcdir)
INCLUDES =
lib_LTLIBRARIES = libshadow.la
libshadow_la_LDFLAGS = -version-info 0:0:0
libshadow_la_LIBADD = $(INTLLIBS) $(LIBCRYPT) $(LIBTCFS) $(LIBSKEY) $(LIBMD) \
libshadow_la_LIBADD = $(INTLLIBS) $(LIBCRYPT) $(LIBSKEY) $(LIBMD) \
$(top_builddir)/libmisc/libmisc.la
@@ -123,10 +167,6 @@ libshadow_la_SOURCES = \
commonio.c \
commonio.h \
defines.h \
dialchk.c \
dialchk.h \
dialup.c \
dialup.h \
encrypt.c \
faillog.h \
fputsx.c \
@@ -138,6 +178,8 @@ libshadow_la_SOURCES = \
gshadow.c \
lockpw.c \
md5.h \
nscd.c \
nscd.h \
pam_defs.h \
port.c \
port.h \
@@ -156,8 +198,6 @@ libshadow_la_SOURCES = \
shadowio.c \
shadowio.h \
snprintf.h \
tcfsio.c \
tcfsio.h \
utent.c
@@ -182,33 +222,32 @@ EXTRA_DIST = \
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 dialchk.lo dialup.lo encrypt.lo \
fputsx.lo getdef.lo getpass.lo groupio.lo gshadow.lo lockpw.lo \
port.lo pwauth.lo pwio.lo rad64.lo sgetgrent.lo sgetpwent.lo \
sgroupio.lo shadow.lo shadowio.lo tcfsio.lo utent.lo
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)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/commonio.Plo $(DEPDIR)/dialchk.Plo \
@AMDEP_TRUE@ $(DEPDIR)/dialup.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)/port.Plo $(DEPDIR)/pwauth.Plo \
@AMDEP_TRUE@ $(DEPDIR)/pwio.Plo $(DEPDIR)/rad64.Plo \
@AMDEP_TRUE@ $(DEPDIR)/sgetgrent.Plo $(DEPDIR)/sgetpwent.Plo \
@AMDEP_TRUE@ $(DEPDIR)/sgroupio.Plo $(DEPDIR)/shadow.Plo \
@AMDEP_TRUE@ $(DEPDIR)/shadowio.Plo $(DEPDIR)/tcfsio.Plo \
@AMDEP_TRUE@ $(DEPDIR)/utent.Plo
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) \
@@ -216,50 +255,47 @@ LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
CFLAGS = @CFLAGS@
DIST_SOURCES = $(libshadow_la_SOURCES)
DIST_COMMON = Makefile.am Makefile.in
DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
SOURCES = $(libshadow_la_SOURCES)
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign lib/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
libLTLIBRARIES_INSTALL = $(INSTALL)
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(libdir)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
echo " $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$p"; \
$(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$p; \
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; \
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; \
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=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libshadow.la: $(libshadow_la_OBJECTS) $(libshadow_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libshadow_la_LDFLAGS) $(libshadow_la_OBJECTS) $(libshadow_la_LIBADD) $(LIBS)
@@ -269,98 +305,148 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/commonio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/dialchk.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/dialup.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/encrypt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fputsx.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getdef.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getpass.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/groupio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/gshadow.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lockpw.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/port.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pwauth.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pwio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/rad64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/sgetgrent.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/sgetpwent.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/sgroupio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/shadow.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/shadowio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/tcfsio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/utent.Plo@am__quote@
distclean-depend:
-rm -rf $(DEPDIR)
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/commonio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/encrypt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fputsx.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdef.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpass.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/groupio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gshadow.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lockpw.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nscd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/port.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwauth.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rad64.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgetgrent.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgetpwent.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgroupio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shadow.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shadowio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utent.Plo@am__quote@
.c.o:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
@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
@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)/'`$<
.c.obj:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `cygpath -w $<`
@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
@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`
.c.lo:
@AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LTCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
CCDEPMODE = @CCDEPMODE@
@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
@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)/'`$<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
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) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique $(LISP)
mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`CDPATH=: && cd $(top_builddir) && pwd` \
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-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)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
@@ -373,7 +459,6 @@ all-am: Makefile $(LTLIBRARIES)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(libdir)
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -385,6 +470,7 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
@@ -392,7 +478,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
-rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -403,9 +489,10 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-am
distclean-am: clean-am distclean-compile distclean-depend \
distclean-generic distclean-libtool distclean-tags
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
dvi: dvi-am
@@ -426,7 +513,8 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
@@ -434,19 +522,28 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
.PHONY: GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool distclean distclean-compile \
distclean-depend distclean-generic distclean-libtool \
.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 \
install-exec-am install-info install-info-am \
install-libLTLIBRARIES install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool tags uninstall \
uninstall-am uninstall-info-am uninstall-libLTLIBRARIES
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-info-am \
uninstall-libLTLIBRARIES
# 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.

View File

@@ -2,7 +2,7 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: commonio.c,v 1.22 2001/11/17 13:15:52 malekith Exp $")
RCSID("$Id: commonio.c,v 1.23 2003/05/12 06:12:06 kloczek Exp $")
#include "defines.h"
#include <sys/stat.h>
@@ -12,6 +12,7 @@ RCSID("$Id: commonio.c,v 1.22 2001/11/17 13:15:52 malekith Exp $")
#include <stdio.h>
#include <signal.h>
#include <pwd.h>
#include <nscd.h>
#ifdef HAVE_SHADOW_H
#include <shadow.h>
#endif

View File

@@ -1,4 +1,4 @@
/* $Id: defines.h,v 1.20 2001/11/19 09:23:52 kloczek Exp $ */
/* $Id: defines.h,v 1.21 2003/05/03 16:14:23 kloczek Exp $ */
/* some useful defines */
#ifndef _DEFINES_H_
@@ -47,14 +47,6 @@ char *strchr(), *strrchr(), *strtok();
# include <errno.h>
#endif
/* Solaris 2.4 defines __SVR4, but not SVR4 -j. */
#ifdef __SVR4
# ifndef SVR4
# define SVR4 __SVR4
# endif
#endif
#include <sys/stat.h>
#include <sys/types.h>
#if HAVE_SYS_WAIT_H
@@ -283,7 +275,7 @@ char *strchr(), *strrchr(), *strtok();
/* get rid of a few ugly repeated #ifdefs in pwent.c and grent.c */
/* XXX - this is ugly too, configure should test it and not check for
any hardcoded system names, if possible. --marekm */
#if defined(SVR4) || defined(AIX) || defined(__linux__)
#if defined(AIX) || defined(__linux__)
#define SETXXENT_TYPE void
#define SETXXENT_RET(x) return
#define SETXXENT_TEST(x) x; if (0) /* compiler should optimize this away */

View File

@@ -1,77 +0,0 @@
/*
* Copyright 1989 - 1991, Julianne Frances Haugh
* 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. Neither the name of Julianne F. Haugh nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY JULIE HAUGH 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 JULIE HAUGH 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>
#include "rcsid.h"
RCSID("$Id: dialchk.c,v 1.6 1999/08/27 19:02:51 marekm Exp $")
#include <stdio.h>
#include "defines.h"
#include "prototypes.h"
#include "dialup.h"
#include "dialchk.h"
/*
* Check for dialup password
*
* dialcheck tests to see if tty is listed as being a dialup
* line. If so, a dialup password may be required if the shell
* is listed as one which requires a second password.
*/
int
dialcheck(const char *tty, const char *sh)
{
struct dialup *dialup;
char *pass;
char *cp;
setduent ();
if (! isadialup (tty)) {
endduent ();
return (1);
}
if (! (dialup = getdushell (sh))) {
endduent ();
return (1);
}
endduent ();
if (dialup->du_passwd[0] == '\0')
return (1);
if (! (pass = getpass(_("Dialup Password: "))))
return (0);
cp = pw_encrypt (pass, dialup->du_passwd);
strzero(pass);
return (strcmp (cp, dialup->du_passwd) == 0);
}

View File

@@ -1,16 +0,0 @@
/* $Id: dialchk.h,v 1.2 2000/08/26 18:27:17 marekm Exp $ */
#ifndef _DIALCHK_H_
#define _DIALCHK_H_
#include "defines.h"
/*
* Check for dialup password
*
* dialcheck tests to see if tty is listed as being a dialup
* line. If so, a dialup password may be required if the shell
* is listed as one which requires a second password.
*/
extern int dialcheck(const char *, const char *);
#endif

View File

@@ -1,169 +0,0 @@
/*
* Copyright 1989 - 1991, Julianne Frances Haugh
* 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. Neither the name of Julianne F. Haugh nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY JULIE HAUGH 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 JULIE HAUGH 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>
#include "rcsid.h"
RCSID("$Id: dialup.c,v 1.3 1997/12/07 23:26:50 marekm Exp $")
#include <stdio.h>
#include "prototypes.h"
#include "defines.h"
#include "dialup.h"
static FILE *dialpwd;
void
setduent(void)
{
if (dialpwd)
rewind (dialpwd);
else
dialpwd = fopen (DIALPWD, "r");
}
void
endduent(void)
{
if (dialpwd)
fclose (dialpwd);
dialpwd = (FILE *) 0;
}
struct dialup *
fgetduent(FILE *fp)
{
static struct dialup dialup; /* static structure to point to */
static char sh[128]; /* some space for a login shell */
static char passwd[128]; /* some space for dialup password */
char buf[BUFSIZ];
char *cp;
char *cp2;
if (! fp)
return 0;
if (! fp || feof (fp))
return ((struct dialup *) 0);
while (fgets (buf, sizeof buf, fp) == buf && buf[0] == '#')
;
if (feof (fp))
return ((struct dialup *) 0);
if ((cp = strchr (buf, '\n')))
*cp = '\0';
if (! (cp = strchr (buf, ':')))
return ((struct dialup *) 0);
if (cp - buf > sizeof sh) /* something is fishy ... */
return ((struct dialup *) 0);
*cp++ = '\0';
(void) strcpy (sh, buf);
sh[cp - buf] = '\0';
if ((cp2 = strchr (cp, ':')))
*cp2 = '\0';
if (strlen (cp) + 1 > sizeof passwd) /* something is REALLY fishy */
return ((struct dialup *) 0);
(void) strcpy (passwd, cp);
dialup.du_shell = sh;
dialup.du_passwd = passwd;
return (&dialup);
}
struct dialup *
getduent(void)
{
if (! dialpwd)
setduent ();
return fgetduent (dialpwd);
}
struct dialup *
getdushell(const char *sh)
{
struct dialup *dialup;
while ((dialup = getduent ())) {
if (strcmp (sh, dialup->du_shell) == 0)
return (dialup);
if (strcmp (dialup->du_shell, "*") == 0)
return (dialup);
}
return ((struct dialup *) 0);
}
int
isadialup(const char *tty)
{
FILE *fp;
char buf[BUFSIZ];
int dialup = 0;
if (! (fp = fopen (DIALUPS, "r")))
return (0);
while (fgets (buf, sizeof buf, fp) == buf) {
if (buf[0] == '#')
continue;
buf[strlen (buf) - 1] = '\0';
if (strcmp (buf, tty) == 0) {
dialup = 1;
break;
}
}
fclose (fp);
return (dialup);
}
int
putduent(const struct dialup *dial, FILE *fp)
{
if (! fp || ! dial)
return -1;
if (fprintf (fp, "%s:%s\n", dial->du_shell, dial->du_passwd) == EOF)
return -1;
return 0;
}

View File

@@ -1,66 +0,0 @@
/*
* Copyright 1989 - 1991, Julianne Frances Haugh
* 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. Neither the name of Julianne F. Haugh nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY JULIE HAUGH 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 JULIE HAUGH 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.
*/
/*
* Structure of the /etc/d_passwd file
*
* The d_passwd file contains the names of login shells which require
* dialup passwords. Each line contains the fully qualified path name
* for the shell, followed by an optional password. Each field is
* separated by a ':'.
*
* Structure of the /etc/dialups file
*
* The dialups file contains the names of ports which may be dialup
* lines. Each line consists of the last component of the path
* name. The leading "/dev/" string is removed.
*
* $Id: dialup.h,v 1.3 2000/08/26 18:27:17 marekm Exp $
*/
#ifndef _DIALUP_H
#define _DIALUP_H
struct dialup {
char *du_shell;
char *du_passwd;
};
extern void setduent(void);
extern void endduent(void);
extern struct dialup *fgetduent(FILE *);
extern struct dialup *getduent(void);
extern struct dialup *getdushell(const char *);
extern int putduent(const struct dialup *, FILE *);
extern int isadialup(const char *);
#define DIALPWD "/etc/d_passwd"
#define DIALUPS "/etc/dialups"
#endif

View File

@@ -30,7 +30,7 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: getdef.c,v 1.15 2002/01/06 14:08:00 kloczek Exp $")
RCSID("$Id: getdef.c,v 1.18 2003/05/12 02:40:08 kloczek Exp $")
#include "prototypes.h"
#include "defines.h"
@@ -63,7 +63,6 @@ static struct itemdef def_table[] = {
{ "CRACKLIB_DICTPATH", NULL },
{ "CREATE_HOME", NULL },
{ "DEFAULT_HOME", NULL },
{ "DIALUPS_CHECK_ENAB", NULL },
{ "ENVIRON_FILE", NULL },
{ "ENV_HZ", NULL },
{ "ENV_PATH", NULL },
@@ -94,7 +93,6 @@ static struct itemdef def_table[] = {
{ "MOTD_FILE", NULL },
{ "NOLOGINS_FILE", NULL },
{ "NOLOGIN_STR", NULL },
{ "NO_PASSWORD_CONSOLE", NULL },
{ "OBSCURE_CHECKS_ENAB", NULL },
{ "PASS_ALWAYS_WARN", NULL },
{ "PASS_CHANGE_TRIES", NULL },
@@ -406,15 +404,11 @@ main(int argc, char **argv)
char *cp;
struct itemdef *d;
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
def_load ();
for (i = 0 ; i < NUMDEFS ; ++i) {
if ((d = def_find(def_table[i].name)) == NULL)
printf(_("error - lookup '%s' failed\n"), def_table[i].name);
printf("error - lookup '%s' failed\n", def_table[i].name);
else
printf("%4d %-24s %s\n", i+1, d->name, d->value);
}
@@ -422,7 +416,7 @@ main(int argc, char **argv)
if ((cp = getdef_str (argv[1])) != NULL)
printf ("%s `%s'\n", argv[1], cp);
else
printf (_("%s not found\n"), argv[1]);
printf ("%s not found\n", argv[1]);
}
exit(0);
}

View File

@@ -31,7 +31,7 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: getpass.c,v 1.11 2001/11/16 14:53:48 kloczek Exp $")
RCSID("$Id: getpass.c,v 1.12 2003/05/05 21:44:12 kloczek Exp $")
#include "defines.h"
@@ -197,10 +197,6 @@ prompt_password(const char *prompt, int with_echo)
is_tty = 1;
if (GTTY(fileno(ifp), &old_modes)) {
is_tty = 0;
#if 0 /* to make getpass work with redirected stdin */
return_value = NULL;
goto out2;
#endif
}
#ifdef USE_SETJMP
@@ -266,9 +262,6 @@ out:
(void) sigaction (SIGINT, &old_sigact, NULL);
#else
(void) signal (SIGINT, old_signal);
#endif
#if 0
out2:
#endif
if (tty_opened)
(void) fclose(ifp);

View File

@@ -30,7 +30,7 @@
/*
* lastlog.h - structure of lastlog file
*
* $Id: lastlog_.h,v 1.2 1997/05/01 23:14:42 marekm Exp $
* $Id: lastlog_.h,v 1.3 2003/12/17 12:52:25 kloczek Exp $
*
* This file defines a lastlog file structure which should be sufficient
* to hold the information required by login. It should only be used if
@@ -40,8 +40,23 @@
#ifndef __LASTLOG_H
#define __LASTLOG_H
#if defined(__GLIBC__)
#error "glibc shall have fixed <lastlog.h> already, which is <utmp.h>"
#endif
#if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32
/* Recent dietlibc will support those conditionnals */
#define LASTLOG_NEEDS_32BIT_LL_TIME 1
#elif defined(__x86_64__) || defined(__powerpc64__) || defined(__sparc_v9__)
#error "I don't know what to do here, what kind of C library are you using?"
#endif
struct lastlog {
#if LASTLOG_NEEDS_32BIT_LL_TIME
unsigned int ll_time;
#else
time_t ll_time;
#endif
char ll_line[12];
char ll_host[16];
};

92
lib/nscd.c Normal file
View File

@@ -0,0 +1,92 @@
/* Copyright (c) 1999 SuSE GmbH Nuerenberg, Germany
Author: Thorsten Kukuk <kukuk@suse.de> */
#include <assert.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/un.h>
/* Version number of the daemon interface */
#define NSCD_VERSION 2
/* Path for the Unix domain socket. */
#define _PATH_NSCDSOCKET "/var/run/.nscd_socket"
/* Available services. */
typedef enum {
GETPWBYNAME,
GETPWBYUID,
GETGRBYNAME,
GETGRBYGID,
GETHOSTBYNAME,
GETHOSTBYNAMEv6,
GETHOSTBYADDR,
GETHOSTBYADDRv6,
LASTDBREQ = GETHOSTBYADDRv6,
SHUTDOWN, /* Shut the server down. */
GETSTAT, /* Get the server statistic. */
INVALIDATE, /* Invalidate one special cache. */
LASTREQ
} request_type;
/* Header common to all requests */
typedef struct {
int version; /* Version number of the daemon interface. */
request_type type; /* Service requested. */
#if defined(__alpha__)
int64_t key_len; /* Key length is 64bit on Alpha. */
#else
int32_t key_len; /* Key length, 32bit on most plattforms. */
#endif
} request_header;
/* Create a socket connected to a name. */
static int nscd_open_socket (void)
{
struct sockaddr_un addr;
int sock;
sock = socket (PF_UNIX, SOCK_STREAM, 0);
if (sock < 0)
return -1;
addr.sun_family = AF_UNIX;
assert (sizeof (addr.sun_path) >= sizeof (_PATH_NSCDSOCKET));
strcpy (addr.sun_path, _PATH_NSCDSOCKET);
if (connect (sock, (struct sockaddr *) &addr, sizeof (addr)) < 0) {
close (sock);
return -1;
}
return sock;
}
/*
* nscd_flush_cache - flush specyfied service bufor in nscd cache
*/
int nscd_flush_cache (char *service)
{
int sock = nscd_open_socket ();
request_header req;
ssize_t nbytes;
if (sock == -1)
return -1;
req.version = NSCD_VERSION;
req.type = INVALIDATE;
req.key_len = strlen (service) + 1;
nbytes = write (sock, &req, sizeof (request_header));
if (nbytes != sizeof (request_header)) {
close (sock);
return -1;
}
nbytes = write (sock, (void *) service, req.key_len);
close (sock);
return (nbytes != req.key_len ? (-1) : 0);
}

12
lib/nscd.h Normal file
View File

@@ -0,0 +1,12 @@
/* Copyright (c) 1999 SuSE GmbH Nuerenberg, Germany
Author: Thorsten Kukuk <kukuk@suse.de> */
#ifndef _FAILURE_H_
#define _FAILURE_H_
/*
* nscd_flush_cache - flush specyfied service bufor in nscd cache
*/
extern int nscd_flush_cache (char *service);
#endif

View File

@@ -6,7 +6,7 @@
* Juha Virtanen, <jiivee@hut.fi>; November 1995
*/
/*
* $Id: prototypes.h,v 1.14 2000/08/26 18:27:17 marekm Exp $
* $Id: prototypes.h,v 1.15 2003/04/25 21:33:47 kloczek Exp $
*
* Added a macro to work around ancient (non-ANSI) compilers, just in case
* someone ever tries to compile this with SunOS cc... --marekm
@@ -16,7 +16,11 @@
#define _PROTOTYPES_H
#include <sys/stat.h>
#if HAVE_UTMPX_H
#include <utmpx.h>
#else
#include <utmp.h>
#endif
#include <pwd.h>
#include <grp.h>

View File

@@ -30,7 +30,7 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: pwauth.c,v 1.11 2000/08/26 18:27:17 marekm Exp $")
RCSID("$Id: pwauth.c,v 1.14 2003/05/12 04:58:56 kloczek Exp $")
#include <sys/types.h>
#include <signal.h>
@@ -59,42 +59,19 @@ static const char *PROMPT = gettext_noop("%s's Password: ");
extern char *getpass();
extern char *getpass_with_echo();
#ifdef AUTH_METHODS
/*
* Look-up table for bound-in methods. Put the name that the
* method is known by in the password field as "name" and a
* pointer to the function
*/
struct method {
char *name;
int (*func)(const char *, int, const char *);
};
#ifdef PAD_AUTH
int pad_auth();
#endif
static struct method methods[] = {
#ifdef PAD_AUTH
{ "pad", pad_auth },
#endif
{ "", 0 }
};
#endif /* AUTH_METHODS */
int wipe_clear_pass = 1;
char *clear_pass = NULL;
/*
* _old_auth - perform getpass/crypt authentication
* pw_auth - perform getpass/crypt authentication
*
* _old_auth gets the user's cleartext password and encrypts it
* using the salt in the encrypted password. The results are
* pw_auth gets the user's cleartext password and encrypts it
* using the salt in the encrypted password. The results are
* compared.
*/
static int
_old_auth(const char *cipher, const char *user, int reason, const char *input)
int
pw_auth(const char *cipher, const char *user, int reason, const char *input)
{
char prompt[1024];
char *clear = NULL;
@@ -283,12 +260,8 @@ _old_auth(const char *cipher, const char *user, int reason, const char *input)
if (retval && use_skey) {
int passcheck = -1;
#if 0 /* some skey libs don't have skey_passcheck. --marekm */
passcheck = skey_passcheck(user, input);
#else
if (skeyverify(&skey, input) == 0)
passcheck = skey.n;
#endif /* if 0 */
if (passcheck > 0)
retval = 0;
}
@@ -313,266 +286,3 @@ _old_auth(const char *cipher, const char *user, int reason, const char *input)
strzero(clear);
return retval;
}
#ifdef AUTH_METHODS
/*
* _pw_auth - perform alternate password authentication
*
* pw_auth executes the alternate password authentication method
* described in the user's password entry. _pw_auth does the real
* work, pw_auth splits the authentication string into individual
* command names.
*/
static int
_pw_auth(const char *command, const char *user, int reason, const char *input)
{
RETSIGTYPE (*sigint)();
RETSIGTYPE (*sigquit)();
#ifdef SIGTSTP
RETSIGTYPE (*sigtstp)();
#endif
int pid;
int status;
int i;
char * const argv[5];
int argc = 0;
int pipes[2];
char *empty_env = NULL;
int use_pipe;
/*
* Start with a quick sanity check. ALL command names must
* be fully-qualified path names.
*/
if (command[0] != '/')
return -1;
/*
* Set the keyboard signals to be ignored. When the user kills
* the child we don't want the parent dying as well.
*/
sigint = signal (SIGINT, SIG_IGN);
sigquit = signal (SIGQUIT, SIG_IGN);
#ifdef SIGTSTP
sigtstp = signal (SIGTSTP, SIG_IGN);
#endif
/*
* FTP and REXEC reasons don't give the program direct access
* to the user. This means that the program can only get input
* from this function. So we set up a pipe for that purpose.
*/
use_pipe = (reason == PW_FTP || reason == PW_REXEC);
if (use_pipe)
if (pipe (pipes))
return -1;
/*
* The program will be forked off with the parent process waiting
* on the child to tell it how successful it was.
*/
switch (pid = fork ()) {
/*
* The fork() failed completely. Clean up as needed and
* return to the caller.
*/
case -1:
if (use_pipe) {
close (pipes[0]);
close (pipes[1]);
}
return -1;
case 0:
/*
* Let the child catch the SIGINT and SIGQUIT
* signals. The parent, however, will continue
* to ignore them.
*/
signal (SIGINT, SIG_DFL);
signal (SIGQUIT, SIG_DFL);
/*
* Set up the command line. The first argument is
* the name of the command being executed. The
* second is the command line option for the reason,
* and the third is the user name.
*/
argv[argc++] = command;
switch (reason) {
case PW_SU: argv[argc++] = "-s"; break;
case PW_LOGIN: argv[argc++] = "-l"; break;
case PW_ADD: argv[argc++] = "-a"; break;
case PW_CHANGE: argv[argc++] = "-c"; break;
case PW_DELETE: argv[argc++] = "-d"; break;
case PW_TELNET: argv[argc++] = "-t"; break;
case PW_RLOGIN: argv[argc++] = "-r"; break;
case PW_FTP: argv[argc++] = "-f"; break;
case PW_REXEC: argv[argc++] = "-x"; break;
}
if (reason == PW_CHANGE && input)
argv[argc++] = input;
argv[argc++] = user;
argv[argc] = (char *) 0;
/*
* The FTP and REXEC reasons use a pipe to communicate
* with the parent. The other standard I/O descriptors
* are closed and re-opened as /dev/null.
*/
if (use_pipe) {
close (0);
close (1);
close (2);
if (dup (pipes[0]) != 0)
exit (1);
close (pipes[0]);
close (pipes[1]);
if (open ("/dev/null", O_WRONLY) != 1)
exit (1);
if (open ("/dev/null", O_WRONLY) != 2)
exit (1);
}
/*
* Now we execute the command directly.
* Do it with empty environment for safety. --marekm
*/
execve(command, argv, &empty_env);
_exit((errno == ENOENT) ? 127 : 126);
/*NOTREACHED*/
default:
/*
* FTP and REXEC cause a single line of text to be
* sent to the child over a pipe that was set up
* earlier.
*/
if (use_pipe) {
close (pipes[0]);
if (input)
write (pipes[1], input, strlen (input));
write (pipes[1], "\n", 1);
close (pipes[1]);
}
/*
* Wait on the child to die. When it does you will
* get the exit status and use that to determine if
* the authentication program was successful.
*/
while ((i = wait (&status)) != pid && i != -1)
;
/*
* Re-set the signals to their earlier values.
*/
signal (SIGINT, sigint);
signal (SIGQUIT, sigquit);
#ifdef SIGTSTP
signal (SIGTSTP, sigtstp);
#endif
/*
* Make sure we found the right process!
*/
if (i == -1)
return -1;
if (status == 0)
return 0;
else
return -1;
}
/*NOTREACHED*/
}
/*
* _builtin_auth - lookup routine in table and execute
*/
static int
_builtin_auth(const char *command, const char *user, int reason, const char *input)
{
int i;
/*
* Scan the table, looking for a match. If we fall off
* the end, it must mean that this method isn't supported,
* so we fail the authentication.
*/
for (i = 0;methods[i].name[0];i++) {
if (! strcmp (command, methods[i].name))
break;
}
if (methods[i].name[0] == '\0')
return -1;
/*
* Call the pointed to function with the other three
* arguments.
*/
return (methods[i].func) (user, reason, input);
}
#endif /* AUTH_METHODS */
/*
* This function does the real work. It splits the list of program names
* up into individual programs and executes them one at a time.
*/
int
pw_auth(const char *command, const char *user, int reason, const char *input)
{
#ifdef AUTH_METHODS
char buf[256];
char *cmd, *end;
int rc;
/*
* Quick little sanity check ...
*/
if (strlen (command) >= sizeof buf)
return -1;
strcpy(buf, command); /* safe (because of the above check) --marekm */
/*
* Find each command and make sure it is NUL-terminated. Then
* invoke _pw_auth to actually run the program. The first
* failing program ends the whole mess.
*/
for (cmd = buf;cmd;cmd = end) {
if ((end = strchr (cmd, ';')))
*end++ = '\0';
if (cmd[0] != '@')
rc = _old_auth (cmd, user, reason, input);
else if (cmd[1] == '/')
rc = _pw_auth (cmd + 1, user, reason, input);
else
rc = _builtin_auth (cmd + 1, user, reason, input);
if (rc)
return -1;
}
return 0;
#else
return _old_auth(command, user, reason, input);
#endif
}

View File

@@ -26,14 +26,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: pwauth.h,v 1.2 1997/05/01 23:14:44 marekm Exp $
* $Id: pwauth.h,v 1.3 2003/05/12 06:08:31 kloczek Exp $
*/
#if __STDC__
int pw_auth(const char *program,const char *user,int flag,const char *input);
#else
int pw_auth ();
#endif
int pw_auth(const char *cipher,const char *user,int flag,const char *input);
/*
* Local access

View File

@@ -2,7 +2,7 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: pwio.c,v 1.12 2001/08/14 21:10:36 malekith Exp $")
RCSID("$Id: pwio.c,v 1.13 2003/05/03 16:14:23 kloczek Exp $")
#include "prototypes.h"
#include "defines.h"
@@ -27,14 +27,6 @@ __pw_dup(const struct passwd *pwent)
return NULL;
if (!(pw->pw_passwd = strdup(pwent->pw_passwd)))
return NULL;
#ifdef ATT_AGE
if (!(pw->pw_age = strdup(pwent->pw_age)))
return NULL;
#endif
#ifdef ATT_COMMENT
if (!(pw->pw_comment = strdup(pwent->pw_comment)))
return NULL;
#endif
if (!(pw->pw_gecos = strdup(pwent->pw_gecos)))
return NULL;
if (!(pw->pw_dir = strdup(pwent->pw_dir)))
@@ -58,12 +50,6 @@ passwd_free(void *ent)
free(pw->pw_name);
free(pw->pw_passwd);
#ifdef ATT_AGE
free(pw->pw_age);
#endif
#ifdef ATT_COMMENT
free(pw->pw_comment);
#endif
free(pw->pw_gecos);
free(pw->pw_dir);
free(pw->pw_shell);

View File

@@ -30,7 +30,7 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: pwpack.c,v 1.4 1998/04/16 19:57:42 marekm Exp $")
RCSID("$Id: pwpack.c,v 1.6 2003/12/17 01:33:28 kloczek Exp $")
#include <sys/types.h>
#include "defines.h"
@@ -53,12 +53,6 @@ pw_pack(const struct passwd *passwd, char *buf)
cp += strlen (cp) + 1;
strcpy (cp, passwd->pw_passwd);
#ifdef ATT_AGE
if (passwd->pw_age[0]) {
*cp++ = ',';
strcat (cp, passwd->pw_age);
}
#endif
cp += strlen (cp) + 1;
memcpy (cp, (const char *) &passwd->pw_uid, sizeof passwd->pw_uid);
@@ -66,17 +60,7 @@ pw_pack(const struct passwd *passwd, char *buf)
memcpy (cp, (const char *) &passwd->pw_gid, sizeof passwd->pw_gid);
cp += sizeof passwd->pw_gid;
#ifdef BSD_QUOTA
memcpy (cp, (const char *) &passwd->pw_quota, sizeof passwd->pw_quota);
cp += sizeof passwd->pw_quota;
#endif
#ifdef ATT_COMMENT
if (passwd->pw_comment) {
strcpy (cp, passwd->pw_comment);
cp += strlen (cp) + 1;
} else
*cp++ = '\0';
#endif
strcpy (cp, passwd->pw_gecos);
cp += strlen (cp) + 1;
@@ -97,9 +81,6 @@ int
pw_unpack(char *buf, int len, struct passwd *passwd)
{
char *org = buf;
#ifdef ATT_AGE
char *cp;
#endif
memzero(passwd, sizeof *passwd);
@@ -113,14 +94,6 @@ pw_unpack(char *buf, int len, struct passwd *passwd)
if (buf - org > len)
return -1;
#ifdef ATT_AGE
if (cp = strchr (passwd->pw_passwd, ',')) {
*cp++ = '\0';
passwd->pw_age = cp;
} else
passwd->pw_age = "";
#endif
memcpy ((void *) &passwd->pw_uid, (void *) buf, sizeof passwd->pw_uid);
buf += sizeof passwd->pw_uid;
if (buf - org > len)
@@ -131,19 +104,6 @@ pw_unpack(char *buf, int len, struct passwd *passwd)
if (buf - org > len)
return -1;
#ifdef BSD_QUOTA
memcpy ((void *) &passwd->pw_quota, (void *) buf,
sizeof passwd->pw_quota);
buf += sizeof passwd->pw_quota;
if (buf - org > len)
return -1;
#endif
#ifdef ATT_COMMENT
passwd->pw_comment = buf;
buf += strlen (buf) + 1;
if (buf - org > len)
return -1;
#endif
passwd->pw_gecos = buf;
buf += strlen (buf) + 1;
if (buf - org > len)

View File

@@ -30,7 +30,7 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: sgetpwent.c,v 1.5 1998/04/02 21:51:46 marekm Exp $")
RCSID("$Id: sgetpwent.c,v 1.6 2003/05/03 16:14:23 kloczek Exp $")
#include <sys/types.h>
#include "defines.h"
@@ -112,23 +112,7 @@ sgetpwent(const char *buf)
((pwent.pw_gid = strtol (fields[3], &ep, 10)) == 0 && *ep)) {
return 0;
}
#ifdef ATT_AGE
cp = pwent.pw_passwd;
while (*cp && *cp != ',')
++cp;
if (*cp) {
*cp++ = '\0';
pwent.pw_age = cp;
} else {
cp = 0;
pwent.pw_age = "";
}
#endif
pwent.pw_gecos = fields[4];
#ifdef ATT_COMMENT
pwent.pw_comment = "";
#endif
pwent.pw_dir = fields[5];
pwent.pw_shell = fields[6];

View File

@@ -33,7 +33,7 @@
#if defined(SHADOWPWD) && !defined(HAVE_GETSPNAM) /*{*/
#include "rcsid.h"
RCSID("$Id: shadow.c,v 1.6 1998/01/29 23:22:32 marekm Exp $")
RCSID("$Id: shadow.c,v 1.7 2003/05/03 16:14:24 kloczek Exp $")
#include <sys/types.h>
#include "prototypes.h"
@@ -199,12 +199,6 @@ my_sgetspent(const char *string)
*cp++ = '\0';
}
/*
* It is acceptable for the last SVR4 field to be blank. This
* results in the loop being terminated early. In which case,
* we just make the last field be blank and be done with it.
*/
if (i == (FIELDS-1))
fields[i++] = cp;
@@ -280,23 +274,12 @@ my_sgetspent(const char *string)
* formatted file), initialize the other field members to -1.
*/
#if 0 /* SVR4 */
if (i == OFIELDS)
return 0;
#else
if (i == OFIELDS) {
spwd.sp_warn = spwd.sp_inact = spwd.sp_expire =
spwd.sp_flag = -1;
return &spwd;
}
#endif
/*
* The rest of the fields are mandatory for SVR4, but optional
* for anything else. However, if one is present the others
* must be as well.
*/
/*
* Get the number of days of password expiry warning.

View File

@@ -1,90 +0,0 @@
#include <config.h>
#ifdef HAVE_TCFS
#include "prototypes.h"
#include "defines.h"
#ifdef TCFS_GDBM_SUPPORT
#undef GDBM_SUPPORT
#define GDBM_SUPPORT
#endif
#include <tcfslib.h>
#include <stdio.h>
#include "commonio.h"
#include "tcfsio.h"
static struct commonio_db tcfs_db = {
TCFSPWDFILE, /* filename */
NULL, /* ops */
NULL,
NULL,
NULL,
NULL,
0,
0,
0,
0,
1
};
int
tcfs_file_present(void)
{
return commonio_present(&tcfs_db);
}
int
tcfs_lock(void)
{
return commonio_lock(&tcfs_db);
}
int
tcfs_open(int mode)
{
return 1;
/* return tcfs_open(); */
}
tcfspwdb *
tcfs_locate(char *name)
{
return tcfs_getpwnam(name, NULL);
}
int
tcfs_update(char *user, struct tcfspwd *tcfspword)
{
char *o, *p;
o=(char*)calloc(128,sizeof(char));
p=(char*)calloc(128,sizeof(char));
strcpy (o, tcfspword->tcfsorig);
strcpy (p, tcfspword->tcfspass);
return tcfs_chgkey(user,o,p);
}
int
tcfs_remove(char *name)
{
return tcfs_putpwnam(name, NULL, U_DEL);
}
int
tcfs_close(void)
{
return 1;
/* return tcfs_close(&shadow_db); */
}
int
tcfs_unlock(void)
{
return commonio_unlock(&tcfs_db);
}
#endif

View File

@@ -1,14 +0,0 @@
struct tcfspwd {
char tcfspass[200]; /* new password */
char tcfsorig[200]; /* old password */
};
extern int tcfs_close(void);
extern int tcfs_file_present(void);
extern tcfspwdb *tcfs_locate(char *);
extern int tcfs_lock(void);
extern int tcfs_name(char *);
extern int tcfs_open(int);
extern int tcfs_remove(char *);
extern int tcfs_unlock(void);
extern int tcfs_update(char *, struct tcfspwd *);