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

This commit is contained in:
nekral-guest 2007-10-07 11:46:07 +00:00
parent 0ee095abd8
commit 8e167d28af
414 changed files with 21641 additions and 27358 deletions

596
ChangeLog
View File

@ -1,3 +1,563 @@
2005-04-25 Tomasz K這czko <kloczek@pld.org.pl>
* po/nl.po: kill fuzzy.
* man/chage.1:
reverte last commit (by mistake commited experimental version generated from XML file).
* NEWS, po/nl.po:
updated for 4.0.8 (by "cobaco (aka Bart Cornelis)" <cobaco@linux.be>).
* po/tl.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po, po/bs.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/es.po, po/eu.po, po/fi.po, po/fr.po, po/he.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/nb.po, po/nl.po, po/nn.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/sk.po, po/sq.po, po/sv.po:
two typos (s,specyfied,specified,; s,maiximum,maximum,).
* NEWS, po/sk.po:
updated for 4.0.8 (by Peter Mann <Peter.Mann@tuke.sk>).
* src/lastlog.c: typo (s,specyfied,specified,)
* src/faillog.c: typo (s,maiximum,maximum,).
2005-04-22 Tomasz K這czko <kloczek@pld.org.pl>
* man/chage.1.xml, man/chfn.1.xml, man/chsh.1.xml, man/expiry.1.xml, man/gpasswd.1.xml, man/groups.1.xml, man/id.1.xml, man/login.1.xml, man/passwd.1.xml, man/su.1.xml:
added <refmiscinfo class="sectdesc">User Commands</refmiscinfo> in <refmeta></refmeta>.
* man/chfn.1.xml, man/chpasswd.8.xml, man/chsh.1.xml, man/expiry.1.xml, man/faillog.5.xml, man/faillog.8.xml, man/gpasswd.1.xml, man/groupadd.8.xml, man/groupdel.8.xml, man/groupmems.8.xml, man/groupmod.8.xml, man/groups.1.xml, man/grpck.8.xml, man/gshadow.5.xml, man/id.1.xml, man/lastlog.8.xml, man/limits.5.xml, man/login.1.xml, man/login.access.5.xml, man/login.defs.5.xml, man/logoutd.8.xml, man/mkpasswd.8.xml, man/newusers.8.xml, man/passwd.1.xml, man/passwd.5.xml, man/porttime.5.xml, man/pw_auth.3.xml, man/pwck.8.xml, man/pwconv.8.xml, man/shadow.3.xml, man/shadow.5.xml, man/shadowconfig.8.xml, man/su.1.xml, man/suauth.5.xml, man/sulogin.8.xml, man/useradd.8.xml, man/userdel.8.xml, man/vigr.8.xml:
Use encoding="UTF-8" and DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN".
* man/userdel.8.xml, man/usermod.8.xml, man/vigr.8.xml, man/vipw.8.xml, man/chage.1.xml, man/chfn.1.xml, man/chpasswd.8.xml, man/chsh.1.xml, man/expiry.1.xml, man/faillog.5.xml, man/faillog.8.xml, man/gpasswd.1.xml, man/groupadd.8.xml, man/groupdel.8.xml, man/groupmems.8.xml, man/groupmod.8.xml, man/groups.1.xml, man/grpck.8.xml, man/gshadow.5.xml, man/id.1.xml, man/lastlog.8.xml, man/limits.5.xml, man/login.1.xml, man/login.access.5.xml, man/login.defs.5.xml, man/logoutd.8.xml, man/mkpasswd.8.xml, man/newusers.8.xml, man/passwd.1.xml, man/passwd.5.xml, man/porttime.5.xml, man/pw_auth.3.xml, man/pwck.8.xml, man/pwconv.8.xml, man/shadow.3.xml, man/shadow.5.xml, man/shadowconfig.8.xml, man/su.1.xml, man/suauth.5.xml, man/sulogin.8.xml, man/useradd.8.xml:
better formation using "xmlindent -l 80 -d 2".
2005-04-21 Tomasz K這czko <kloczek@pld.org.pl>
* man/it/chsh.1, man/it/expiry.1, man/it/faillog.5, man/it/faillog.8, man/it/getspnam.3, man/it/groups.1, man/it/grpck.8, man/it/grpconv.8, man/it/grpunconv.8, man/it/id.1, man/it/lastlog.8, man/it/login.1, man/it/logoutd.8, man/it/newgrp.1, man/it/porttime.5, man/it/pwck.8, man/it/shadow.3, man/it/shadow.5, man/it/shadowconfig.8, man/it/su.1, man/it/vipw.8, NEWS, man/it/Makefile.am, man/it/chage.1, man/it/chfn.1, man/it/chpasswd.8:
updated it man pages: chfn.1, chsh.1, groups.1, grpck.8, grpconv.8, grpunconv.8,
id.1, lastlog.8, login.1, newgrp.1, pwunconv.8, shadow.5, vigr.8, vipw.8.
new it man pages: chage.1, chpasswd.8, expiry.1, faillog.5, faillog.8,
getspnam.3, logoutd.8, porttime.5, pwck.8, shadow.3, shadowconfig.8, su.1.
(by Danilo Piazzalunga <danilopiazza@libero.it>)
* po/uk.po:
cleanups in plural forms (by Roman Festchook <roma@polesye.net>).
* man/chage.1, man/chfn.1.xml, man/chpasswd.8.xml, man/chsh.1.xml, man/expiry.1.xml, man/faillog.5.xml, man/faillog.8.xml, man/gpasswd.1.xml, man/groupadd.8.xml, man/groupdel.8.xml, man/groupmems.8.xml, man/groupmod.8.xml, man/groups.1.xml, man/grpck.8.xml, man/gshadow.5.xml, man/id.1.xml, man/lastlog.8.xml, man/limits.5.xml, man/login.1.xml, man/login.access.5.xml, man/login.defs.5.xml, man/logoutd.8.xml, man/mkpasswd.8.xml, man/newusers.8.xml, man/passwd.1.xml, man/passwd.5.xml, man/porttime.5.xml, man/pw_auth.3.xml, man/pwck.8.xml, man/pwconv.8.xml, man/shadow.3.xml, man/shadow.5.xml, man/shadowconfig.8.xml, man/su.1.xml, man/suauth.5.xml, man/sulogin.8.xml, man/useradd.8.xml, man/userdel.8.xml, man/usermod.8.xml, man/vipw.8.xml:
reformated using xemacs.
2005-04-20 Tomasz K這czko <kloczek@pld.org.pl>
* po/fr.po, NEWS:
updated for 4.0.8 (by Christian Perrier <bubulle@kheops.frmug.org>).
* NEWS, po/eu.po: updated for 4.0.8 (by ^pi^ <piarres@gmail.com>).
* NEWS, po/uk.po:
updated for 4.0.8 (by Roman Festchook <roma@polesye.net>).
* po/cs.po:
updated for 4.0.8 (by Miroslav Kure <kurem@upcase.inf.upol.cz>).
* po/da.po, NEWS:
updated for 4.0.8 (by Claus Hindsgaul <claus_h@image.dk>).
* po/ko.po, NEWS:
updated for 4.0.8 (by Changwoo Ryu <cwryu@debian.org>).
* po/fi.po: kill one fuzzy (by Tommi Vainikainen <thv+debian@iki.fi>).
2005-04-19 Tomasz K這czko <kloczek@pld.org.pl>
* man/chpasswd.8.xml: Rewrited by hand & xemacs.
* man/chfn.1.xml: cleanups in <refentry> tag.
* man/chfn.1.xml: Rewrited by hand & xemacs.
* NEWS, po/pt.po:
updated for 4.0.8 (by Miguel Figueiredo <elmig@debianpt.org>).
* po/es.po, NEWS: updated (by Ruben Porras <nahoo@inicia.es>).
2005-04-18 Tomasz K這czko <kloczek@pld.org.pl>
* man/useradd.8:
fixed typos in useadd syntax (in SYNOPSIS section) catched using doclifter.
* man/chfn.1.xml, man/chpasswd.8.xml, man/chsh.1.xml, man/expiry.1.xml, man/faillog.5.xml, man/faillog.8.xml, man/getspnam.3.xml, man/gpasswd.1.xml, man/groupadd.8.xml, man/groupdel.8.xml, man/groupmems.8.xml, man/groupmod.8.xml, man/groups.1.xml, man/grpck.8.xml, man/grpconv.8.xml, man/grpunconv.8.xml, man/gshadow.5.xml, man/id.1.xml, man/lastlog.8.xml, man/limits.5.xml, man/login.1.xml, man/login.access.5.xml, man/login.defs.5.xml, man/logoutd.8.xml, man/mkpasswd.8.xml, man/newusers.8.xml, man/passwd.1.xml, man/passwd.5.xml, man/porttime.5.xml, man/pw_auth.3.xml, man/pwck.8.xml, man/pwconv.8.xml, man/pwunconv.8.xml, man/sg.1.xml, man/shadow.3.xml, man/shadow.5.xml, man/shadowconfig.8.xml, man/su.1.xml, man/suauth.5.xml, man/sulogin.8.xml, man/useradd.8.xml, man/userdel.8.xml, man/usermod.8.xml, man/vigr.8.xml, man/vipw.8.xml:
raw version converted using doclifter.
* configure.in: remove handle --with-lib{opie,skey}.
* man/de/chsh.1:
synced with english version (by Simon Brandmair <sbrandmair@gmx.net>).
* man/usermod.8: improved -o description.
* man/de/passwd.1:
added translation EXIT VALUES section (by Simon Brandmair <sbrandmair@gmx.net>).
* NEWS, po/it.po:
updated it translation (by Danilo Piazzalunga <danilopiazza@libero.it>).
2005-04-17 Tomasz K這czko <kloczek@pld.org.pl>
* po/bs.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/es.po, po/eu.po, po/fi.po, po/fr.po, po/he.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/nb.po, po/nl.po, po/nn.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/sk.po, po/sq.po, po/sv.po, po/tl.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po:
cleanups.
* po/pl.po: updated.
* src/usermod.c:
use the same error message ("%s: PAM authentication failed\n") on fail
authentication as in other tools.
* po/zh_CN.po, po/zh_TW.po, po/bs.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/es.po, po/eu.po, po/fi.po, po/fr.po, po/he.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/nb.po, po/nl.po, po/nn.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/sk.po, po/sq.po, po/sv.po, po/tl.po, po/tr.po, po/uk.po:
run "make update-po".
* src/login.c, src/login_nopam.c:
fixed build with disabled PAM support: move bad_time_notify() and check_nologin()
back to src/login.c but use this functions #ifndef USE_PAM.
* NEWS, lib/Makefile.am, lib/pwauth.c:
remove not working OPIE and SKEY support.
* configure.in: typo (s,SELinuux,SELinux,).
* NEWS: typos.
* NEWS: chage, useradd, usermod: reduce multiple OPENLOG() calls.
* src/useradd.c, src/usermod.c: fix multiple OPENLOG() calls.
* src/chage.c: cleanups.
* src/chage.c: fix multiple OPENLOG() calls.
* src/chage.c:
use E_SUCCESS/E_NOPERM #defines instead 0/1 in exit() arguments.
2005-04-15 Tomasz K這czko <kloczek@pld.org.pl>
* src/passwd.c:
adjust also syslog message on usage -S option without permission.
Consolidate SELinix and non-SELinux code.
* po/bs.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/es.po, po/eu.po, po/fi.po, po/fr.po, po/he.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/nb.po, po/nl.po, po/nn.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/sk.po, po/sq.po, po/sv.po, po/tl.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po, NEWS, src/passwd.c:
fix #61313 Debian bug: "passwd -S root" (as a normal user) should not
display "You may not change the password for root.
* NEWS, man/passwd.1:
fix #160477 Debian bug: improve -S output description.
* man/de/passwd.1:
new translation by Simon Brandmair <sbrandmair@gmx.net> with merged all
changes between revision 1.2 a 1.5.
2005-04-14 Tomasz K這czko <kloczek@pld.org.pl>
* man/passwd.1, man/pl/passwd.1: bold passwd and chage commands.
* NEWS, src/vipw.c:
fixed race condition in vipw (Debian #242407 bug; fix by Alexander Gattin
<arg@online.com.ua>).
* man/pl/chage.1, man/pl/chage.1.xml: synced with english version.
* man/chage.1, man/chage.1.xml:
add info about what mean -1 passed n expiredate parameter (based on #304542
Debian bug; submited by Federico Grau <grauf@rfa.org>).
2005-04-13 Tomasz K這czko <kloczek@pld.org.pl>
* po/fi.po, NEWS:
updated translation (by Tommi Vainikainen <tvainikan@cc.hut.fi>).
* man/hu/passwd.1, man/it/passwd.1, man/ja/passwd.1, man/pl/passwd.1, man/de/passwd.1, man/es/passwd.1, man/passwd.1:
cleanups and unifications in SEE ALSO section.
2005-04-12 Tomasz K這czko <kloczek@pld.org.pl>
* configure.in:
Info documentation says about AC_GNU_SOURCE: "should be called before any
macros that run the C compiler". So move this macro on top configure.in for
avoid autoconf warnings.
* configure.in:
AC_SYS_LARGEFILE() performs checking is fseeko() is avalaible so "fseeko" can
be removed from AC_CHECK_FUNCS() parameters.
* NEWS, configure.in: Remove using AC_PROG_GCC_TRADITIONAL macro.
Add using AC_GNU_SOURCE macro for kill compilation warnings about implicit
declaration of function `fseeko'.
* po/cs.po: killed fuzzy (by Miroslav Kure <kurem@debian.cz>).
* man/ja/newgrp.1, man/pl/newgrp.1, NEWS, man/hu/newgrp.1, man/newgrp.1:
newgrp uses /bin/sh (not bash).
* man/gpasswd.1, man/groupdel.8, man/groupmems.8, man/groupmod.8, man/groups.1, man/id.1, man/mkpasswd.8, man/newgrp.1, man/pwck.8, man/useradd.8, man/userdel.8, man/usermod.8:
describe /etc/group in FILES section as "group account information".
* man/grpck.8:
describe /etc/passwd in FILES section as "user account information".
* po/stats: small script for generate translations statistics.
* NEWS, po/cs.po: Updated by Miroslav Kure <kurem@debian.cz>.
* man/chage.1.xml, man/chage.1, man/expiry.1, man/login.1, man/mkpasswd.8, man/newgrp.1, man/passwd.1, man/pwck.8, man/shadow.3, man/shadow.5, man/su.1, man/sulogin.8:
describe /etc/shadow in FILES section as "secure user account information".
* man/newgrp.1: Reformated paragraph. s,Bourne shell,\fBbash\fR shell,
* NEWS, man/newgrp.1:
fix #251926, #166173, #113191 Debian bugs: explain why editing /etc/group
(without gshadow) doesn't permit to use newgrp.
* po/sk.po, po/sq.po, po/sv.po, po/tl.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po, po/bs.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/es.po, po/eu.po, po/fi.po, po/fr.po, po/he.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/nb.po, po/nl.po, po/nn.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po:
added/fixed Plural-Forms: header entries. Run "make update-po".
* po/pl.po:
added Plural-Forms: header entry and updated for last change in
libmisc/failure.c.
* libmisc/failure.c:
break message text with failure login since last login.
* libmisc/failure.c:
Use ngettext instead of string concatenation and static number of cases.
Patch by Tommi Vainikainen <tvainika@cc.hut.fi>.
2005-04-11 Tomasz K這czko <kloczek@pld.org.pl>
* po/cs.po:
new translation maintainer: Miroslav Kure <kurem@debian.cz>.
2005-04-10 Tomasz K這czko <kloczek@pld.org.pl>
* po/pl.po: updated for 4.0.8.
2005-04-09 Tomasz K這czko <kloczek@pld.org.pl>
* po/el.po, po/es.po, po/eu.po, po/fi.po, po/fr.po, po/he.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/nb.po, po/nl.po, po/nn.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/sk.po, po/sq.po, po/sv.po, po/tl.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po, NEWS, po/bs.po, po/ca.po, po/cs.po, po/da.po, po/de.po, src/faillog.c:
changed faillog records display format for allow fit in 80 columns all
faillog atributies.
* po/de.po, po/el.po, po/es.po, po/eu.po, po/fi.po, po/fr.po, po/he.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/nb.po, po/nl.po, po/nn.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/sk.po, po/sq.po, po/sv.po, po/tl.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po, po/bs.po, po/ca.po, po/cs.po, po/da.po:
run "make update-po". Updated pl.po.
* src/faillog.c (usage): typo (s,IDAYS,DAYS,).
* man/faillog.8, NEWS:
updated after rewrite faillog command for use getopt_long().
* src/faillog.c:
Add handle -h,--help option. Show in usage output information about
-t,--time option. Remove handle -p option.
* po/he.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/nb.po, po/nl.po, po/nn.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/sk.po, po/sq.po, po/sv.po, po/tl.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po, po/bs.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/es.po, po/eu.po, po/fi.po, po/fr.po:
run "make update-po".
* po/POTFILES.in: updated.
* man/gpasswd.1: typo (s,fB,\fB,).
2005-04-06 Tomasz K這czko <kloczek@pld.org.pl>
* NEWS, man/ja/login.1:
updated ja man page for Debian #95213 bug (by Kenshi Muto <kmuto@debian.org>).
* src/chage.c, src/chfn.c, src/chsh.c, src/gpasswd.c, src/groupadd.c, src/groupdel.c, src/groupmod.c, src/grpck.c, src/passwd.c, src/pwck.c, src/useradd.c, src/userdel.c, src/usermod.c, NEWS, lib/grdbm.c, lib/gsdbm.c, lib/pwdbm.c, lib/spdbm.c, lib/Makefile.am, lib/gshadow.c, lib/shadow.c:
next round of cleanups: removed NDBM code (unused).
* src/login.c: consilidate some !USE_PAM lines.
* src/login.c, src/login_nopam.c:
move bad_time_notify() and check_nologin() to src/login_nopam.c.
* lib/prototypes.h: remove not used login_desrpc() prototype.
* lib/rad64.c, lib/encrypt.c, lib/prototypes.h, lib/Makefile.am:
remove lib/rad64 with not used c64i() and i64c() functions.
* lib/encrypt.c:
remove "#ifdef SW_CRYPT .. #endif" and "#ifdef DOUBLESIZE .. #endif" unused code.
* lib/encrypt.c: remove "#ifdef MD5_CRYPT .. #endif" unused code.
* libmisc/salt.c:
remove prototypes for *l64a() and add #include <stdlib.h>. Remove unused
now code (old style random salt generator).
* src/chage.c: cleanups.
* src/chpasswd.c:
remove prototypes for *l64a() and add #include <stdlib.h>.
* src/login.c: remove login_fbtab() prototype.
* src/chage.c:
remove prototypes for a64l() and *l64a() and add #include <stdlib.h>.
2005-04-05 Tomasz K這czko <kloczek@pld.org.pl>
* man/ru/passwd.5, man/zh_CN/chfn.1, man/zh_CN/chpasswd.8, man/zh_CN/chsh.1, man/zh_CN/groupadd.8, man/zh_CN/groupdel.8, man/zh_CN/groupmod.8, man/zh_CN/useradd.8, man/zh_CN/userdel.8, man/zh_CN/usermod.8, man/zh_TW/chfn.1, man/zh_TW/chsh.1, man/zh_TW/groupadd.8, man/zh_TW/groupdel.8, man/zh_TW/groupmod.8, man/zh_TW/useradd.8, man/zh_TW/userdel.8, man/zh_TW/usermod.8, man/ko/chfn.1, man/ko/chsh.1, man/ko/groups.1, man/ko/id.1, man/ko/login.1, man/ko/passwd.5, man/ko/su.1, man/pt_BR/gpasswd.1, man/pt_BR/groupadd.8, man/pt_BR/groupdel.8, man/pt_BR/groupmod.8, man/pt_BR/shadow.5, man/ja/chage.1, man/ja/chfn.1, man/ja/chpasswd.8, man/ja/chsh.1, man/ja/expiry.1, man/ja/faillog.8, man/ja/gpasswd.1, man/ja/groupadd.8, man/ja/groupmod.8, man/ja/groups.1, man/ja/grpck.8, man/ja/id.1, man/ja/lastlog.8, man/ja/limits.5, man/ja/login.1, man/ja/login.access.5, man/ja/login.defs.5, man/ja/mkpasswd.8, man/ja/newgrp.1, man/ja/passwd.1, man/ja/porttime.5, man/ja/pw_auth.3, man/ja/pwck.8, man/ja/shadow.3, man/ja/su.1, man/ja/suauth.5, man/ja/sulogin.8, man/ja/useradd.8, man/ja/userdel.8, man/ja/usermod.8, man/ja/vipw.8, man/hu/chfn.1, man/hu/chsh.1, man/hu/gpasswd.1, man/hu/groups.1, man/hu/id.1, man/hu/login.1, man/hu/newgrp.1, man/hu/passwd.1, man/hu/su.1, man/id/chsh.1, man/id/login.1, man/id/useradd.8, man/it/chfn.1, man/it/chsh.1, man/it/gpasswd.1, man/it/groupadd.8, man/it/groupdel.8, man/it/groupmod.8, man/it/groups.1, man/it/grpck.8, man/it/id.1, man/it/lastlog.8, man/it/login.1, man/it/passwd.5, man/it/shadow.5, man/it/useradd.8, man/it/userdel.8, man/it/usermod.8, man/it/vipw.8, man/de/chfn.1, man/de/chsh.1, man/de/login.1, man/de/passwd.1, man/de/passwd.5, man/de/su.1, man/de/vipw.8, man/es/login.1, man/es/passwd.1, man/es/su.1, man/fr/chage.1, man/fr/chpasswd.8, man/fr/chsh.1, man/fr/faillog.5, man/fr/gpasswd.1, man/fr/groups.1, man/fr/id.1, man/fr/passwd.1, man/fr/passwd.5, man/fr/shadow.5, man/fr/su.1, man/fr/useradd.8, man/fr/userdel.8, man/fr/usermod.8, man/cs/groups.1, man/cs/id.1, man/cs/lastlog.8, man/cs/passwd.5, man/cs/shadow.5, man/cs/su.1, man/pl/chage.1, man/pl/chfn.1, man/pl/chpasswd.8, man/pl/chsh.1, man/pl/expiry.1, man/pl/faillog.5, man/pl/faillog.8, man/pl/gpasswd.1, man/pl/groupadd.8, man/pl/groupdel.8, man/pl/groupmems.8, man/pl/groupmod.8, man/pl/groups.1, man/pl/grpck.8, man/pl/id.1, man/pl/lastlog.8, man/pl/limits.5, man/pl/login.1, man/pl/login.access.5, man/pl/login.defs.5, man/pl/logoutd.8, man/pl/mkpasswd.8, man/pl/newgrp.1, man/pl/newusers.8, man/pl/passwd.1, man/pl/passwd.5, man/pl/porttime.5, man/pl/pw_auth.3, man/pl/pwck.8, man/pl/pwconv.8, man/pl/shadow.3, man/pl/shadow.5, man/pl/shadowconfig.8, man/pl/su.1, man/pl/suauth.5, man/pl/sulogin.8, man/pl/useradd.8, man/pl/userdel.8, man/pl/vipw.8, man/chage.1, man/chfn.1, man/expiry.1, man/faillog.8, man/gpasswd.1, man/groupadd.8, man/groupmems.8, man/groupmod.8, man/grpck.8, man/lastlog.8, man/limits.5, man/login.1, man/login.defs.5, man/newgrp.1, man/passwd.1, man/porttime.5, man/pwck.8, man/shadow.3, man/su.1, man/suauth.5, man/sulogin.8, man/useradd.8, man/usermod.8, man/vipw.8:
more replaces "-" by "\-" (s,\\-,-,g; s,-,\\-,g).
* man/pl/usermod.8: finish sync with english version.
* man/hu/login.1, man/pl/login.1, NEWS, man/de/login.1, man/login.1:
removed fragment about abilities pass enviroment variables in login prompt.
* man/gpasswd.1, man/newgrp.1:
fixes by Nicolas Nicolas Fran癟ois <nicolas.francois@centraliens.net> (not all
commited).
2005-04-02 Tomasz K這czko <kloczek@pld.org.pl>
* man/login.1, man/login.access.5, man/login.defs.5, man/logoutd.8, man/mkpasswd.8, man/newgrp.1, man/newusers.8, man/passwd.1, man/passwd.5, man/porttime.5, man/pw_auth.3, man/pwck.8, man/shadow.3, man/shadow.5, man/su.1, man/suauth.5, man/sulogin.8, man/useradd.8, man/userdel.8, man/usermod.8, man/vipw.8, man/chage.1, man/chfn.1, man/chpasswd.8, man/chsh.1, man/expiry.1, man/faillog.5, man/faillog.8, man/gpasswd.1, man/groupadd.8, man/groupmems.8, man/groupmod.8, man/groups.1, man/grpck.8, man/gshadow.5, man/id.1, man/lastlog.8, man/limits.5:
replace all "-" by "\-" (s,\\-,-,; s,-,\\-,).
* man/cs/groups.1: cleanups.
* NEWS, src/su.c:
fixed use of SU_WHEEL_ONLY in su. Now su realy is avalaible for wheel group
members. Thanks to Mike Frysinger <vapier@gentoo.org> for report:
http://bugs.gentoo.org/show_bug.cgi?id=80345
* man/pl/chage.1.xml:
converted from roff using doclifter. Rewrited by hand. Probably will be
removed after prepare infrastructure for translate man pages using gettext
but temporary I need this for some experiments.
* src/login.c: remove unused #ifded LOGIN_FBTAB .. #endif code.
* configure.in, libmisc/login_access.c, libmisc/Makefile.am, src/Makefile.am, src/login.c, src/login_nopam.c:
move libmisc/login_access.c to src/login_mopam.c.
Remove using LOGIN_ACCESS #define. Now LOGIN_ACCESS is equal to !USE_PAM.
In src/login_nopam.c will be cumulated non-PAM specyfic login code.
* src/lastlog.c, src/login.c, src/useradd.c, src/usermod.c, libmisc/log.c:
cleanups: remove using #include "lastlog_.h".
* src/login.c: fixed build with PAM support disabled.
* src/login.c: remove "#ifdef HUP_MESG_FILE .. #endif" code.
* src/login.c: reindent using -l80.
* man/chage.1, man/chage.1.xml: s/chage/chage command/ in DESCRIPTION.
* man/chage.1.xml:
converted from roff using doclifter. Rewrited by hand.
* man/chage.1, man/chfn.1, man/faillog.8, man/groupmod.8, man/pwconv.8, man/useradd.8, man/usermod.8:
cleanups.
* man/pwconv.8: fixed typo: s,fI,\fI,
* po/POTFILES.in: remove libmisc/login_{desrpc,krb}.c.
* lib/getdef.c, libmisc/login_desrpc.c, libmisc/login_krb.c, libmisc/Makefile.am, src/login.c, NEWS, autogen.sh, configure.in:
drop never finished kerberos and des_rpc support.
* man/it/chfn.1: cleanups.
2005-04-01 Tomasz K這czko <kloczek@pld.org.pl>
* NEWS, configure.in:
fixed UTMP path detection (by Kelledin <kelledin@users.sf.net>).
* man/fr/chsh.1: typo.
* man/de/Makefile.am, man/de/passwd.5:
imported from Deutscher manpages.
* man/cs/Makefile.am, man/cs/groups.1, man/cs/lastlog.8, man/cs/su.1:
new files imported from Czech man-pages.
* man/pl/faillog.8, man/pl/groupmems.8, man/pl/id.1, man/pt_BR/groupadd.8, man/pt_BR/groupmod.8, man/zh_CN/groupadd.8, man/zh_CN/groupmod.8, man/zh_CN/useradd.8, man/zh_CN/usermod.8, man/zh_TW/groupadd.8, man/zh_TW/groupmod.8, man/zh_TW/useradd.8, man/zh_TW/usermod.8, man/fr/chage.1, man/fr/chpasswd.8, man/fr/passwd.1, man/hu/chsh.1, man/it/groupadd.8, man/it/groupmod.8, man/it/usermod.8, man/ja/chage.1, man/ja/chfn.1, man/ja/chsh.1, man/ja/gpasswd.1, man/ja/groupadd.8, man/ja/groupmod.8, man/ja/login.1, man/ja/passwd.1, man/ja/useradd.8, man/ja/usermod.8, man/chage.1, man/chfn.1, man/chsh.1, man/de/chfn.1, man/de/chsh.1, man/de/login.1, man/de/passwd.1, man/gpasswd.1, man/groupadd.8, man/id.1, man/login.1, man/passwd.1, man/useradd.8:
cleanups: aded missing \fR.
* man/Makefile.am, man/gpasswd.1, man/gshadow.5, NEWS:
added new file (by Nicolas Nicolas Fran癟ois <nicolas.francois@centraliens.net>).
2005-03-31 Tomasz K這czko <kloczek@pld.org.pl>
* man/pl/chage.1, man/pl/chfn.1, man/pl/chsh.1, man/pl/gpasswd.1:
added missing \fR.
* man/pl/groupmod.8: typo: s,\fI,\fR,
* man/pl/login.1, man/pl/passwd.1: cleanups: aded missing \fR.
* man/pl/sulogin.8: cleanups.
* man/pl/useradd.8: cleanups: aded missing \fR.
* man/pl/usermod.8: partialy synced with english version.
* man/usermod.8: typo.
* NEWS, man/usermod.8:
fixed #302388 Debian bug: added separated -o option description.
* lib/getdef.c:
FAILLOG_ENAB, LOGIN_STRING moved to code "#ifndef USE_PAM" dependent.
* lib/pwauth.c, lib/pwauth.h: enable pw_auth() only #ifndef USE_PAM.
* src/userdel.c, src/usermod.c, src/vipw.c, src/chage.c, src/chfn.c, src/chpasswd.c, src/chsh.c, src/expiry.c, src/faillog.c, src/gpasswd.c, src/groupadd.c, src/groupdel.c, src/groupmems.c, src/groupmod.c, src/groups.c, src/grpck.c, src/grpconv.c, src/grpunconv.c, src/logoutd.c, src/mkpasswd.c, src/newgrp.c, src/newusers.c, src/passwd.c, src/pwck.c, src/pwconv.c, src/pwunconv.c, src/su.c, src/suauth.c, src/sulogin.c, src/useradd.c, po/id.po, po/it.po, po/ja.po, po/ko.po, po/nb.po, po/nl.po, po/nn.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/sk.po, po/sq.po, po/sv.po, po/tl.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po, po/bs.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/es.po, po/eu.po, po/fi.po, po/fr.po, po/he.po, libmisc/login_access.c, libmisc/login_krb.c, libmisc/addgrps.c, libmisc/age.c, libmisc/chkname.h, libmisc/chowndir.c, libmisc/chowntty.c, libmisc/copydir.c, libmisc/env.c, libmisc/failure.c, libmisc/failure.h, libmisc/getdate.h, libmisc/hushed.c, libmisc/isexpired.c, libmisc/limits.c, libmisc/loginprompt.c, libmisc/motd.c, libmisc/pam_pass.c, libmisc/pwdcheck.c, libmisc/rlogin.c, libmisc/setugid.c, libmisc/setupenv.c, libmisc/shell.c, libmisc/strtoday.c, libmisc/sulog.c, libmisc/ttytype.c, libmisc/utmp.c, libmisc/xmalloc.c, NEWS, lib/grdbm.c, lib/gsdbm.c, lib/pwdbm.c, lib/rad64.c, lib/spdbm.c, lib/commonio.c, lib/commonio.h, lib/defines.h, lib/encrypt.c, lib/faillog.h, lib/fputsx.c, lib/getdef.c, lib/getdef.h, lib/getpass.c, lib/groupio.c, lib/groupio.h, lib/grpack.c, lib/gshadow.c, lib/gshadow_.h, lib/gspack.c, lib/lockpw.c, lib/port.c, lib/port.h, lib/prototypes.h, lib/pwauth.c, lib/pwauth.h, lib/pwio.c, lib/pwio.h, lib/pwpack.c, lib/rcsid.h, lib/sgetgrent.c, lib/sgetpwent.c, lib/sgetspent.c, lib/sgroupio.c, lib/sgroupio.h, lib/shadow.c, lib/shadowio.c, lib/shadowio.h, lib/sppack.c, lib/utent.c:
reindent all source code using -l80.
* lib/gshadow.c, NEWS:
rewrited group count to dynamic (by John Newbigin <jnewbigin@ict.swin.edu.au >).
* po/fi.po, po/fr.po, po/he.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/nb.po, po/nl.po, po/nn.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/sk.po, po/sq.po, po/sv.po, po/tl.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po, po/bs.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/es.po, po/eu.po:
run "make update-po".
* src/login.c: use allways "\n%s login: " login prompt.
* src/login.c: removed radius support (even not compiles).
* doc/README.mirrors, doc/Makefile.am: removed.
* src/userdel.c (update_user): removed next redundant closing }.
* src/userdel.c: remove using unused NO_REMOVE_MAILBOX #define.
* src/userdel.c (update_user): removed redundant closing }.
2005-03-30 Tomasz K這czko <kloczek@pld.org.pl>
* lib/getdef.c:
move PASS_MAX_DAYS, PASS_MIN_DAYS and PASS_WARN_AGE to part PAM not dependent
(used in useradd, pwconv).
* configure.in, src/Makefile.am:
move define LOCALEDIR using AC_DEFINE_UNQUOTED() to src/Makefile.am::AM_CPPFLAGS.
* man/pwconv.8: typo in bold.
* doc/INSTALL: removed.
* doc/README.sun4, doc/Makefile.am: removed outdated README.sun4.
2005-03-24 Tomasz K這czko <kloczek@pld.org.pl>
* po/pl.po: put mine data in Last-Translator: field.
* src/newusers.c:
use the same as in useradd default UMASK (022 instead 077) if diffrent not
defined in login.defs.
* NEWS, libmisc/copydir.c:
added SELinux changes (based on Fedora patch).
* NEWS: typo.
* man/login.defs.5: typo in bold.
* src/chfn.c, src/chsh.c, lib/getdef.c:
move CHFN_AUTH, CHSH_AUTH variables from login.defs to part !USE_PAM dependent.
Use "auth required pam_unix.so" in /etc/pam.d/{chfn,chsh} for force enter password
on use chfn/chsh.
* lib/getdef.c: added CHSH_AUTH variable in def_table[] table.
* src/chsh.c: s/CHFN_AUTH/CHSH_AUTH/
* man/shadow.5, man/passwd.5:
add more accurate information about what contains field with encrypted password in
each passwd/shadow line (reported by Mike Brodbelt).
* autogen.sh: reorder.
* lib/getdef.c:
CRACKLIB_DICTPATH, ENV_HZ, ENV_PATH, ENV_ROOTPATH, ENV_SUPATH, ENV_TZ,
ENVIRON_FILE, FTMP_FILE, ISSUE_FILE, LASTLOG_ENAB, MAIL_CHECK_ENAB, MAIL_DIR,
MAIL_FILE, MD5_CRYPT_ENAB, MOTD_FILE, NOLOGINS_FILE, OBSCURE_CHECKS_ENAB,
PASS_ALWAYS_WARN, PASS_CHANGE_TRIES, PASS_MAX_DAYS, PASS_MAX_LEN, PASS_MIN_DAYS,
PASS_MIN_LEN, PASS_WARN_AGE, PORTTIME_CHECKS_ENAB, SU_WHEEL_ONLY, QMAIL_DIR,
QUOTAS_ENAB, ULIMIT variables moved to code "#ifndef USE_PAM" dependent.
* configure.in:
fix importand typo: added missing ",". Now LOGIN_ACCESS realy is defined only
when PAM is not enabled.
* libmisc/obscure.c, libmisc/limits.c:
all functions from this file are "#ifndef USE_PAM" dependent.
* libmisc/setugid.c (change_uid):
removed dead code depndent on "#ifdef BSD".
* libmisc/ttytype.c (ttytype):
removed dead code depend on "defined(SUN) || defined(BSD) || defined(SUN4)".
* src/login.c (setup_tty): remove dead code.
* libmisc/rlogin.c:
fix compilation warning: replace #include <unistd.h> by #include <netdb.h>
where ruserok() is declared.
2005-03-23 Tomasz K這czko <kloczek@pld.org.pl>
* po/pl.po: kill one fuzzy entry.
2005-03-09 Tomasz K這czko <kloczek@pld.org.pl>
* NEWS, libmisc/log.c:
fixed create lastlog entry fo users never loged in on non-PAM
variant of login (fix by <oracular@ziplip.com>).
2005-03-07 Tomasz K這czko <kloczek@pld.org.pl>
* NEWS, etc/login.defs, etc/login.defs.linux, lib/getdef.c, man/pl/login.defs.5:
remove handle login.defs::NOLOGIN_STR (never used).
2005-02-25 Tomasz K這czko <kloczek@pld.org.pl>
* man/shadow.5:
added missing '\&' in line starting with '\.', which causes groff to skip
it entirely (fix submited by Danilo Piazzalunga <danilopiazza@libero.it>).
* TODO: cleanups.
2005-02-23 Tomasz K這czko <kloczek@pld.org.pl>
* src/useradd.c, NEWS:
useradd: fixes a potential security problem when mailbox is created in
useradd.
Patch and comment by Koblinger Egmont <egmont@uhulinux.hu>:
Only two arguments are passed to the open() call though it expects three
because O_CREAT is present. Hence the permission of the file first becomes
some random garbage found on the stack, and an attacker can perhaps open
this file and hold it open for reading or writing before the proper
fchmod() is executed. (Actually, we could also pass the final "mode" to
the open() call and then save the consequent fchmod().)
2005-02-17 Tomasz K這czko <kloczek@pld.org.pl>
* NEWS, po/LINGUAS, po/tl.po:
added tl translation (fron Debian resources).
2005-02-14 Tomasz K這czko <kloczek@pld.org.pl>
* NEWS, src/chage.c, src/chfn.c, src/chsh.c, src/passwd.c:
SELinux changes: added changes in chage, chfn, chsh, passwd for allow
construct more grained user password/accuunt properties on SELinux
policies level. Patch originally based on RH changes (submited by Chris
PeBenito <pebenito@gentoo.org>)
2005-02-09 Tomasz K這czko <kloczek@pld.org.pl>
* po/fr.po, NEWS:
updated translation (by Jean-Luc Coulon <jean-luc.coulon@wanadoo.fr>) from
Debian resources.
2005-01-26 Tomasz K這czko <kloczek@pld.org.pl>
* NEWS, configure.in: open work on 4.0.8.
2005-01-24 Tomasz K這czko <kloczek@pld.org.pl>
* po/ru.po, po/sk.po, po/sq.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po, po/bs.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/es.po, po/eu.po, po/fi.po, po/fr.po, po/he.po, po/id.po, po/ja.po, po/ko.po, po/nb.po, po/nl.po, po/nn.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po:
@ -820,7 +1380,7 @@
* libmisc/shell.c (shell): do not gettexitize DEBUG message.
* src/chsh.c, src/grpconv.c, src/login.c, src/logoutd.c, src/sulogin.c, src/vipw.c, libmisc/getdate.y, libmisc/limits.c, libmisc/login_access.c, libmisc/obscure.c, libmisc/setupenv.c, lib/getpass.c, lib/pwauth.c:
* src/chsh.c, src/grpconv.c, src/login.c, src/logoutd.c, src/sulogin.c, src/vipw.c, libmisc/login_access.c, libmisc/getdate.y, libmisc/limits.c, libmisc/obscure.c, libmisc/setupenv.c, lib/getpass.c, lib/pwauth.c:
Removed "#if 0 .. #endif" dead code.
* libmisc/utmp.c: Fixed unterminated #if.
@ -990,7 +1550,7 @@
2003-04-22 Tomasz K這czko <kloczek@pld.org.pl>
* libmisc/getdate.c, libmisc/nscd.c, libmisc/entry.c, libmisc/env.c, libmisc/failure.c, libmisc/fields.c, libmisc/hushed.c, libmisc/isexpired.c, libmisc/limits.c, libmisc/list.c, libmisc/log.c, libmisc/login_access.c, libmisc/login_desrpc.c, libmisc/login_krb.c, libmisc/loginprompt.c, libmisc/mail.c, libmisc/motd.c, libmisc/myname.c, libmisc/obscure.c, libmisc/pam_pass.c, libmisc/pwd2spwd.c, libmisc/pwd_init.c, libmisc/pwdcheck.c, libmisc/rlogin.c, libmisc/salt.c, libmisc/setugid.c, libmisc/setup.c, libmisc/setupenv.c, libmisc/shell.c, libmisc/strtoday.c, libmisc/sub.c, libmisc/sulog.c, libmisc/ttytype.c, libmisc/tz.c, libmisc/ulimit.c, libmisc/utmp.c, libmisc/valid.c, libmisc/xmalloc.c, libmisc/addgrps.c, libmisc/age.c, libmisc/basename.c, libmisc/chkname.c, libmisc/chkshell.c, libmisc/chowndir.c, libmisc/chowntty.c, libmisc/console.c, libmisc/copydir.c:
* libmisc/getdate.c, libmisc/login_access.c, libmisc/login_desrpc.c, libmisc/login_krb.c, libmisc/nscd.c, libmisc/entry.c, libmisc/env.c, libmisc/failure.c, libmisc/fields.c, libmisc/hushed.c, libmisc/isexpired.c, libmisc/limits.c, libmisc/list.c, libmisc/log.c, libmisc/loginprompt.c, libmisc/mail.c, libmisc/motd.c, libmisc/myname.c, libmisc/obscure.c, libmisc/pam_pass.c, libmisc/pwd2spwd.c, libmisc/pwd_init.c, libmisc/pwdcheck.c, libmisc/rlogin.c, libmisc/salt.c, libmisc/setugid.c, libmisc/setup.c, libmisc/setupenv.c, libmisc/shell.c, libmisc/strtoday.c, libmisc/sub.c, libmisc/sulog.c, libmisc/ttytype.c, libmisc/tz.c, libmisc/ulimit.c, libmisc/utmp.c, libmisc/valid.c, libmisc/xmalloc.c, libmisc/addgrps.c, libmisc/age.c, libmisc/basename.c, libmisc/chkname.c, libmisc/chkshell.c, libmisc/chowndir.c, libmisc/chowntty.c, libmisc/console.c, libmisc/copydir.c:
Indent all using current .indent.pro settings.
* po/Makevars: New file neccessary for gettext >=0.11.5.
@ -1978,7 +2538,7 @@
2000-08-26 Marek Micha趾iewicz <marekm@pld.org.pl>
* contrib/Makefile.am, contrib/groupmems.shar, doc/LSM, po/el.po, po/fr.po, po/pl.po, po/sv.po, doc/README.mirrors, src/vipw.c, src/dpasswd.c, src/Makefile.am, src/chage.c, src/chfn.c, src/chpasswd.c, src/chsh.c, src/expiry.c, src/faillog.c, src/gpasswd.c, src/groupadd.c, src/groupdel.c, src/groupmod.c, src/groups.c, src/grpck.c, src/grpconv.c, src/grpunconv.c, src/id.c, src/lastlog.c, src/login.c, src/logoutd.c, src/mkpasswd.c, src/newgrp.c, src/newusers.c, src/passwd.c, src/pwck.c, src/pwconv.c, src/pwunconv.c, src/su.c, src/sulogin.c, src/useradd.c, src/userdel.c, src/usermod.c, lib/dialchk.h, lib/dialup.h, lib/tcfsio.h, lib/Makefile.am, lib/commonio.c, lib/commonio.h, lib/defines.h, lib/encrypt.c, lib/getdef.c, lib/getdef.h, lib/groupio.c, lib/groupio.h, lib/prototypes.h, lib/pwauth.c, lib/pwio.c, lib/pwio.h, lib/rad64.c, lib/sgroupio.c, lib/sgroupio.h, lib/shadowio.h, libmisc/suauth.c, libmisc/chkname.h, libmisc/chowndir.c, libmisc/copydir.c, libmisc/entry.c, libmisc/failure.h, libmisc/getdate.h, libmisc/hushed.c, libmisc/loginprompt.c, libmisc/setupenv.c, libmisc/sulog.c, man/dpasswd.8, man/pwauth.8, man/Makefile.am, man/chage.1, man/chfn.1, man/chpasswd.8, man/chsh.1, man/faillog.5, man/faillog.8, man/groupadd.8, man/groupdel.8, man/groupmod.8, man/groups.1, man/grpck.8, man/id.1, man/lastlog.8, man/login.1, man/login.defs.5, man/logoutd.8, man/mkpasswd.8, man/newgrp.1, man/newusers.8, man/passwd.1, man/passwd.5, man/pl/Makefile.am, man/pl/groupadd.8, man/pl/groupdel.8, man/pl/groupmod.8, man/pl/useradd.8, man/pl/userdel.8, man/pl/usermod.8, man/porttime.5, man/pw_auth.3, man/pwck.8, man/shadow.3, man/shadow.5, man/su.1, man/sulogin.8, man/useradd.8, man/userdel.8, man/usermod.8, etc/login.defs.hurd, etc/login.defs.linux, doc/ANNOUNCE, doc/CHANGES, doc/README, doc/README.linux, doc/README.pam, doc/WISHLIST, debian/login.copyright, debian/passwd.copyright, debian/secure-su.copyright, mkinstalldirs, configure.in, Makefile.am:
* contrib/Makefile.am, contrib/groupmems.shar, doc/LSM, po/el.po, po/fr.po, po/pl.po, po/sv.po, doc/README.mirrors, src/vipw.c, src/dpasswd.c, src/Makefile.am, src/chage.c, src/chfn.c, src/chpasswd.c, src/chsh.c, src/expiry.c, src/faillog.c, src/gpasswd.c, src/groupadd.c, src/groupdel.c, src/groupmod.c, src/groups.c, src/grpck.c, src/grpconv.c, src/grpunconv.c, src/id.c, src/lastlog.c, src/login.c, src/logoutd.c, src/mkpasswd.c, src/newgrp.c, src/newusers.c, src/passwd.c, src/pwck.c, src/pwconv.c, src/pwunconv.c, src/su.c, src/sulogin.c, src/useradd.c, src/userdel.c, src/usermod.c, lib/dialchk.h, lib/dialup.h, lib/rad64.c, lib/tcfsio.h, lib/Makefile.am, lib/commonio.c, lib/commonio.h, lib/defines.h, lib/encrypt.c, lib/getdef.c, lib/getdef.h, lib/groupio.c, lib/groupio.h, lib/prototypes.h, lib/pwauth.c, lib/pwio.c, lib/pwio.h, lib/sgroupio.c, lib/sgroupio.h, lib/shadowio.h, libmisc/suauth.c, libmisc/chkname.h, libmisc/chowndir.c, libmisc/copydir.c, libmisc/entry.c, libmisc/failure.h, libmisc/getdate.h, libmisc/hushed.c, libmisc/loginprompt.c, libmisc/setupenv.c, libmisc/sulog.c, man/dpasswd.8, man/pwauth.8, man/Makefile.am, man/chage.1, man/chfn.1, man/chpasswd.8, man/chsh.1, man/faillog.5, man/faillog.8, man/groupadd.8, man/groupdel.8, man/groupmod.8, man/groups.1, man/grpck.8, man/id.1, man/lastlog.8, man/login.1, man/login.defs.5, man/logoutd.8, man/mkpasswd.8, man/newgrp.1, man/newusers.8, man/passwd.1, man/passwd.5, man/pl/Makefile.am, man/pl/groupadd.8, man/pl/groupdel.8, man/pl/groupmod.8, man/pl/useradd.8, man/pl/userdel.8, man/pl/usermod.8, man/porttime.5, man/pw_auth.3, man/pwck.8, man/shadow.3, man/shadow.5, man/su.1, man/sulogin.8, man/useradd.8, man/userdel.8, man/usermod.8, etc/login.defs.hurd, etc/login.defs.linux, doc/ANNOUNCE, doc/CHANGES, doc/README, doc/README.linux, doc/README.pam, doc/WISHLIST, debian/login.copyright, debian/passwd.copyright, debian/secure-su.copyright, mkinstalldirs, configure.in, Makefile.am:
*** empty log message ***
1999-08-27 Marek Micha趾iewicz <marekm@pld.org.pl>
@ -1993,7 +2553,7 @@
1999-06-07 Marek Micha趾iewicz <marekm@pld.org.pl>
* redhat/shadow-utils.spec.in, src/dpasswd.c, src/Makefile.am, src/chage.c, src/chfn.c, src/chpasswd.c, src/chsh.c, src/expiry.c, src/faillog.c, src/gpasswd.c, src/groupadd.c, src/groupdel.c, src/groupmod.c, src/groups.c, src/grpck.c, src/grpconv.c, src/grpunconv.c, src/id.c, src/lastlog.c, src/login.c, src/logoutd.c, src/mkpasswd.c, src/newgrp.c, src/newusers.c, src/passwd.c, src/pwck.c, src/pwconv.c, src/pwunconv.c, src/su.c, src/sulogin.c, src/useradd.c, src/userdel.c, src/usermod.c, contrib/Makefile.am, contrib/README, contrib/udbachk.tgz, debian/changelog, debian/rules, doc/CHANGES, doc/LSM, doc/README.linux, doc/README.mirrors, doc/README.platforms, doc/WISHLIST, lib/Makefile.am, lib/fputsx.c, lib/getpass.c, lib/pam_defs.h, lib/prototypes.h, lib/rcsid.h, libmisc/login_desrpc.c, libmisc/pam_pass.c, libmisc/utmp.c, man/login.1, po/el.po, po/pl.po, acconfig.h, configure.in:
* redhat/shadow-utils.spec.in, src/dpasswd.c, src/Makefile.am, src/chage.c, src/chfn.c, src/chpasswd.c, src/chsh.c, src/expiry.c, src/faillog.c, src/gpasswd.c, src/groupadd.c, src/groupdel.c, src/groupmod.c, src/groups.c, src/grpck.c, src/grpconv.c, src/grpunconv.c, src/id.c, src/lastlog.c, src/login.c, src/logoutd.c, src/mkpasswd.c, src/newgrp.c, src/newusers.c, src/passwd.c, src/pwck.c, src/pwconv.c, src/pwunconv.c, src/su.c, src/sulogin.c, src/useradd.c, src/userdel.c, src/usermod.c, contrib/Makefile.am, contrib/README, contrib/udbachk.tgz, debian/changelog, debian/rules, doc/CHANGES, doc/README.mirrors, doc/LSM, doc/README.linux, doc/README.platforms, doc/WISHLIST, lib/Makefile.am, lib/fputsx.c, lib/getpass.c, lib/pam_defs.h, lib/prototypes.h, lib/rcsid.h, libmisc/login_desrpc.c, libmisc/pam_pass.c, libmisc/utmp.c, man/login.1, po/el.po, po/pl.po, acconfig.h, configure.in:
*** empty log message ***
1999-03-07 Marek Micha趾iewicz <marekm@pld.org.pl>
@ -2008,12 +2568,12 @@
1998-07-24 Marek Micha趾iewicz <marekm@pld.org.pl>
* src/passwd.c, src/su.c, src/userdel.c, src/Makefile.am, src/chage.c, src/faillog.c, src/login.c, lib/tcfsio.c, lib/tcfsio.h, lib/pwauth.c, libmisc/chowntty.c, libmisc/pam_pass.c, libmisc/setugid.c, etc/pam.d/passwd, etc/pam.d/su, lib/Makefile.am, lib/commonio.c, lib/defines.h, lib/prototypes.h, doc/Makefile.am, doc/README.linux, doc/README.mirrors, doc/README.platforms, doc/WISHLIST, etc/Makefile.am, etc/pam.d/Makefile.am, doc/CHANGES, debian/changelog, configure.in, acconfig.h:
* src/passwd.c, src/su.c, src/userdel.c, src/Makefile.am, src/chage.c, src/faillog.c, src/login.c, lib/tcfsio.c, lib/tcfsio.h, lib/pwauth.c, libmisc/chowntty.c, libmisc/pam_pass.c, libmisc/setugid.c, etc/pam.d/passwd, etc/pam.d/su, lib/Makefile.am, lib/commonio.c, lib/defines.h, lib/prototypes.h, doc/README.mirrors, doc/Makefile.am, doc/README.linux, doc/README.platforms, doc/WISHLIST, etc/Makefile.am, etc/pam.d/Makefile.am, doc/CHANGES, debian/changelog, configure.in, acconfig.h:
*** empty log message ***
1998-06-26 Marek Micha趾iewicz <marekm@pld.org.pl>
* src/passwd.c, src/usermod.c, man/faillog.8, man/pwconv.8, src/logoutd.c, lib/getpass.c, libmisc/copydir.c, doc/README.linux, doc/README.mirrors, doc/WISHLIST, lib/commonio.c, debian/changelog, doc/CHANGES, configure.in:
* src/passwd.c, src/usermod.c, man/faillog.8, man/pwconv.8, src/logoutd.c, lib/getpass.c, libmisc/copydir.c, doc/README.mirrors, doc/README.linux, doc/WISHLIST, lib/commonio.c, debian/changelog, doc/CHANGES, configure.in:
*** empty log message ***
1998-05-29 Marek Micha趾iewicz <marekm@pld.org.pl>
@ -2023,17 +2583,17 @@
1998-04-16 Marek Micha趾iewicz <marekm@pld.org.pl>
* src/useradd.c, src/userdel.c, src/usermod.c, src/passwd.c, src/sulogin.c, src/groupdel.c, src/login.c, src/logoutd.c, src/newgrp.c, src/dpasswd.c, src/chage.c, src/faillog.c, src/gpasswd.c, src/groupadd.c, redhat/shadow-970616-rh.patch, redhat/shadow-970616-utuser.patch, redhat/shadow-970616.login.defs, redhat/shadow-970616.useradd, redhat/shadow-utils-970616.spec, src/Makefile.am, libmisc/utmp.c, redhat/Makefile.am, redhat/README, redhat/shadow-970616-fix.patch, redhat/shadow-970616-glibc.patch, libmisc/limits.c, libmisc/log.c, libmisc/login_desrpc.c, libmisc/loginprompt.c, libmisc/obscure.c, libmisc/strtoday.c, libmisc/chkname.c, libmisc/chowndir.c, libmisc/copydir.c, libmisc/failure.c, lib/dialchk.c, lib/defines.h, lib/pwauth.c, lib/pwpack.c, doc/CHANGES, doc/README.linux, doc/WISHLIST, doc/cracklib26.diff, lib/commonio.c, acconfig.h, configure.in, debian/tar.c:
* src/useradd.c, src/userdel.c, src/usermod.c, src/passwd.c, src/sulogin.c, src/groupdel.c, src/login.c, src/logoutd.c, src/newgrp.c, src/dpasswd.c, src/chage.c, src/faillog.c, src/gpasswd.c, src/groupadd.c, redhat/shadow-970616-rh.patch, redhat/shadow-970616-utuser.patch, redhat/shadow-970616.login.defs, redhat/shadow-970616.useradd, redhat/shadow-utils-970616.spec, src/Makefile.am, libmisc/utmp.c, redhat/Makefile.am, redhat/README, redhat/shadow-970616-fix.patch, redhat/shadow-970616-glibc.patch, libmisc/login_desrpc.c, libmisc/limits.c, libmisc/log.c, libmisc/loginprompt.c, libmisc/obscure.c, libmisc/strtoday.c, libmisc/chkname.c, libmisc/chowndir.c, libmisc/copydir.c, libmisc/failure.c, lib/dialchk.c, lib/defines.h, lib/pwauth.c, lib/pwpack.c, doc/CHANGES, doc/README.linux, doc/WISHLIST, doc/cracklib26.diff, lib/commonio.c, acconfig.h, configure.in, debian/tar.c:
*** empty log message ***
1998-04-02 Marek Micha趾iewicz <marekm@pld.org.pl>
* src/groupmod.c, libmisc/sulog.c, lib/sgetspent.c, lib/sgetpwent.c, lib/sgetgrent.c, lib/putgrent.c, lib/gshadow.c, lib/getdef.c, lib/fputsx.c, lib/commonio.c, doc/README.linux, doc/README.mirrors, doc/CHANGES, configure.in:
* src/groupmod.c, libmisc/sulog.c, lib/sgetspent.c, lib/sgetpwent.c, lib/sgetgrent.c, lib/putgrent.c, lib/gshadow.c, lib/getdef.c, lib/fputsx.c, lib/commonio.c, doc/README.mirrors, doc/README.linux, doc/CHANGES, configure.in:
*** empty log message ***
1998-01-30 Marek Micha趾iewicz <marekm@pld.org.pl>
* install-sh, src/userdel.c, src/usermod.c, src/pwconv.c, src/pwunconv.c, src/su.c, src/useradd.c, src/newgrp.c, src/newusers.c, src/passwd.c, src/pwck.c, src/groupmod.c, src/login.c, src/logoutd.c, src/gpasswd.c, src/groupadd.c, src/groupdel.c, src/chfn.c, src/chpasswd.c, src/chsh.c, src/expiry.c, redhat/README, redhat/shadow-utils.spec.in, src/Makefile.am, src/chage.c, man/login.defs.5, man/useradd.8, man/usermod.8, redhat/Makefile.am, libmisc/pam_pass.c, libmisc/strtoday.c, libmisc/tz.c, libmisc/login_access.c, libmisc/login_desrpc.c, libmisc/login_krb.c, libmisc/obscure.c, libmisc/age.c, libmisc/env.c, libmisc/limits.c, lib/strstr.c, lib/shadow.c, lib/shadowio.c, lib/shadowio.h, lib/utent.c, lib/rmdir.c, lib/pwio.c, lib/pwio.h, lib/sgetspent.c, lib/sgroupio.c, lib/mkdir.c, lib/putgrent.c, lib/prototypes.h, lib/pwauth.c, lib/md5crypt.c, lib/getpass.c, lib/groupio.c, lib/gshadow.c, lib/lockpw.c, lib/commonio.h, lib/defines.h, lib/encrypt.c, lib/getdef.c, lib/getdef.h, doc/automake-1.0.diff, doc/README.mirrors, doc/WISHLIST, lib/Makefile.am, lib/commonio.c, doc/ANNOUNCE, doc/CHANGES, doc/Makefile.am, doc/README.limits, doc/README.linux, debian/Makefile.am, debian/changelog, debian/login.copyright, debian/rules, mkinstalldirs, shadow-utils.spec, contrib/README, aclocal.m4, acconfig.h, configure.in, Makefile.am:
* install-sh, src/userdel.c, src/usermod.c, src/pwconv.c, src/pwunconv.c, src/su.c, src/useradd.c, src/newgrp.c, src/newusers.c, src/passwd.c, src/pwck.c, src/groupmod.c, src/login.c, src/logoutd.c, src/gpasswd.c, src/groupadd.c, src/groupdel.c, src/chfn.c, src/chpasswd.c, src/chsh.c, src/expiry.c, redhat/README, redhat/shadow-utils.spec.in, src/Makefile.am, src/chage.c, man/login.defs.5, man/useradd.8, man/usermod.8, redhat/Makefile.am, libmisc/pam_pass.c, libmisc/strtoday.c, libmisc/tz.c, libmisc/login_access.c, libmisc/login_desrpc.c, libmisc/login_krb.c, libmisc/obscure.c, libmisc/age.c, libmisc/env.c, libmisc/limits.c, lib/strstr.c, lib/shadow.c, lib/shadowio.c, lib/shadowio.h, lib/utent.c, lib/rmdir.c, lib/pwio.c, lib/pwio.h, lib/sgetspent.c, lib/sgroupio.c, lib/mkdir.c, lib/putgrent.c, lib/prototypes.h, lib/pwauth.c, lib/md5crypt.c, lib/getpass.c, lib/groupio.c, lib/gshadow.c, lib/lockpw.c, lib/commonio.h, lib/defines.h, lib/encrypt.c, lib/getdef.c, lib/getdef.h, doc/README.mirrors, doc/automake-1.0.diff, doc/WISHLIST, lib/Makefile.am, lib/commonio.c, doc/ANNOUNCE, doc/CHANGES, doc/Makefile.am, doc/README.limits, doc/README.linux, debian/Makefile.am, debian/changelog, debian/login.copyright, debian/rules, mkinstalldirs, shadow-utils.spec, contrib/README, aclocal.m4, acconfig.h, configure.in, Makefile.am:
*** empty log message ***
1998-01-25 Marek Micha趾iewicz <marekm@pld.org.pl>
@ -2042,22 +2602,22 @@
1997-12-14 Marek Micha趾iewicz <marekm@pld.org.pl>
* doc/CHANGES, debian/checksums, debian/rules, debian/Makefile.am, src/Makefile.am, src/userdel.c, src/usermod.c, src/pwck.c, src/useradd.c, src/mkpasswd.c, src/gpasswd.c, src/grpck.c, src/login.c, src/chage.c, src/chfn.c, src/chsh.c, man/shadowconfig.8, man/vipw.8, old/Makefile.am, old/pwunconv.8, man/Makefile.am, man/login.defs.5, man/pwconv.8, man/pwunconv.8, libmisc/limits.c, libmisc/rlogin.c, lib/pwent.c, lib/prototypes.h, lib/pwdbm.c, lib/shadow.c, doc/LSM, doc/WISHLIST, etc/limits, lib/grent.c, shadow-utils.spec, debian/changelog, configure.in:
* doc/CHANGES, debian/checksums, debian/rules, debian/Makefile.am, src/Makefile.am, src/userdel.c, src/usermod.c, src/pwck.c, src/useradd.c, src/mkpasswd.c, src/gpasswd.c, src/grpck.c, src/login.c, src/chage.c, src/chfn.c, src/chsh.c, man/shadowconfig.8, man/vipw.8, old/Makefile.am, old/pwunconv.8, man/Makefile.am, man/login.defs.5, man/pwconv.8, man/pwunconv.8, libmisc/limits.c, libmisc/rlogin.c, lib/pwdbm.c, lib/pwent.c, lib/prototypes.h, lib/shadow.c, doc/LSM, doc/WISHLIST, etc/limits, lib/grent.c, shadow-utils.spec, debian/changelog, configure.in:
*** empty log message ***
1997-12-08 Marek Micha趾iewicz <marekm@pld.org.pl>
* src/userdel.c, src/usermod.c, src/shadowconfig.sh, src/su.c, src/sulogin.c, src/useradd.c, src/passwd.c, src/pwck.c, src/pwconv.c, src/pwunconv.c, src/newgrp.c, src/newusers.c, src/logoutd.c, src/mkpasswd.c, src/grpconv.c, src/grpunconv.c, src/id.c, src/lastlog.c, src/login.c, src/groupadd.c, src/groupdel.c, src/groupmod.c, src/groups.c, src/grpck.c, src/dpasswd.c, src/chsh.c, src/expiry.c, src/faillog.c, src/gpasswd.c, src/Makefile.am, src/chage.c, src/chfn.c, src/chpasswd.c, old/Makefile.am, old/pwconv.8, old/vipw.8, man/Makefile.am, man/limits.5, man/pwconv.8, man/shadowconfig.8, man/vipw.8, libmisc/tz.c, libmisc/ulimit.c, libmisc/utmp.c, libmisc/valid.c, libmisc/xmalloc.c, libmisc/suauth.c, libmisc/strtoday.c, libmisc/sub.c, libmisc/sulog.c, libmisc/ttytype.c, libmisc/salt.c, libmisc/setugid.c, libmisc/setup.c, libmisc/setupenv.c, libmisc/shell.c, libmisc/rlogin.c, libmisc/motd.c, libmisc/myname.c, libmisc/obscure.c, libmisc/pam_pass.c, libmisc/pwd2spwd.c, libmisc/pwd_init.c, libmisc/login_access.c, libmisc/login_desrpc.c, libmisc/login_krb.c, libmisc/loginprompt.c, libmisc/mail.c, libmisc/hushed.c, libmisc/isexpired.c, libmisc/limits.c, libmisc/list.c, libmisc/log.c, libmisc/getdate.c, libmisc/failure.h, libmisc/fields.c, libmisc/getdate.h, libmisc/getdate.y, libmisc/entry.c, libmisc/env.c, libmisc/failure.c, libmisc/chowndir.c, libmisc/chowntty.c, libmisc/console.c, libmisc/copydir.c, libmisc/age.c, libmisc/basename.c, libmisc/chkname.c, libmisc/chkname.h, libmisc/chkshell.c, lib/strdup.c, lib/strerror.c, lib/strstr.c, lib/utent.c, libmisc/Makefile.am, libmisc/addgrps.c, lib/sgroupio.c, lib/shadow.c, lib/shadowio.c, lib/spdbm.c, lib/sppack.c, lib/rename.c, lib/rmdir.c, lib/sgetgrent.c, lib/sgetpwent.c, lib/sgetspent.c, lib/rad64.c, lib/pwent.c, lib/pwauth.c, lib/pwdbm.c, lib/pwio.c, lib/pwpack.c, lib/mkdir.c, lib/putgrent.c, lib/putpwent.c, lib/putspent.c, lib/port.c, lib/prototypes.h, lib/md5.c, lib/md5crypt.c, lib/gsdbm.c, lib/gshadow.c, lib/gspack.c, lib/lockpw.c, lib/grent.c, lib/grdbm.c, lib/groupio.c, lib/grpack.c, lib/getpass.c, lib/dialup.c, lib/encrypt.c, lib/fputsx.c, lib/getdef.c, lib/dialchk.c, lib/dialchk.h, lib/commonio.c, lib/commonio.h, lib/defines.h, doc/automake-1.0.diff, etc/limits, etc/login.defs.linux, lib/Makefile.am, doc/CHANGES, doc/README.linux, doc/README.mirrors, doc/WISHLIST, debian/login.conffiles, debian/login.postinst, debian/passwd.postinst, debian/porttime, debian/rules, debian/secure-su.README, debian/securetty, contrib/pwdauth.c, debian/changelog, debian/control, aclocal.m4, shadow-utils.spec, acconfig.h, configure.in, Makefile.am:
* src/userdel.c, src/usermod.c, src/shadowconfig.sh, src/su.c, src/sulogin.c, src/useradd.c, src/passwd.c, src/pwck.c, src/pwconv.c, src/pwunconv.c, src/newgrp.c, src/newusers.c, src/logoutd.c, src/mkpasswd.c, src/grpconv.c, src/grpunconv.c, src/id.c, src/lastlog.c, src/login.c, src/groupadd.c, src/groupdel.c, src/groupmod.c, src/groups.c, src/grpck.c, src/dpasswd.c, src/chsh.c, src/expiry.c, src/faillog.c, src/gpasswd.c, src/Makefile.am, src/chage.c, src/chfn.c, src/chpasswd.c, old/Makefile.am, old/pwconv.8, old/vipw.8, man/Makefile.am, man/limits.5, man/pwconv.8, man/shadowconfig.8, man/vipw.8, libmisc/tz.c, libmisc/ulimit.c, libmisc/utmp.c, libmisc/valid.c, libmisc/xmalloc.c, libmisc/suauth.c, libmisc/strtoday.c, libmisc/sub.c, libmisc/sulog.c, libmisc/ttytype.c, libmisc/salt.c, libmisc/setugid.c, libmisc/setup.c, libmisc/setupenv.c, libmisc/shell.c, libmisc/rlogin.c, libmisc/motd.c, libmisc/myname.c, libmisc/obscure.c, libmisc/pam_pass.c, libmisc/pwd2spwd.c, libmisc/pwd_init.c, libmisc/login_access.c, libmisc/login_desrpc.c, libmisc/login_krb.c, libmisc/loginprompt.c, libmisc/mail.c, libmisc/hushed.c, libmisc/isexpired.c, libmisc/limits.c, libmisc/list.c, libmisc/log.c, libmisc/getdate.c, libmisc/failure.h, libmisc/fields.c, libmisc/getdate.h, libmisc/getdate.y, libmisc/entry.c, libmisc/env.c, libmisc/failure.c, libmisc/chowndir.c, libmisc/chowntty.c, libmisc/console.c, libmisc/copydir.c, libmisc/age.c, libmisc/basename.c, libmisc/chkname.c, libmisc/chkname.h, libmisc/chkshell.c, lib/strdup.c, lib/strerror.c, lib/strstr.c, lib/utent.c, libmisc/Makefile.am, libmisc/addgrps.c, lib/spdbm.c, lib/sgroupio.c, lib/shadow.c, lib/shadowio.c, lib/sppack.c, lib/rename.c, lib/rmdir.c, lib/sgetgrent.c, lib/sgetpwent.c, lib/sgetspent.c, lib/rad64.c, lib/pwdbm.c, lib/pwent.c, lib/pwauth.c, lib/pwio.c, lib/pwpack.c, lib/mkdir.c, lib/putgrent.c, lib/putpwent.c, lib/putspent.c, lib/port.c, lib/prototypes.h, lib/gsdbm.c, lib/md5.c, lib/md5crypt.c, lib/gshadow.c, lib/gspack.c, lib/lockpw.c, lib/grdbm.c, lib/grent.c, lib/groupio.c, lib/grpack.c, lib/getpass.c, lib/dialup.c, lib/encrypt.c, lib/fputsx.c, lib/getdef.c, lib/dialchk.c, lib/dialchk.h, lib/commonio.c, lib/commonio.h, lib/defines.h, doc/automake-1.0.diff, etc/limits, etc/login.defs.linux, lib/Makefile.am, doc/CHANGES, doc/README.mirrors, doc/README.linux, doc/WISHLIST, debian/login.conffiles, debian/login.postinst, debian/passwd.postinst, debian/porttime, debian/rules, debian/secure-su.README, debian/securetty, contrib/pwdauth.c, debian/changelog, debian/control, aclocal.m4, shadow-utils.spec, acconfig.h, configure.in, Makefile.am:
*** empty log message ***
1997-10-01 Marek Micha趾iewicz <marekm@pld.org.pl>
* debian/changelog, src/chpasswd.c, libmisc/login_access.c, lib/commonio.h, lib/sgroupio.c, lib/shadowio.c, etc/login.defs.linux, doc/CHANGES, doc/LSM, doc/README.mirrors, doc/WISHLIST, shadow-utils.spec:
* debian/changelog, src/chpasswd.c, libmisc/login_access.c, lib/commonio.h, lib/sgroupio.c, lib/shadowio.c, etc/login.defs.linux, doc/CHANGES, doc/README.mirrors, doc/LSM, doc/WISHLIST, shadow-utils.spec:
*** empty log message ***
1997-09-30 Marek Micha趾iewicz <marekm@pld.org.pl>
* src/useradd.c, src/userdel.c, src/usermod.c, src/pwconv.c, src/pwunconv.c, src/su.c, src/newusers.c, src/passwd.c, src/pwck.c, src/grpck.c, src/grpconv.c, src/grpunconv.c, src/login.c, src/groupmod.c, src/dpasswd.c, src/gpasswd.c, src/groupadd.c, src/groupdel.c, src/chage.c, src/chfn.c, src/chpasswd.c, src/chsh.c, src/Makefile.am, old/install-sh, old/pwconv-old.8, old/pwunconv-old.8, old/Makefile.am, man/pwconv.8, man/pwunconv.8, libmisc/setugid.c, libmisc/shell.c, libmisc/utmp.c, libmisc/mail.c, libmisc/obscure.c, libmisc/pam_pass.c, libmisc/salt.c, libmisc/isexpired.c, libmisc/login_access.c, libmisc/env.c, libmisc/fields.c, libmisc/addgrps.c, libmisc/chowndir.c, libmisc/chowntty.c, libmisc/console.c, libmisc/copydir.c, lib/strerror.c, lib/snprintf.c, lib/snprintf.h, lib/sgroupio.c, lib/sgroupio.h, lib/shadowio.c, lib/shadowio.h, lib/putgrent.c, lib/pwent.c, lib/pwauth.c, lib/grent.c, lib/getpass.c, lib/prototypes.h, lib/commonio.c, lib/commonio.h, lib/defines.h, lib/encrypt.c, lib/getdef.c, lib/Makefile.am, etc/login.defs.linux, doc/README.linux, doc/README.mirrors, doc/WISHLIST, doc/CHANGES, doc/LSM, doc/Makefile.am, debian/rules, debian/changelog, contrib/adduser.c, configure.in, acconfig.h:
* src/useradd.c, src/userdel.c, src/usermod.c, src/pwconv.c, src/pwunconv.c, src/su.c, src/newusers.c, src/passwd.c, src/pwck.c, src/grpck.c, src/grpconv.c, src/grpunconv.c, src/login.c, src/groupmod.c, src/dpasswd.c, src/gpasswd.c, src/groupadd.c, src/groupdel.c, src/chage.c, src/chfn.c, src/chpasswd.c, src/chsh.c, src/Makefile.am, old/install-sh, old/pwconv-old.8, old/pwunconv-old.8, old/Makefile.am, man/pwconv.8, man/pwunconv.8, libmisc/setugid.c, libmisc/shell.c, libmisc/utmp.c, libmisc/mail.c, libmisc/obscure.c, libmisc/pam_pass.c, libmisc/salt.c, libmisc/login_access.c, libmisc/isexpired.c, libmisc/env.c, libmisc/fields.c, libmisc/addgrps.c, libmisc/chowndir.c, libmisc/chowntty.c, libmisc/console.c, libmisc/copydir.c, lib/strerror.c, lib/snprintf.c, lib/snprintf.h, lib/sgroupio.c, lib/sgroupio.h, lib/shadowio.c, lib/shadowio.h, lib/putgrent.c, lib/pwent.c, lib/pwauth.c, lib/grent.c, lib/getpass.c, lib/prototypes.h, lib/commonio.c, lib/commonio.h, lib/defines.h, lib/encrypt.c, lib/getdef.c, lib/Makefile.am, etc/login.defs.linux, doc/README.mirrors, doc/README.linux, doc/WISHLIST, doc/CHANGES, doc/LSM, doc/Makefile.am, debian/rules, debian/changelog, contrib/adduser.c, configure.in, acconfig.h:
*** empty log message ***
1997-09-29 Marek Micha趾iewicz <marekm@pld.org.pl>
@ -2067,7 +2627,7 @@
1997-06-16 Marek Micha趾iewicz <marekm@pld.org.pl>
* doc/console.c.spec, doc/Makefile.am, doc/WISHLIST, doc/console.c.spec.txt, doc/CHANGES, debian/changelog, src/shadowconfig.sh, redhat/Makefile.am, redhat/README, redhat/shadow-970502-config.patch, redhat/shadow-utils.spec, doc/README.shadow-paper, doc/README.mirrors, doc/README.linux, debian/login.copyright, debian/passwd.copyright, debian/secure-su.copyright, shadow-utils.spec, Makefile.am, configure.in:
* doc/console.c.spec, doc/Makefile.am, doc/WISHLIST, doc/console.c.spec.txt, doc/CHANGES, debian/changelog, src/shadowconfig.sh, redhat/Makefile.am, redhat/README, redhat/shadow-970502-config.patch, redhat/shadow-utils.spec, doc/README.mirrors, doc/README.shadow-paper, doc/README.linux, debian/login.copyright, debian/passwd.copyright, debian/secure-su.copyright, shadow-utils.spec, Makefile.am, configure.in:
*** empty log message ***
1997-06-01 Marek Micha趾iewicz <marekm@pld.org.pl>
@ -2077,7 +2637,7 @@
1997-05-02 Marek Micha趾iewicz <marekm@pld.org.pl>
* src/shadowconfig.sh, src/Makefile.am, man/Makefile.am, libmisc/mail.c, libmisc/salt.c, lib/sgroupio.c, lib/shadowio.c, lib/groupio.c, lib/pwio.c, etc/Makefile.am, doc/WISHLIST, doc/CHANGES, debian/shadowconfig, debian/Makefile.am, debian/changelog, debian/control, debian/rules, configure.in, configure, shlib/Makefile.in, man/Makefile.in, libmisc/Makefile.in, lib/Makefile.in, etc/Makefile.in, doc/Makefile.in, contrib/Makefile.in, Makefile.in, man/userdel.8, man/usermod.8, man/shadow.5, man/su.1, man/sulogin.8, man/useradd.8, man/pwauth.8, man/pw_auth.3, man/pwck.8, man/pwconv.8, man/pwunconv.8, man/shadow.3, man/newusers.8, man/passwd.1, man/passwd.5, man/porttime.5, man/login.defs.5, man/logoutd.8, man/mkpasswd.8, man/newgrp.1, man/limits.5, man/login.1, man/groups.1, man/grpck.8, man/id.1, man/lastlog.8, man/faillog.5, man/faillog.8, man/groupadd.8, man/groupdel.8, man/groupmod.8, man/dpasswd.8, man/chage.1, man/chfn.1, man/chpasswd.8, man/chsh.1, libmisc/valid.c, libmisc/sulog.c, libmisc/ttytype.c, libmisc/tz.c, libmisc/utmp.c, libmisc/setup.c, libmisc/setupenv.c, libmisc/shell.c, libmisc/strtoday.c, libmisc/sub.c, libmisc/setugid.c, libmisc/obscure.c, libmisc/pwd2spwd.c, libmisc/rlogin.c, libmisc/login_access.c, libmisc/loginprompt.c, libmisc/motd.c, libmisc/hushed.c, libmisc/isexpired.c, libmisc/limits.c, libmisc/list.c, libmisc/log.c, libmisc/copydir.c, libmisc/entry.c, libmisc/env.c, libmisc/failure.c, libmisc/fields.c, libmisc/age.c, libmisc/chowndir.c, libmisc/chowntty.c, libmisc/console.c, lib/utent.c, lib/shadow_.h, lib/strstr.c, lib/spdbm.c, lib/sppack.c, lib/shadow.c, lib/sgetpwent.c, lib/sgetspent.c, lib/rename.c, lib/rmdir.c, lib/pwpack.c, lib/rad64.c, lib/sgetgrent.c, lib/pwent.c, lib/pwauth.h, lib/pwdbm.c, lib/putgrent.c, lib/putpwent.c, lib/putspent.c, lib/port.h, lib/pwauth.c, lib/lastlog_.h, lib/mkdir.c, lib/lockpw.c, lib/port.c, lib/grpack.c, lib/gsdbm.c, lib/gshadow.c, lib/gshadow_.h, lib/gspack.c, lib/grent.c, lib/getdef.c, lib/getpass.c, lib/grdbm.c, lib/dialup.h, lib/encrypt.c, lib/faillog.h, lib/fputsx.c, lib/dialchk.c, lib/dialup.c, lib/commonio.c, lib/defines.h, etc/login.defs, etc/login.defs.linux, doc/README.linux, doc/LICENSE, doc/Makefile.am, doc/README, doc/HOWTO, doc/ANNOUNCE, debian/secure-su.README, debian/secure-su.conffiles, debian/secure-su.copyright, debian/secure-su.postrm, debian/secure-su.preinst, debian/securetty, debian/passwd.conffiles, debian/passwd.copyright, debian/passwd.postinst, debian/porttime, debian/login.conffiles, debian/login.copyright, debian/login.postinst, debian/login.postrm, debian/login.preinst, debian/login.prerm, debian/logoutd, config.h.in, acconfig.h, Makefile.am, old/Makefile.in, old/scologin.c, old/orig-config.h, old/pwconv-old.c, old/pwd.h.m4, old/pwunconv-old.c, old/config.h.sun4, old/config.h.svr4, old/config.h.xenix, old/config.h.linux, old/Makefile.sun4, old/Makefile.svr4, old/Makefile.xenix, old/Makefile.am, old/Makefile.linux, src/Makefile.in, src/pwconv.c, src/userdel.c, src/usermod.c, src/useradd.c, src/su.c, src/sulogin.c, src/pwconv5.c, src/scologin.c, src/pwck.c, src/pwunconv.c, src/patchlevel.h, src/newusers.c, src/passwd.c, src/logoutd.c, src/mkpasswd.c, src/newgrp.c, src/grpunconv.c, src/id.c, src/lastlog.c, src/login.c, src/grpck.c, src/grpconv.c, src/groupdel.c, src/groupmod.c, src/groups.c, src/faillog.c, src/gpasswd.c, src/groupadd.c, src/dpasswd.c, src/chsh.c, src/expiry.c, src/chfn.c, src/chpasswd.c, src/chage.c:
* src/shadowconfig.sh, src/Makefile.am, man/Makefile.am, libmisc/mail.c, libmisc/salt.c, lib/sgroupio.c, lib/shadowio.c, lib/groupio.c, lib/pwio.c, etc/Makefile.am, doc/WISHLIST, doc/CHANGES, debian/shadowconfig, debian/Makefile.am, debian/changelog, debian/control, debian/rules, configure.in, configure, shlib/Makefile.in, man/Makefile.in, libmisc/Makefile.in, lib/Makefile.in, etc/Makefile.in, doc/Makefile.in, contrib/Makefile.in, Makefile.in, man/userdel.8, man/usermod.8, man/shadow.5, man/su.1, man/sulogin.8, man/useradd.8, man/pwauth.8, man/pw_auth.3, man/pwck.8, man/pwconv.8, man/pwunconv.8, man/shadow.3, man/newusers.8, man/passwd.1, man/passwd.5, man/porttime.5, man/login.defs.5, man/logoutd.8, man/mkpasswd.8, man/newgrp.1, man/limits.5, man/login.1, man/groups.1, man/grpck.8, man/id.1, man/lastlog.8, man/faillog.5, man/faillog.8, man/groupadd.8, man/groupdel.8, man/groupmod.8, man/dpasswd.8, man/chage.1, man/chfn.1, man/chpasswd.8, man/chsh.1, libmisc/valid.c, libmisc/sulog.c, libmisc/ttytype.c, libmisc/tz.c, libmisc/utmp.c, libmisc/setup.c, libmisc/setupenv.c, libmisc/shell.c, libmisc/strtoday.c, libmisc/sub.c, libmisc/setugid.c, libmisc/obscure.c, libmisc/pwd2spwd.c, libmisc/rlogin.c, libmisc/login_access.c, libmisc/loginprompt.c, libmisc/motd.c, libmisc/hushed.c, libmisc/isexpired.c, libmisc/limits.c, libmisc/list.c, libmisc/log.c, libmisc/copydir.c, libmisc/entry.c, libmisc/env.c, libmisc/failure.c, libmisc/fields.c, libmisc/age.c, libmisc/chowndir.c, libmisc/chowntty.c, libmisc/console.c, lib/utent.c, lib/shadow_.h, lib/spdbm.c, lib/strstr.c, lib/sppack.c, lib/shadow.c, lib/sgetpwent.c, lib/sgetspent.c, lib/rad64.c, lib/rename.c, lib/rmdir.c, lib/pwpack.c, lib/sgetgrent.c, lib/pwdbm.c, lib/pwent.c, lib/pwauth.h, lib/putgrent.c, lib/putpwent.c, lib/putspent.c, lib/port.h, lib/pwauth.c, lib/lastlog_.h, lib/mkdir.c, lib/lockpw.c, lib/port.c, lib/gsdbm.c, lib/grpack.c, lib/gshadow.c, lib/gshadow_.h, lib/gspack.c, lib/grdbm.c, lib/grent.c, lib/getdef.c, lib/getpass.c, lib/dialup.h, lib/encrypt.c, lib/faillog.h, lib/fputsx.c, lib/dialchk.c, lib/dialup.c, lib/commonio.c, lib/defines.h, etc/login.defs, etc/login.defs.linux, doc/README.linux, doc/LICENSE, doc/Makefile.am, doc/README, doc/HOWTO, doc/ANNOUNCE, debian/secure-su.README, debian/secure-su.conffiles, debian/secure-su.copyright, debian/secure-su.postrm, debian/secure-su.preinst, debian/securetty, debian/passwd.conffiles, debian/passwd.copyright, debian/passwd.postinst, debian/porttime, debian/login.conffiles, debian/login.copyright, debian/login.postinst, debian/login.postrm, debian/login.preinst, debian/login.prerm, debian/logoutd, config.h.in, acconfig.h, Makefile.am, old/Makefile.in, old/scologin.c, old/orig-config.h, old/pwconv-old.c, old/pwd.h.m4, old/pwunconv-old.c, old/config.h.sun4, old/config.h.svr4, old/config.h.xenix, old/config.h.linux, old/Makefile.sun4, old/Makefile.svr4, old/Makefile.xenix, old/Makefile.am, old/Makefile.linux, src/Makefile.in, src/pwconv.c, src/userdel.c, src/usermod.c, src/useradd.c, src/su.c, src/sulogin.c, src/pwconv5.c, src/scologin.c, src/pwck.c, src/pwunconv.c, src/patchlevel.h, src/newusers.c, src/passwd.c, src/logoutd.c, src/mkpasswd.c, src/newgrp.c, src/grpunconv.c, src/id.c, src/lastlog.c, src/login.c, src/grpck.c, src/grpconv.c, src/groupdel.c, src/groupmod.c, src/groups.c, src/faillog.c, src/gpasswd.c, src/groupadd.c, src/dpasswd.c, src/chsh.c, src/expiry.c, src/chfn.c, src/chpasswd.c, src/chage.c:
*** empty log message ***
1997-02-11 Marek Micha趾iewicz <marekm@pld.org.pl>
@ -2097,7 +2657,7 @@
1996-09-25 Marek Micha趾iewicz <marekm@pld.org.pl>
* src/usermod.c, src/sulogin.c, src/useradd.c, src/userdel.c, src/su.c, src/pwconv5.c, src/newgrp.c, src/passwd.c, src/pwck.c, src/grpck.c, src/login.c, src/logoutd.c, src/gpasswd.c, src/groupadd.c, src/groupdel.c, src/groupmod.c, src/chfn.c, src/chsh.c, src/chage.c, libmisc/strtoday.c, libmisc/env.c, libmisc/fields.c, libmisc/isexpired.c, libmisc/setupenv.c, lib/getdef.c, lib/prototypes.h, lib/rad64.c, lib/defines.h, etc/login.defs.linux, doc/README.linux, doc/WISHLIST, doc/CHANGES, configure, configure.in, config.h.in:
* src/usermod.c, src/sulogin.c, src/useradd.c, src/userdel.c, src/su.c, src/pwconv5.c, src/newgrp.c, src/passwd.c, src/pwck.c, src/grpck.c, src/login.c, src/logoutd.c, src/gpasswd.c, src/groupadd.c, src/groupdel.c, src/groupmod.c, src/chfn.c, src/chsh.c, src/chage.c, libmisc/strtoday.c, libmisc/env.c, libmisc/fields.c, libmisc/isexpired.c, libmisc/setupenv.c, lib/rad64.c, lib/getdef.c, lib/prototypes.h, lib/defines.h, etc/login.defs.linux, doc/README.linux, doc/WISHLIST, doc/CHANGES, configure, configure.in, config.h.in:
*** empty log message ***
1996-09-20 Marek Micha趾iewicz <marekm@pld.org.pl>
@ -2115,9 +2675,9 @@
* old/Makefile.am, old/Makefile.linux, old/Makefile.sun4, old/Makefile.svr4, old/Makefile.xenix, old/config.h.linux, old/config.h.sun4, old/config.h.svr4, old/config.h.xenix, old/install-sh, old/orig-config.h, old/pwd.h.m4, shlib/Makefile.am, shlib/Makefile.in, shlib/Makefile.in.saved:
New file.
* contrib/adduser-old.c, contrib/adduser.sh, contrib/adduser2.sh, contrib/atudel, doc/README.sun4:
* contrib/adduser-old.c, contrib/adduser.sh, contrib/adduser2.sh, contrib/atudel:
960810 - first version under cvs
* contrib/Makefile.in, contrib/Makefile.am, contrib/README, contrib/adduser.c, contrib/pwdauth.c, doc/ANNOUNCE, doc/CHANGES, doc/Makefile.in, doc/automake-1.0.diff, doc/console.c.spec, doc/HOWTO, doc/LICENSE, doc/Makefile.am, doc/README, doc/README.limits, doc/README.linux, doc/WISHLIST, etc/Makefile.in, etc/Makefile.am, etc/login.access, etc/login.defs, etc/login.defs.linux, old/Makefile.in, src/patchlevel.h, src/pwconv5.c, src/scologin.c, src/chage.c, src/chfn.c, src/chsh.c, src/expiry.c, src/gpasswd.c, src/groups.c, src/grpconv.c, src/id.c, src/login.c, src/newgrp.c, src/passwd.c, src/pwconv.c, src/pwunconv.c, src/su.c, src/sulogin.c, lib/dialup.h, lib/grent.c, lib/lastlog_.h, lib/md5.c, lib/md5.h, lib/md5crypt.c, lib/mkdir.c, lib/putgrent.c, lib/putpwent.c, lib/putspent.c, lib/pwent.c, lib/rename.c, lib/rmdir.c, lib/shadow_.h, lib/strdup.c, lib/strstr.c, lib/defines.h, lib/faillog.h, lib/getdef.h, lib/grdbm.c, lib/groupio.h, lib/grpack.c, lib/gsdbm.c, lib/gshadow_.h, lib/gspack.c, lib/port.h, lib/prototypes.h, lib/pwauth.h, lib/pwdbm.c, lib/pwio.h, lib/pwpack.c, lib/rcsid.h, lib/sgetgrent.c, lib/sgetpwent.c, lib/sgetspent.c, lib/sgroupio.h, lib/shadow.c, lib/shadowio.c, lib/shadowio.h, lib/spdbm.c, lib/sppack.c, lib/utent.c, src/Makefile.in, src/dpasswd.c, src/Makefile.am, src/chpasswd.c, src/faillog.c, src/groupadd.c, src/groupdel.c, src/groupmod.c, src/grpck.c, src/lastlog.c, src/logoutd.c, src/mkpasswd.c, src/newusers.c, src/pwck.c, src/useradd.c, src/userdel.c, src/usermod.c, lib/Makefile.in, lib/dialchk.c, lib/dialup.c, lib/Makefile.am, lib/commonio.c, lib/encrypt.c, lib/fputsx.c, lib/getdef.c, lib/getpass.c, lib/groupio.c, lib/gshadow.c, lib/lockpw.c, lib/port.c, lib/pwauth.c, lib/pwio.c, lib/rad64.c, lib/sgroupio.c, libmisc/suauth.c, libmisc/age.c, libmisc/basename.c, libmisc/chkname.c, libmisc/chowndir.c, libmisc/chowntty.c, libmisc/console.c, libmisc/copydir.c, libmisc/entry.c, libmisc/env.c, libmisc/failure.c, libmisc/fields.c, libmisc/hushed.c, libmisc/isexpired.c, libmisc/limits.c, libmisc/list.c, libmisc/log.c, libmisc/login_access.c, libmisc/login_desrpc.c, libmisc/login_krb.c, libmisc/loginprompt.c, libmisc/mail.c, libmisc/motd.c, libmisc/obscure.c, libmisc/pwd2spwd.c, libmisc/rlogin.c, libmisc/salt.c, libmisc/setugid.c, libmisc/setup.c, libmisc/setupenv.c, libmisc/shell.c, libmisc/strtoday.c, libmisc/sub.c, libmisc/sulog.c, libmisc/ttytype.c, libmisc/tz.c, libmisc/ulimit.c, libmisc/utmp.c, libmisc/valid.c, libmisc/xmalloc.c, man/Makefile.in, man/dpasswd.8, man/pwauth.8, man/Makefile.am, man/chage.1, man/chfn.1, man/chpasswd.8, man/chsh.1, man/faillog.5, man/faillog.8, man/gpasswd.1, man/groupadd.8, man/groupdel.8, man/groupmod.8, man/groups.1, man/grpck.8, man/id.1, man/lastlog.8, man/login.1, man/login.access.5, man/login.defs.5, man/logoutd.8, man/mkpasswd.8, man/newgrp.1, man/newusers.8, man/passwd.1, man/passwd.5, man/porttime.5, man/pw_auth.3, man/pwck.8, man/pwconv.8, man/pwunconv.8, man/shadow.3, man/shadow.5, man/su.1, man/suauth.5, man/sulogin.8, man/useradd.8, man/userdel.8, man/usermod.8, Makefile.in, aclocal.m4, config.h.in, configure, install-sh, mkinstalldirs, stamp-h.in, Makefile.am, README, acconfig.h, configure.in, libmisc/Makefile.in, libmisc/Makefile.am, libmisc/addgrps.c:
* contrib/Makefile.in, contrib/Makefile.am, contrib/README, contrib/adduser.c, contrib/pwdauth.c, doc/ANNOUNCE, doc/CHANGES, doc/Makefile.in, doc/README.sun4, doc/automake-1.0.diff, doc/console.c.spec, doc/HOWTO, doc/LICENSE, doc/Makefile.am, doc/README, doc/README.limits, doc/README.linux, doc/WISHLIST, etc/Makefile.in, etc/Makefile.am, etc/login.access, etc/login.defs, etc/login.defs.linux, old/Makefile.in, src/patchlevel.h, src/pwconv5.c, src/scologin.c, src/chage.c, src/chfn.c, src/chsh.c, src/expiry.c, src/gpasswd.c, src/groups.c, src/grpconv.c, src/id.c, src/login.c, src/newgrp.c, src/passwd.c, src/pwconv.c, src/pwunconv.c, src/su.c, src/sulogin.c, lib/dialup.h, lib/grdbm.c, lib/grent.c, lib/gsdbm.c, lib/lastlog_.h, lib/md5.c, lib/md5.h, lib/md5crypt.c, lib/mkdir.c, lib/putgrent.c, lib/putpwent.c, lib/putspent.c, lib/pwdbm.c, lib/pwent.c, lib/rename.c, lib/rmdir.c, lib/shadow_.h, lib/spdbm.c, lib/strdup.c, lib/strstr.c, lib/defines.h, lib/faillog.h, lib/getdef.h, lib/groupio.h, lib/grpack.c, lib/gshadow_.h, lib/gspack.c, lib/port.h, lib/prototypes.h, lib/pwauth.h, lib/pwio.h, lib/pwpack.c, lib/rcsid.h, lib/sgetgrent.c, lib/sgetpwent.c, lib/sgetspent.c, lib/sgroupio.h, lib/shadow.c, lib/shadowio.c, lib/shadowio.h, lib/sppack.c, lib/utent.c, src/Makefile.in, src/dpasswd.c, src/Makefile.am, src/chpasswd.c, src/faillog.c, src/groupadd.c, src/groupdel.c, src/groupmod.c, src/grpck.c, src/lastlog.c, src/logoutd.c, src/mkpasswd.c, src/newusers.c, src/pwck.c, src/useradd.c, src/userdel.c, src/usermod.c, lib/Makefile.in, lib/dialchk.c, lib/dialup.c, lib/rad64.c, lib/Makefile.am, lib/commonio.c, lib/encrypt.c, lib/fputsx.c, lib/getdef.c, lib/getpass.c, lib/groupio.c, lib/gshadow.c, lib/lockpw.c, lib/port.c, lib/pwauth.c, lib/pwio.c, lib/sgroupio.c, libmisc/login_access.c, libmisc/login_desrpc.c, libmisc/login_krb.c, libmisc/suauth.c, libmisc/age.c, libmisc/basename.c, libmisc/chkname.c, libmisc/chowndir.c, libmisc/chowntty.c, libmisc/console.c, libmisc/copydir.c, libmisc/entry.c, libmisc/env.c, libmisc/failure.c, libmisc/fields.c, libmisc/hushed.c, libmisc/isexpired.c, libmisc/limits.c, libmisc/list.c, libmisc/log.c, libmisc/loginprompt.c, libmisc/mail.c, libmisc/motd.c, libmisc/obscure.c, libmisc/pwd2spwd.c, libmisc/rlogin.c, libmisc/salt.c, libmisc/setugid.c, libmisc/setup.c, libmisc/setupenv.c, libmisc/shell.c, libmisc/strtoday.c, libmisc/sub.c, libmisc/sulog.c, libmisc/ttytype.c, libmisc/tz.c, libmisc/ulimit.c, libmisc/utmp.c, libmisc/valid.c, libmisc/xmalloc.c, man/Makefile.in, man/dpasswd.8, man/pwauth.8, man/Makefile.am, man/chage.1, man/chfn.1, man/chpasswd.8, man/chsh.1, man/faillog.5, man/faillog.8, man/gpasswd.1, man/groupadd.8, man/groupdel.8, man/groupmod.8, man/groups.1, man/grpck.8, man/id.1, man/lastlog.8, man/login.1, man/login.access.5, man/login.defs.5, man/logoutd.8, man/mkpasswd.8, man/newgrp.1, man/newusers.8, man/passwd.1, man/passwd.5, man/porttime.5, man/pw_auth.3, man/pwck.8, man/pwconv.8, man/pwunconv.8, man/shadow.3, man/shadow.5, man/su.1, man/suauth.5, man/sulogin.8, man/useradd.8, man/userdel.8, man/usermod.8, Makefile.in, aclocal.m4, config.h.in, configure, install-sh, mkinstalldirs, stamp-h.in, Makefile.am, README, acconfig.h, configure.in, libmisc/Makefile.in, libmisc/Makefile.am, libmisc/addgrps.c:
New file.

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -107,17 +107,16 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBCRACK = @LIBCRACK@
LIBCRYPT = @LIBCRYPT@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBMD = @LIBMD@
LIBOBJS = @LIBOBJS@
LIBPAM = @LIBPAM@
LIBS = @LIBS@
LIBSELINUX = @LIBSELINUX@
LIBSKEY = @LIBSKEY@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
@ -270,7 +269,13 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -282,7 +287,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@ -290,7 +295,13 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@ -311,7 +322,7 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \

62
NEWS
View File

@ -1,4 +1,62 @@
$Id: NEWS,v 1.104 2005/01/21 20:55:46 kloczek Exp $
$Id: NEWS,v 1.147 2005/04/25 10:39:48 kloczek Exp $
shadow-4.0.7 -> shadow-4.0.8
*** general:
- remove not working OPIE and SKEY support,
- chage, useradd, usermod: reduce multiple OPENLOG() calls,
- passwd: fix #61313 Debian bug: "passwd -S root" (as a normal user) should not
display "You may not change the password for root.",
- vipw: fixed race condition (Debian #242407 bug; fix by Alexander Gattin
<arg@online.com.ua>),
- configure.in: add using AC_GNU_SOURCE macro for kill compilation warnings about
implicit declaration of function `fseeko',
- faillog: changed faillog record display format for allow fit in 80 columns all
faillog atributies,
- removed NDBM code (unused),
- fixed use of SU_WHEEL_ONLY in su. Now su realy is avalaible for wheel group
members. Thanks to Mike Frysinger <vapier@gentoo.org> for report:
http://bugs.gentoo.org/show_bug.cgi?id=80345
- drop never finished kerberos and des_rpc support (for kerberos support back firs
must be prepared modularization),
- fixed UTMP path detection (by Kelledin <kelledin@users.sf.net>),
- useradd: rewrited group count to dynamic (by John Newbigin
<jnewbigin@ict.swin.edu.au>),
- login: fixed create lastlog entry fo users never loged in on non-PAM
variant of login (fix by <oracular@ziplip.com>),
- remove handle login.defs::NOLOGIN_STR (never used),
- useradd: fixes a potential security problem when mailbox is created in
useradd.
Patch and comment by Koblinger Egmont <egmont@uhulinux.hu>:
Only two arguments are passed to the open() call though it expects three
because O_CREAT is present. Hence the permission of the file first becomes
some random garbage found on the stack, and an attacker can perhaps open
this file and hold it open for reading or writing before the proper
fchmod() is executed. (Actually, we could also pass the final "mode" to
the open() call and then save the consequent fchmod().)
- SELinux changes: added changes in chage, chfn, chsh, passwd for allow
construct more grained user password/accuunt properties on SELinux
policies level. Patch originally based on RH changes (submited by Chris
PeBenito <pebenito@gentoo.org>),
- added SELinux changes: in libmisc/copydir.c (based on Fedora patch),
- updated translations: cs, da, es, eu, fi, fr, it, ko, nl, pl, pt, sk, uk,
- added new translations: tl,
- reindent all source code using -l80,
*** documentation:
- it man pages (by Danilo Piazzalunga <danilopiazza@libero.it>):
-- updated: chfn.1, chsh.1, groups.1, grpck.8, grpconv.8,
grpunconv.8, id.1, lastlog.8, login.1, newgrp.1, pwunconv.8, shadow.5,
vigr.8, vipw.8,
-- new: chage.1, chpasswd.8, expiry.1, faillog.5, faillog.8, getspnam.3,
logoutd.8, porttime.5, pwck.8, shadow.3, shadowconfig.8, su.1,
- passwd(1): fix #160477 Debian bug: improve -S output description,
- newgrp(1): fix #251926, #166173, #113191 Debian bugs: explain why editing /etc/group
(without gshadow) doesn't permit to use newgrp,
- newgrp(1): newgrp uses /bin/sh (not bash),
- faillog(8): updated after rewrite faillog command for use getopt_long(),
- 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>),
- usermod(8): fixed #302388 Debian bug: added separated -o option description,
shadow-4.0.6 -> shadow-4.0.7
@ -10,7 +68,7 @@ shadow-4.0.6 -> shadow-4.0.7
- added ro, sq translations (from Debian resources),
- fixed large file support in lastlog and faillog:
-- added AC_SYS_LARGEFILE macro to autoconf,
-- use fseeko() instead fseek() and remove casting file ofsets to unsigned
-- use fseeko() instead fseek() and remove casting file offsets to unsigned
long.
- lastlog:
-- rewrited source code using the same style as in chpasswd.c,

6
TODO
View File

@ -5,9 +5,9 @@
ALL:
- move base passwd/shadow/group/gshadow operation to module for allow write
diffrent backend modules for db, NIS, LDAP and others. Default backend it
will be choose depending on /etc/nsswitch.conf and allow overwride this by
-r <repository> options (where the <repository> can be file, db, nis
nisplus, ldap .. like on /etc/nsswitch.conf in service column).
will be goot if will be choosen depending on /etc/nsswitch.conf and allow
overwride this by -r <repository> options (where the <repository> can be
file, db, nis nisplus, ldap .. like on /etc/nsswitch.conf in service column).
passwd have old piece of code with handling -r option and it will be good
finish this and propagate on other shadow tools for allow operate on other
user databases by well known tools.

2015
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

12
config.guess vendored
View File

@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
timestamp='2004-11-12'
timestamp='2004-09-07'
# 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
@ -319,9 +319,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:OS/390:*:*)
echo i370-ibm-openedition
exit 0 ;;
*:z/VM:*:*)
echo s390-ibm-zvmoe
exit 0 ;;
*:OS400:*:*)
echo powerpc-ibm-os400
exit 0 ;;
@ -345,7 +342,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
exit 0 ;;
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
DRS?6000:UNIX_SV:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7 && exit 0 ;;
esac ;;
@ -1250,10 +1247,7 @@ EOF
A*) echo alpha-dec-vms && exit 0 ;;
I*) echo ia64-dec-vms && exit 0 ;;
V*) echo vax-dec-vms && exit 0 ;;
esac ;;
*:XENIX:*:SysV)
echo i386-pc-xenix
exit 0 ;;
esac
esac
#echo '(No uname command or uname output not recognized.)' 1>&2

View File

@ -95,6 +95,14 @@
/* Define to 1 if you have the `a64l' function. */
#undef HAVE_A64L
/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
#undef HAVE_CFLOCALECOPYCURRENT
/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
the CoreFoundation framework. */
#undef HAVE_CFPREFERENCESCOPYAPPVALUE
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
#undef HAVE_DCGETTEXT
@ -118,9 +126,6 @@
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the `fseeko' function. */
#undef HAVE_FSEEKO
/* Define to 1 if you have the `fsync' function. */
#undef HAVE_FSYNC
@ -330,9 +335,6 @@
/* Define to 1 if you have the <utmp.h> header file. */
#undef HAVE_UTMP_H
/* locale directory */
#undef LOCALEDIR
/* Name of package */
#undef PACKAGE
@ -384,6 +386,11 @@
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES

21
config.sub vendored
View File

@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
timestamp='2004-11-30'
timestamp='2004-08-29'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -267,7 +267,7 @@ case $basic_machine in
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
| x86 | xscale | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
@ -343,8 +343,8 @@ case $basic_machine in
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
| xtensa-* \
| ymp-* \
| z8k-*)
;;
@ -489,10 +489,6 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
@ -1033,10 +1029,6 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
xbox)
basic_machine=i686-pc
os=-mingw32
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
@ -1110,7 +1102,7 @@ case $basic_machine in
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
*-unknown | noarch-*)
*-unknown)
# Make sure to match an already-canonicalized machine name.
;;
*)
@ -1305,9 +1297,6 @@ case $os in
-kaos*)
os=-kaos
;;
-zvmoe)
os=-zvmoe
;;
-none)
;;
*)

1176
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,14 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT
AM_INIT_AUTOMAKE(shadow, 4.0.7)
AM_INIT_AUTOMAKE(shadow, 4.0.8)
AC_CONFIG_HEADERS([config.h])
dnl Some hacks...
test "$prefix" = "NONE" && prefix="/usr"
test "$prefix" = "/usr" && exec_prefix=""
AC_GNU_SOURCE
AM_DISABLE_SHARED
AM_ENABLE_STATIC
@ -32,7 +34,7 @@ AC_CHECK_HEADERS(errno.h fcntl.h limits.h unistd.h sys/time.h utmp.h \
utime.h ulimit.h sys/resource.h gshadow.h shadow.h lastlog.h \
locale.h rpc/key_prot.h)
AC_CHECK_FUNCS(a64l fchmod fchown fseeko fsync getgroups gethostname getspnam \
AC_CHECK_FUNCS(a64l fchmod fchown fsync getgroups gethostname getspnam \
gettimeofday getusershell getutent initgroups lchown lckpwdf lstat \
memcpy memset setgroups sigaction strchr updwtmp updwtmpx)
AC_SYS_LARGEFILE
@ -97,7 +99,6 @@ fi
dnl Checks for library functions.
AC_TYPE_GETGROUPS
AC_PROG_GCC_TRADITIONAL
AC_TYPE_SIGNAL
AC_FUNC_UTIME_NULL
AC_FUNC_STRFTIME
@ -152,7 +153,7 @@ if test $shadow_cv_mailfile != none; then
fi
AC_CACHE_CHECK([location of utmp], shadow_cv_utmpdir,
[for utmpdir in /var/run /var/adm /usr/adm /etc none; do
[for shadow_cv_utmpdir in /var/run /var/adm /usr/adm /etc none; do
if test -f $shadow_cv_utmpdir/utmp; then
break
fi
@ -192,14 +193,11 @@ dnl (unlike many systems which have a limit of 8 characters), and can
dnl be interrupted with Ctrl-C (unlike Linux libc).
AC_DEFINE(getpass, libshadow_getpass)
AC_ARG_ENABLE(desrpc, [ --enable-desrpc try to use secure RPC in login (default if found)])
AC_ARG_ENABLE(shadowgrp, [ --enable-shadowgrp enable shadow group support [default=yes]])
AC_ARG_WITH(libcrack, [ --with-libcrack try to use libcrack (default if found)])
AC_ARG_WITH(libcrypt, [ --with-libcrypt try to use libcrypt (default if found)])
AC_ARG_WITH(libopie, [ --with-libopie use libopie for OPIE support])
AC_ARG_WITH(libpam, [ --with-libpam use libpam for PAM support])
AC_ARG_WITH(libskey, [ --with-libskey use libskey for S/Key support])
AC_ARG_WITH(selinux, [ --with-selinux use SELinux support])
dnl Check for some functions in libc first, only if not found check for
@ -210,15 +208,6 @@ AC_SEARCH_LIBS(inet_ntoa, inet)
AC_SEARCH_LIBS(socket, socket)
AC_SEARCH_LIBS(gethostbyname, nsl)
dnl XXX - getsecretkey() causes login to hang for 5 minutes on at least
dnl one RH 4.0 system. Use --disable-desrpc if you have this problem.
dnl Reported by Mohan Khurana <mohan@stealth.net>.
if test "$enable_desrpc" != "no" -a "$ac_cv_header_rpc_key_prot_h" = "yes" ; then
AC_CHECK_FUNC(getsecretkey, AC_DEFINE(DES_RPC),
AC_CHECK_LIB(rpcsvc, getsecretkey, AC_DEFINE(DES_RPC)))
fi
if test "$enable_shadowgrp" != "no"; then
AC_DEFINE(SHADOWGRP)
fi
@ -236,17 +225,8 @@ if test "$with_libcrack" != "no"; then
AC_CHECK_LIB(crack, FascistHistoryPw, AC_DEFINE(HAVE_LIBCRACK_PW))
fi
AC_SUBST(LIBSKEY)
AC_SUBST(LIBMD)
if test "$with_libskey" = "yes"; then
AC_CHECK_LIB(md, MD5Init, LIBMD=-lmd)
AC_CHECK_LIB(skey, skeychallenge, AC_DEFINE(SKEY) LIBSKEY=-lskey, [], $LIBMD $LIBCRYPT)
elif test "$with_libopie" = "yes"; then
AC_CHECK_LIB(opie, opiechallenge, AC_DEFINE(OPIE) LIBSKEY=-lopie, [], $LIBCRYPT)
fi
if test "$with_selinux" = "yes"; then
AC_CHECK_LIB(selinux, is_selinux_enabled, [LIBSELINUX="-lselinux"], [SELinuux enabled but libselinux not found])
AC_CHECK_LIB(selinux, is_selinux_enabled, [LIBSELINUX="-lselinux"], [SELinux enabled but libselinux not found])
AC_SUBST(LIBSELINUX)
AC_CHECK_HEADERS(selinux/selinux.h, [], [selinux/selinux.h is missing])
AC_DEFINE(WITH_SELINUX, 1, [Build shadow with SELinux support])
@ -260,23 +240,20 @@ if test "$with_libpam" = "yes"; then
AC_CHECK_LIB(pam_misc, main,
[LIBPAM="$LIBPAM -lpam_misc"],
AC_MSG_ERROR(libpam_misc is missing)
)]
)],
[AC_MSG_CHECKING(use login access checking if PAM not used)
AC_DEFINE(LOGIN_ACCESS)
AC_MSG_RESULT(yes)]
)
AC_MSG_CHECKING(use login and su access checking if PAM not used)
AC_MSG_RESULT(no)
else
AC_MSG_CHECKING(use login and su access checking if PAM not used)
AC_DEFINE(LOGIN_ACCESS)
AC_DEFINE(SU_ACCESS)
AC_MSG_RESULT(yes)
fi
AM_GNU_GETTEXT_VERSION(0.12.1)
AM_GNU_GETTEXT([external])
AC_DEFINE_UNQUOTED(LOCALEDIR, "${datadir}/locale", [locale directory])
AC_CONFIG_FILES([
Makefile

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -85,17 +85,16 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBCRACK = @LIBCRACK@
LIBCRYPT = @LIBCRYPT@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBMD = @LIBMD@
LIBOBJS = @LIBOBJS@
LIBPAM = @LIBPAM@
LIBS = @LIBS@
LIBSELINUX = @LIBSELINUX@
LIBSKEY = @LIBSKEY@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
@ -185,9 +184,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu contrib/Makefile
$(AUTOMAKE) --foreign contrib/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \

View File

@ -1,176 +0,0 @@
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes a while. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made.
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.

View File

@ -2,5 +2,5 @@
# and also cooperate to make a distribution for `make dist'
EXTRA_DIST = HOWTO LICENSE LSM README \
README.limits README.linux README.mirrors README.nls README.pam \
README.platforms README.sun4 WISHLIST console.c.spec.txt cracklib26.diff
README.limits README.linux README.nls README.pam \
README.platforms WISHLIST console.c.spec.txt cracklib26.diff

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -39,8 +39,7 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = doc
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
INSTALL
DIST_COMMON = README $(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) \
@ -86,17 +85,16 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBCRACK = @LIBCRACK@
LIBCRYPT = @LIBCRYPT@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBMD = @LIBMD@
LIBOBJS = @LIBOBJS@
LIBPAM = @LIBPAM@
LIBS = @LIBS@
LIBSELINUX = @LIBSELINUX@
LIBSKEY = @LIBSKEY@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
@ -171,8 +169,8 @@ sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
EXTRA_DIST = HOWTO LICENSE LSM README \
README.limits README.linux README.mirrors README.nls README.pam \
README.platforms README.sun4 WISHLIST console.c.spec.txt cracklib26.diff
README.limits README.linux README.nls README.pam \
README.platforms WISHLIST console.c.spec.txt cracklib26.diff
all: all-am
@ -186,9 +184,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/Makefile
$(AUTOMAKE) --foreign doc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \

View File

@ -1,60 +0,0 @@
Primary sites for the Shadow Password Suite for Linux:
ftp://piast.t19.ds.pwr.wroc.pl/pub/linux/shadow/
ftp://ftp.ists.pwr.wroc.pl/pub/linux/shadow/
http://www.itnet.pl/amelektr/linux/shadow/
I upload latest versions here (and sometimes also to sunsite, but not
every new release). If you are not in Poland, these sites may be slow
for you - please use a mirror near you.
Thanks to several people who offered to mirror this archive. Mirror
sites known to me (with addresses of people who submitted them to
this list) are listed below. If you want your site to be added here,
please let me know (specify the URL, and contact e-mail address).
If any of these sites become way out of date and should be removed,
or if they are good but the URL changes, please let me know too.
Working mirrors that I know of, sorted by country (note: I removed
a few mirrors that didn't work when I tried to access them several
times - if any of them are still alive, please let me know):
(XXX - list may be out of date now.)
Brazil:
ftp://ftp.athena.pads.ufrj.br/pub/linux/shadow/
Rafael Jorge Csura Szendrodi <szendro@santuario.pads.ufrj.br>
Czech Republic:
ftp://ftp.gts.cz/pub/linux/security/shadow/
Martin Mares <mj@mj.gts.cz>
Greece:
ftp://linux.forthnet.gr/pub/linux/shadow/
http://linux.forthnet.gr/pub/linux/shadow/
Sotiris Tsimbonis <stsimb@forthnet.gr>
Poland:
ftp://xenium.pdi.net/pub/Crypto/shadow/
Marcin E. Bednarz <specula@pdi.net>
ftp://giswitch.sggw.waw.pl/pub/Linux/shadow/
Marek Czajko <mcj@giswitch.sggw.waw.pl>
Romania:
ftp://ftp.kappa.ro/pub/Linux/Security/shadow/
Mircea Damian <dmircea@kappa.ro>
United States:
ftp://ftp.cqc.com/pub/mirrors/linux-shadow/
pacman@cqc.com
Thanks,
Marek Michalkiewicz <marekm@linux.org.pl>
(or marekm@piast.t19.ds.pwr.wroc.pl, or marekm@bach.ists.pwr.wroc.pl)

View File

@ -1,39 +0,0 @@
[ $Id: README.sun4,v 1.1.1.1 1996/08/10 07:59:52 marekm Exp $ ]
You'll need to do the following to get the shadow password dist to
compile on a sun 4.1.1 system.
copy Makefile.sun4 to Makefile, and make any system specific changes.
copy config.h.sun4 config.h, and make any system specific changes.
You may have to edit the pwd.h.m4 file by hand, as the sunos m4 may
not grok the pwd.h.m4 file corectly. If you have the /usr/5bin/m4,
substitute that. Be sure to delete the pwd.h file before typeing
'make' again, as there will be an empty one left from the failed attempt
to use the standard sunos m4.
type 'make'. If everything goes well, then type 'make install'
If using csh, then type 'rehash'. cd to the /etc directory and type
'pwconv'. This will create two files, nshadow and npasswd.
now type 'mkpasswd -f nshadow' and 'mkpasswd -f npasswd'. This will
create the shadow password file.
Note: The shadow group stuff does not work with sunos.
Note: ftp will still use the old password file.
Note: if you run suns pcnfs, be aware that it will still be looking at the
old password file as well. I may work out a patch for this, as I am
fairly certain the stuff on the sun side comes with source.
Note: I have compiled this package with the standard c compiler and
suns unbundled c compiler at an optomization level of 2 in
both casses. Haven't tried gcc yet, so I don't know wether it
works. Same goes for suns C++ compiler.
Note: has been compiled on a sun 3/75 running sunos 4.1.1. Should compile
fine on sun 4's running 4.1.1, and may compile on suns running
4.1. Have no idea what sort of success people will have that
are running 4.03 and older versions.

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -94,17 +94,16 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBCRACK = @LIBCRACK@
LIBCRYPT = @LIBCRYPT@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBMD = @LIBMD@
LIBOBJS = @LIBOBJS@
LIBPAM = @LIBPAM@
LIBS = @LIBS@
LIBSELINUX = @LIBSELINUX@
LIBSKEY = @LIBSKEY@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
@ -199,9 +198,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu etc/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign etc/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu etc/Makefile
$(AUTOMAKE) --foreign etc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@ -237,7 +236,13 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -249,7 +254,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@ -257,7 +262,13 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@ -278,7 +289,7 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \

View File

@ -1,7 +1,7 @@
#
# /etc/login.defs - Configuration control definitions for the login package.
#
# $Id: login.defs,v 1.5 2003/05/04 20:09:43 kloczek Exp $
# $Id: login.defs,v 1.6 2005/03/07 10:09:06 kloczek Exp $
#
# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH.
# If unspecified, some arbitrary (and possibly incorrect) value will
@ -128,12 +128,6 @@ MAIL_DIR /var/mail
#HUSHLOGIN_FILE .hushlogin
HUSHLOGIN_FILE /etc/hushlogins
#
# If defined, the presence of this value in an /etc/passwd "shell" field will
# disable logins for that user, although "su" will still be allowed.
#
NOLOGIN_STR NOLOGIN
#
# If defined, either a TZ environment parameter spec or the
# fully-rooted pathname of a file containing such a spec.

View File

@ -1,7 +1,7 @@
#
# /etc/login.defs - Configuration control definitions for the login package.
#
# $Id: login.defs.linux,v 1.14 2003/05/04 20:09:43 kloczek Exp $
# $Id: login.defs.linux,v 1.15 2005/03/07 10:09:06 kloczek Exp $
#
# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH.
# If unspecified, some arbitrary (and possibly incorrect) value will
@ -138,14 +138,6 @@ MAIL_DIR /var/spool/mail
HUSHLOGIN_FILE .hushlogin
#HUSHLOGIN_FILE /etc/hushlogins
#
# If defined, the presence of this value in an /etc/passwd "shell" field will
# disable logins for that user, although "su" will still be allowed.
#
# XXX this does not seem to be implemented yet... --marekm
# no, it was implemented but I ripped it out ;-) -- jfh
NOLOGIN_STR NOLOGIN
#
# If defined, either a TZ environment parameter spec or the
# fully-rooted pathname of a file containing such a spec.

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -85,17 +85,16 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBCRACK = @LIBCRACK@
LIBCRYPT = @LIBCRYPT@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBMD = @LIBMD@
LIBOBJS = @LIBOBJS@
LIBPAM = @LIBPAM@
LIBS = @LIBS@
LIBSELINUX = @LIBSELINUX@
LIBSKEY = @LIBSKEY@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
@ -195,9 +194,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu etc/pam.d/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign etc/pam.d/Makefile'; \
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
@case '$?' in \

View File

@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2004-12-17.09
scriptversion=2004-09-10.20
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@ -213,7 +213,7 @@ do
fi
# This sed command emulates the dirname command.
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
@ -226,8 +226,7 @@ do
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
shift
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=
@ -296,7 +295,7 @@ do
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit 1
(exit 1); exit
}
else
:
@ -307,12 +306,12 @@ do
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
}
}
fi || { (exit 1); exit 1; }
fi || { (exit 1); exit; }
done
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit 0
(exit 0); exit
}
# Local variables:

1
lib/.indent.pro vendored
View File

@ -2,3 +2,4 @@
-i8
-bad
-pcs
-l80

View File

@ -6,7 +6,7 @@ DEFS =
lib_LTLIBRARIES = libshadow.la
libshadow_la_LDFLAGS = -version-info 0:0:0
libshadow_la_LIBADD = $(INTLLIBS) $(LIBCRYPT) $(LIBSKEY) $(LIBMD) $(LIBSELINUX)
libshadow_la_LIBADD = $(INTLLIBS) $(LIBCRYPT) $(LIBSELINUX)
libshadow_la_SOURCES = \
commonio.c \
@ -32,7 +32,6 @@ libshadow_la_SOURCES = \
pwauth.h \
pwio.c \
pwio.h \
rad64.c \
rcsid.h \
sgetgrent.c \
sgetpwent.c \
@ -50,6 +49,5 @@ libshadow_la_SOURCES = \
EXTRA_DIST = \
.indent.pro \
grdbm.c gsdbm.c pwdbm.c spdbm.c \
grpack.c gspack.c pwpack.c sppack.c \
gshadow_.h

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -58,12 +58,11 @@ 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)
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
pwauth.lo pwio.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
@ -116,17 +115,16 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBCRACK = @LIBCRACK@
LIBCRYPT = @LIBCRYPT@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBMD = @LIBMD@
LIBOBJS = @LIBOBJS@
LIBPAM = @LIBPAM@
LIBS = @LIBS@
LIBSELINUX = @LIBSELINUX@
LIBSKEY = @LIBSKEY@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
@ -203,7 +201,7 @@ target_alias = @target_alias@
AUTOMAKE_OPTIONS = 1.0 foreign
lib_LTLIBRARIES = libshadow.la
libshadow_la_LDFLAGS = -version-info 0:0:0
libshadow_la_LIBADD = $(INTLLIBS) $(LIBCRYPT) $(LIBSKEY) $(LIBMD) $(LIBSELINUX)
libshadow_la_LIBADD = $(INTLLIBS) $(LIBCRYPT) $(LIBSELINUX)
libshadow_la_SOURCES = \
commonio.c \
commonio.h \
@ -228,7 +226,6 @@ libshadow_la_SOURCES = \
pwauth.h \
pwio.c \
pwio.h \
rad64.c \
rcsid.h \
sgetgrent.c \
sgetpwent.c \
@ -246,7 +243,6 @@ libshadow_la_SOURCES = \
# sources for dbm support (not yet used)
EXTRA_DIST = \
.indent.pro \
grdbm.c gsdbm.c pwdbm.c spdbm.c \
grpack.c gspack.c pwpack.c sppack.c \
gshadow_.h
@ -331,7 +327,6 @@ distclean-compile:
@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@

View File

@ -2,8 +2,7 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: commonio.c,v 1.27 2004/11/02 19:01:12 kloczek Exp $")
RCSID ("$Id: commonio.c,v 1.28 2005/03/31 05:14:49 kloczek Exp $")
#include "defines.h"
#include <sys/stat.h>
#include <utime.h>
@ -18,30 +17,30 @@ RCSID("$Id: commonio.c,v 1.27 2004/11/02 19:01:12 kloczek Exp $")
#endif
#ifdef WITH_SELINUX
#include <selinux/selinux.h>
static security_context_t old_context=NULL;
static security_context_t old_context = NULL;
#endif
#include "commonio.h"
/* local function prototypes */
static int check_link_count(const char *);
static int do_lock_file(const char *, const char *);
static FILE *fopen_set_perms(const char *, const char *, const struct stat *);
static int create_backup(const char *, FILE *);
static void free_linked_list(struct commonio_db *);
static void add_one_entry(struct commonio_db *, struct commonio_entry *);
static int name_is_nis(const char *);
static int write_all(const struct commonio_db *);
static struct commonio_entry *find_entry_by_name(struct commonio_db *, const char *);
static int check_link_count (const char *);
static int do_lock_file (const char *, const char *);
static FILE *fopen_set_perms (const char *, const char *, const struct stat *);
static int create_backup (const char *, FILE *);
static void free_linked_list (struct commonio_db *);
static void add_one_entry (struct commonio_db *, struct commonio_entry *);
static int name_is_nis (const char *);
static int write_all (const struct commonio_db *);
static struct commonio_entry *find_entry_by_name (struct commonio_db *,
const char *);
static int lock_count = 0;
static int nscd_need_reload = 0;
static int
check_link_count(const char *file)
static int check_link_count (const char *file)
{
struct stat sb;
if (stat(file, &sb) != 0)
if (stat (file, &sb) != 0)
return 0;
if (sb.st_nlink != 2)
@ -51,8 +50,7 @@ check_link_count(const char *file)
}
static int
do_lock_file(const char *file, const char *lock)
static int do_lock_file (const char *file, const char *lock)
{
int fd;
int pid;
@ -60,100 +58,99 @@ do_lock_file(const char *file, const char *lock)
int retval;
char buf[32];
if ((fd = open(file, O_CREAT|O_EXCL|O_WRONLY, 0600)) == -1)
if ((fd = open (file, O_CREAT | O_EXCL | O_WRONLY, 0600)) == -1)
return 0;
pid = getpid();
snprintf(buf, sizeof buf, "%d", pid);
len = strlen(buf) + 1;
if (write(fd, buf, len) != len) {
close(fd);
unlink(file);
pid = getpid ();
snprintf (buf, sizeof buf, "%d", pid);
len = strlen (buf) + 1;
if (write (fd, buf, len) != len) {
close (fd);
unlink (file);
return 0;
}
close(fd);
close (fd);
if (link(file, lock) == 0) {
retval = check_link_count(file);
unlink(file);
if (link (file, lock) == 0) {
retval = check_link_count (file);
unlink (file);
return retval;
}
if ((fd = open(lock, O_RDWR)) == -1) {
unlink(file);
if ((fd = open (lock, O_RDWR)) == -1) {
unlink (file);
errno = EINVAL;
return 0;
}
len = read(fd, buf, sizeof(buf) - 1);
close(fd);
len = read (fd, buf, sizeof (buf) - 1);
close (fd);
if (len <= 0) {
unlink(file);
unlink (file);
errno = EINVAL;
return 0;
}
buf[len] = '\0';
if ((pid = strtol(buf, (char **) 0, 10)) == 0) {
unlink(file);
if ((pid = strtol (buf, (char **) 0, 10)) == 0) {
unlink (file);
errno = EINVAL;
return 0;
}
if (kill(pid, 0) == 0) {
unlink(file);
if (kill (pid, 0) == 0) {
unlink (file);
errno = EEXIST;
return 0;
}
if (unlink(lock) != 0) {
unlink(file);
if (unlink (lock) != 0) {
unlink (file);
return 0;
}
retval = 0;
if (link(file, lock) == 0 && check_link_count(file))
if (link (file, lock) == 0 && check_link_count (file))
retval = 1;
unlink(file);
unlink (file);
return retval;
}
static FILE *
fopen_set_perms(const char *name, const char *mode, const struct stat *sb)
static FILE *fopen_set_perms (const char *name, const char *mode,
const struct stat *sb)
{
FILE *fp;
mode_t mask;
mask = umask(0777);
fp = fopen(name, mode);
umask(mask);
mask = umask (0777);
fp = fopen (name, mode);
umask (mask);
if (!fp)
return NULL;
#ifdef HAVE_FCHOWN
if (fchown(fileno(fp), sb->st_uid, sb->st_gid))
if (fchown (fileno (fp), sb->st_uid, sb->st_gid))
goto fail;
#else
if (chown(name, sb->st_mode))
if (chown (name, sb->st_mode))
goto fail;
#endif
#ifdef HAVE_FCHMOD
if (fchmod(fileno(fp), sb->st_mode & 0664))
if (fchmod (fileno (fp), sb->st_mode & 0664))
goto fail;
#else
if (chmod(name, sb->st_mode & 0664))
if (chmod (name, sb->st_mode & 0664))
goto fail;
#endif
return fp;
fail:
fclose(fp);
unlink(name);
fail:
fclose (fp);
unlink (name);
return NULL;
}
static int
create_backup(const char *backup, FILE *fp)
static int create_backup (const char *backup, FILE * fp)
{
struct stat sb;
struct utimbuf ub;
@ -161,38 +158,37 @@ create_backup(const char *backup, FILE *fp)
int c;
mode_t mask;
if (fstat(fileno(fp), &sb))
if (fstat (fileno (fp), &sb))
return -1;
mask = umask(077);
bkfp = fopen(backup, "w");
umask(mask);
mask = umask (077);
bkfp = fopen (backup, "w");
umask (mask);
if (!bkfp)
return -1;
/* TODO: faster copy, not one-char-at-a-time. --marekm */
c = 0;
if (fseek(fp, 0, SEEK_SET) == 0)
while ((c = getc(fp)) != EOF) {
if (putc(c, bkfp) == EOF)
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);
if (c != EOF || ferror (fp) || fflush (bkfp)) {
fclose (bkfp);
return -1;
}
if (fclose(bkfp))
if (fclose (bkfp))
return -1;
ub.actime = sb.st_atime;
ub.modtime = sb.st_mtime;
utime(backup, &ub);
utime (backup, &ub);
return 0;
}
static void
free_linked_list(struct commonio_db *db)
static void free_linked_list (struct commonio_db *db)
{
struct commonio_entry *p;
@ -201,34 +197,31 @@ free_linked_list(struct commonio_db *db)
db->head = p->next;
if (p->line)
free(p->line);
free (p->line);
if (p->eptr)
db->ops->free(p->eptr);
db->ops->free (p->eptr);
free(p);
free (p);
}
db->tail = NULL;
}
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);
return 1;
}
int
commonio_present(const struct commonio_db *db)
int commonio_present (const struct commonio_db *db)
{
return (access(db->filename, F_OK) == 0);
return (access (db->filename, F_OK) == 0);
}
int
commonio_lock_nowait(struct commonio_db *db)
int commonio_lock_nowait (struct commonio_db *db)
{
char file[1024];
char lock[1024];
@ -236,9 +229,9 @@ commonio_lock_nowait(struct commonio_db *db)
if (db->locked)
return 1;
snprintf(file, sizeof file, "%s.%ld", db->filename, (long) getpid());
snprintf(lock, sizeof lock, "%s.lock", db->filename);
if (do_lock_file(file, lock)) {
snprintf (file, sizeof file, "%s.%ld", db->filename, (long) getpid ());
snprintf (lock, sizeof lock, "%s.lock", db->filename);
if (do_lock_file (file, lock)) {
db->locked = 1;
lock_count++;
return 1;
@ -247,8 +240,7 @@ commonio_lock_nowait(struct commonio_db *db)
}
int
commonio_lock(struct commonio_db *db)
int commonio_lock (struct commonio_db *db)
{
#ifdef HAVE_LCKPWDF
/*
@ -262,15 +254,15 @@ commonio_lock(struct commonio_db *db)
* (no retries, it should always succeed).
*/
if (lock_count == 0) {
if (lckpwdf() == -1)
return 0; /* failure */
if (lckpwdf () == -1)
return 0; /* failure */
}
if (commonio_lock_nowait(db))
return 1; /* success */
if (commonio_lock_nowait (db))
return 1; /* success */
ulckpwdf();
return 0; /* failure */
ulckpwdf ();
return 0; /* failure */
#else
int i;
@ -286,19 +278,18 @@ commonio_lock(struct commonio_db *db)
#endif
for (i = 0; i < LOCK_TRIES; i++) {
if (i > 0)
sleep(LOCK_SLEEP); /* delay between retries */
if (commonio_lock_nowait(db))
return 1; /* success */
sleep (LOCK_SLEEP); /* delay between retries */
if (commonio_lock_nowait (db))
return 1; /* success */
/* no unnecessary retries on "permission denied" errors */
if (geteuid() != 0)
if (geteuid () != 0)
return 0;
}
return 0; /* failure */
return 0; /* failure */
#endif
}
static void
dec_lock_count(void)
static void dec_lock_count (void)
{
if (lock_count > 0) {
lock_count--;
@ -306,48 +297,46 @@ dec_lock_count(void)
/* Tell nscd when lock count goes to zero,
if any of the files were changed. */
if (nscd_need_reload) {
nscd_flush_cache("passwd");
nscd_flush_cache("group");
nscd_flush_cache ("passwd");
nscd_flush_cache ("group");
nscd_need_reload = 0;
}
#ifdef HAVE_LCKPWDF
ulckpwdf();
ulckpwdf ();
#endif
}
}
}
int
commonio_unlock(struct commonio_db *db)
int commonio_unlock (struct commonio_db *db)
{
char lock[1024];
if (db->isopen) {
db->readonly = 1;
if (!commonio_close(db)) {
if (!commonio_close (db)) {
if (db->locked)
dec_lock_count();
dec_lock_count ();
return 0;
}
}
if (db->locked) {
if (db->locked) {
/*
* Unlock in reverse order: remove the lock file,
* then call ulckpwdf() (if used) on last unlock.
*/
db->locked = 0;
snprintf(lock, sizeof lock, "%s.lock", db->filename);
unlink(lock);
dec_lock_count();
db->locked = 0;
snprintf (lock, sizeof lock, "%s.lock", db->filename);
unlink (lock);
dec_lock_count ();
return 1;
}
return 0;
}
static void
add_one_entry(struct commonio_db *db, struct commonio_entry *p)
static void add_one_entry (struct commonio_db *db, struct commonio_entry *p)
{
p->next = NULL;
p->prev = db->tail;
@ -359,8 +348,7 @@ add_one_entry(struct commonio_db *db, struct commonio_entry *p)
}
static int
name_is_nis(const char *n)
static int name_is_nis (const char *n)
{
return (n[0] == '+' || n[0] == '-');
}
@ -375,15 +363,16 @@ name_is_nis(const char *n)
#endif
#if KEEP_NIS_AT_END
static void add_one_entry_nis(struct commonio_db *, struct commonio_entry *);
static void add_one_entry_nis (struct commonio_db *, struct commonio_entry *);
static void
add_one_entry_nis(struct commonio_db *db, struct commonio_entry *newp)
add_one_entry_nis (struct commonio_db *db, struct commonio_entry *newp)
{
struct commonio_entry *p;
for (p = db->head; p; p = p->next) {
if (name_is_nis(p->eptr ? db->ops->getname(p->eptr) : p->line)) {
if (name_is_nis
(p->eptr ? db->ops->getname (p->eptr) : p->line)) {
newp->next = p;
newp->prev = p->prev;
if (p->prev)
@ -394,16 +383,15 @@ add_one_entry_nis(struct commonio_db *db, struct commonio_entry *newp)
return;
}
}
add_one_entry(db, newp);
add_one_entry (db, newp);
}
#endif /* KEEP_NIS_AT_END */
#endif /* KEEP_NIS_AT_END */
/* Initial buffer size, as well as increment if not sufficient
(for reading very long lines in group files). */
#define BUFLEN 4096
int
commonio_open(struct commonio_db *db, int mode)
int commonio_open (struct commonio_db *db, int mode)
{
char *buf;
char *cp;
@ -429,7 +417,7 @@ commonio_open(struct commonio_db *db, int mode)
db->head = db->tail = db->cursor = NULL;
db->changed = 0;
db->fp = fopen(db->filename, db->readonly ? "r" : "r+");
db->fp = fopen (db->filename, db->readonly ? "r" : "r+");
/*
* If O_CREAT was specified and the file didn't exist, it will be
@ -442,48 +430,47 @@ 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;
}
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);
buf = (char *) malloc (buflen);
if (!buf)
goto cleanup_ENOMEM;
while (db->ops->fgets(buf, buflen, db->fp)) {
while (!(cp = strrchr(buf, '\n')) && !feof(db->fp)) {
while (db->ops->fgets (buf, buflen, db->fp)) {
while (!(cp = strrchr (buf, '\n')) && !feof (db->fp)) {
int len;
buflen += BUFLEN;
cp = (char *) realloc(buf, buflen);
cp = (char *) realloc (buf, buflen);
if (!cp)
goto cleanup_buf;
buf = cp;
len = strlen(buf);
db->ops->fgets(buf + len, buflen - len, db->fp);
len = strlen (buf);
db->ops->fgets (buf + len, buflen - len, db->fp);
}
if ((cp = strrchr(buf, '\n')))
if ((cp = strrchr (buf, '\n')))
*cp = '\0';
if (!(line = strdup(buf)))
if (!(line = strdup (buf)))
goto cleanup_buf;
if (name_is_nis(line)) {
if (name_is_nis (line)) {
eptr = NULL;
} else if ((eptr = db->ops->parse(line))) {
eptr = db->ops->dup(eptr);
} else if ((eptr = db->ops->parse (line))) {
eptr = db->ops->dup (eptr);
if (!eptr)
goto cleanup_line;
}
p = (struct commonio_entry *) malloc(sizeof *p);
p = (struct commonio_entry *) malloc (sizeof *p);
if (!p)
goto cleanup_entry;
@ -491,36 +478,36 @@ commonio_open(struct commonio_db *db, int mode)
p->line = line;
p->changed = 0;
add_one_entry(db, p);
add_one_entry (db, p);
}
free(buf);
free (buf);
if (ferror(db->fp))
if (ferror (db->fp))
goto cleanup_errno;
db->isopen = 1;
return 1;
cleanup_entry:
cleanup_entry:
if (eptr)
db->ops->free(eptr);
cleanup_line:
free(line);
cleanup_buf:
free(buf);
cleanup_ENOMEM:
db->ops->free (eptr);
cleanup_line:
free (line);
cleanup_buf:
free (buf);
cleanup_ENOMEM:
errno = ENOMEM;
cleanup_errno:
cleanup_errno:
saved_errno = errno;
free_linked_list(db);
free_linked_list (db);
#ifdef WITH_SELINUX
if (db->scontext!= NULL) {
freecon(db->scontext);
db->scontext=NULL;
if (db->scontext != NULL) {
freecon (db->scontext);
db->scontext = NULL;
}
#endif
fclose(db->fp);
fclose (db->fp);
db->fp = NULL;
errno = saved_errno;
return 0;
@ -530,7 +517,7 @@ cleanup_errno:
* Sort given db according to cmp function (usually compares uids)
*/
int
commonio_sort(struct commonio_db *db, int (*cmp)(const void *, const void *))
commonio_sort (struct commonio_db *db, int (*cmp) (const void *, const void *))
{
struct commonio_entry **entries, *ptr;
int n = 0, i;
@ -540,29 +527,29 @@ commonio_sort(struct commonio_db *db, int (*cmp)(const void *, const void *))
if (n <= 1)
return 0;
entries = malloc(n * sizeof(struct commonio_entry*));
entries = malloc (n * sizeof (struct commonio_entry *));
if (entries == NULL)
return -1;
n = 0;
for (ptr = db->head; ptr; ptr = ptr->next)
entries[n++] = ptr;
qsort(entries, n, sizeof(struct commonio_entry*), cmp);
qsort (entries, n, sizeof (struct commonio_entry *), cmp);
db->head = entries[0];
db->tail = entries[--n];
db->head->prev = NULL;
db->head->next = entries[1];
db->tail->prev = entries[n-1];
db->tail->prev = entries[n - 1];
db->tail->next = NULL;
for (i = 1; i < n; i++) {
entries[i]->prev = entries[i-1];
entries[i]->next = entries[i+1];
entries[i]->prev = entries[i - 1];
entries[i]->next = entries[i + 1];
}
free(entries);
free (entries);
db->changed = 1;
return 0;
@ -571,8 +558,7 @@ commonio_sort(struct commonio_db *db, int (*cmp)(const void *, const void *))
/*
* Sort entries in db according to order in another.
*/
int
commonio_sort_wrt(struct commonio_db *shadow, struct commonio_db *passwd)
int commonio_sort_wrt (struct commonio_db *shadow, struct commonio_db *passwd)
{
struct commonio_entry *head = NULL, *pw_ptr, *spw_ptr;
const char *name;
@ -580,34 +566,34 @@ commonio_sort_wrt(struct commonio_db *shadow, struct commonio_db *passwd)
for (pw_ptr = passwd->head; pw_ptr; pw_ptr = pw_ptr->next) {
if (pw_ptr->eptr == NULL)
continue;
name = passwd->ops->getname(pw_ptr->eptr);
name = passwd->ops->getname (pw_ptr->eptr);
for (spw_ptr = shadow->head; spw_ptr; spw_ptr = spw_ptr->next)
if (strcmp(name, shadow->ops->getname(spw_ptr->eptr)) == 0)
if (strcmp (name, shadow->ops->getname (spw_ptr->eptr))
== 0)
break;
if (spw_ptr == NULL)
if (spw_ptr == NULL)
continue;
commonio_del_entry(shadow, spw_ptr);
commonio_del_entry (shadow, spw_ptr);
spw_ptr->next = head;
head = spw_ptr;
}
for (spw_ptr = head; spw_ptr; spw_ptr = head) {
head = head->next;
if (shadow->head)
shadow->head->prev = spw_ptr;
spw_ptr->next = shadow->head;
shadow->head = spw_ptr;
}
shadow->head->prev = NULL;
shadow->changed = 1;
return 0;
}
static int
write_all(const struct commonio_db *db)
static int write_all (const struct commonio_db *db)
{
const struct commonio_entry *p;
void *eptr;
@ -615,12 +601,12 @@ write_all(const struct commonio_db *db)
for (p = db->head; p; p = p->next) {
if (p->changed) {
eptr = p->eptr;
if (db->ops->put(eptr, db->fp))
if (db->ops->put (eptr, db->fp))
return -1;
} else if (p->line) {
if (db->ops->fputs(p->line, db->fp) == EOF)
if (db->ops->fputs (p->line, db->fp) == EOF)
return -1;
if (putc('\n', db->fp) == EOF)
if (putc ('\n', db->fp) == EOF)
return -1;
}
}
@ -628,8 +614,7 @@ write_all(const struct commonio_db *db)
}
int
commonio_close(struct commonio_db *db)
int commonio_close (struct commonio_db *db)
{
char buf[1024];
int errors = 0;
@ -642,41 +627,41 @@ commonio_close(struct commonio_db *db)
db->isopen = 0;
if (!db->changed || db->readonly) {
fclose(db->fp);
fclose (db->fp);
db->fp = NULL;
goto success;
}
memzero(&sb, sizeof sb);
memzero (&sb, sizeof sb);
if (db->fp) {
if (fstat(fileno(db->fp), &sb)) {
fclose(db->fp);
if (fstat (fileno (db->fp), &sb)) {
fclose (db->fp);
db->fp = NULL;
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;
}
int stat = getfscreatecon (&old_context);
if (stat < 0) {
errors++;
goto fail;
}
if (setfscreatecon (db->scontext) < 0) {
errors++;
goto fail;
}
}
#endif
/*
* Create backup file.
*/
snprintf(buf, sizeof buf, "%s-", db->filename);
snprintf (buf, sizeof buf, "%s-", db->filename);
if (create_backup(buf, db->fp))
if (create_backup (buf, db->fp))
errors++;
if (fclose(db->fp))
if (fclose (db->fp))
errors++;
if (errors) {
@ -693,77 +678,76 @@ commonio_close(struct commonio_db *db)
sb.st_gid = 0;
}
snprintf(buf, sizeof buf, "%s+", db->filename);
snprintf (buf, sizeof buf, "%s+", db->filename);
db->fp = fopen_set_perms(buf, "w", &sb);
db->fp = fopen_set_perms (buf, "w", &sb);
if (!db->fp)
goto fail;
if (write_all(db))
if (write_all (db))
errors++;
if (fflush(db->fp))
if (fflush (db->fp))
errors++;
#ifdef HAVE_FSYNC
if (fsync(fileno(db->fp)))
if (fsync (fileno (db->fp)))
errors++;
#else
sync();
sync ();
#endif
if (fclose(db->fp))
if (fclose (db->fp))
errors++;
db->fp = NULL;
if (errors) {
unlink(buf);
unlink (buf);
goto fail;
}
if (rename(buf, db->filename))
if (rename (buf, db->filename))
goto fail;
nscd_need_reload = 1;
goto success;
fail:
fail:
errors++;
success:
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;
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 errors==0;
free_linked_list (db);
return errors == 0;
}
static struct commonio_entry *
find_entry_by_name(struct commonio_db *db, const char *name)
static struct commonio_entry *find_entry_by_name (struct commonio_db *db,
const char *name)
{
struct commonio_entry *p;
void *ep;
for (p = db->head; p; p = p->next) {
ep = p->eptr;
if (ep && strcmp(db->ops->getname(ep), name) == 0)
if (ep && strcmp (db->ops->getname (ep), name) == 0)
break;
}
return p;
}
int
commonio_update(struct commonio_db *db, const void *eptr)
int commonio_update (struct commonio_db *db, const void *eptr)
{
struct commonio_entry *p;
void *nentry;
@ -772,13 +756,13 @@ commonio_update(struct commonio_db *db, const void *eptr)
errno = EINVAL;
return 0;
}
if (!(nentry = db->ops->dup(eptr))) {
if (!(nentry = db->ops->dup (eptr))) {
errno = ENOMEM;
return 0;
}
p = find_entry_by_name(db, db->ops->getname(eptr));
p = find_entry_by_name (db, db->ops->getname (eptr));
if (p) {
db->ops->free(p->eptr);
db->ops->free (p->eptr);
p->eptr = nentry;
p->changed = 1;
db->cursor = p;
@ -787,9 +771,9 @@ commonio_update(struct commonio_db *db, const void *eptr)
return 1;
}
/* not found, new entry */
p = (struct commonio_entry *) malloc(sizeof *p);
p = (struct commonio_entry *) malloc (sizeof *p);
if (!p) {
db->ops->free(nentry);
db->ops->free (nentry);
errno = ENOMEM;
return 0;
}
@ -799,9 +783,9 @@ commonio_update(struct commonio_db *db, const void *eptr)
p->changed = 1;
#if KEEP_NIS_AT_END
add_one_entry_nis(db, p);
add_one_entry_nis (db, p);
#else
add_one_entry(db, p);
add_one_entry (db, p);
#endif
db->changed = 1;
@ -809,8 +793,7 @@ commonio_update(struct commonio_db *db, const void *eptr)
}
void
commonio_del_entry(struct commonio_db *db, const struct commonio_entry *p)
void commonio_del_entry (struct commonio_db *db, const struct commonio_entry *p)
{
if (p == db->cursor)
db->cursor = p->next;
@ -829,8 +812,7 @@ commonio_del_entry(struct commonio_db *db, const struct commonio_entry *p)
}
int
commonio_remove(struct commonio_db *db, const char *name)
int commonio_remove (struct commonio_db *db, const char *name)
{
struct commonio_entry *p;
@ -838,26 +820,25 @@ commonio_remove(struct commonio_db *db, const char *name)
errno = EINVAL;
return 0;
}
p = find_entry_by_name(db, name);
p = find_entry_by_name (db, name);
if (!p) {
errno = ENOENT;
return 0;
}
commonio_del_entry(db, p);
commonio_del_entry (db, p);
if (p->line)
free(p->line);
free (p->line);
if (p->eptr)
db->ops->free(p->eptr);
db->ops->free (p->eptr);
return 1;
}
const void *
commonio_locate(struct commonio_db *db, const char *name)
const void *commonio_locate (struct commonio_db *db, const char *name)
{
struct commonio_entry *p;
@ -865,7 +846,7 @@ commonio_locate(struct commonio_db *db, const char *name)
errno = EINVAL;
return NULL;
}
p = find_entry_by_name(db, name);
p = find_entry_by_name (db, name);
if (!p) {
errno = ENOENT;
return NULL;
@ -875,8 +856,7 @@ commonio_locate(struct commonio_db *db, const char *name)
}
int
commonio_rewind(struct commonio_db *db)
int commonio_rewind (struct commonio_db *db)
{
if (!db->isopen) {
errno = EINVAL;
@ -887,8 +867,7 @@ commonio_rewind(struct commonio_db *db)
}
const void *
commonio_next(struct commonio_db *db)
const void *commonio_next (struct commonio_db *db)
{
void *eptr;

View File

@ -1,4 +1,4 @@
/* $Id: commonio.h,v 1.8 2004/10/11 04:40:29 kloczek Exp $ */
/* $Id: commonio.h,v 1.9 2005/03/31 05:14:49 kloczek Exp $ */
#ifdef WITH_SELINUX
#include <selinux/selinux.h>
@ -8,7 +8,7 @@
*/
struct commonio_entry {
char *line;
void *eptr; /* struct passwd, struct spwd, ... */
void *eptr; /* struct passwd, struct spwd, ... */
struct commonio_entry *prev, *next;
int changed:1;
};
@ -21,37 +21,37 @@ struct commonio_ops {
* Make a copy of the object (for example, struct passwd)
* and all strings pointed by it, in malloced memory.
*/
void *(*dup)(const void *);
void *(*dup) (const void *);
/*
* free() the object including any strings pointed by it.
*/
void (*free)(void *);
void (*free) (void *);
/*
* Return the name of the object (for example, pw_name
* for struct passwd).
*/
const char *(*getname)(const void *);
const char *(*getname) (const void *);
/*
* Parse a string, return object (in static area -
* should be copied using the dup operation above).
*/
void *(*parse)(const char *);
void *(*parse) (const char *);
/*
* Write the object to the file (this calls putpwent()
* for struct passwd, for example).
*/
int (*put)(const void *, FILE *);
int (*put) (const void *, FILE *);
/*
* fgets and fputs (can be replaced by versions that
* understand line continuation conventions).
*/
char *(*fgets)(char *, int, FILE *);
int (*fputs)(const char *, FILE *);
char *(*fgets) (char *, int, FILE *);
int (*fputs) (const char *, FILE *);
};
/*
@ -74,7 +74,7 @@ struct commonio_db {
FILE *fp;
#ifdef WITH_SELINUX
security_context_t scontext;
security_context_t scontext;
#endif
/*
* Head, tail, current position in linked list.
@ -90,19 +90,21 @@ struct commonio_db {
int readonly:1;
};
extern int commonio_setname(struct commonio_db *, const char *);
extern int commonio_present(const struct commonio_db *);
extern int commonio_lock(struct commonio_db *);
extern int commonio_lock_nowait(struct commonio_db *);
extern int commonio_open(struct commonio_db *, int);
extern const void *commonio_locate(struct commonio_db *, const char *);
extern int commonio_update(struct commonio_db *, const void *);
extern int commonio_remove(struct commonio_db *, const char *);
extern int commonio_rewind(struct commonio_db *);
extern const void *commonio_next(struct commonio_db *);
extern int commonio_close(struct commonio_db *);
extern int commonio_unlock(struct commonio_db *);
extern void commonio_del_entry(struct commonio_db *, const struct commonio_entry *);
extern int commonio_sort_wrt(struct commonio_db *shadow, struct commonio_db *passwd);
extern int commonio_sort(struct commonio_db *db, int (*cmp)(const void *, const void *));
extern int commonio_setname (struct commonio_db *, const char *);
extern int commonio_present (const struct commonio_db *);
extern int commonio_lock (struct commonio_db *);
extern int commonio_lock_nowait (struct commonio_db *);
extern int commonio_open (struct commonio_db *, int);
extern const void *commonio_locate (struct commonio_db *, const char *);
extern int commonio_update (struct commonio_db *, const void *);
extern int commonio_remove (struct commonio_db *, const char *);
extern int commonio_rewind (struct commonio_db *);
extern const void *commonio_next (struct commonio_db *);
extern int commonio_close (struct commonio_db *);
extern int commonio_unlock (struct commonio_db *);
extern void commonio_del_entry (struct commonio_db *,
const struct commonio_entry *);
extern int commonio_sort_wrt (struct commonio_db *shadow,
struct commonio_db *passwd);
extern int commonio_sort (struct commonio_db *db,
int (*cmp) (const void *, const void *));

View File

@ -1,4 +1,4 @@
/* $Id: defines.h,v 1.24 2005/01/17 19:03:34 kloczek Exp $ */
/* $Id: defines.h,v 1.25 2005/03/31 05:14:49 kloczek Exp $ */
/* some useful defines */
#ifndef _DEFINES_H_
@ -20,25 +20,26 @@
# define _(Text) gettext (Text)
#else
# undef bindtextdomain
# define bindtextdomain(Domain, Directory) /* empty */
# define bindtextdomain(Domain, Directory) /* empty */
# undef textdomain
# define textdomain(Domain) /* empty */
# define textdomain(Domain) /* empty */
# define _(Text) Text
#endif
#if STDC_HEADERS
# include <stdlib.h>
# include <string.h>
#else /* not STDC_HEADERS */
#else /* not STDC_HEADERS */
# ifndef HAVE_STRCHR
# define strchr index
# define strrchr rindex
# endif
char *strchr(), *strrchr(), *strtok();
char *strchr (), *strrchr (), *strtok ();
# ifndef HAVE_MEMCPY
# define memcpy(d, s, n) bcopy((s), (d), (n))
# endif
#endif /* not STDC_HEADERS */
#endif /* not STDC_HEADERS */
#if HAVE_ERRNO_H
# include <errno.h>
@ -63,32 +64,32 @@ char *strchr(), *strrchr(), *strtok();
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else /* not TIME_WITH_SYS_TIME */
#else /* not TIME_WITH_SYS_TIME */
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif /* not TIME_WITH_SYS_TIME */
#endif /* not TIME_WITH_SYS_TIME */
#ifdef HAVE_MEMSET
# define memzero(ptr, size) memset((void *)(ptr), 0, (size))
#else
# define memzero(ptr, size) bzero((char *)(ptr), (size))
#endif
#define strzero(s) memzero(s, strlen(s)) /* warning: evaluates twice */
#define strzero(s) memzero(s, strlen(s)) /* warning: evaluates twice */
#ifdef HAVE_DIRENT_H /* DIR_SYSV */
#ifdef HAVE_DIRENT_H /* DIR_SYSV */
# include <dirent.h>
# define DIRECT dirent
#else
# ifdef HAVE_SYS_NDIR_H /* DIR_XENIX */
# ifdef HAVE_SYS_NDIR_H /* DIR_XENIX */
# include <sys/ndir.h>
# endif
# ifdef HAVE_SYS_DIR_H /* DIR_??? */
# ifdef HAVE_SYS_DIR_H /* DIR_??? */
# include <sys/dir.h>
# endif
# ifdef HAVE_NDIR_H /* DIR_BSD */
# ifdef HAVE_NDIR_H /* DIR_BSD */
# include <ndir.h>
# endif
# define DIRECT direct
@ -106,13 +107,13 @@ char *strchr(), *strrchr(), *strtok();
#if defined(SHADOWGRP) && !defined(GSHADOW)
#include "gshadow_.h"
#endif
#else /* not HAVE_SHADOW_H */
#else /* not HAVE_SHADOW_H */
#include "shadow_.h"
#ifdef SHADOWGRP
#include "gshadow_.h"
#endif
#endif /* not HAVE_SHADOW_H */
#endif /* SHADOWPWD */
#endif /* not HAVE_SHADOW_H */
#endif /* SHADOWPWD */
#include <limits.h>
@ -162,17 +163,17 @@ char *strchr(), *strrchr(), *strtok();
free(saved_locale); \
} \
} while (0)
#else /* !ENABLE_NLS */
#else /* !ENABLE_NLS */
#define SYSLOG(x) syslog x
#endif /* !ENABLE_NLS */
#endif /* !ENABLE_NLS */
#else /* !USE_SYSLOG */
#else /* !USE_SYSLOG */
#define SYSLOG(x) /* empty */
#define openlog(a,b,c) /* empty */
#define closelog() /* empty */
#define SYSLOG(x) /* empty */
#define openlog(a,b,c) /* empty */
#define closelog() /* empty */
#endif /* !USE_SYSLOG */
#endif /* !USE_SYSLOG */
/* The default syslog settings can now be changed here,
in just one place. */
@ -231,7 +232,7 @@ char *strchr(), *strrchr(), *strtok();
# define GTTY(fd, termio) tcgetattr(fd, termio)
# define TERMIO struct termios
# define USE_TERMIOS
#else /* assumed HAVE_TERMIO_H */
#else /* assumed HAVE_TERMIO_H */
# include <sys/ioctl.h>
# include <termio.h>
# define STTY(fd, termio) ioctl(fd, TCSETA, termio)
@ -275,7 +276,7 @@ char *strchr(), *strrchr(), *strtok();
#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 */
#define SETXXENT_TEST(x) x; if (0) /* compiler should optimize this away */
#else
#define SETXXENT_TYPE int
#define SETXXENT_RET(x) return(x)
@ -311,11 +312,11 @@ char *strchr(), *strrchr(), *strtok();
#define NULL ((void *) 0)
#endif
#ifdef sun /* hacks for compiling on SunOS */
#ifdef sun /* hacks for compiling on SunOS */
# ifndef SOLARIS
extern int fputs();
extern char *strdup();
extern char *strerror();
extern int fputs ();
extern char *strdup ();
extern char *strerror ();
# endif
#endif
@ -332,4 +333,4 @@ extern char *strerror();
#define SHADOW_PASSWD_STRING "x"
#endif
#endif /* _DEFINES_H_ */
#endif /* _DEFINES_H_ */

View File

@ -30,94 +30,29 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: encrypt.c,v 1.7 2000/08/26 18:27:17 marekm Exp $")
RCSID ("$Id: encrypt.c,v 1.11 2005/04/06 02:59:22 kloczek Exp $")
#include <unistd.h>
#include "prototypes.h"
#include "defines.h"
extern char *crypt();
extern char *libshadow_md5_crypt(const char *, const char *);
char *
pw_encrypt(const char *clear, const char *salt)
char *pw_encrypt (const char *clear, const char *salt)
{
static char cipher[128];
char *cp;
#ifdef SW_CRYPT
static int count;
#endif
static char cipher[128];
char *cp;
#ifdef MD5_CRYPT
/*
* If the salt string from the password file or from crypt_make_salt()
* begins with the magic string, use the new algorithm.
*/
if (strncmp(salt, "$1$", 3) == 0)
return libshadow_md5_crypt(clear, salt);
#endif
#ifdef SW_CRYPT
/*
* Copy over the salt. It is always the first two
* characters of the string.
*/
cipher[0] = salt[0];
cipher[1] = salt[1];
cipher[2] = '\0';
/*
* Loop up to ten times on the cleartext password.
* This is because the input limit for passwords is
* 80 characters.
*
* The initial salt is that provided by the user, or the
* one generated above. The subsequent salts are gotten
* from the first two characters of the previous encrypted
* block of characters.
*/
for (count = 0;count < 10;count++) {
cp = crypt(clear, salt);
if (!cp) {
perror("crypt");
exit(1);
}
if (strlen(cp) != 13)
return cp;
strcat(cipher, cp + 2);
salt = cipher + 11 * count + 2;
if (strlen(clear) > 8)
clear += 8;
else
break;
}
#else
cp = crypt(clear, salt);
crypt (clear, salt);
if (!cp) {
/*
* Single Unix Spec: crypt() may return a null pointer,
* and set errno to indicate an error. The caller doesn't
* expect us to return NULL, so...
*/
perror("crypt");
exit(1);
perror ("crypt");
exit (1);
}
if (strlen(cp) != 13)
return cp; /* nonstandard crypt() in libc, better bail out */
strcpy(cipher, cp);
if (strlen (cp) != 13)
return cp; /* nonstandard crypt() in libc, better bail out */
strcpy (cipher, cp);
#ifdef DOUBLESIZE
if (strlen (clear) > 8) {
cp = crypt(clear + 8, salt);
if (!cp) {
perror("crypt");
exit(1);
}
strcat(cipher, cp + 2);
}
#endif /* DOUBLESIZE */
#endif /* SW_CRYPT */
return cipher;
}

View File

@ -30,7 +30,7 @@
/*
* faillog.h - login failure logging file format
*
* $Id: faillog.h,v 1.3 1997/05/01 23:14:39 marekm Exp $
* $Id: faillog.h,v 1.4 2005/03/31 05:14:49 kloczek Exp $
*
* The login failure file is maintained by login(1) and faillog(8)
* Each record in the file represents a separate UID and the file
@ -40,16 +40,16 @@
#ifndef _FAILLOG_H
#define _FAILLOG_H
struct faillog {
short fail_cnt; /* failures since last success */
short fail_max; /* failures before turning account off */
char fail_line[12]; /* last failure occured here */
time_t fail_time; /* last failure occured then */
struct faillog {
short fail_cnt; /* failures since last success */
short fail_max; /* failures before turning account off */
char fail_line[12]; /* last failure occured here */
time_t fail_time; /* last failure occured then */
/*
* If nonzero, the account will be re-enabled if there are no
* failures for fail_locktime seconds since last failure.
*/
long fail_locktime;
long fail_locktime;
};
#endif

View File

@ -33,10 +33,9 @@
#include "defines.h"
#include "rcsid.h"
RCSID("$Id: fputsx.c,v 1.5 1999/06/07 16:40:44 marekm Exp $")
RCSID ("$Id: fputsx.c,v 1.6 2005/03/31 05:14:49 kloczek Exp $")
char *
fgetsx(char *buf, int cnt, FILE *f)
char *fgetsx (char *buf, int cnt, FILE * f)
{
char *cp = buf;
char *ep;
@ -57,17 +56,16 @@ fgetsx(char *buf, int cnt, FILE *f)
return buf;
}
int
fputsx(const char *s, FILE *stream)
int fputsx (const char *s, FILE * stream)
{
int i;
for (i = 0;*s;i++, s++) {
for (i = 0; *s; i++, s++) {
if (putc (*s, stream) == EOF)
return EOF;
#if 0 /* The standard getgr*() can't handle that. --marekm */
if (i > (BUFSIZ/2)) {
#if 0 /* The standard getgr*() can't handle that. --marekm */
if (i > (BUFSIZ / 2)) {
if (putc ('\\', stream) == EOF ||
putc ('\n', stream) == EOF)
return EOF;

View File

@ -30,22 +30,19 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: getdef.c,v 1.20 2005/01/20 12:43:05 kloczek Exp $")
RCSID ("$Id: getdef.c,v 1.28 2005/04/01 22:52:03 kloczek Exp $")
#include "prototypes.h"
#include "defines.h"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include "getdef.h"
/*
* A configuration item definition.
*/
struct itemdef {
const char *name; /* name of the item */
char *value; /* value given, or NULL if no value */
const char *name; /* name of the item */
char *value; /* value given, or NULL if no value */
};
/*
@ -54,85 +51,86 @@ struct itemdef {
#define NUMDEFS (sizeof(def_table)/sizeof(def_table[0]))
static struct itemdef def_table[] = {
{ "CHFN_AUTH", NULL },
{ "CHFN_RESTRICT", NULL },
{"CHFN_RESTRICT", NULL},
{"DEFAULT_HOME", NULL},
{"FAIL_DELAY", NULL},
{"PASS_MAX_DAYS", NULL},
{"PASS_MIN_DAYS", NULL},
{"PASS_WARN_AGE", NULL},
{"USERDEL_CMD", NULL},
#ifdef USE_PAM
{ "CLOSE_SESSIONS", NULL },
{"CLOSE_SESSIONS", NULL},
#else
{"CHFN_AUTH", NULL},
{"CHSH_AUTH", NULL},
{"CRACKLIB_DICTPATH", NULL},
{"ENV_HZ", NULL},
{"ENV_PATH", NULL},
{"ENV_ROOTPATH", NULL}, /* SuSE compatibility? */
{"ENV_SUPATH", NULL},
{"ENV_TZ", NULL},
{"ENVIRON_FILE", NULL},
{"FAILLOG_ENAB", NULL},
{"FTMP_FILE", NULL},
{"ISSUE_FILE", NULL},
{"LASTLOG_ENAB", NULL},
{"LOGIN_STRING", NULL},
{"MAIL_CHECK_ENAB", NULL},
{"MAIL_DIR", NULL},
{"MAIL_FILE", NULL},
{"MD5_CRYPT_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},
{"SU_WHEEL_ONLY", NULL},
{"QMAIL_DIR", NULL},
{"QUOTAS_ENAB", NULL},
{"ULIMIT", NULL},
#endif
{ "CONSOLE", NULL },
{ "CONSOLE_GROUPS", NULL },
{ "CRACKLIB_DICTPATH", NULL },
{ "CREATE_HOME", NULL },
{ "DEFAULT_HOME", NULL },
{ "ENVIRON_FILE", NULL },
{ "ENV_HZ", NULL },
{ "ENV_PATH", NULL },
{ "ENV_ROOTPATH", NULL }, /* SuSE compatibility? */
{ "ENV_SUPATH", NULL },
{ "ENV_TZ", NULL },
{ "ERASECHAR", NULL },
{ "FAILLOG_ENAB", NULL },
{ "FAIL_DELAY", NULL },
{ "FAKE_SHELL", NULL },
{ "FTMP_FILE", NULL },
{ "GETPASS_ASTERISKS", NULL },
{ "GID_MAX", NULL },
{ "GID_MIN", NULL },
{ "HUSHLOGIN_FILE", NULL },
{ "ISSUE_FILE", NULL },
{ "KILLCHAR", NULL },
{ "LASTLOG_ENAB", NULL },
{ "LOGIN_RETRIES", NULL },
{ "LOGIN_STRING", NULL },
{ "LOGIN_TIMEOUT", NULL },
{ "LOG_OK_LOGINS", NULL },
{ "LOG_UNKFAIL_ENAB", NULL },
{ "MAIL_CHECK_ENAB", NULL },
{ "MAIL_DIR", NULL },
{ "MAIL_FILE", NULL },
{ "MD5_CRYPT_ENAB", NULL },
{ "MOTD_FILE", NULL },
{ "NOLOGINS_FILE", NULL },
{ "NOLOGIN_STR", NULL },
{ "OBSCURE_CHECKS_ENAB", NULL },
{ "PASS_ALWAYS_WARN", NULL },
{ "PASS_CHANGE_TRIES", NULL },
{ "PASS_MAX_DAYS", NULL },
{ "PASS_MAX_LEN", NULL },
{ "PASS_MIN_DAYS", NULL },
{ "PASS_MIN_LEN", NULL },
{ "PASS_WARN_AGE", NULL },
{ "PORTTIME_CHECKS_ENAB", NULL },
{ "QMAIL_DIR", NULL },
{ "QUOTAS_ENAB", NULL },
{ "SULOG_FILE", NULL },
{ "SU_NAME", NULL },
{ "SU_WHEEL_ONLY", NULL },
{"CONSOLE", NULL},
{"CONSOLE_GROUPS", NULL},
{"CREATE_HOME", NULL},
{"ERASECHAR", NULL},
{"FAKE_SHELL", NULL},
{"GETPASS_ASTERISKS", NULL},
{"GID_MAX", NULL},
{"GID_MIN", NULL},
{"HUSHLOGIN_FILE", NULL},
{"KILLCHAR", NULL},
{"LOGIN_RETRIES", NULL},
{"LOGIN_TIMEOUT", NULL},
{"LOG_OK_LOGINS", NULL},
{"LOG_UNKFAIL_ENAB", NULL},
{"SULOG_FILE", NULL},
{"SU_NAME", NULL},
#ifdef USE_SYSLOG
{ "SYSLOG_SG_ENAB", NULL },
{ "SYSLOG_SU_ENAB", NULL },
{"SYSLOG_SG_ENAB", NULL},
{"SYSLOG_SU_ENAB", NULL},
#endif
{ "TTYGROUP", NULL },
{ "TTYPERM", NULL },
{ "TTYTYPE_FILE", NULL },
{ "UID_MAX", NULL },
{ "UID_MIN", NULL },
{ "ULIMIT", NULL },
{ "UMASK", NULL },
{ "USERDEL_CMD", NULL },
{ "USERGROUPS_ENAB", NULL }
{"TTYGROUP", NULL},
{"TTYPERM", NULL},
{"TTYTYPE_FILE", NULL},
{"UID_MAX", NULL},
{"UID_MIN", NULL},
{"UMASK", NULL},
{"USERGROUPS_ENAB", NULL}
};
#ifndef LOGINDEFS
#define LOGINDEFS "/etc/login.defs"
#endif
static char def_fname[] = LOGINDEFS; /* login config defs file */
static int def_loaded = 0; /* are defs already loaded? */
static char def_fname[] = LOGINDEFS; /* login config defs file */
static int def_loaded = 0; /* are defs already loaded? */
/* local function prototypes */
static struct itemdef *def_find(const char *);
static void def_load(void);
static struct itemdef *def_find (const char *);
static void def_load (void);
/*
@ -142,15 +140,14 @@ static void def_load(void);
* defined. First time invoked, will load definitions from the file.
*/
char *
getdef_str(const char *item)
char *getdef_str (const char *item)
{
struct itemdef *d;
if (!def_loaded)
def_load();
def_load ();
return ((d = def_find(item)) == NULL ? (char *)NULL : d->value);
return ((d = def_find (item)) == NULL ? (char *) NULL : d->value);
}
@ -160,18 +157,17 @@ getdef_str(const char *item)
* Return TRUE if specified item is defined as "yes", else FALSE.
*/
int
getdef_bool(const char *item)
int getdef_bool (const char *item)
{
struct itemdef *d;
if (!def_loaded)
def_load();
def_load ();
if ((d = def_find(item)) == NULL || d->value == NULL)
if ((d = def_find (item)) == NULL || d->value == NULL)
return 0;
return (strcasecmp(d->value, "yes") == 0);
return (strcasecmp (d->value, "yes") == 0);
}
@ -183,18 +179,17 @@ getdef_bool(const char *item)
* values are handled.
*/
int
getdef_num(const char *item, int dflt)
int getdef_num (const char *item, int dflt)
{
struct itemdef *d;
if (!def_loaded)
def_load();
def_load ();
if ((d = def_find(item)) == NULL || d->value == NULL)
if ((d = def_find (item)) == NULL || d->value == NULL)
return dflt;
return (int) strtol(d->value, (char **)NULL, 0);
return (int) strtol (d->value, (char **) NULL, 0);
}
@ -206,18 +201,17 @@ getdef_num(const char *item, int dflt)
* values are handled.
*/
unsigned int
getdef_unum(const char *item, unsigned int dflt)
unsigned int getdef_unum (const char *item, unsigned int dflt)
{
struct itemdef *d;
if (!def_loaded)
def_load();
def_load ();
if ((d = def_find(item)) == NULL || d->value == NULL)
if ((d = def_find (item)) == NULL || d->value == NULL)
return dflt;
return (unsigned int) strtoul(d->value, (char **)NULL, 0);
return (unsigned int) strtoul (d->value, (char **) NULL, 0);
}
@ -229,18 +223,17 @@ getdef_unum(const char *item, unsigned int dflt)
* values are handled.
*/
long
getdef_long(const char *item, long dflt)
long getdef_long (const char *item, long dflt)
{
struct itemdef *d;
if (!def_loaded)
def_load();
def_load ();
if ((d = def_find(item)) == NULL || d->value == NULL)
if ((d = def_find (item)) == NULL || d->value == NULL)
return dflt;
return strtol(d->value, (char **)NULL, 0);
return strtol (d->value, (char **) NULL, 0);
}
@ -249,35 +242,33 @@ getdef_long(const char *item, long dflt)
* (also used when loading the initial defaults)
*/
int
putdef_str(const char *name, const char *value)
int putdef_str (const char *name, const char *value)
{
struct itemdef *d;
char *cp;
if (!def_loaded)
def_load();
def_load ();
/*
* Locate the slot to save the value. If this parameter
* is unknown then "def_find" will print an err message.
*/
if ((d = def_find(name)) == NULL)
if ((d = def_find (name)) == NULL)
return -1;
/*
* Save off the value.
*/
if ((cp = strdup(value)) == NULL) {
fprintf(stderr,
_("Could not allocate space for config info.\n"));
SYSLOG((LOG_ERR,
"could not allocate space for config info"));
if ((cp = strdup (value)) == NULL) {
fprintf (stderr,
_("Could not allocate space for config info.\n"));
SYSLOG ((LOG_ERR, "could not allocate space for config info"));
return -1;
}
if (d->value)
free(d->value);
free (d->value);
d->value = cp;
return 0;
@ -291,8 +282,7 @@ putdef_str(const char *name, const char *value)
* specified configuration option.
*/
static struct itemdef *
def_find(const char *name)
static struct itemdef *def_find (const char *name)
{
int min, max, curr, n;
@ -301,7 +291,7 @@ def_find(const char *name)
*/
min = 0;
max = NUMDEFS-1;
max = NUMDEFS - 1;
/*
* Binary search into the table. Relies on the items being
@ -309,23 +299,26 @@ def_find(const char *name)
*/
while (min <= max) {
curr = (min+max)/2;
curr = (min + max) / 2;
if (! (n = strcmp(def_table[curr].name, name)))
if (!(n = strcmp (def_table[curr].name, name)))
return &def_table[curr];
if (n < 0)
min = curr+1;
min = curr + 1;
else
max = curr-1;
max = curr - 1;
}
/*
* Item was never found.
*/
fprintf(stderr, _("configuration error - unknown item '%s' (notify administrator)\n"), name);
SYSLOG((LOG_CRIT, "unknown configuration item `%s'", name));
fprintf (stderr,
_
("configuration error - unknown item '%s' (notify administrator)\n"),
name);
SYSLOG ((LOG_CRIT, "unknown configuration item `%s'", name));
return (struct itemdef *) NULL;
}
@ -335,8 +328,7 @@ def_find(const char *name)
* Loads the user-configured options from the default configuration file
*/
static void
def_load(void)
static void def_load (void)
{
int i;
FILE *fp;
@ -345,10 +337,10 @@ def_load(void)
/*
* Open the configuration definitions file.
*/
if ((fp = fopen(def_fname, "r")) == NULL) {
SYSLOG((LOG_CRIT, "cannot open login definitions %s [%m]",
def_fname));
exit(1);
if ((fp = fopen (def_fname, "r")) == NULL) {
SYSLOG ((LOG_CRIT, "cannot open login definitions %s [%m]",
def_fname));
exit (1);
}
/*
@ -360,13 +352,13 @@ def_load(void)
/*
* Go through all of the lines in the file.
*/
while (fgets(buf, sizeof(buf), fp) != NULL) {
while (fgets (buf, sizeof (buf), fp) != NULL) {
/*
* Trim trailing whitespace.
*/
for (i = strlen(buf)-1 ; i >= 0 ; --i) {
if (!isspace(buf[i]))
for (i = strlen (buf) - 1; i >= 0; --i) {
if (!isspace (buf[i]))
break;
}
buf[++i] = '\0';
@ -374,37 +366,36 @@ def_load(void)
/*
* Break the line into two fields.
*/
name = buf + strspn(buf, " \t"); /* first nonwhite */
name = buf + strspn (buf, " \t"); /* first nonwhite */
if (*name == '\0' || *name == '#')
continue; /* comment or empty */
continue; /* comment or empty */
s = name + strcspn(name, " \t"); /* end of field */
s = name + strcspn (name, " \t"); /* end of field */
if (*s == '\0')
continue; /* only 1 field?? */
continue; /* only 1 field?? */
*s++ = '\0';
value = s + strspn(s, " \"\t"); /* next nonwhite */
*(value + strcspn(value, "\"")) = '\0';
value = s + strspn (s, " \"\t"); /* next nonwhite */
*(value + strcspn (value, "\"")) = '\0';
/*
* Store the value in def_table.
*/
putdef_str(name, value);
putdef_str (name, value);
}
if (ferror(fp)) {
SYSLOG((LOG_CRIT, "cannot read login definitions %s [%m]",
def_fname));
exit(1);
if (ferror (fp)) {
SYSLOG ((LOG_CRIT, "cannot read login definitions %s [%m]",
def_fname));
exit (1);
}
(void) fclose(fp);
(void) fclose (fp);
}
#ifdef CKDEFS
int
main(int argc, char **argv)
int main (int argc, char **argv)
{
int i;
char *cp;
@ -412,18 +403,19 @@ main(int argc, char **argv)
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);
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);
else
printf("%4d %-24s %s\n", i+1, d->name, d->value);
printf ("%4d %-24s %s\n", i + 1, d->name, d->value);
}
for (i = 1;i < argc;i++) {
for (i = 1; i < argc; i++) {
if ((cp = getdef_str (argv[1])) != NULL)
printf ("%s `%s'\n", argv[1], cp);
else
printf ("%s not found\n", argv[1]);
}
exit(0);
exit (0);
}
#endif

View File

@ -2,11 +2,11 @@
#define _GETDEF_H
/* getdef.c */
extern int getdef_bool(const char *);
extern long getdef_long(const char *, long);
extern int getdef_num(const char *, int);
extern unsigned int getdef_unum(const char *, unsigned int);
extern char *getdef_str(const char *);
extern int putdef_str(const char *, const char *);
extern int getdef_bool (const char *);
extern long getdef_long (const char *, long);
extern int getdef_num (const char *, int);
extern unsigned int getdef_unum (const char *, unsigned int);
extern char *getdef_str (const char *);
extern int putdef_str (const char *, const char *);
#endif /* _GETDEF_H */
#endif /* _GETDEF_H */

View File

@ -31,44 +31,36 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: getpass.c,v 1.12 2003/05/05 21:44:12 kloczek Exp $")
RCSID ("$Id: getpass.c,v 1.13 2005/03/31 05:14:49 kloczek Exp $")
#include "defines.h"
#include <signal.h>
#include <stdio.h>
#include "getdef.h"
/* new code, #undef if there are any problems... */
#define USE_SETJMP 1
#ifdef USE_SETJMP
#include <setjmp.h>
static sigjmp_buf intr; /* where to jump on SIGINT */
static sigjmp_buf intr; /* where to jump on SIGINT */
#endif
static int sig_caught;
static int sig_caught;
#ifdef HAVE_SIGACTION
static struct sigaction sigact;
static struct sigaction sigact;
#endif
/*ARGSUSED*/
static RETSIGTYPE
sig_catch(int sig)
/*ARGSUSED*/ static RETSIGTYPE sig_catch (int sig)
{
sig_caught = 1;
#ifdef USE_SETJMP
siglongjmp(intr, 1);
siglongjmp (intr, 1);
#endif
}
#define MAXLEN 127
static char *
readpass(FILE *ifp, FILE *ofp, int with_echo, int max_asterisks)
static char *readpass (FILE * ifp, FILE * ofp, int with_echo, int max_asterisks)
{
static char input[MAXLEN + 1], asterix[MAXLEN + 1];
static char once;
@ -77,9 +69,9 @@ readpass(FILE *ifp, FILE *ofp, int with_echo, int max_asterisks)
if (max_asterisks < 0) {
/* traditional code using fgets() */
if (fgets(input, sizeof input, ifp) != input)
if (fgets (input, sizeof input, ifp) != input)
return NULL;
cp = strrchr(input, '\n');
cp = strrchr (input, '\n');
if (cp)
*cp = '\0';
else
@ -87,12 +79,12 @@ readpass(FILE *ifp, FILE *ofp, int with_echo, int max_asterisks)
return input;
}
if (!once) {
srandom(time(0)*getpid());
srandom (time (0) * getpid ());
once = 1;
}
cp = input;
ap = asterix;
while (read(fileno(ifp), &c, 1)) {
while (read (fileno (ifp), &c, 1)) {
switch (c) {
case '\n':
case '\r':
@ -103,67 +95,68 @@ readpass(FILE *ifp, FILE *ofp, int with_echo, int max_asterisks)
cp--;
ap--;
for (i = *ap; i > 0; i--)
fputs("\b \b", ofp);
fputs ("\b \b", ofp);
*cp = '\0';
*ap = 0;
} else {
putc('\a', ofp); /* BEL */
putc ('\a', ofp); /* BEL */
}
break;
case '\025': /* Ctrl-U = erase everything typed so far */
case '\025': /* Ctrl-U = erase everything typed so far */
if (cp == input) {
putc('\a', ofp); /* BEL */
} else while (cp > input) {
cp--;
ap--;
for (i = *ap; i > 0; i--)
fputs("\b \b", ofp);
*cp = '\0';
*ap = 0;
}
putc ('\a', ofp); /* BEL */
} else
while (cp > input) {
cp--;
ap--;
for (i = *ap; i > 0; i--)
fputs ("\b \b", ofp);
*cp = '\0';
*ap = 0;
}
break;
default:
*cp++ = c;
if (with_echo) {
*ap = 1;
putc(c, ofp);
putc (c, ofp);
} else if (max_asterisks > 0) {
*ap = (random() % max_asterisks) + 1;
*ap = (random () % max_asterisks) + 1;
for (i = *ap; i > 0; i--)
putc('*', ofp);
putc ('*', ofp);
} else {
*ap = 0;
}
ap++;
break;
}
fflush(ofp);
fflush (ofp);
if (cp >= input + MAXLEN) {
putc('\a', ofp); /* BEL */
putc ('\a', ofp); /* BEL */
break;
}
}
endwhile:
endwhile:
*cp = '\0';
putc('\n', ofp);
putc ('\n', ofp);
return input;
}
static char *
prompt_password(const char *prompt, int with_echo)
static char *prompt_password (const char *prompt, int with_echo)
{
static char nostring[1] = "";
static char *return_value;
volatile int tty_opened;
static FILE *ifp, *ofp;
volatile int is_tty;
#ifdef HAVE_SIGACTION
struct sigaction old_sigact;
#else
RETSIGTYPE (*old_signal)();
RETSIGTYPE (*old_signal) ();
#endif
TERMIO old_modes;
int max_asterisks = getdef_num("GETPASS_ASTERISKS", -1);
int max_asterisks = getdef_num ("GETPASS_ASTERISKS", -1);
/*
* set a flag so the SIGINT signal can be re-sent if it
@ -179,14 +172,14 @@ prompt_password(const char *prompt, int with_echo)
* from stdin and write to stderr instead.
*/
if (!(ifp = fopen("/dev/tty", "r+"))) {
if (!(ifp = fopen ("/dev/tty", "r+"))) {
ifp = stdin;
ofp = stderr;
} else {
ofp = ifp;
tty_opened = 1;
}
setbuf(ifp, (char *) 0);
setbuf (ifp, (char *) 0);
/*
* the current tty modes must be saved so they can be
@ -195,26 +188,25 @@ prompt_password(const char *prompt, int with_echo)
*/
is_tty = 1;
if (GTTY(fileno(ifp), &old_modes)) {
if (GTTY (fileno (ifp), &old_modes)) {
is_tty = 0;
}
#ifdef USE_SETJMP
/*
* If we get a SIGINT, sig_catch() will jump here -
* no need to press Enter after Ctrl-C.
*/
if (sigsetjmp(intr, 1))
if (sigsetjmp (intr, 1))
goto out;
#endif
#ifdef HAVE_SIGACTION
sigact.sa_handler = sig_catch;
sigemptyset(&sigact.sa_mask);
sigemptyset (&sigact.sa_mask);
sigact.sa_flags = 0;
sigaction(SIGINT, &sigact, &old_sigact);
sigaction (SIGINT, &sigact, &old_sigact);
#else
old_signal = signal(SIGINT, sig_catch);
old_signal = signal (SIGINT, sig_catch);
#endif
if (is_tty) {
@ -232,7 +224,7 @@ prompt_password(const char *prompt, int with_echo)
new_modes.c_lflag |= ECHONL;
if (STTY(fileno(ifp), &new_modes))
if (STTY (fileno (ifp), &new_modes))
goto out;
}
@ -243,9 +235,9 @@ prompt_password(const char *prompt, int with_echo)
* returned.
*/
if ((fputs(prompt, ofp) != EOF) && (fflush(ofp) != EOF))
return_value = readpass(ifp, ofp, with_echo, max_asterisks);
out:
if ((fputs (prompt, ofp) != EOF) && (fflush (ofp) != EOF))
return_value = readpass (ifp, ofp, with_echo, max_asterisks);
out:
/*
* the old SIGINT handler is restored after the tty
* modes. then /dev/tty is closed if it was opened in
@ -254,20 +246,19 @@ out:
*/
if (is_tty) {
if (STTY(fileno(ifp), &old_modes))
if (STTY (fileno (ifp), &old_modes))
return_value = NULL;
}
#ifdef HAVE_SIGACTION
(void) sigaction (SIGINT, &old_sigact, NULL);
#else
(void) signal (SIGINT, old_signal);
#endif
if (tty_opened)
(void) fclose(ifp);
(void) fclose (ifp);
if (sig_caught) {
kill(getpid(), SIGINT);
kill (getpid (), SIGINT);
return_value = NULL;
}
if (!return_value) {
@ -277,15 +268,12 @@ out:
return return_value;
}
char *
libshadow_getpass(const char *prompt)
char *libshadow_getpass (const char *prompt)
{
return prompt_password(prompt, 0);
return prompt_password (prompt, 0);
}
char *
getpass_with_echo(const char *prompt)
char *getpass_with_echo (const char *prompt)
{
return prompt_password(prompt, 1);
return prompt_password (prompt, 1);
}

View File

@ -1,211 +0,0 @@
/*
* Copyright 1990 - 1994, 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>
#ifdef NDBM
#include "rcsid.h"
RCSID("$Id: grdbm.c,v 1.3 1997/12/07 23:26:52 marekm Exp $")
#include <string.h>
#include <stdio.h>
#include <grp.h>
#include "prototypes.h"
#include <ndbm.h>
extern DBM *gr_dbm;
#define GRP_FRAG 256
/*
* gr_dbm_update
*
* Updates the DBM password files, if they exist.
*/
int
gr_dbm_update(const struct group *gr)
{
datum key;
datum content;
char data[BUFSIZ*8];
char grpkey[60];
char *cp;
int len;
int i;
int cnt;
static int once;
if (! once) {
if (! gr_dbm)
setgrent ();
once++;
}
if (! gr_dbm)
return 0;
len = gr_pack (gr, data);
if (len <= GRP_FRAG) {
content.dsize = len;
content.dptr = data;
key.dsize = strlen (gr->gr_name);
key.dptr = gr->gr_name;
if (dbm_store (gr_dbm, key, content, DBM_REPLACE))
return 0;
key.dsize = sizeof gr->gr_gid;
key.dptr = (char *) &gr->gr_gid;
if (dbm_store (gr_dbm, key, content, DBM_REPLACE))
return 0;
} else {
content.dsize = sizeof cnt;
content.dptr = (char *) &cnt;
cnt = (len + (GRP_FRAG-1)) / GRP_FRAG;
key.dsize = strlen (gr->gr_name);
key.dptr = gr->gr_name;
if (dbm_store (gr_dbm, key, content, DBM_REPLACE))
return 0;
key.dsize = sizeof gr->gr_gid;
key.dptr = (char *) &gr->gr_gid;
if (dbm_store (gr_dbm, key, content, DBM_REPLACE))
return 0;
for (cp = data, i = 0;i < cnt;i++) {
content.dsize = len > GRP_FRAG ? GRP_FRAG:len;
len -= content.dsize;
content.dptr = cp;
cp += content.dsize;
key.dsize = sizeof i + strlen (gr->gr_name);
key.dptr = grpkey;
memcpy (grpkey, (char *) &i, sizeof i);
strcpy (grpkey + sizeof i, gr->gr_name);
if (dbm_store (gr_dbm, key, content, DBM_REPLACE))
return 0;
key.dsize = sizeof i + sizeof gr->gr_gid;
key.dptr = grpkey;
memcpy (grpkey, (char *) &i, sizeof i);
memcpy (grpkey + sizeof i, (char *) &gr->gr_gid,
sizeof gr->gr_gid);
if (dbm_store (gr_dbm, key, content, DBM_REPLACE))
return 0;
}
}
return 1;
}
/*
* gr_dbm_remove
*
* Deletes the DBM group file entries, if they exist.
*/
int
gr_dbm_remove(const struct group *gr)
{
datum key;
datum content;
char grpkey[60];
int i;
int cnt;
int errors = 0;
static int once;
if (! once) {
if (! gr_dbm)
setgrent ();
once++;
}
if (! gr_dbm)
return 0;
key.dsize = strlen (gr->gr_name);
key.dptr = (char *) gr->gr_name;
content = dbm_fetch (gr_dbm, key);
if (content.dptr == 0)
++errors;
else {
if (content.dsize == sizeof (int)) {
memcpy ((char *) &cnt, content.dptr, sizeof cnt);
for (i = 0;i < cnt;i++) {
key.dsize = sizeof i + strlen (gr->gr_name);
key.dptr = grpkey;
memcpy (grpkey, (char *) &i, sizeof i);
strcpy (grpkey + sizeof i, gr->gr_name);
if (dbm_delete (gr_dbm, key))
++errors;
}
} else {
if (dbm_delete (gr_dbm, key))
++errors;
}
}
key.dsize = sizeof gr->gr_gid;
key.dptr = (char *) &gr->gr_gid;
content = dbm_fetch (gr_dbm, key);
if (content.dptr == 0)
++errors;
else {
if (content.dsize == sizeof (int)) {
memcpy ((char *) &cnt, content.dptr, sizeof cnt);
for (i = 0;i < cnt;i++) {
key.dsize = sizeof i + sizeof gr->gr_gid;
key.dptr = grpkey;
memcpy (grpkey, (char *) &i, sizeof i);
memcpy (grpkey + sizeof i, (char *) &gr->gr_gid,
sizeof gr->gr_gid);
if (dbm_delete (gr_dbm, key))
++errors;
}
} else {
if (dbm_delete (gr_dbm, key))
++errors;
}
}
return errors ? 0:1;
}
int
gr_dbm_present(void)
{
return (access(GROUP_PAG_FILE, F_OK) == 0);
}
#endif

View File

@ -2,38 +2,33 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: groupio.c,v 1.10 2001/08/14 21:10:36 malekith Exp $")
RCSID ("$Id: groupio.c,v 1.11 2005/03/31 05:14:49 kloczek Exp $")
#include "prototypes.h"
#include "defines.h"
#include "commonio.h"
#include "groupio.h"
extern int putgrent (const struct group *, FILE *);
extern struct group *sgetgrent (const char *);
extern int putgrent(const struct group *, FILE *);
extern struct group *sgetgrent(const char *);
struct group *
__gr_dup(const struct group *grent)
struct group *__gr_dup (const struct group *grent)
{
struct group *gr;
int i;
if (!(gr = (struct group *) malloc(sizeof *gr)))
if (!(gr = (struct group *) malloc (sizeof *gr)))
return NULL;
*gr = *grent;
if (!(gr->gr_name = strdup(grent->gr_name)))
if (!(gr->gr_name = strdup (grent->gr_name)))
return NULL;
if (!(gr->gr_passwd = strdup(grent->gr_passwd)))
if (!(gr->gr_passwd = strdup (grent->gr_passwd)))
return NULL;
for (i = 0; grent->gr_mem[i]; i++)
;
gr->gr_mem = (char **) malloc((i + 1) * sizeof(char *));
for (i = 0; grent->gr_mem[i]; i++);
gr->gr_mem = (char **) malloc ((i + 1) * sizeof (char *));
if (!gr->gr_mem)
return NULL;
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 (!gr->gr_mem[i])
return NULL;
}
@ -41,45 +36,43 @@ __gr_dup(const struct group *grent)
return gr;
}
static void *
group_dup(const void *ent)
static void *group_dup (const void *ent)
{
const struct group *gr = ent;
return __gr_dup(gr);
return __gr_dup (gr);
}
static void
group_free(void *ent)
static void group_free (void *ent)
{
struct group *gr = ent;
free(gr->gr_name);
free(gr->gr_passwd);
while(*(gr->gr_mem)) {
free(*(gr->gr_mem));
free (gr->gr_name);
free (gr->gr_passwd);
while (*(gr->gr_mem)) {
free (*(gr->gr_mem));
gr->gr_mem++;
}
free(gr);
free (gr);
}
static const char *
group_getname(const void *ent)
static const char *group_getname (const void *ent)
{
const struct group *gr = ent;
return gr->gr_name;
}
static void *
group_parse(const char *line)
static void *group_parse (const char *line)
{
return (void *) sgetgrent(line);
return (void *) sgetgrent (line);
}
static int
group_put(const void *ent, FILE *file)
static int group_put (const void *ent, FILE * file)
{
const struct group *gr = ent;
return (putgrent(gr, file) == -1) ? -1 : 0;
return (putgrent (gr, file) == -1) ? -1 : 0;
}
static struct commonio_ops group_ops = {
@ -93,114 +86,99 @@ static struct commonio_ops group_ops = {
};
static struct commonio_db group_db = {
GROUP_FILE, /* filename */
&group_ops, /* ops */
NULL, /* fp */
NULL, /* head */
NULL, /* tail */
NULL, /* cursor */
0, /* changed */
0, /* isopen */
0, /* locked */
0 /* readonly */
GROUP_FILE, /* filename */
&group_ops, /* ops */
NULL, /* fp */
NULL, /* head */
NULL, /* tail */
NULL, /* cursor */
0, /* changed */
0, /* isopen */
0, /* locked */
0 /* readonly */
};
int
gr_name(const char *filename)
int gr_name (const char *filename)
{
return commonio_setname(&group_db, filename);
return commonio_setname (&group_db, filename);
}
int
gr_lock(void)
int gr_lock (void)
{
return commonio_lock(&group_db);
return commonio_lock (&group_db);
}
int
gr_open(int mode)
int gr_open (int mode)
{
return commonio_open(&group_db, mode);
return commonio_open (&group_db, mode);
}
const struct group *
gr_locate(const char *name)
const struct group *gr_locate (const char *name)
{
return commonio_locate(&group_db, name);
return commonio_locate (&group_db, name);
}
int
gr_update(const struct group *gr)
int gr_update (const struct group *gr)
{
return commonio_update(&group_db, (const void *) gr);
return commonio_update (&group_db, (const void *) gr);
}
int
gr_remove(const char *name)
int gr_remove (const char *name)
{
return commonio_remove(&group_db, name);
return commonio_remove (&group_db, name);
}
int
gr_rewind(void)
int gr_rewind (void)
{
return commonio_rewind(&group_db);
return commonio_rewind (&group_db);
}
const struct group *
gr_next(void)
const struct group *gr_next (void)
{
return commonio_next(&group_db);
return commonio_next (&group_db);
}
int
gr_close(void)
int gr_close (void)
{
return commonio_close(&group_db);
return commonio_close (&group_db);
}
int
gr_unlock(void)
int gr_unlock (void)
{
return commonio_unlock(&group_db);
return commonio_unlock (&group_db);
}
void
__gr_set_changed(void)
void __gr_set_changed (void)
{
group_db.changed = 1;
}
struct commonio_entry *
__gr_get_head(void)
struct commonio_entry *__gr_get_head (void)
{
return group_db.head;
}
struct commonio_db *
__gr_get_db(void)
struct commonio_db *__gr_get_db (void)
{
return &group_db;
}
void
__gr_del_entry(const struct commonio_entry *ent)
void __gr_del_entry (const struct commonio_entry *ent)
{
commonio_del_entry(&group_db, ent);
commonio_del_entry (&group_db, ent);
}
static int
gr_cmp(const void *p1, const void *p2)
static int gr_cmp (const void *p1, const void *p2)
{
gid_t u1, u2;
if ((*(struct commonio_entry**)p1)->eptr == NULL)
if ((*(struct commonio_entry **) p1)->eptr == NULL)
return 1;
if ((*(struct commonio_entry**)p2)->eptr == NULL)
if ((*(struct commonio_entry **) p2)->eptr == NULL)
return -1;
u1 = ((struct group *)(*(struct commonio_entry**)p1)->eptr)->gr_gid;
u2 = ((struct group *)(*(struct commonio_entry**)p2)->eptr)->gr_gid;
u1 = ((struct group *) (*(struct commonio_entry **) p1)->eptr)->gr_gid;
u2 = ((struct group *) (*(struct commonio_entry **) p2)->eptr)->gr_gid;
if (u1 < u2)
return -1;
@ -211,8 +189,7 @@ gr_cmp(const void *p1, const void *p2)
}
/* Sort entries by gid */
int
gr_sort()
int gr_sort ()
{
return commonio_sort(&group_db, gr_cmp);
return commonio_sort (&group_db, gr_cmp);
}

View File

@ -1,13 +1,13 @@
extern struct group *__gr_dup(const struct group *);
extern void __gr_set_changed(void);
extern int gr_close(void);
extern const struct group *gr_locate(const char *);
extern int gr_lock(void);
extern int gr_name(const char *);
extern const struct group *gr_next(void);
extern int gr_open(int);
extern int gr_remove(const char *);
extern int gr_rewind(void);
extern int gr_unlock(void);
extern int gr_update(const struct group *);
extern int gr_sort(void);
extern struct group *__gr_dup (const struct group *);
extern void __gr_set_changed (void);
extern int gr_close (void);
extern const struct group *gr_locate (const char *);
extern int gr_lock (void);
extern int gr_name (const char *);
extern const struct group *gr_next (void);
extern int gr_open (int);
extern int gr_remove (const char *);
extern int gr_rewind (void);
extern int gr_unlock (void);
extern int gr_update (const struct group *);
extern int gr_sort (void);

View File

@ -30,18 +30,14 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: grpack.c,v 1.3 1997/12/07 23:26:52 marekm Exp $")
RCSID ("$Id: grpack.c,v 1.4 2005/03/31 05:14:49 kloczek Exp $")
#include <stdio.h>
#include <grp.h>
#include "defines.h"
int
gr_pack(const struct group *group, char *buf)
int gr_pack (const struct group *group, char *buf)
{
char *cp;
int i;
char *cp;
int i;
cp = buf;
strcpy (cp, group->gr_name);
@ -53,7 +49,7 @@ gr_pack(const struct group *group, char *buf)
memcpy (cp, (const char *) &group->gr_gid, sizeof group->gr_gid);
cp += sizeof group->gr_gid;
for (i = 0;group->gr_mem[i];i++) {
for (i = 0; group->gr_mem[i]; i++) {
strcpy (cp, group->gr_mem[i]);
cp += strlen (cp) + 1;
}
@ -62,11 +58,10 @@ gr_pack(const struct group *group, char *buf)
return cp - buf;
}
int
gr_unpack(char *buf, int len, struct group *group)
int gr_unpack (char *buf, int len, struct group *group)
{
char *org = buf;
int i;
char *org = buf;
int i;
group->gr_name = buf;
buf += strlen (buf) + 1;
@ -83,7 +78,7 @@ gr_unpack(char *buf, int len, struct group *group)
if (buf - org > len)
return -1;
for (i = 0;*buf && i < 1024;i++) {
for (i = 0; *buf && i < 1024; i++) {
group->gr_mem[i] = buf;
buf += strlen (buf) + 1;

View File

@ -1,167 +0,0 @@
/*
* Copyright 1990 - 1994, 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>
#if defined(NDBM) && defined(SHADOWGRP) /*{*/
#include <string.h>
#include <stdio.h>
#include "prototypes.h"
#include "rcsid.h"
RCSID("$Id: gsdbm.c,v 1.3 1997/12/07 23:26:53 marekm Exp $")
#include <ndbm.h>
extern DBM *sg_dbm;
#define GRP_FRAG 256
/*
* sg_dbm_update
*
* Updates the DBM password files, if they exist.
*/
int
sg_dbm_update(const struct sgrp *sgr)
{
datum key;
datum content;
char data[BUFSIZ*8];
char sgrpkey[60];
char *cp;
int len;
int i;
int cnt;
static int once;
if (! once) {
if (! sg_dbm)
setsgent ();
once++;
}
if (! sg_dbm)
return 0;
len = sgr_pack (sgr, data);
if (len <= GRP_FRAG) {
content.dsize = len;
content.dptr = data;
key.dsize = strlen (sgr->sg_name);
key.dptr = sgr->sg_name;
if (dbm_store (sg_dbm, key, content, DBM_REPLACE))
return 0;
} else {
content.dsize = sizeof cnt;
content.dptr = (char *) &cnt;
cnt = (len + (GRP_FRAG-1)) / GRP_FRAG;
key.dsize = strlen (sgr->sg_name);
key.dptr = sgr->sg_name;
if (dbm_store (sg_dbm, key, content, DBM_REPLACE))
return 0;
for (cp = data, i = 0;i < cnt;i++) {
content.dsize = len > GRP_FRAG ? GRP_FRAG:len;
len -= content.dsize;
content.dptr = cp;
cp += content.dsize;
key.dsize = sizeof i + strlen (sgr->sg_name);
key.dptr = sgrpkey;
memcpy (sgrpkey, (char *) &i, sizeof i);
strcpy (sgrpkey + sizeof i, sgr->sg_name);
if (dbm_store (sg_dbm, key, content, DBM_REPLACE))
return 0;
}
}
return 1;
}
/*
* sg_dbm_remove
*
* Deletes the DBM shadow group file entries, if they exist.
*/
int
sg_dbm_remove(const char *name)
{
datum key;
datum content;
char grpkey[60];
int i;
int cnt;
int errors = 0;
static int once;
if (! once) {
if (! sg_dbm)
setsgent ();
once++;
}
if (! sg_dbm)
return 0;
key.dsize = strlen (name);
key.dptr = name;
content = dbm_fetch (sg_dbm, key);
if (content.dptr == 0)
++errors;
else {
if (content.dsize == sizeof (int)) {
memcpy ((char *) &cnt, content.dptr, sizeof cnt);
for (i = 0;i < cnt;i++) {
key.dsize = sizeof i + strlen (name);
key.dptr = grpkey;
memcpy (grpkey, (char *) &i, sizeof i);
strcpy (grpkey + sizeof i, name);
if (dbm_delete (sg_dbm, key))
++errors;
}
} else {
if (dbm_delete (sg_dbm, key))
++errors;
}
}
return errors ? 0:1;
}
int
sg_dbm_present(void)
{
return (access(SGROUP_PAG_FILE, F_OK) == 0);
}
#endif /*} SHADOWGRP && NDBM */

View File

@ -30,47 +30,38 @@
#include <config.h>
/* Newer versions of Linux libc already have shadow support. */
#if defined(SHADOWGRP) && !defined(HAVE_SHADOWGRP) /*{*/
#if defined(SHADOWGRP) && !defined(HAVE_SHADOWGRP) /*{ */
#include "rcsid.h"
RCSID("$Id: gshadow.c,v 1.6 1998/04/02 21:51:43 marekm Exp $")
RCSID ("$Id: gshadow.c,v 1.9 2005/04/06 04:26:05 kloczek Exp $")
#include <stdio.h>
#include "prototypes.h"
#include "defines.h"
#ifdef NDBM
#include <ndbm.h>
#include <fcntl.h>
DBM *sg_dbm;
int sg_dbm_mode = -1;
static int dbmopened;
static int dbmerror;
#endif
static FILE *shadow;
static char sgrbuf[BUFSIZ * 4];
static char **members = NULL;
static size_t nmembers = 0;
static char **admins = NULL;
static size_t nadmins = 0;
static struct sgrp sgroup;
#define MAXMEM 1024
static FILE *shadow;
static char sgrbuf[BUFSIZ*4];
static char *members[MAXMEM+1];
static char *admins[MAXMEM+1];
static struct sgrp sgroup;
extern char *fgetsx();
extern int fputsx();
extern char *fgetsx ();
extern int fputsx ();
#define FIELDS 4
#ifdef USE_NIS
static int nis_used;
static int nis_ignore;
static enum { native, start, middle, native2 } nis_state;
static int nis_bound;
static char *nis_domain;
static char *nis_key;
static int nis_keylen;
static char *nis_val;
static int nis_vallen;
static int nis_used;
static int nis_ignore;
static enum { native, start, middle, native2 } nis_state;
static int nis_bound;
static char *nis_domain;
static char *nis_key;
static int nis_keylen;
static char *nis_val;
static int nis_vallen;
#define IS_NISCHAR(c) ((c)=='+')
#endif
@ -80,10 +71,9 @@ static int nis_vallen;
* __setsgNIS - turn on or off NIS searches
*/
void
__setsgNIS(int flag)
void __setsgNIS (int flag)
{
nis_ignore = ! flag;
nis_ignore = !flag;
if (nis_ignore)
nis_used = 0;
@ -93,8 +83,7 @@ __setsgNIS(int flag)
* bind_nis - bind to NIS server
*/
static int
bind_nis(void)
static int bind_nis (void)
{
if (yp_get_default_domain (&nis_domain))
return -1;
@ -104,82 +93,53 @@ bind_nis(void)
}
#endif
static char **
list(char *s, char **l)
static char **list (char *s, char **list[], size_t * nlist)
{
int nmembers = 0;
char **ptr = *list;
size_t nelem = *nlist, size;
while (s && *s) {
l[nmembers++] = s;
if ((s = strchr (s, ',')))
*s++ = '\0';
while (s != NULL && *s != '\0') {
size = (nelem + 1) * sizeof (ptr);
if ((ptr = realloc (*list, size)) != NULL) {
ptr[nelem++] = s;
*list = ptr;
*nlist = nelem;
if ((s = strchr (s, ',')))
*s++ = '\0';
}
}
l[nmembers] = (char *) 0;
return l;
size = (nelem + 1) * sizeof (ptr);
if ((ptr = realloc (*list, size)) != NULL) {
ptr[nelem] = '\0';
*list = ptr;
}
return ptr;
}
void
setsgent(void)
void setsgent (void)
{
#ifdef NDBM
int mode;
#endif /* NDBM */
#ifdef USE_NIS
nis_state = native;
#endif
if (shadow)
rewind (shadow);
else
shadow = fopen(SGROUP_FILE, "r");
/*
* Attempt to open the DBM files if they have never been opened
* and an error has never been returned.
*/
#ifdef NDBM
if (! dbmerror && ! dbmopened) {
char dbmfiles[BUFSIZ];
strcpy (dbmfiles, SGROUP_PAG_FILE);
if (sg_dbm_mode == -1)
mode = O_RDWR;
else
mode = (sg_dbm_mode == O_RDWR) ? O_RDWR:O_RDONLY;
if (access(dbmfiles, F_OK) ||
(! (sg_dbm = dbm_open(SGROUP_FILE, mode, 0))))
dbmerror = 1;
else
dbmopened = 1;
}
#endif /* NDBM */
shadow = fopen (SGROUP_FILE, "r");
}
void
endsgent(void)
void endsgent (void)
{
if (shadow)
(void) fclose (shadow);
shadow = (FILE *) 0;
#ifdef NDBM
if (dbmopened && sg_dbm) {
dbm_close (sg_dbm);
dbmopened = 0;
sg_dbm = 0;
}
#endif
}
struct sgrp *
sgetsgent(const char *string)
struct sgrp *sgetsgent (const char *string)
{
char *fields[FIELDS];
char *cp;
int i;
char *fields[FIELDS];
char *cp;
int i;
strncpy (sgrbuf, string, (int) sizeof sgrbuf - 1);
sgrbuf[sizeof sgrbuf - 1] = '\0';
@ -192,7 +152,7 @@ sgetsgent(const char *string)
* all 4 of them and save the starting addresses in fields[].
*/
for (cp = sgrbuf, i = 0;i < FIELDS && cp;i++) {
for (cp = sgrbuf, i = 0; i < FIELDS && cp; i++) {
fields[i] = cp;
if ((cp = strchr (cp, ':')))
*cp++ = '\0';
@ -205,7 +165,7 @@ sgetsgent(const char *string)
if (cp || i != FIELDS)
#ifdef USE_NIS
if (! IS_NISCHAR (fields[0][0]))
if (!IS_NISCHAR (fields[0][0]))
return 0;
else
nis_used = 1;
@ -215,8 +175,18 @@ sgetsgent(const char *string)
sgroup.sg_name = fields[0];
sgroup.sg_passwd = fields[1];
sgroup.sg_adm = list (fields[2], admins);
sgroup.sg_mem = list (fields[3], members);
if (nadmins) {
nadmins = 0;
free (admins);
admins = NULL;
}
if (nmembers) {
nmembers = 0;
free (members);
members = NULL;
}
sgroup.sg_adm = list (fields[2], &admins, &nadmins);
sgroup.sg_mem = list (fields[3], &members, &nmembers);
return &sgroup;
}
@ -228,13 +198,12 @@ sgetsgent(const char *string)
* converts it to a (struct sgrp). NULL is returned on EOF.
*/
struct sgrp *
fgetsgent(FILE *fp)
struct sgrp *fgetsgent (FILE * fp)
{
char buf[sizeof sgrbuf];
char *cp;
char buf[sizeof sgrbuf];
char *cp;
if (! fp)
if (!fp)
return (0);
#ifdef USE_NIS
@ -258,19 +227,18 @@ fgetsgent(FILE *fp)
* getsgent - get a single shadow group entry
*/
struct sgrp *
getsgent(void)
struct sgrp *getsgent (void)
{
#ifdef USE_NIS
int nis_1_group = 0;
struct sgrp *val;
char buf[BUFSIZ];
int nis_1_group = 0;
struct sgrp *val;
char buf[BUFSIZ];
#endif
if (! shadow)
if (!shadow)
setsgent ();
#ifdef USE_NIS
again:
again:
/*
* See if we are reading from the local file.
*/
@ -282,7 +250,7 @@ again:
* NULL right away if there is none.
*/
if (! (val = fgetsgent (shadow)))
if (!(val = fgetsgent (shadow)))
return 0;
/*
@ -328,15 +296,15 @@ again:
}
if (nis_state == start) {
if (yp_first (nis_domain, "gshadow.byname", &nis_key,
&nis_keylen, &nis_val, &nis_vallen)) {
&nis_keylen, &nis_val, &nis_vallen)) {
nis_state = native2;
goto again;
}
nis_state = middle;
} else if (nis_state == middle) {
if (yp_next (nis_domain, "gshadow.byname", nis_key,
nis_keylen, &nis_key, &nis_keylen,
&nis_val, &nis_vallen)) {
nis_keylen, &nis_key, &nis_keylen,
&nis_val, &nis_vallen)) {
nis_state = native2;
goto again;
}
@ -352,61 +320,35 @@ again:
* getsgnam - get a shadow group entry by name
*/
struct sgrp *
getsgnam(const char *name)
struct sgrp *getsgnam (const char *name)
{
struct sgrp *sgrp;
#ifdef NDBM
datum key;
datum content;
#endif
struct sgrp *sgrp;
#ifdef USE_NIS
char buf[BUFSIZ];
static char save_name[16];
int nis_disabled = 0;
char buf[BUFSIZ];
static char save_name[16];
int nis_disabled = 0;
#endif
setsgent ();
#ifdef NDBM
/*
* If the DBM file are now open, create a key for this group and
* try to fetch the entry from the database. A matching record
* will be unpacked into a static structure and returned to
* the user.
*/
if (dbmopened) {
key.dsize = strlen (name);
key.dptr = (void *) name;
content = dbm_fetch (sg_dbm, key);
if (content.dptr != 0) {
memcpy (sgrbuf, content.dptr, content.dsize);
sgroup.sg_mem = members;
sgroup.sg_adm = admins;
sgr_unpack (sgrbuf, content.dsize, &sgroup);
return &sgroup;
}
}
#endif
#ifdef USE_NIS
if (nis_used) {
again:
again:
/*
* Search the gshadow.byname map for this group.
*/
if (! nis_bound)
if (!nis_bound)
bind_nis ();
if (nis_bound) {
char *cp;
char *cp;
if (yp_match (nis_domain, "gshadow.byname", name,
strlen (name), &nis_val, &nis_vallen) == 0) {
strlen (name), &nis_val,
&nis_vallen) == 0) {
if (cp = strchr (nis_val, '\n'))
*cp = '\0';
@ -448,24 +390,23 @@ again:
* opposite of fgetsgent.
*/
int
putsgent(const struct sgrp *sgrp, FILE *fp)
int putsgent (const struct sgrp *sgrp, FILE * fp)
{
char *buf, *cp;
int i;
size_t size;
if (! fp || ! sgrp)
if (!fp || !sgrp)
return -1;
/* calculate the required buffer size */
size = strlen(sgrp->sg_name) + strlen(sgrp->sg_passwd) + 10;
size = strlen (sgrp->sg_name) + strlen (sgrp->sg_passwd) + 10;
for (i = 0; sgrp->sg_adm && sgrp->sg_adm[i]; i++)
size += strlen(sgrp->sg_adm[i]) + 1;
size += strlen (sgrp->sg_adm[i]) + 1;
for (i = 0; sgrp->sg_mem && sgrp->sg_mem[i]; i++)
size += strlen(sgrp->sg_mem[i]) + 1;
size += strlen (sgrp->sg_mem[i]) + 1;
buf = malloc(size);
buf = malloc (size);
if (!buf)
return -1;
cp = buf;
@ -487,7 +428,7 @@ putsgent(const struct sgrp *sgrp, FILE *fp)
* with a ",".
*/
for (i = 0;sgrp->sg_adm[i];i++) {
for (i = 0; sgrp->sg_adm[i]; i++) {
if (i > 0)
*cp++ = ',';
@ -500,7 +441,7 @@ putsgent(const struct sgrp *sgrp, FILE *fp)
* Now do likewise with the group members.
*/
for (i = 0;sgrp->sg_mem[i];i++) {
for (i = 0; sgrp->sg_mem[i]; i++) {
if (i > 0)
*cp++ = ',';
@ -515,14 +456,14 @@ putsgent(const struct sgrp *sgrp, FILE *fp)
* continuation conventions.
*/
if (fputsx(buf, fp) == EOF) {
free(buf);
if (fputsx (buf, fp) == EOF) {
free (buf);
return -1;
}
free(buf);
free (buf);
return 0;
}
#else
extern int errno; /* warning: ANSI C forbids an empty source file */
#endif /*} SHADOWGRP */
extern int errno; /* warning: ANSI C forbids an empty source file */
#endif /*} SHADOWGRP */

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: gshadow_.h,v 1.2 1997/05/01 23:14:41 marekm Exp $
* $Id: gshadow_.h,v 1.3 2005/03/31 05:14:49 kloczek Exp $
*/
#ifndef _H_GSHADOW
@ -36,36 +36,36 @@
* Shadow group security file structure
*/
struct sgrp {
char *sg_name; /* group name */
char *sg_passwd; /* group password */
char **sg_adm; /* group administator list */
char **sg_mem; /* group membership list */
struct sgrp {
char *sg_name; /* group name */
char *sg_passwd; /* group password */
char **sg_adm; /* group administator list */
char **sg_mem; /* group membership list */
};
/*
* Shadow group security file functions.
*/
#include <stdio.h> /* for FILE */
#include <stdio.h> /* for FILE */
#if __STDC__
struct sgrp *getsgent (void);
struct sgrp *getsgnam (const char *);
struct sgrp *sgetsgent (const char *);
struct sgrp *fgetsgent (FILE *);
void setsgent (void);
void endsgent (void);
int putsgent (const struct sgrp *, FILE *);
struct sgrp *getsgent (void);
struct sgrp *getsgnam (const char *);
struct sgrp *sgetsgent (const char *);
struct sgrp *fgetsgent (FILE *);
void setsgent (void);
void endsgent (void);
int putsgent (const struct sgrp *, FILE *);
#else
struct sgrp *getsgent ();
struct sgrp *getsgnam ();
struct sgrp *sgetsgent ();
struct sgrp *fgetsgent ();
void setsgent ();
void endsgent ();
int putsgent ();
struct sgrp *getsgent ();
struct sgrp *getsgnam ();
struct sgrp *sgetsgent ();
struct sgrp *fgetsgent ();
void setsgent ();
void endsgent ();
int putsgent ();
#endif
#define GSHADOW "/etc/gshadow"
#endif /* ifndef _H_GSHADOW */
#endif /* ifndef _H_GSHADOW */

View File

@ -29,14 +29,12 @@
#include <config.h>
#ifdef SHADOWGRP /*{*/
#ifdef SHADOWGRP /*{ */
#include "rcsid.h"
RCSID("$Id: gspack.c,v 1.3 1997/12/07 23:26:53 marekm Exp $")
RCSID ("$Id: gspack.c,v 1.4 2005/03/31 05:14:49 kloczek Exp $")
#include <stdio.h>
#include "defines.h"
/*
* sgr_pack - convert a shadow group structure to a packed
* shadow group record
@ -45,12 +43,10 @@ RCSID("$Id: gspack.c,v 1.3 1997/12/07 23:26:53 marekm Exp $")
* the components in a record. this record will be
* unpacked later by sgr_unpack.
*/
int
sgr_pack(const struct sgrp *sgrp, char *buf)
int sgr_pack (const struct sgrp *sgrp, char *buf)
{
char *cp;
int i;
char *cp;
int i;
/*
* The name and password are both easy - append each string
@ -74,13 +70,13 @@ sgr_pack(const struct sgrp *sgrp, char *buf)
* find the start of the members.
*/
for (i = 0;sgrp->sg_adm[i];i++) {
for (i = 0; sgrp->sg_adm[i]; i++) {
strcpy (cp, sgrp->sg_adm[i]);
cp += strlen (cp) + 1;
}
*cp++ = '\0';
for (i = 0;sgrp->sg_mem[i];i++) {
for (i = 0; sgrp->sg_mem[i]; i++) {
strcpy (cp, sgrp->sg_mem[i]);
cp += strlen (cp) + 1;
}
@ -97,11 +93,10 @@ sgr_pack(const struct sgrp *sgrp, char *buf)
* into the normal shadow group structure format.
*/
int
sgr_unpack(char *buf, int len, struct sgrp *sgrp)
int sgr_unpack (char *buf, int len, struct sgrp *sgrp)
{
char *org = buf;
int i;
char *org = buf;
int i;
/*
* The name and password are both easy - they are the first
@ -125,7 +120,7 @@ sgr_unpack(char *buf, int len, struct sgrp *sgrp)
* looking for an initial character of '\0'.
*/
for (i = 0;*buf && i < 1024;i++) {
for (i = 0; *buf && i < 1024; i++) {
sgrp->sg_adm[i] = buf;
buf += strlen (buf) + 1;
@ -133,10 +128,10 @@ sgr_unpack(char *buf, int len, struct sgrp *sgrp)
return -1;
}
sgrp->sg_adm[i] = (char *) 0;
if (! *buf)
if (!*buf)
buf++;
for (i = 0;*buf && i < 1024;i++) {
for (i = 0; *buf && i < 1024; i++) {
sgrp->sg_mem[i] = buf;
buf += strlen (buf) + 1;
@ -147,4 +142,4 @@ sgr_unpack(char *buf, int len, struct sgrp *sgrp)
return 0;
}
#endif /*}*/
#endif /*} */

View File

@ -32,30 +32,25 @@
#ifndef HAVE_LCKPWDF
#include "rcsid.h"
RCSID("$Id: lockpw.c,v 1.4 1998/01/29 23:22:28 marekm Exp $")
RCSID ("$Id: lockpw.c,v 1.5 2005/03/31 05:14:49 kloczek Exp $")
#include "prototypes.h"
#include "defines.h"
#include "pwio.h"
#ifdef SHADOWPWD
#include "shadowio.h"
#endif
/*
* lckpwdf - lock the password files
*/
int
lckpwdf(void)
int lckpwdf (void)
{
int i;
int i;
/*
* We have 15 seconds to lock the whole mess
*/
for (i = 0;i < 15;i++)
for (i = 0; i < 15; i++)
if (pw_lock ())
break;
else
@ -73,7 +68,7 @@ lckpwdf(void)
* file.
*/
for (;i < 15;i++)
for (; i < 15; i++)
if (spw_lock ())
break;
else
@ -99,16 +94,15 @@ lckpwdf(void)
* ulckpwdf - unlock the password files
*/
int
ulckpwdf(void)
int ulckpwdf (void)
{
/*
* Unlock both files.
*/
return (pw_unlock () && spw_unlock ()) ? 0:-1;
return (pw_unlock () && spw_unlock ())? 0 : -1;
}
#else
extern int errno; /* warning: ANSI C forbids an empty source file */
extern int errno; /* warning: ANSI C forbids an empty source file */
#endif

View File

@ -30,17 +30,15 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: port.c,v 1.3 1997/12/07 23:26:54 marekm Exp $")
RCSID ("$Id: port.c,v 1.4 2005/03/31 05:14:49 kloczek Exp $")
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
#include "defines.h"
#include "port.h"
extern int errno;
extern int errno;
static FILE *ports;
static FILE *ports;
/*
* portcmp - compare the name of a port to a /etc/porttime entry
@ -52,8 +50,7 @@ static FILE *ports;
* A match returns 0, failure returns non-zero.
*/
static int
portcmp(const char *pattern, const char *port)
static int portcmp (const char *pattern, const char *port)
{
const char *orig = port;
@ -65,7 +62,7 @@ portcmp(const char *pattern, const char *port)
if (orig[0] == 'S' && orig[1] == 'U' && orig[2] == '\0')
return 1;
return *pattern == '*' ? 0:1;
return *pattern == '*' ? 0 : 1;
}
/*
@ -75,12 +72,11 @@ portcmp(const char *pattern, const char *port)
* opened for reading.
*/
static void
setportent(void)
static void setportent (void)
{
if (ports)
rewind (ports);
else
else
ports = fopen (PORTS, "r");
}
@ -92,8 +88,7 @@ setportent(void)
* open.
*/
static void
endportent(void)
static void endportent (void)
{
if (ports)
fclose (ports);
@ -110,28 +105,27 @@ endportent(void)
* set to EINVAL on error to distinguish the two conditions.
*/
static struct port *
getportent(void)
static struct port *getportent (void)
{
static struct port port; /* static struct to point to */
static char buf[BUFSIZ]; /* some space for stuff */
static char *ttys[PORT_TTY+1]; /* some pointers to tty names */
static char *users[PORT_IDS+1]; /* some pointers to user ids */
static struct pt_time ptimes[PORT_TIMES+1]; /* time ranges */
char *cp; /* pointer into line */
int dtime; /* scratch time of day */
int i, j;
int saveerr = errno; /* errno value on entry */
static struct port port; /* static struct to point to */
static char buf[BUFSIZ]; /* some space for stuff */
static char *ttys[PORT_TTY + 1]; /* some pointers to tty names */
static char *users[PORT_IDS + 1]; /* some pointers to user ids */
static struct pt_time ptimes[PORT_TIMES + 1]; /* time ranges */
char *cp; /* pointer into line */
int dtime; /* scratch time of day */
int i, j;
int saveerr = errno; /* errno value on entry */
/*
* If the ports file is not open, open the file. Do not rewind
* since we want to search from the beginning each time.
*/
if (! ports)
if (!ports)
setportent ();
if (! ports) {
if (!ports) {
errno = saveerr;
return 0;
}
@ -139,14 +133,14 @@ getportent(void)
/*
* Common point for beginning a new line -
*
* - read a line, and NUL terminate
* - skip lines which begin with '#'
* - parse off the tty names
* - parse off a list of user names
* - parse off a list of days and times
* - read a line, and NUL terminate
* - skip lines which begin with '#'
* - parse off the tty names
* - parse off a list of user names
* - parse off a list of days and times
*/
again:
again:
/*
* Get the next line and remove the last character, which
@ -170,18 +164,18 @@ again:
buf[strlen (buf) - 1] = 0;
port.pt_names = ttys;
for (cp = buf, j = 0;j < PORT_TTY;j++) {
for (cp = buf, j = 0; j < PORT_TTY; j++) {
port.pt_names[j] = cp;
while (*cp && *cp != ':' && *cp != ',')
cp++;
if (! *cp)
if (!*cp)
goto again; /* line format error */
if (*cp == ':') /* end of tty name list */
if (*cp == ':') /* end of tty name list */
break;
if (*cp == ',') /* end of current tty name */
if (*cp == ',') /* end of current tty name */
*cp++ = '\0';
}
*cp++ = 0;
@ -198,7 +192,7 @@ again:
port.pt_users = users;
port.pt_users[0] = cp;
for (j = 1;*cp != ':';cp++) {
for (j = 1; *cp != ':'; cp++) {
if (*cp == ',' && j < PORT_IDS) {
*cp++ = 0;
port.pt_users[j++] = cp;
@ -237,7 +231,7 @@ again:
* Get the next comma separated entry
*/
for (j = 0;*cp && j < PORT_TIMES;j++) {
for (j = 0; *cp && j < PORT_TIMES; j++) {
/*
* Start off with no days of the week
@ -251,38 +245,38 @@ again:
* week or the other two values.
*/
for (i = 0;cp[i] && cp[i + 1] && isalpha (cp[i]);i += 2) {
for (i = 0; cp[i] && cp[i + 1] && isalpha (cp[i]); i += 2) {
switch ((cp[i] << 8) | (cp[i + 1])) {
case ('S' << 8) | 'u':
port.pt_times[j].t_days |= 01;
break;
case ('M' << 8) | 'o':
port.pt_times[j].t_days |= 02;
break;
case ('T' << 8) | 'u':
port.pt_times[j].t_days |= 04;
break;
case ('W' << 8) | 'e':
port.pt_times[j].t_days |= 010;
break;
case ('T' << 8) | 'h':
port.pt_times[j].t_days |= 020;
break;
case ('F' << 8) | 'r':
port.pt_times[j].t_days |= 040;
break;
case ('S' << 8) | 'a':
port.pt_times[j].t_days |= 0100;
break;
case ('W' << 8) | 'k':
port.pt_times[j].t_days |= 076;
break;
case ('A' << 8) | 'l':
port.pt_times[j].t_days |= 0177;
break;
default:
errno = EINVAL;
return 0;
case ('S' << 8) | 'u':
port.pt_times[j].t_days |= 01;
break;
case ('M' << 8) | 'o':
port.pt_times[j].t_days |= 02;
break;
case ('T' << 8) | 'u':
port.pt_times[j].t_days |= 04;
break;
case ('W' << 8) | 'e':
port.pt_times[j].t_days |= 010;
break;
case ('T' << 8) | 'h':
port.pt_times[j].t_days |= 020;
break;
case ('F' << 8) | 'r':
port.pt_times[j].t_days |= 040;
break;
case ('S' << 8) | 'a':
port.pt_times[j].t_days |= 0100;
break;
case ('W' << 8) | 'k':
port.pt_times[j].t_days |= 076;
break;
case ('A' << 8) | 'l':
port.pt_times[j].t_days |= 0177;
break;
default:
errno = EINVAL;
return 0;
}
}
@ -299,7 +293,7 @@ again:
* representing the times of day.
*/
for (dtime = 0;cp[i] && isdigit (cp[i]);i++)
for (dtime = 0; cp[i] && isdigit (cp[i]); i++)
dtime = dtime * 10 + cp[i] - '0';
if (cp[i] != '-' || dtime > 2400 || dtime % 100 > 59)
@ -307,11 +301,10 @@ again:
port.pt_times[j].t_start = dtime;
cp = cp + i + 1;
for (dtime = i = 0;cp[i] && isdigit (cp[i]);i++)
for (dtime = i = 0; cp[i] && isdigit (cp[i]); i++)
dtime = dtime * 10 + cp[i] - '0';
if ((cp[i] != ',' && cp[i]) ||
dtime > 2400 || dtime % 100 > 59)
if ((cp[i] != ',' && cp[i]) || dtime > 2400 || dtime % 100 > 59)
goto again;
port.pt_times[j].t_end = dtime;
@ -337,11 +330,10 @@ again:
* entries are treated as an ordered list.
*/
static struct port *
getttyuser(const char *tty, const char *user)
static struct port *getttyuser (const char *tty, const char *user)
{
int i, j;
struct port *port;
int i, j;
struct port *port;
setportent ();
@ -349,16 +341,16 @@ getttyuser(const char *tty, const char *user)
if (port->pt_names == 0 || port->pt_users == 0)
continue;
for (i = 0;port->pt_names[i];i++)
for (i = 0; port->pt_names[i]; i++)
if (portcmp (port->pt_names[i], tty) == 0)
break;
if (port->pt_names[i] == 0)
continue;
for (j = 0;port->pt_users[j];j++)
for (j = 0; port->pt_users[j]; j++)
if (strcmp (user, port->pt_users[j]) == 0 ||
strcmp (port->pt_users[j], "*") == 0)
strcmp (port->pt_users[j], "*") == 0)
break;
if (port->pt_users[j] != 0)
@ -375,13 +367,12 @@ getttyuser(const char *tty, const char *user)
* the user name and TTY given.
*/
int
isttytime(const char *id, const char *port, time_t when)
int isttytime (const char *id, const char *port, time_t when)
{
int i;
int dtime;
struct port *pp;
struct tm *tm;
int i;
int dtime;
struct port *pp;
struct tm *tm;
/*
* Try to find a matching entry for this user. Default to
@ -389,7 +380,7 @@ isttytime(const char *id, const char *port, time_t when)
* entry to match all users.
*/
if (! (pp = getttyuser (port, id)))
if (!(pp = getttyuser (port, id)))
return 1;
/*
@ -415,17 +406,17 @@ isttytime(const char *id, const char *port, time_t when)
* midnight and either the start or end time.
*/
for (i = 0;pp->pt_times[i].t_start != -1;i++) {
if (! (pp->pt_times[i].t_days & PORT_DAY(tm->tm_wday)))
for (i = 0; pp->pt_times[i].t_start != -1; i++) {
if (!(pp->pt_times[i].t_days & PORT_DAY (tm->tm_wday)))
continue;
if (pp->pt_times[i].t_start <= pp->pt_times[i].t_end) {
if (dtime >= pp->pt_times[i].t_start &&
dtime <= pp->pt_times[i].t_end)
dtime <= pp->pt_times[i].t_end)
return 1;
} else {
if (dtime >= pp->pt_times[i].t_start ||
dtime <= pp->pt_times[i].t_end)
dtime <= pp->pt_times[i].t_end)
return 1;
}
}

View File

@ -30,7 +30,7 @@
/*
* port.h - structure of /etc/porttime
*
* $Id: port.h,v 1.2 1997/05/01 23:14:43 marekm Exp $
* $Id: port.h,v 1.3 2005/03/31 05:14:49 kloczek Exp $
*
* Each entry in /etc/porttime consists of a TTY device
* name or "*" to indicate all TTY devices, followed by
@ -62,10 +62,10 @@
* pt_times - pointer to list of allowable time periods.
*/
struct port {
char **pt_names;
char **pt_users;
struct pt_time *pt_times;
struct port {
char **pt_names;
char **pt_users;
struct pt_time *pt_times;
};
/*
@ -74,8 +74,8 @@ struct port {
* t_end - ending time for this entry
*/
struct pt_time {
short t_days;
short t_start;
short t_end;
struct pt_time {
short t_days;
short t_start;
short t_end;
};

View File

@ -6,7 +6,7 @@
* Juha Virtanen, <jiivee@hut.fi>; November 1995
*/
/*
* $Id: prototypes.h,v 1.15 2003/04/25 21:33:47 kloczek Exp $
* $Id: prototypes.h,v 1.18 2005/04/06 03:01:07 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
@ -27,206 +27,199 @@
#include "defines.h"
/* addgrps.c */
extern int add_groups(const char *);
extern void add_cons_grps(void);
extern int add_groups (const char *);
extern void add_cons_grps (void);
/* age.c */
#ifdef SHADOWPWD
extern void agecheck(const struct passwd *, const struct spwd *);
extern int expire(const struct passwd *, const struct spwd *);
extern int isexpired(const struct passwd *, const struct spwd *);
extern void agecheck (const struct passwd *, const struct spwd *);
extern int expire (const struct passwd *, const struct spwd *);
extern int isexpired (const struct passwd *, const struct spwd *);
#else
extern void agecheck(const struct passwd *);
extern int expire(const struct passwd *);
extern int isexpired(const struct passwd *);
extern void agecheck (const struct passwd *);
extern int expire (const struct passwd *);
extern int isexpired (const struct passwd *);
#endif
/* basename() renamed to Basename() to avoid libc name space confusion */
/* basename.c */
extern char *Basename(char *str);
extern char *Basename (char *str);
/* chkshell.c */
extern int check_shell(const char *);
extern int check_shell (const char *);
/* chowndir.c */
extern int chown_tree(const char *, uid_t, uid_t, gid_t, gid_t);
extern int chown_tree (const char *, uid_t, uid_t, gid_t, gid_t);
/* chowntty.c */
extern void chown_tty(const char *, const struct passwd *);
extern void chown_tty (const char *, const struct passwd *);
/* console.c */
extern int console(const char *);
extern int is_listed(const char *, const char *, int);
extern int console (const char *);
extern int is_listed (const char *, const char *, int);
/* copydir.c */
extern int copy_tree(const char *, const char *, uid_t, gid_t);
extern int remove_tree(const char *);
extern int copy_tree (const char *, const char *, uid_t, gid_t);
extern int remove_tree (const char *);
/* encrypt.c */
extern char *pw_encrypt(const char *, const char *);
extern char *pw_encrypt (const char *, const char *);
/* entry.c */
extern void pw_entry(const char *, struct passwd *);
extern void pw_entry (const char *, struct passwd *);
/* env.c */
extern void addenv(const char *, const char *);
extern void initenv(void);
extern void set_env(int, char * const *);
extern void sanitize_env(void);
extern void addenv (const char *, const char *);
extern void initenv (void);
extern void set_env (int, char *const *);
extern void sanitize_env (void);
/* fields.c */
extern void change_field(char *, size_t, const char *);
extern int valid_field(const char *, const char *);
extern void change_field (char *, size_t, const char *);
extern int valid_field (const char *, const char *);
/* fputsx.c */
extern char *fgetsx(char *, int, FILE *);
extern int fputsx(const char *, FILE *);
extern char *fgetsx (char *, int, FILE *);
extern int fputsx (const char *, FILE *);
/* grdbm.c */
extern int gr_dbm_remove(const struct group *);
extern int gr_dbm_update(const struct group *);
extern int gr_dbm_present(void);
extern int gr_dbm_remove (const struct group *);
extern int gr_dbm_update (const struct group *);
extern int gr_dbm_present (void);
/* grent.c */
extern int putgrent(const struct group *, FILE *);
extern int putgrent (const struct group *, FILE *);
/* grpack.c */
extern int gr_pack(const struct group *, char *);
extern int gr_unpack(char *, int, struct group *);
extern int gr_pack (const struct group *, char *);
extern int gr_unpack (char *, int, struct group *);
#ifdef SHADOWGRP
/* gsdbm.c */
extern int sg_dbm_remove(const char *);
extern int sg_dbm_update(const struct sgrp *);
extern int sg_dbm_present(void);
extern int sg_dbm_remove (const char *);
extern int sg_dbm_update (const struct sgrp *);
extern int sg_dbm_present (void);
/* gspack.c */
extern int sgr_pack(const struct sgrp *, char *);
extern int sgr_unpack(char *, int, struct sgrp *);
extern int sgr_pack (const struct sgrp *, char *);
extern int sgr_unpack (char *, int, struct sgrp *);
#endif
/* hushed.c */
extern int hushed(const struct passwd *);
extern int hushed (const struct passwd *);
/* limits.c */
extern void setup_limits(const struct passwd *);
extern void setup_limits (const struct passwd *);
/* list.c */
extern char **add_list(char **, const char *);
extern char **del_list(char **, const char *);
extern char **dup_list(char * const *);
extern int is_on_list(char * const *, const char *);
extern char **comma_to_list(const char *);
extern char **add_list (char **, const char *);
extern char **del_list (char **, const char *);
extern char **dup_list (char *const *);
extern int is_on_list (char *const *, const char *);
extern char **comma_to_list (const char *);
/* login.c */
extern void login_prompt(const char *, char *, int);
/* login_desrpc.c */
extern int login_desrpc(const char *);
extern void login_prompt (const char *, char *, int);
/* mail.c */
extern void mailcheck(void);
extern void mailcheck (void);
/* motd.c */
extern void motd(void);
extern void motd (void);
/* myname.c */
extern struct passwd *get_my_pwent(void);
extern struct passwd *get_my_pwent (void);
/* obscure.c */
extern int obscure(const char *, const char *, const struct passwd *);
extern int obscure (const char *, const char *, const struct passwd *);
/* pam_pass.c */
extern int do_pam_passwd(const char *, int, int);
extern int do_pam_passwd (const char *, int, int);
/* port.c */
extern int isttytime(const char *, const char *, time_t);
extern int isttytime (const char *, const char *, time_t);
/* pwd2spwd.c */
#ifdef SHADOWPWD
extern struct spwd *pwd_to_spwd(const struct passwd *);
extern struct spwd *pwd_to_spwd (const struct passwd *);
#endif
/* pwdcheck.c */
extern void passwd_check(const char *, const char *, const char *);
extern void passwd_check (const char *, const char *, const char *);
/* pwd_init.c */
extern void pwd_init(void);
extern void pwd_init (void);
/* pwdbm.c */
extern int pw_dbm_remove(const struct passwd *);
extern int pw_dbm_update(const struct passwd *);
extern int pw_dbm_present(void);
extern int pw_dbm_remove (const struct passwd *);
extern int pw_dbm_update (const struct passwd *);
extern int pw_dbm_present (void);
/* pwpack.c */
extern int pw_pack(const struct passwd *, char *);
extern int pw_unpack(char *, int, struct passwd *);
/* rad64.c */
extern int c64i(int);
extern int i64c(int);
extern int pw_pack (const struct passwd *, char *);
extern int pw_unpack (char *, int, struct passwd *);
/* rlogin.c */
extern int do_rlogin(const char *, char *, int, char *, int);
extern int do_rlogin (const char *, char *, int, char *, int);
/* salt.c */
extern char *crypt_make_salt(void);
extern char *crypt_make_salt (void);
/* setugid.c */
extern int setup_groups(const struct passwd *);
extern int change_uid(const struct passwd *);
extern int setup_uid_gid(const struct passwd *, int);
extern int setup_groups (const struct passwd *);
extern int change_uid (const struct passwd *);
extern int setup_uid_gid (const struct passwd *, int);
/* setup.c */
extern void setup(struct passwd *);
extern void setup (struct passwd *);
/* setupenv.c */
extern void setup_env(struct passwd *);
extern void setup_env (struct passwd *);
/* shell.c */
extern void shell(const char *, const char *);
extern void shell (const char *, const char *);
#ifdef SHADOWPWD
/* spdbm.c */
extern int sp_dbm_remove(const char *);
extern int sp_dbm_update(const struct spwd *);
extern int sp_dbm_present(void);
extern int sp_dbm_remove (const char *);
extern int sp_dbm_update (const struct spwd *);
extern int sp_dbm_present (void);
/* sppack.c */
extern int spw_pack(const struct spwd *, char *);
extern int spw_unpack(char *, int, struct spwd *);
extern int spw_pack (const struct spwd *, char *);
extern int spw_unpack (char *, int, struct spwd *);
#endif
/* strtoday.c */
extern long strtoday(const char *);
extern long strtoday (const char *);
/* suauth.c */
extern int check_su_auth(const char *, const char *);
extern int check_su_auth (const char *, const char *);
/* sulog.c */
extern void sulog(const char *, int, const char *, const char *);
extern void sulog (const char *, int, const char *, const char *);
/* sub.c */
extern void subsystem(const struct passwd *);
extern void subsystem (const struct passwd *);
/* ttytype.c */
extern void ttytype(const char *);
extern void ttytype (const char *);
/* tz.c */
extern char *tz(const char *);
extern char *tz (const char *);
/* ulimit.c */
extern void set_filesize_limit(int);
extern void set_filesize_limit (int);
/* utmp.c */
extern void checkutmp(int);
extern void setutmp(const char *, const char *, const char *);
extern void checkutmp (int);
extern void setutmp (const char *, const char *, const char *);
/* valid.c */
extern int valid(const char *, const struct passwd *);
extern int valid (const char *, const struct passwd *);
/* xmalloc.c */
extern char *xmalloc(size_t);
extern char *xstrdup(const char *);
extern char *xmalloc (size_t);
extern char *xstrdup (const char *);
#endif /* _PROTOTYPES_H */
#endif /* _PROTOTYPES_H */

View File

@ -29,9 +29,9 @@
#include <config.h>
#ifndef USE_PAM
#include "rcsid.h"
RCSID("$Id: pwauth.c,v 1.14 2003/05/12 04:58:56 kloczek Exp $")
RCSID ("$Id: pwauth.c,v 1.17 2005/04/17 15:21:42 kloczek Exp $")
#include <sys/types.h>
#include <signal.h>
#include <fcntl.h>
@ -41,23 +41,14 @@ RCSID("$Id: pwauth.c,v 1.14 2003/05/12 04:58:56 kloczek Exp $")
#include "defines.h"
#include "pwauth.h"
#include "getdef.h"
#ifdef SKEY
#include <skey.h>
#endif
#ifdef OPIE
#include <opie.h>
#endif
#ifdef __linux__ /* standard password prompt by default */
static const char *PROMPT = gettext_noop("Password: ");
#ifdef __linux__ /* standard password prompt by default */
static const char *PROMPT = gettext_noop ("Password: ");
#else
static const char *PROMPT = gettext_noop("%s's Password: ");
static const char *PROMPT = gettext_noop ("%s's Password: ");
#endif
extern char *getpass();
extern char *getpass_with_echo();
extern char *getpass ();
extern char *getpass_with_echo ();
int wipe_clear_pass = 1;
char *clear_pass = NULL;
@ -71,41 +62,12 @@ char *clear_pass = NULL;
*/
int
pw_auth(const char *cipher, const char *user, int reason, const char *input)
pw_auth (const char *cipher, const char *user, int reason, const char *input)
{
char prompt[1024];
char *clear = NULL;
char prompt[1024];
char *clear = NULL;
const char *cp;
int retval;
#ifdef SKEY
int use_skey = 0;
char challenge_info[40];
struct skey skey;
#endif
#ifdef OPIE
int use_opie = 0;
char o_challenge_info[OPIE_CHALLENGE_MAX + 1];
struct opie opie;
/*
* This implementation is based almost entirely on the SKEY code
* above. Thus the opie struct is called skey, etc. I am unaware
* if the system works at the same time, but I cannot imagine why
* anyone would want to do this....
* -- A.R.
* Mod: 5/14/98 A.R.
* Made the OPIE code separate from the S/Key code. Now
* (conceivably) both can be compiled in and function apart from
* one another (assuming a sysadmin really wants to maintain OPIE
* and an S/Key databases....).
*
* Also cleaned up the code a bit. Will be adding second-prompt
* support (the traditional Echo-on S/Key/OPIE-only prompts to let
* the users see the one-time passwords they are typing/pasting
* in....
* -- A.R.
*/
#endif
int retval;
/*
* There are programs for adding and deleting authentication data.
@ -117,7 +79,6 @@ pw_auth(const char *cipher, const char *user, int reason, const char *input)
/*
* There are even programs for changing the user name ...
*/
if (reason == PW_CHANGE && input != (char *) 0)
return 0;
@ -129,7 +90,6 @@ pw_auth(const char *cipher, const char *user, int reason, const char *input)
* know it. This is a policy decision that might have to be
* revisited.
*/
if (reason == PW_CHANGE && getuid () == 0)
return 0;
@ -141,65 +101,21 @@ pw_auth(const char *cipher, const char *user, int reason, const char *input)
* the user could just hit <ENTER>, so it doesn't really
* matter.
*/
if (cipher == (char *) 0 || *cipher == '\0')
return 0;
#ifdef SKEY
/*
* If the user has an S/KEY entry show them the pertinent info
* and then we can try validating the created cyphertext and the SKEY.
* If there is no SKEY information we default to not using SKEY.
*/
if (skeychallenge (&skey, user, challenge_info) == 0)
use_skey = 1;
#endif
#ifdef OPIE
/*
* Ditto above, for OPIE passwords.
* -- AR
*/
o_challenge_info[0] = '\0';
if (opiechallenge(&opie, user, o_challenge_info) == 0)
use_opie = 1;
if (use_opie == 0)
opieverify(&opie, (char *)NULL);
/*
* This call to opieverify is necessary within OPIE's interface:
* Every call to opiechallenge(), which checks to see if the user
* has an OPIE password, and if so get the challenge, must be
* accompanied by exactly one call to opieverify, which clears
* any outstanding locks, and otherwise cleans up.
* -- AR
*/
#endif
/*
* Prompt for the password as required. FTPD and REXECD both
* get the cleartext password for us.
*/
if (reason != PW_FTP && reason != PW_REXEC && !input) {
if (! (cp = getdef_str ("LOGIN_STRING")))
if (!(cp = getdef_str ("LOGIN_STRING")))
cp = _(PROMPT);
#ifdef SKEY
if (use_skey)
printf ("[%s]\n", challenge_info);
#endif
#ifdef OPIE
if (use_opie)
printf("[ %s ]\n", o_challenge_info);
#endif
snprintf(prompt, sizeof prompt, cp, user);
clear = getpass(prompt);
snprintf (prompt, sizeof prompt, cp, user);
clear = getpass (prompt);
if (!clear) {
static char c[1];
c[0] = '\0';
clear = c;
}
@ -209,70 +125,9 @@ pw_auth(const char *cipher, const char *user, int reason, const char *input)
/*
* Convert the cleartext password into a ciphertext string.
* If the two match, the return value will be zero, which is
* SUCCESS. Otherwise we see if SKEY is being used and check
* the results there as well.
* SUCCESS.
*/
retval = strcmp(pw_encrypt(input, cipher), cipher);
#ifdef OPIE
/*
* This is required because using OPIE, opieverify() MUST be called
* opiechallenge() above even if OPIE isn't being used in this case,
* so locks get released, etc.
* -- AR
*/
if ((retval == 0) && use_opie)
opieverify(&opie, (char *)NULL);
#endif
#if (defined(SKEY) || defined(OPIE))
/*
* If (1) The password fails to match, and
* (2) The password is empty and
* (3) We are using OPIE or S/Key, then
* ...Re-prompt, with echo on.
* -- AR 8/22/1999
*/
if (retval && !input[0] &&
(0
#ifdef SKEY
|| use_skey
#endif
#ifdef OPIE
|| use_opie
#endif
)) {
strncat(prompt, _("(Echo on) "),
(sizeof(prompt) - strlen(prompt)));
clear = getpass_with_echo(prompt);
if (!clear) {
static char c[1];
c[0] = '\0';
clear = c;
}
input = clear;
}
#endif
#ifdef SKEY
if (retval && use_skey) {
int passcheck = -1;
if (skeyverify(&skey, input) == 0)
passcheck = skey.n;
if (passcheck > 0)
retval = 0;
}
#endif
#ifdef OPIE
if (retval && use_opie) {
if (opieverify(&opie, input) == 0)
retval = 0;
}
#endif /* OPIE */
retval = strcmp (pw_encrypt (input, cipher), cipher);
/*
* Things like RADIUS authentication may need the password -
@ -280,9 +135,9 @@ pw_auth(const char *cipher, const char *user, int reason, const char *input)
* not wipe it (the caller should wipe clear_pass when it is
* no longer needed). --marekm
*/
clear_pass = clear;
if (wipe_clear_pass && clear && *clear)
strzero(clear);
strzero (clear);
return retval;
}
#endif /* !USE_PAM */

View File

@ -26,10 +26,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: pwauth.h,v 1.3 2003/05/12 06:08:31 kloczek Exp $
* $Id: pwauth.h,v 1.5 2005/03/31 06:24:27 kloczek Exp $
*/
int pw_auth(const char *cipher,const char *user,int flag,const char *input);
#ifndef USE_PAM
int pw_auth (const char *cipher, const char *user, int flag, const char *input);
#endif /* !USE_PAM */
/*
* Local access

View File

@ -1,143 +0,0 @@
/*
* Copyright 1990 - 1994, 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>
#ifdef NDBM /*{*/
#include "rcsid.h"
RCSID("$Id: pwdbm.c,v 1.4 1997/12/14 20:07:19 marekm Exp $")
#include <sys/types.h>
#include <stdio.h>
#include <pwd.h>
#include "prototypes.h"
#include "defines.h"
#include <ndbm.h>
extern DBM *pw_dbm;
/*
* pw_dbm_update
*
* Updates the DBM password files, if they exist.
*/
int
pw_dbm_update(const struct passwd *pw)
{
datum key;
datum content;
char data[BUFSIZ];
int len;
static int once;
if (! once) {
if (! pw_dbm)
setpwent ();
once++;
}
if (! pw_dbm)
return 0;
len = pw_pack (pw, data);
content.dsize = len;
content.dptr = data;
key.dsize = strlen (pw->pw_name);
key.dptr = pw->pw_name;
if (dbm_store(pw_dbm, key, content, DBM_REPLACE))
return 0;
/*
* XXX - on systems with 16-bit UIDs (such as Linux/x86)
* name "aa" and UID 24929 will give the same key. This
* happens only rarely, but code which only "works most
* of the time" is not good enough...
*
* This needs to be fixed in several places (pwdbm.c,
* grdbm.c, pwent.c, grent.c). Fixing it will cause
* incompatibility with existing dbm files.
*
* Summary: don't use this stuff for now. --marekm
*/
key.dsize = sizeof pw->pw_uid;
key.dptr = (char *) &pw->pw_uid;
if (dbm_store(pw_dbm, key, content, DBM_REPLACE))
return 0;
return 1;
}
/*
* pw_dbm_remove
*
* Removes the DBM password entry, if it exists.
*/
int
pw_dbm_remove(const struct passwd *pw)
{
datum key;
static int once;
char data[BUFSIZ];
if (! once) {
if (! pw_dbm)
setpwent ();
once++;
}
if (! pw_dbm)
return 0;
key.dsize = strlen (pw->pw_name);
key.dptr = pw->pw_name;
if (dbm_delete (pw_dbm, key))
return 0;
key.dsize = sizeof pw->pw_uid;
key.dptr = (char *) &pw->pw_uid;
if (dbm_delete (pw_dbm, key))
return 0;
return 1;
}
int
pw_dbm_present(void)
{
return (access(PASSWD_PAG_FILE, F_OK) == 0);
}
#endif /* NDBM */

View File

@ -2,78 +2,72 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: pwio.c,v 1.13 2003/05/03 16:14:23 kloczek Exp $")
RCSID ("$Id: pwio.c,v 1.14 2005/03/31 05:14:49 kloczek Exp $")
#include "prototypes.h"
#include "defines.h"
#include <pwd.h>
#include <stdio.h>
#include "commonio.h"
#include "pwio.h"
extern struct passwd *sgetpwent (const char *);
extern int putpwent (const struct passwd *, FILE *);
extern struct passwd *sgetpwent(const char *);
extern int putpwent(const struct passwd *, FILE *);
struct passwd *
__pw_dup(const struct passwd *pwent)
struct passwd *__pw_dup (const struct passwd *pwent)
{
struct passwd *pw;
if (!(pw = (struct passwd *) malloc(sizeof *pw)))
if (!(pw = (struct passwd *) malloc (sizeof *pw)))
return NULL;
*pw = *pwent;
if (!(pw->pw_name = strdup(pwent->pw_name)))
if (!(pw->pw_name = strdup (pwent->pw_name)))
return NULL;
if (!(pw->pw_passwd = strdup(pwent->pw_passwd)))
if (!(pw->pw_passwd = strdup (pwent->pw_passwd)))
return NULL;
if (!(pw->pw_gecos = strdup(pwent->pw_gecos)))
if (!(pw->pw_gecos = strdup (pwent->pw_gecos)))
return NULL;
if (!(pw->pw_dir = strdup(pwent->pw_dir)))
if (!(pw->pw_dir = strdup (pwent->pw_dir)))
return NULL;
if (!(pw->pw_shell = strdup(pwent->pw_shell)))
if (!(pw->pw_shell = strdup (pwent->pw_shell)))
return NULL;
return pw;
}
static void *
passwd_dup(const void *ent)
static void *passwd_dup (const void *ent)
{
const struct passwd *pw = ent;
return __pw_dup(pw);
return __pw_dup (pw);
}
static void
passwd_free(void *ent)
static void passwd_free (void *ent)
{
struct passwd *pw = ent;
free(pw->pw_name);
free(pw->pw_passwd);
free(pw->pw_gecos);
free(pw->pw_dir);
free(pw->pw_shell);
free(pw);
free (pw->pw_name);
free (pw->pw_passwd);
free (pw->pw_gecos);
free (pw->pw_dir);
free (pw->pw_shell);
free (pw);
}
static const char *
passwd_getname(const void *ent)
static const char *passwd_getname (const void *ent)
{
const struct passwd *pw = ent;
return pw->pw_name;
}
static void *
passwd_parse(const char *line)
static void *passwd_parse (const char *line)
{
return (void *) sgetpwent(line);
return (void *) sgetpwent (line);
}
static int
passwd_put(const void *ent, FILE *file)
static int passwd_put (const void *ent, FILE * file)
{
const struct passwd *pw = ent;
return (putpwent(pw, file) == -1) ? -1 : 0;
return (putpwent (pw, file) == -1) ? -1 : 0;
}
static struct commonio_ops passwd_ops = {
@ -87,108 +81,94 @@ static struct commonio_ops passwd_ops = {
};
static struct commonio_db passwd_db = {
PASSWD_FILE, /* filename */
&passwd_ops, /* ops */
NULL, /* fp */
NULL, /* head */
NULL, /* tail */
NULL, /* cursor */
0, /* changed */
0, /* isopen */
0, /* locked */
0 /* readonly */
PASSWD_FILE, /* filename */
&passwd_ops, /* ops */
NULL, /* fp */
NULL, /* head */
NULL, /* tail */
NULL, /* cursor */
0, /* changed */
0, /* isopen */
0, /* locked */
0 /* readonly */
};
int
pw_name(const char *filename)
int pw_name (const char *filename)
{
return commonio_setname(&passwd_db, filename);
return commonio_setname (&passwd_db, filename);
}
int
pw_lock(void)
int pw_lock (void)
{
return commonio_lock(&passwd_db);
return commonio_lock (&passwd_db);
}
int
pw_open(int mode)
int pw_open (int mode)
{
return commonio_open(&passwd_db, mode);
return commonio_open (&passwd_db, mode);
}
const struct passwd *
pw_locate(const char *name)
const struct passwd *pw_locate (const char *name)
{
return commonio_locate(&passwd_db, name);
return commonio_locate (&passwd_db, name);
}
int
pw_update(const struct passwd *pw)
int pw_update (const struct passwd *pw)
{
return commonio_update(&passwd_db, (const void *) pw);
return commonio_update (&passwd_db, (const void *) pw);
}
int
pw_remove(const char *name)
int pw_remove (const char *name)
{
return commonio_remove(&passwd_db, name);
return commonio_remove (&passwd_db, name);
}
int
pw_rewind(void)
int pw_rewind (void)
{
return commonio_rewind(&passwd_db);
return commonio_rewind (&passwd_db);
}
const struct passwd *
pw_next(void)
const struct passwd *pw_next (void)
{
return commonio_next(&passwd_db);
return commonio_next (&passwd_db);
}
int
pw_close(void)
int pw_close (void)
{
return commonio_close(&passwd_db);
return commonio_close (&passwd_db);
}
int
pw_unlock(void)
int pw_unlock (void)
{
return commonio_unlock(&passwd_db);
return commonio_unlock (&passwd_db);
}
struct commonio_entry *
__pw_get_head(void)
struct commonio_entry *__pw_get_head (void)
{
return passwd_db.head;
}
void
__pw_del_entry(const struct commonio_entry *ent)
void __pw_del_entry (const struct commonio_entry *ent)
{
commonio_del_entry(&passwd_db, ent);
commonio_del_entry (&passwd_db, ent);
}
struct commonio_db *
__pw_get_db(void)
struct commonio_db *__pw_get_db (void)
{
return &passwd_db;
}
static int
pw_cmp(const void *p1, const void *p2)
static int pw_cmp (const void *p1, const void *p2)
{
uid_t u1, u2;
if ((*(struct commonio_entry**)p1)->eptr == NULL)
if ((*(struct commonio_entry **) p1)->eptr == NULL)
return 1;
if ((*(struct commonio_entry**)p2)->eptr == NULL)
if ((*(struct commonio_entry **) p2)->eptr == NULL)
return -1;
u1 = ((struct passwd *)(*(struct commonio_entry**)p1)->eptr)->pw_uid;
u2 = ((struct passwd *)(*(struct commonio_entry**)p2)->eptr)->pw_uid;
u1 = ((struct passwd *) (*(struct commonio_entry **) p1)->eptr)->pw_uid;
u2 = ((struct passwd *) (*(struct commonio_entry **) p2)->eptr)->pw_uid;
if (u1 < u2)
return -1;
@ -199,8 +179,7 @@ pw_cmp(const void *p1, const void *p2)
}
/* Sort entries by uid */
int
pw_sort()
int pw_sort ()
{
return commonio_sort(&passwd_db, pw_cmp);
return commonio_sort (&passwd_db, pw_cmp);
}

View File

@ -1,13 +1,13 @@
extern struct passwd *__pw_dup(const struct passwd *);
extern void __pw_set_changed(void);
extern int pw_close(void);
extern const struct passwd *pw_locate(const char *);
extern int pw_lock(void);
extern int pw_name(const char *);
extern const struct passwd *pw_next(void);
extern int pw_open(int);
extern int pw_remove(const char *);
extern int pw_rewind(void);
extern int pw_unlock(void);
extern int pw_update(const struct passwd *);
extern int pw_sort(void);
extern struct passwd *__pw_dup (const struct passwd *);
extern void __pw_set_changed (void);
extern int pw_close (void);
extern const struct passwd *pw_locate (const char *);
extern int pw_lock (void);
extern int pw_name (const char *);
extern const struct passwd *pw_next (void);
extern int pw_open (int);
extern int pw_remove (const char *);
extern int pw_rewind (void);
extern int pw_unlock (void);
extern int pw_update (const struct passwd *);
extern int pw_sort (void);

View File

@ -30,23 +30,18 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: pwpack.c,v 1.6 2003/12/17 01:33:28 kloczek Exp $")
RCSID ("$Id: pwpack.c,v 1.7 2005/03/31 05:14:49 kloczek Exp $")
#include <sys/types.h>
#include "defines.h"
#include <stdio.h>
#include <pwd.h>
/*
* pw_pack - convert a (struct pwd) to a packed record
* WARNING: buf must be large enough, no check for overrun!
*/
int
pw_pack(const struct passwd *passwd, char *buf)
int pw_pack (const struct passwd *passwd, char *buf)
{
char *cp;
char *cp;
cp = buf;
strcpy (cp, passwd->pw_name);
@ -68,7 +63,7 @@ pw_pack(const struct passwd *passwd, char *buf)
cp += strlen (cp) + 1;
strcpy (cp, passwd->pw_shell);
cp += strlen (cp) + 1;
cp += strlen (cp) + 1;
return cp - buf;
}
@ -77,12 +72,11 @@ pw_pack(const struct passwd *passwd, char *buf)
* pw_unpack - convert a packed (struct pwd) record to a (struct pwd)
*/
int
pw_unpack(char *buf, int len, struct passwd *passwd)
int pw_unpack (char *buf, int len, struct passwd *passwd)
{
char *org = buf;
char *org = buf;
memzero(passwd, sizeof *passwd);
memzero (passwd, sizeof *passwd);
passwd->pw_name = buf;
buf += strlen (buf) + 1;

View File

@ -1,126 +0,0 @@
/*
* Copyright 1989 - 1992, 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: rad64.c,v 1.5 2000/08/26 18:27:17 marekm Exp $")
/*
* c64i - convert a radix 64 character to an integer
*/
int
c64i(int c)
{
if (c == '.')
return (0);
if (c == '/')
return (1);
if (c >= '0' && c <= '9')
return (c - '0' + 2);
if (c >= 'A' && c <= 'Z')
return (c - 'A' + 12);
if (c >= 'a' && c <= 'z')
return (c - 'a' + 38);
else
return (-1);
}
/*
* i64c - convert an integer to a radix 64 character
*/
int
i64c(int i)
{
if (i <= 0)
return ('.');
if (i == 1)
return ('/');
if (i >= 2 && i < 12)
return ('0' - 2 + i);
if (i >= 12 && i < 38)
return ('A' - 12 + i);
if (i >= 38 && i < 63)
return ('a' - 38 + i);
return ('z');
}
#ifndef HAVE_A64L
/*
* l64a - convert a long to a string of radix 64 characters
*/
char *
l64a(long l)
{
static char buf[8];
int i = 0;
if (l < 0L)
return ((char *) 0);
do {
buf[i++] = i64c ((int) (l % 64));
buf[i] = '\0';
} while (l /= 64L, l > 0 && i < 6);
return (buf);
}
/*
* a64l - convert a radix 64 string to a long integer
*/
long
a64l(const char *s)
{
int i;
long value;
long shift = 0;
for (i = 0, value = 0L;i < 6 && *s;s++) {
value += (c64i ((int) *s) << shift);
shift += 6;
}
return (value);
}
#endif /* !HAVE_A64L */

View File

@ -1,22 +1,23 @@
/*
* $Id: rcsid.h,v 1.2 1999/06/07 16:40:44 marekm Exp $
* $Id: rcsid.h,v 1.3 2005/03/31 05:14:49 kloczek Exp $
*/
#define PKG_VER " $Package: " PACKAGE " $ $Version: " VERSION " $ "
#if defined(NO_RCSID) || defined(lint)
#define RCSID(x) /* empty */
#define RCSID(x) /* empty */
#else
#if __STDC__
/*
* This function is never called from anywhere, but it calls itself
* recursively only to fool gcc to not generate warnings :-).
*/
static const char *rcsid(const char *);
static const char *rcsid (const char *);
#define RCSID(x) \
static const char *rcsid(const char *s) { \
return rcsid(x); }
#else /* ! __STDC__ */
#else /* ! __STDC__ */
#define RCSID(x) \
static char *rcsid(s) char *s; { \
return rcsid(x); }
#endif /* ! __STDC__ */
#endif /* ! __STDC__ */
#endif

View File

@ -30,14 +30,11 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: sgetgrent.c,v 1.4 1998/04/02 21:51:45 marekm Exp $")
RCSID ("$Id: sgetgrent.c,v 1.5 2005/03/31 05:14:49 kloczek Exp $")
#include <stdio.h>
#include <grp.h>
#include "defines.h"
#define NFIELDS 4
/*
* list - turn a comma-separated string into an array of (char *)'s
*
@ -51,12 +48,10 @@ RCSID("$Id: sgetgrent.c,v 1.4 1998/04/02 21:51:45 marekm Exp $")
* FINALLY added dynamic allocation. Still need to fix sgetsgent().
* --marekm
*/
static char **
list(char *s)
static char **list (char *s)
{
static char **members = 0;
static int size = 0; /* max members + 1 */
static int size = 0; /* max members + 1 */
int i;
char **rbuf;
@ -65,17 +60,18 @@ list(char *s)
/* check if there is room for another pointer (to a group
member name, or terminating NULL). */
if (i >= size) {
size = i + 100; /* at least: i + 1 */
size = i + 100; /* at least: i + 1 */
if (members) {
rbuf = realloc(members, size * sizeof(char *));
rbuf =
realloc (members, size * sizeof (char *));
} else {
/* for old (before ANSI C) implementations of
realloc() that don't handle NULL properly */
rbuf = malloc(size * sizeof(char *));
rbuf = malloc (size * sizeof (char *));
}
if (!rbuf) {
if (members)
free(members);
free (members);
members = 0;
size = 0;
return (char **) 0;
@ -95,46 +91,45 @@ list(char *s)
}
struct group *
sgetgrent(const char *buf)
struct group *sgetgrent (const char *buf)
{
static char *grpbuf = 0;
static size_t size = 0;
static char *grpfields[NFIELDS];
static struct group grent;
int i;
char *cp;
int i;
char *cp;
if (strlen(buf) + 1 > size) {
if (strlen (buf) + 1 > size) {
/* no need to use realloc() here - just free it and
allocate a larger block */
if (grpbuf)
free(grpbuf);
size = strlen(buf) + 1000; /* at least: strlen(buf) + 1 */
grpbuf = malloc(size);
free (grpbuf);
size = strlen (buf) + 1000; /* at least: strlen(buf) + 1 */
grpbuf = malloc (size);
if (!grpbuf) {
size = 0;
return 0;
}
}
strcpy(grpbuf, buf);
strcpy (grpbuf, buf);
if ((cp = strrchr(grpbuf, '\n')))
if ((cp = strrchr (grpbuf, '\n')))
*cp = '\0';
for (cp = grpbuf, i = 0; i < NFIELDS && cp; i++) {
grpfields[i] = cp;
if ((cp = strchr(cp, ':')))
if ((cp = strchr (cp, ':')))
*cp++ = 0;
}
if (i < (NFIELDS-1) || *grpfields[2] == '\0')
if (i < (NFIELDS - 1) || *grpfields[2] == '\0')
return 0;
grent.gr_name = grpfields[0];
grent.gr_passwd = grpfields[1];
grent.gr_gid = atoi(grpfields[2]);
grent.gr_mem = list(grpfields[3]);
grent.gr_gid = atoi (grpfields[2]);
grent.gr_mem = list (grpfields[3]);
if (!grent.gr_mem)
return (struct group *) 0; /* out of memory */
return (struct group *) 0; /* out of memory */
return &grent;
}

View File

@ -30,15 +30,12 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: sgetpwent.c,v 1.6 2003/05/03 16:14:23 kloczek Exp $")
RCSID ("$Id: sgetpwent.c,v 1.7 2005/03/31 05:14:49 kloczek Exp $")
#include <sys/types.h>
#include "defines.h"
#include <stdio.h>
#include <pwd.h>
#define NFIELDS 7
/*
* sgetpwent - convert a string to a (struct passwd)
*
@ -51,15 +48,13 @@ RCSID("$Id: sgetpwent.c,v 1.6 2003/05/03 16:14:23 kloczek Exp $")
* performance reasons. I am going to come up with some conditional
* compilation glarp to improve on this in the future.
*/
struct passwd *
sgetpwent(const char *buf)
struct passwd *sgetpwent (const char *buf)
{
static struct passwd pwent;
static char pwdbuf[1024];
register int i;
register char *cp;
char *ep;
register int i;
register char *cp;
char *ep;
char *fields[NFIELDS];
/*
@ -67,20 +62,20 @@ sgetpwent(const char *buf)
* the password structure remain valid.
*/
if (strlen(buf) >= sizeof pwdbuf)
return 0; /* fail if too long */
strcpy(pwdbuf, buf);
if (strlen (buf) >= sizeof pwdbuf)
return 0; /* fail if too long */
strcpy (pwdbuf, buf);
/*
* Save a pointer to the start of each colon separated
* field. The fields are converted into NUL terminated strings.
*/
for (cp = pwdbuf, i = 0;i < NFIELDS && cp;i++) {
for (cp = pwdbuf, i = 0; i < NFIELDS && cp; i++) {
fields[i] = cp;
while (*cp && *cp != ':')
++cp;
if (*cp)
*cp++ = '\0';
else
@ -105,11 +100,11 @@ sgetpwent(const char *buf)
pwent.pw_name = fields[0];
pwent.pw_passwd = fields[1];
if (fields[2][0] == '\0' ||
((pwent.pw_uid = strtol (fields[2], &ep, 10)) == 0 && *ep)) {
((pwent.pw_uid = strtol (fields[2], &ep, 10)) == 0 && *ep)) {
return 0;
}
if (fields[3][0] == '\0' ||
((pwent.pw_gid = strtol (fields[3], &ep, 10)) == 0 && *ep)) {
((pwent.pw_gid = strtol (fields[3], &ep, 10)) == 0 && *ep)) {
return 0;
}
pwent.pw_gecos = fields[4];

View File

@ -4,50 +4,44 @@
#ifdef SHADOWGRP
#include "rcsid.h"
RCSID("$Id: sgroupio.c,v 1.12 2001/08/14 21:10:36 malekith Exp $")
RCSID ("$Id: sgroupio.c,v 1.13 2005/03/31 05:14:49 kloczek Exp $")
#include "prototypes.h"
#include "defines.h"
#include "commonio.h"
#include "sgroupio.h"
extern int putsgent (const struct sgrp *, FILE *);
extern struct sgrp *sgetsgent (const char *);
extern int putsgent(const struct sgrp *, FILE *);
extern struct sgrp *sgetsgent(const char *);
struct sgrp *
__sgr_dup(const struct sgrp *sgent)
struct sgrp *__sgr_dup (const struct sgrp *sgent)
{
struct sgrp *sg;
int i;
if (!(sg = (struct sgrp *) malloc(sizeof *sg)))
if (!(sg = (struct sgrp *) malloc (sizeof *sg)))
return NULL;
*sg = *sgent;
if (!(sg->sg_name = strdup(sgent->sg_name)))
if (!(sg->sg_name = strdup (sgent->sg_name)))
return NULL;
if (!(sg->sg_passwd = strdup(sgent->sg_passwd)))
if (!(sg->sg_passwd = strdup (sgent->sg_passwd)))
return NULL;
for (i = 0; sgent->sg_adm[i]; i++)
;
sg->sg_adm = (char **) malloc((i + 1) * sizeof(char *));
for (i = 0; sgent->sg_adm[i]; i++);
sg->sg_adm = (char **) malloc ((i + 1) * sizeof (char *));
if (!sg->sg_adm)
return NULL;
for (i = 0; sgent->sg_adm[i]; i++) {
sg->sg_adm[i] = strdup(sgent->sg_adm[i]);
sg->sg_adm[i] = strdup (sgent->sg_adm[i]);
if (!sg->sg_adm[i])
return NULL;
}
sg->sg_adm[i] = NULL;
for (i = 0; sgent->sg_mem[i]; i++)
;
sg->sg_mem = (char **) malloc((i + 1) * sizeof(char *));
for (i = 0; sgent->sg_mem[i]; i++);
sg->sg_mem = (char **) malloc ((i + 1) * sizeof (char *));
if (!sg->sg_mem)
return NULL;
for (i = 0; sgent->sg_mem[i]; i++) {
sg->sg_mem[i] = strdup(sgent->sg_mem[i]);
sg->sg_mem[i] = strdup (sgent->sg_mem[i]);
if (!sg->sg_mem[i])
return NULL;
}
@ -56,49 +50,47 @@ __sgr_dup(const struct sgrp *sgent)
return sg;
}
static void *
gshadow_dup(const void *ent)
static void *gshadow_dup (const void *ent)
{
const struct sgrp *sg = ent;
return __sgr_dup(sg);
return __sgr_dup (sg);
}
static void
gshadow_free(void *ent)
static void gshadow_free (void *ent)
{
struct sgrp *sg = ent;
free(sg->sg_name);
free(sg->sg_passwd);
while(*(sg->sg_adm)) {
free(*(sg->sg_adm));
free (sg->sg_name);
free (sg->sg_passwd);
while (*(sg->sg_adm)) {
free (*(sg->sg_adm));
sg->sg_adm++;
}
while(*(sg->sg_mem)) {
free(*(sg->sg_mem));
while (*(sg->sg_mem)) {
free (*(sg->sg_mem));
sg->sg_mem++;
}
free(sg);
free (sg);
}
static const char *
gshadow_getname(const void *ent)
static const char *gshadow_getname (const void *ent)
{
const struct sgrp *gr = ent;
return gr->sg_name;
}
static void *
gshadow_parse(const char *line)
static void *gshadow_parse (const char *line)
{
return (void *) sgetsgent(line);
return (void *) sgetsgent (line);
}
static int
gshadow_put(const void *ent, FILE *file)
static int gshadow_put (const void *ent, FILE * file)
{
const struct sgrp *sg = ent;
return (putsgent(sg, file) == -1) ? -1 : 0;
return (putsgent (sg, file) == -1) ? -1 : 0;
}
static struct commonio_ops gshadow_ops = {
@ -112,110 +104,95 @@ static struct commonio_ops gshadow_ops = {
};
static struct commonio_db gshadow_db = {
SGROUP_FILE, /* filename */
&gshadow_ops, /* ops */
NULL, /* fp */
NULL, /* head */
NULL, /* tail */
NULL, /* cursor */
0, /* changed */
0, /* isopen */
0, /* locked */
0 /* readonly */
SGROUP_FILE, /* filename */
&gshadow_ops, /* ops */
NULL, /* fp */
NULL, /* head */
NULL, /* tail */
NULL, /* cursor */
0, /* changed */
0, /* isopen */
0, /* locked */
0 /* readonly */
};
int
sgr_name(const char *filename)
int sgr_name (const char *filename)
{
return commonio_setname(&gshadow_db, filename);
return commonio_setname (&gshadow_db, filename);
}
int
sgr_file_present(void)
int sgr_file_present (void)
{
return commonio_present(&gshadow_db);
return commonio_present (&gshadow_db);
}
int
sgr_lock(void)
int sgr_lock (void)
{
return commonio_lock(&gshadow_db);
return commonio_lock (&gshadow_db);
}
int
sgr_open(int mode)
int sgr_open (int mode)
{
return commonio_open(&gshadow_db, mode);
return commonio_open (&gshadow_db, mode);
}
const struct sgrp *
sgr_locate(const char *name)
const struct sgrp *sgr_locate (const char *name)
{
return commonio_locate(&gshadow_db, name);
return commonio_locate (&gshadow_db, name);
}
int
sgr_update(const struct sgrp *sg)
int sgr_update (const struct sgrp *sg)
{
return commonio_update(&gshadow_db, (const void *) sg);
return commonio_update (&gshadow_db, (const void *) sg);
}
int
sgr_remove(const char *name)
int sgr_remove (const char *name)
{
return commonio_remove(&gshadow_db, name);
return commonio_remove (&gshadow_db, name);
}
int
sgr_rewind(void)
int sgr_rewind (void)
{
return commonio_rewind(&gshadow_db);
return commonio_rewind (&gshadow_db);
}
const struct sgrp *
sgr_next(void)
const struct sgrp *sgr_next (void)
{
return commonio_next(&gshadow_db);
return commonio_next (&gshadow_db);
}
int
sgr_close(void)
int sgr_close (void)
{
return commonio_close(&gshadow_db);
return commonio_close (&gshadow_db);
}
int
sgr_unlock(void)
int sgr_unlock (void)
{
return commonio_unlock(&gshadow_db);
return commonio_unlock (&gshadow_db);
}
void
__sgr_set_changed(void)
void __sgr_set_changed (void)
{
gshadow_db.changed = 1;
}
struct commonio_entry *
__sgr_get_head(void)
struct commonio_entry *__sgr_get_head (void)
{
return gshadow_db.head;
}
void
__sgr_del_entry(const struct commonio_entry *ent)
void __sgr_del_entry (const struct commonio_entry *ent)
{
commonio_del_entry(&gshadow_db, ent);
commonio_del_entry (&gshadow_db, ent);
}
/* Sort with respect to group ordering. */
int
sgr_sort()
int sgr_sort ()
{
extern struct commonio_db *__gr_get_db();
extern struct commonio_db *__gr_get_db ();
return commonio_sort_wrt(&gshadow_db, __gr_get_db());
return commonio_sort_wrt (&gshadow_db, __gr_get_db ());
}
#else
extern int errno; /* warning: ANSI C forbids an empty source file */
extern int errno; /* warning: ANSI C forbids an empty source file */
#endif

View File

@ -1,14 +1,14 @@
extern struct sgrp *__sgr_dup(const struct sgrp *);
extern void __sgr_set_changed(void);
extern int sgr_close(void);
extern int sgr_file_present(void);
extern const struct sgrp *sgr_locate(const char *);
extern int sgr_lock(void);
extern int sgr_name(const char *);
extern const struct sgrp *sgr_next(void);
extern int sgr_open(int);
extern int sgr_remove(const char *);
extern int sgr_rewind(void);
extern int sgr_unlock(void);
extern int sgr_update(const struct sgrp *);
extern int sgr_sort(void);
extern struct sgrp *__sgr_dup (const struct sgrp *);
extern void __sgr_set_changed (void);
extern int sgr_close (void);
extern int sgr_file_present (void);
extern const struct sgrp *sgr_locate (const char *);
extern int sgr_lock (void);
extern int sgr_name (const char *);
extern const struct sgrp *sgr_next (void);
extern int sgr_open (int);
extern int sgr_remove (const char *);
extern int sgr_rewind (void);
extern int sgr_unlock (void);
extern int sgr_update (const struct sgrp *);
extern int sgr_sort (void);

View File

@ -30,41 +30,32 @@
#include <config.h>
/* Newer versions of Linux libc already have shadow support. */
#if defined(SHADOWPWD) && !defined(HAVE_GETSPNAM) /*{*/
#if defined(SHADOWPWD) && !defined(HAVE_GETSPNAM) /*{ */
#include "rcsid.h"
RCSID("$Id: shadow.c,v 1.7 2003/05/03 16:14:24 kloczek Exp $")
RCSID ("$Id: shadow.c,v 1.9 2005/04/06 04:26:05 kloczek Exp $")
#include <sys/types.h>
#include "prototypes.h"
#include "defines.h"
#include <stdio.h>
#ifdef NDBM
#include <ndbm.h>
#include <fcntl.h>
DBM *sp_dbm;
int sp_dbm_mode = -1;
static int dbmopened;
static int dbmerror;
#endif
#ifdef USE_NIS
static int nis_used;
static int nis_ignore;
static enum { native, start, middle, native2 } nis_state;
static int nis_bound;
static char *nis_domain;
static char *nis_key;
static int nis_keylen;
static char *nis_val;
static int nis_vallen;
static int nis_used;
static int nis_ignore;
static enum { native, start, middle, native2 } nis_state;
static int nis_bound;
static char *nis_domain;
static char *nis_key;
static int nis_keylen;
static char *nis_val;
static int nis_vallen;
#define IS_NISCHAR(c) ((c)=='+')
#endif
static FILE *shadow;
static char spwbuf[BUFSIZ];
static struct spwd spwd;
static FILE *shadow;
static char spwbuf[BUFSIZ];
static struct spwd spwd;
#define FIELDS 9
#define OFIELDS 5
@ -75,10 +66,9 @@ static struct spwd spwd;
* __setspNIS - turn on or off NIS searches
*/
void
__setspNIS(int flag)
void __setspNIS (int flag)
{
nis_ignore = ! flag;
nis_ignore = !flag;
if (nis_ignore)
nis_used = 0;
@ -88,8 +78,7 @@ __setspNIS(int flag)
* bind_nis - bind to NIS server
*/
static int
bind_nis(void)
static int bind_nis (void)
{
if (yp_get_default_domain (&nis_domain))
return -1;
@ -103,84 +92,49 @@ bind_nis(void)
* setspent - initialize access to shadow text and DBM files
*/
void
setspent(void)
void setspent (void)
{
if (shadow)
rewind(shadow);
rewind (shadow);
else
shadow = fopen(SHADOW_FILE, "r");
shadow = fopen (SHADOW_FILE, "r");
#ifdef USE_NIS
nis_state = native;
#endif
/*
* Attempt to open the DBM files if they have never been opened
* and an error has never been returned.
*/
#ifdef NDBM
if (! dbmerror && ! dbmopened) {
int mode;
char dbmfiles[BUFSIZ];
strcpy (dbmfiles, SHADOW_PAG_FILE);
if (sp_dbm_mode == -1)
mode = O_RDWR;
else
mode = (sp_dbm_mode == O_RDWR) ? O_RDWR:O_RDONLY;
if (! (sp_dbm = dbm_open (SHADOW_FILE, mode, 0)))
dbmerror = 1;
else
dbmopened = 1;
}
#endif
}
/*
* endspent - terminate access to shadow text and DBM files
*/
void
endspent(void)
void endspent (void)
{
if (shadow)
(void) fclose (shadow);
shadow = (FILE *) 0;
#ifdef NDBM
if (dbmopened && sp_dbm) {
dbm_close (sp_dbm);
sp_dbm = 0;
}
dbmopened = 0;
dbmerror = 0;
#endif
}
/*
* my_sgetspent - convert string in shadow file format to (struct spwd *)
*/
static struct spwd *
my_sgetspent(const char *string)
static struct spwd *my_sgetspent (const char *string)
{
char *fields[FIELDS];
char *cp;
char *cpp;
int i;
char *fields[FIELDS];
char *cp;
char *cpp;
int i;
/*
* Copy string to local buffer. It has to be tokenized and we
* have to do that to our private copy.
*/
if (strlen(string) >= sizeof spwbuf)
if (strlen (string) >= sizeof spwbuf)
return 0;
strcpy(spwbuf, string);
strcpy (spwbuf, string);
if ((cp = strrchr (spwbuf, '\n')))
*cp = '\0';
@ -190,7 +144,7 @@ my_sgetspent(const char *string)
* FIELDS different fields.
*/
for (cp = spwbuf, i = 0;*cp && i < FIELDS;i++) {
for (cp = spwbuf, i = 0; *cp && i < FIELDS; i++) {
fields[i] = cp;
while (*cp && *cp != ':')
cp++;
@ -199,7 +153,7 @@ my_sgetspent(const char *string)
*cp++ = '\0';
}
if (i == (FIELDS-1))
if (i == (FIELDS - 1))
fields[i++] = cp;
if ((cp && *cp) || (i != FIELDS && i != OFIELDS))
@ -227,7 +181,7 @@ my_sgetspent(const char *string)
if ((spwd.sp_lstchg = strtol (fields[2], &cpp, 10)) == 0 && *cpp) {
#ifdef USE_NIS
if (! nis_used)
if (!nis_used)
return 0;
else
spwd.sp_lstchg = -1;
@ -243,7 +197,7 @@ my_sgetspent(const char *string)
if ((spwd.sp_min = strtol (fields[3], &cpp, 10)) == 0 && *cpp) {
#ifdef USE_NIS
if (! nis_used)
if (!nis_used)
return 0;
else
spwd.sp_min = -1;
@ -259,7 +213,7 @@ my_sgetspent(const char *string)
if ((spwd.sp_max = strtol (fields[4], &cpp, 10)) == 0 && *cpp) {
#ifdef USE_NIS
if (! nis_used)
if (!nis_used)
return 0;
else
spwd.sp_max = -1;
@ -276,7 +230,7 @@ my_sgetspent(const char *string)
if (i == OFIELDS) {
spwd.sp_warn = spwd.sp_inact = spwd.sp_expire =
spwd.sp_flag = -1;
spwd.sp_flag = -1;
return &spwd;
}
@ -287,7 +241,7 @@ my_sgetspent(const char *string)
if ((spwd.sp_warn = strtol (fields[5], &cpp, 10)) == 0 && *cpp) {
#ifdef USE_NIS
if (! nis_used)
if (!nis_used)
return 0;
else
spwd.sp_warn = -1;
@ -304,7 +258,7 @@ my_sgetspent(const char *string)
if ((spwd.sp_inact = strtol (fields[6], &cpp, 10)) == 0 && *cpp) {
#ifdef USE_NIS
if (! nis_used)
if (!nis_used)
return 0;
else
spwd.sp_inact = -1;
@ -321,7 +275,7 @@ my_sgetspent(const char *string)
if ((spwd.sp_expire = strtol (fields[7], &cpp, 10)) == 0 && *cpp) {
#ifdef USE_NIS
if (! nis_used)
if (!nis_used)
return 0;
else
spwd.sp_expire = -1;
@ -338,7 +292,7 @@ my_sgetspent(const char *string)
if ((spwd.sp_flag = strtol (fields[8], &cpp, 10)) == 0 && *cpp) {
#ifdef USE_NIS
if (! nis_used)
if (!nis_used)
return 0;
else
spwd.sp_flag = -1;
@ -355,13 +309,12 @@ my_sgetspent(const char *string)
* fgetspent - get an entry from a /etc/shadow formatted stream
*/
struct spwd *
fgetspent(FILE *fp)
struct spwd *fgetspent (FILE * fp)
{
char buf[BUFSIZ];
char *cp;
char buf[BUFSIZ];
char *cp;
if (! fp)
if (!fp)
return (0);
#ifdef USE_NIS
@ -376,7 +329,7 @@ fgetspent(FILE *fp)
if (nis_ignore && IS_NISCHAR (buf[0]))
continue;
#endif
return my_sgetspent(buf);
return my_sgetspent (buf);
}
return 0;
}
@ -385,19 +338,18 @@ fgetspent(FILE *fp)
* getspent - get a (struct spwd *) from the current shadow file
*/
struct spwd *
getspent(void)
struct spwd *getspent (void)
{
#ifdef USE_NIS
int nis_1_user = 0;
struct spwd *val;
char buf[BUFSIZ];
int nis_1_user = 0;
struct spwd *val;
char buf[BUFSIZ];
#endif
if (! shadow)
if (!shadow)
setspent ();
#ifdef USE_NIS
again:
again:
/*
* See if we are reading from the local file.
*/
@ -409,7 +361,7 @@ again:
* right away if there is none.
*/
if (! (val = fgetspent (shadow)))
if (!(val = fgetspent (shadow)))
return 0;
/*
@ -455,20 +407,20 @@ again:
}
if (nis_state == start) {
if (yp_first (nis_domain, "shadow.bynam", &nis_key,
&nis_keylen, &nis_val, &nis_vallen)) {
&nis_keylen, &nis_val, &nis_vallen)) {
nis_state = native2;
goto again;
}
nis_state = middle;
} else if (nis_state == middle) {
if (yp_next (nis_domain, "shadow.bynam", nis_key,
nis_keylen, &nis_key, &nis_keylen,
&nis_val, &nis_vallen)) {
nis_keylen, &nis_key, &nis_keylen,
&nis_val, &nis_vallen)) {
nis_state = native2;
goto again;
}
}
return my_sgetspent(nis_val);
return my_sgetspent (nis_val);
}
#else
return (fgetspent (shadow));
@ -479,68 +431,42 @@ again:
* getspnam - get a shadow entry by name
*/
struct spwd *
getspnam(const char *name)
struct spwd *getspnam (const char *name)
{
struct spwd *sp;
#ifdef NDBM
datum key;
datum content;
#endif
struct spwd *sp;
#ifdef USE_NIS
char buf[BUFSIZ];
static char save_name[16];
int nis_disabled = 0;
char buf[BUFSIZ];
static char save_name[16];
int nis_disabled = 0;
#endif
setspent ();
#ifdef NDBM
/*
* If the DBM file are now open, create a key for this UID and
* try to fetch the entry from the database. A matching record
* will be unpacked into a static structure and returned to
* the user.
*/
if (dbmopened) {
key.dsize = strlen (name);
key.dptr = (char *) name;
content = dbm_fetch (sp_dbm, key);
if (content.dptr != 0) {
memcpy (spwbuf, content.dptr, content.dsize);
spw_unpack (spwbuf, content.dsize, &spwd);
endspent();
return &spwd;
}
}
#endif
#ifdef USE_NIS
/*
* Search the shadow.byname map for this user.
*/
if (! nis_ignore && ! nis_bound)
if (!nis_ignore && !nis_bound)
bind_nis ();
if (! nis_ignore && nis_bound) {
char *cp;
if (!nis_ignore && nis_bound) {
char *cp;
if (yp_match (nis_domain, "shadow.byname", name,
strlen (name), &nis_val, &nis_vallen) == 0) {
strlen (name), &nis_val, &nis_vallen) == 0) {
if (cp = strchr (nis_val, '\n'))
*cp = '\0';
nis_state = middle;
if ((sp = my_sgetspent(nis_val))) {
if ((sp = my_sgetspent (nis_val))) {
strcpy (save_name, sp->sp_namp);
nis_key = save_name;
nis_keylen = strlen (save_name);
}
endspent();
endspent ();
return sp;
} else
nis_state = native2;
@ -567,9 +493,9 @@ getspnam(const char *name)
if (nis_disabled)
nis_ignore--;
#endif
endspent();
endspent ();
return (sp);
}
#else
extern int errno; /* warning: ANSI C forbids an empty source file */
#endif /*}*/
extern int errno; /* warning: ANSI C forbids an empty source file */
#endif /*} */

View File

@ -4,68 +4,62 @@
#ifdef SHADOWPWD
#include "rcsid.h"
RCSID("$Id: shadowio.c,v 1.13 2001/08/14 21:10:36 malekith Exp $")
RCSID ("$Id: shadowio.c,v 1.14 2005/03/31 05:14:49 kloczek Exp $")
#include "prototypes.h"
#include "defines.h"
#ifdef HAVE_SHADOW_H
# include <shadow.h>
#endif
#include <stdio.h>
#include "commonio.h"
#include "shadowio.h"
struct spwd *
__spw_dup(const struct spwd *spent)
struct spwd *__spw_dup (const struct spwd *spent)
{
struct spwd *sp;
if (!(sp = (struct spwd *) malloc(sizeof *sp)))
if (!(sp = (struct spwd *) malloc (sizeof *sp)))
return NULL;
*sp = *spent;
if (!(sp->sp_namp = strdup(spent->sp_namp)))
if (!(sp->sp_namp = strdup (spent->sp_namp)))
return NULL;
if (!(sp->sp_pwdp = strdup(spent->sp_pwdp)))
if (!(sp->sp_pwdp = strdup (spent->sp_pwdp)))
return NULL;
return sp;
}
static void *
shadow_dup(const void *ent)
static void *shadow_dup (const void *ent)
{
const struct spwd *sp = ent;
return __spw_dup(sp);
return __spw_dup (sp);
}
static void
shadow_free(void *ent)
static void shadow_free (void *ent)
{
struct spwd *sp = ent;
free(sp->sp_namp);
free(sp->sp_pwdp);
free(sp);
free (sp->sp_namp);
free (sp->sp_pwdp);
free (sp);
}
static const char *
shadow_getname(const void *ent)
static const char *shadow_getname (const void *ent)
{
const struct spwd *sp = ent;
return sp->sp_namp;
}
static void *
shadow_parse(const char *line)
static void *shadow_parse (const char *line)
{
return (void *) sgetspent(line);
return (void *) sgetspent (line);
}
static int
shadow_put(const void *ent, FILE *file)
static int shadow_put (const void *ent, FILE * file)
{
const struct spwd *sp = ent;
return (putspent(sp, file) == -1) ? -1 : 0;
return (putspent (sp, file) == -1) ? -1 : 0;
}
static struct commonio_ops shadow_ops = {
@ -79,102 +73,88 @@ static struct commonio_ops shadow_ops = {
};
static struct commonio_db shadow_db = {
SHADOW_FILE, /* filename */
&shadow_ops, /* ops */
NULL, /* fp */
NULL, /* head */
NULL, /* tail */
NULL, /* cursor */
0, /* changed */
0, /* isopen */
0, /* locked */
0 /* readonly */
SHADOW_FILE, /* filename */
&shadow_ops, /* ops */
NULL, /* fp */
NULL, /* head */
NULL, /* tail */
NULL, /* cursor */
0, /* changed */
0, /* isopen */
0, /* locked */
0 /* readonly */
};
int
spw_name(const char *filename)
int spw_name (const char *filename)
{
return commonio_setname(&shadow_db, filename);
return commonio_setname (&shadow_db, filename);
}
int
spw_file_present(void)
int spw_file_present (void)
{
return commonio_present(&shadow_db);
return commonio_present (&shadow_db);
}
int
spw_lock(void)
int spw_lock (void)
{
return commonio_lock(&shadow_db);
return commonio_lock (&shadow_db);
}
int
spw_open(int mode)
int spw_open (int mode)
{
return commonio_open(&shadow_db, mode);
return commonio_open (&shadow_db, mode);
}
const struct spwd *
spw_locate(const char *name)
const struct spwd *spw_locate (const char *name)
{
return commonio_locate(&shadow_db, name);
return commonio_locate (&shadow_db, name);
}
int
spw_update(const struct spwd *sp)
int spw_update (const struct spwd *sp)
{
return commonio_update(&shadow_db, (const void *) sp);
return commonio_update (&shadow_db, (const void *) sp);
}
int
spw_remove(const char *name)
int spw_remove (const char *name)
{
return commonio_remove(&shadow_db, name);
return commonio_remove (&shadow_db, name);
}
int
spw_rewind(void)
int spw_rewind (void)
{
return commonio_rewind(&shadow_db);
return commonio_rewind (&shadow_db);
}
const struct spwd *
spw_next(void)
const struct spwd *spw_next (void)
{
return commonio_next(&shadow_db);
return commonio_next (&shadow_db);
}
int
spw_close(void)
int spw_close (void)
{
return commonio_close(&shadow_db);
return commonio_close (&shadow_db);
}
int
spw_unlock(void)
int spw_unlock (void)
{
return commonio_unlock(&shadow_db);
return commonio_unlock (&shadow_db);
}
struct commonio_entry *
__spw_get_head(void)
struct commonio_entry *__spw_get_head (void)
{
return shadow_db.head;
}
void
__spw_del_entry(const struct commonio_entry *ent)
void __spw_del_entry (const struct commonio_entry *ent)
{
commonio_del_entry(&shadow_db, ent);
commonio_del_entry (&shadow_db, ent);
}
/* Sort with respect to passwd ordering. */
int
spw_sort()
int spw_sort ()
{
extern struct commonio_db *__pw_get_db();
extern struct commonio_db *__pw_get_db ();
return commonio_sort_wrt(&shadow_db, __pw_get_db());
return commonio_sort_wrt (&shadow_db, __pw_get_db ());
}
#endif

View File

@ -1,14 +1,14 @@
extern struct spwd *__spw_dup(const struct spwd *);
extern void __spw_set_changed(void);
extern int spw_close(void);
extern int spw_file_present(void);
extern const struct spwd *spw_locate(const char *);
extern int spw_lock(void);
extern int spw_name(const char *);
extern const struct spwd *spw_next(void);
extern int spw_open(int);
extern int spw_remove(const char *);
extern int spw_rewind(void);
extern int spw_unlock(void);
extern int spw_update(const struct spwd *);
extern int spw_sort(void);
extern struct spwd *__spw_dup (const struct spwd *);
extern void __spw_set_changed (void);
extern int spw_close (void);
extern int spw_file_present (void);
extern const struct spwd *spw_locate (const char *);
extern int spw_lock (void);
extern int spw_name (const char *);
extern const struct spwd *spw_next (void);
extern int spw_open (int);
extern int spw_remove (const char *);
extern int spw_rewind (void);
extern int spw_unlock (void);
extern int spw_update (const struct spwd *);
extern int spw_sort (void);

View File

@ -1,116 +0,0 @@
/*
* Copyright 1990 - 1994, 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>
#if defined(SHADOWPWD) && defined(NDBM) /*{*/
#include "rcsid.h"
RCSID("$Id: spdbm.c,v 1.3 1997/12/07 23:26:58 marekm Exp $")
#include <string.h>
#include <stdio.h>
#include "prototypes.h"
#include "defines.h"
#include <ndbm.h>
extern DBM *sp_dbm;
/*
* sp_dbm_update
*
* Updates the DBM password files, if they exist.
*/
int
sp_dbm_update(struct spwd *sp)
{
datum key;
datum content;
char data[BUFSIZ];
int len;
static int once;
if (! once) {
if (! sp_dbm)
setspent ();
once++;
}
if (! sp_dbm)
return 0;
len = spw_pack (sp, data);
content.dsize = len;
content.dptr = data;
key.dsize = strlen (sp->sp_namp);
key.dptr = sp->sp_namp;
if (dbm_store (sp_dbm, key, content, DBM_REPLACE))
return 0;
return 1;
}
/*
* sp_dbm_remove
*
* Updates the DBM password files, if they exist.
*/
int
sp_dbm_remove(char *user)
{
datum key;
static int once;
if (! once) {
if (! sp_dbm)
setspent ();
once++;
}
if (! sp_dbm)
return 0;
key.dsize = strlen (user);
key.dptr = user;
if (dbm_delete (sp_dbm, key))
return 0;
return 1;
}
int
sp_dbm_present(void)
{
return (access(SHADOW_PAG_FILE, F_OK) == 0);
}
#endif /*} SHADOWPWD && NDBM */

View File

@ -28,19 +28,16 @@
*/
#include <config.h>
#ifdef SHADOWPWD /*{*/
#ifdef SHADOWPWD /*{ */
#include "rcsid.h"
RCSID("$Id: sppack.c,v 1.3 1997/12/07 23:26:58 marekm Exp $")
RCSID ("$Id: sppack.c,v 1.4 2005/03/31 05:14:49 kloczek Exp $")
#include <stdio.h>
#include <sys/types.h>
#include "defines.h"
int
spw_pack(const struct spwd *spwd, char *buf)
int spw_pack (const struct spwd *spwd, char *buf)
{
char *cp;
char *cp;
cp = buf;
strcpy (cp, spwd->sp_namp);
@ -73,10 +70,9 @@ spw_pack(const struct spwd *spwd, char *buf)
return cp - buf;
}
int
spw_unpack(char *buf, int len, struct spwd *spwd)
int spw_unpack (char *buf, int len, struct spwd *spwd)
{
char *org = buf;
char *org = buf;
spwd->sp_namp = buf;
buf += strlen (buf) + 1;
@ -110,4 +106,4 @@ spw_unpack(char *buf, int len, struct spwd *spwd)
return 0;
}
#endif /*}*/
#endif /*} */

View File

@ -37,18 +37,17 @@
#include <utmp.h>
#ifndef lint
static char rcsid[] = "$Id: utent.c,v 1.4 1998/01/29 23:22:32 marekm Exp $";
static char rcsid[] = "$Id: utent.c,v 1.5 2005/03/31 05:14:49 kloczek Exp $";
#endif
static int utmp_fd = -1;
static struct utmp utmp_buf;
static int utmp_fd = -1;
static struct utmp utmp_buf;
/*
* setutent - open or rewind the utmp file
*/
void
setutent(void)
void setutent (void)
{
if (utmp_fd == -1)
if ((utmp_fd = open (_UTMP_FILE, O_RDWR)) == -1)
@ -62,8 +61,7 @@ setutent(void)
* endutent - close the utmp file
*/
void
endutent(void)
void endutent (void)
{
if (utmp_fd != -1)
close (utmp_fd);
@ -75,8 +73,7 @@ endutent(void)
* getutent - get the next record from the utmp file
*/
struct utmp *
getutent(void)
struct utmp *getutent (void)
{
if (utmp_fd == -1)
setutent ();
@ -94,11 +91,10 @@ getutent(void)
* getutline - get the utmp entry matching ut_line
*/
struct utmp *
getutline(const struct utmp *utent)
struct utmp *getutline (const struct utmp *utent)
{
struct utmp save;
struct utmp *new;
struct utmp save;
struct utmp *new;
save = *utent;
while (new = getutent ())
@ -110,5 +106,5 @@ getutline(const struct utmp *utent)
return (struct utmp *) 0;
}
#else
extern int errno; /* warning: ANSI C forbids an empty source file */
extern int errno; /* warning: ANSI C forbids an empty source file */
#endif

View File

@ -27,9 +27,6 @@ libmisc_a_SOURCES = \
isexpired.c \
limits.c \
list.c log.c \
login_access.c \
login_desrpc.c \
login_krb.c \
loginprompt.c \
mail.c \
motd.c \

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -57,16 +57,15 @@ am_libmisc_a_OBJECTS = addgrps.$(OBJEXT) age.$(OBJEXT) \
copydir.$(OBJEXT) entry.$(OBJEXT) env.$(OBJEXT) \
failure.$(OBJEXT) fields.$(OBJEXT) getdate.$(OBJEXT) \
hushed.$(OBJEXT) isexpired.$(OBJEXT) limits.$(OBJEXT) \
list.$(OBJEXT) log.$(OBJEXT) login_access.$(OBJEXT) \
login_desrpc.$(OBJEXT) login_krb.$(OBJEXT) \
loginprompt.$(OBJEXT) mail.$(OBJEXT) motd.$(OBJEXT) \
myname.$(OBJEXT) obscure.$(OBJEXT) pam_pass.$(OBJEXT) \
pwd2spwd.$(OBJEXT) pwdcheck.$(OBJEXT) pwd_init.$(OBJEXT) \
rlogin.$(OBJEXT) salt.$(OBJEXT) setugid.$(OBJEXT) \
setup.$(OBJEXT) setupenv.$(OBJEXT) shell.$(OBJEXT) \
strtoday.$(OBJEXT) sub.$(OBJEXT) sulog.$(OBJEXT) \
ttytype.$(OBJEXT) tz.$(OBJEXT) ulimit.$(OBJEXT) utmp.$(OBJEXT) \
valid.$(OBJEXT) xmalloc.$(OBJEXT)
list.$(OBJEXT) log.$(OBJEXT) loginprompt.$(OBJEXT) \
mail.$(OBJEXT) motd.$(OBJEXT) myname.$(OBJEXT) \
obscure.$(OBJEXT) pam_pass.$(OBJEXT) pwd2spwd.$(OBJEXT) \
pwdcheck.$(OBJEXT) pwd_init.$(OBJEXT) rlogin.$(OBJEXT) \
salt.$(OBJEXT) setugid.$(OBJEXT) setup.$(OBJEXT) \
setupenv.$(OBJEXT) shell.$(OBJEXT) strtoday.$(OBJEXT) \
sub.$(OBJEXT) sulog.$(OBJEXT) ttytype.$(OBJEXT) tz.$(OBJEXT) \
ulimit.$(OBJEXT) utmp.$(OBJEXT) valid.$(OBJEXT) \
xmalloc.$(OBJEXT)
libmisc_a_OBJECTS = $(am_libmisc_a_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
@ -122,17 +121,16 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBCRACK = @LIBCRACK@
LIBCRYPT = @LIBCRYPT@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBMD = @LIBMD@
LIBOBJS = @LIBOBJS@
LIBPAM = @LIBPAM@
LIBS = @LIBS@
LIBSELINUX = @LIBSELINUX@
LIBSKEY = @LIBSKEY@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
@ -231,9 +229,6 @@ libmisc_a_SOURCES = \
isexpired.c \
limits.c \
list.c log.c \
login_access.c \
login_desrpc.c \
login_krb.c \
loginprompt.c \
mail.c \
motd.c \
@ -272,9 +267,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libmisc/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libmisc/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu libmisc/Makefile
$(AUTOMAKE) --foreign libmisc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@ -325,9 +320,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/limits.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/login_access.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/login_desrpc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/login_krb.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loginprompt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/motd.Po@am__quote@

View File

@ -10,7 +10,7 @@
#include <errno.h>
#include "rcsid.h"
RCSID ("$Id: addgrps.c,v 1.6 2003/04/22 10:59:21 kloczek Exp $")
RCSID ("$Id: addgrps.c,v 1.7 2005/03/31 05:14:50 kloczek Exp $")
#define SEP ",:"
/*
* Add groups with names from LIST (separated by commas or colons)
@ -58,8 +58,7 @@ int add_groups (const char *list)
continue;
}
for (i = 0; i < ngroups && grouplist[i] != grp->gr_gid;
i++);
for (i = 0; i < ngroups && grouplist[i] != grp->gr_gid; i++);
if (i < ngroups)
continue;
@ -68,9 +67,7 @@ int add_groups (const char *list)
fprintf (stderr, _("Warning: too many groups\n"));
break;
}
tmp =
realloc (grouplist,
(ngroups + 1) * sizeof (GETGROUPS_T));
tmp = realloc (grouplist, (ngroups + 1) * sizeof (GETGROUPS_T));
if (!tmp) {
free (grouplist);
return -1;

View File

@ -41,7 +41,7 @@
#if defined(SHADOWPWD)
#include "rcsid.h"
RCSID ("$Id: age.c,v 1.9 2004/03/29 00:26:18 kloczek Exp $")
RCSID ("$Id: age.c,v 1.10 2005/03/31 05:14:50 kloczek Exp $")
#ifndef PASSWD_PROGRAM
#define PASSWD_PROGRAM "/bin/passwd"
#endif
@ -124,8 +124,7 @@ int expire (const struct passwd *pw, const struct spwd *sp)
if (setup_uid_gid (pw, 0))
_exit (126);
execl (PASSWD_PROGRAM, PASSWD_PROGRAM, pw->pw_name,
(char *) 0);
execl (PASSWD_PROGRAM, PASSWD_PROGRAM, pw->pw_name, (char *) 0);
err = errno;
perror ("Can't execute " PASSWD_PROGRAM);
_exit ((err == ENOENT) ? 127 : 126);
@ -170,8 +169,7 @@ void agecheck (const struct passwd *pw, const struct spwd *sp)
("Your password will expire in %ld days.\n"),
remain);
else if (remain == 1)
printf (_
("Your password will expire tomorrow.\n"));
printf (_("Your password will expire tomorrow.\n"));
else if (remain == 0)
printf (_("Your password will expire today.\n"));
}

View File

@ -1,4 +1,4 @@
/* $Id: chkname.h,v 1.2 2000/08/26 18:27:17 marekm Exp $ */
/* $Id: chkname.h,v 1.3 2005/03/31 05:14:50 kloczek Exp $ */
#ifndef _CHKNAME_H_
#define _CHKNAME_H_
@ -9,7 +9,7 @@
#include "defines.h"
extern int check_user_name(const char *);
extern int check_group_name(const char *name);
extern int check_user_name (const char *);
extern int check_group_name (const char *name);
#endif

View File

@ -30,7 +30,7 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: chowndir.c,v 1.7 2003/04/22 10:59:21 kloczek Exp $")
RCSID ("$Id: chowndir.c,v 1.8 2005/03/31 05:14:50 kloczek Exp $")
#include <sys/types.h>
#include <sys/stat.h>
#include "prototypes.h"
@ -86,8 +86,7 @@ chown_tree (const char *root, uid_t old_uid, uid_t new_uid, gid_t old_gid,
* destination files.
*/
if (strlen (root) + strlen (ent->d_name) + 2 >
sizeof new_name)
if (strlen (root) + strlen (ent->d_name) + 2 > sizeof new_name)
break;
snprintf (new_name, sizeof new_name, "%s/%s", root,
@ -114,8 +113,7 @@ chown_tree (const char *root, uid_t old_uid, uid_t new_uid, gid_t old_gid,
#endif
if (sb.st_uid == old_uid)
LCHOWN (new_name, new_uid,
sb.st_gid ==
old_gid ? new_gid : sb.st_gid);
sb.st_gid == old_gid ? new_gid : sb.st_gid);
}
closedir (dir);
@ -126,8 +124,7 @@ chown_tree (const char *root, uid_t old_uid, uid_t new_uid, gid_t old_gid,
if (!stat (root, &sb)) {
if (sb.st_uid == old_uid)
LCHOWN (root, new_uid,
sb.st_gid ==
old_gid ? new_gid : sb.st_gid);
sb.st_gid == old_gid ? new_gid : sb.st_gid);
}
return rc;
}

View File

@ -30,7 +30,7 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: chowntty.c,v 1.10 2003/04/22 10:59:21 kloczek Exp $")
RCSID ("$Id: chowntty.c,v 1.11 2005/03/31 05:14:50 kloczek Exp $")
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
@ -103,8 +103,7 @@ void chown_tty (const char *tty, const struct passwd *info)
chmod (tty, getdef_num ("TTYPERM", 0600))) {
int err = errno;
snprintf (buf, sizeof buf, _("Unable to change tty %s"),
tty);
snprintf (buf, sizeof buf, _("Unable to change tty %s"), tty);
perror (buf);
SYSLOG ((LOG_WARN,
"unable to change tty `%s' for user `%s'\n", tty,

View File

@ -30,14 +30,17 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: copydir.c,v 1.10 2004/10/18 20:10:10 kloczek Exp $")
RCSID ("$Id: copydir.c,v 1.12 2005/03/31 05:14:50 kloczek Exp $")
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <stdio.h>
#include "prototypes.h"
#include "defines.h"
#ifdef WITH_SELINUX
#include <selinux/selinux.h>
static int selinux_enabled = -1;
#endif
static const char *src_orig;
static const char *dst_orig;
@ -50,6 +53,26 @@ struct link_name {
};
static struct link_name *links;
#ifdef WITH_SELINUX
static int selinux_file_context (const char *dst_name)
{
security_context_t scontext = NULL;
if (selinux_enabled < 0)
selinux_enabled = is_selinux_enabled () > 0;
if (selinux_enabled) {
if (matchpathcon (dst_name, 0, &scontext) < 0)
if (security_getenforce ())
return 1;
if (setfscreatecon (scontext) < 0)
if (security_getenforce ())
return 1;
freecon (scontext);
}
return 0;
}
#endif
/*
* remove_link - delete a link from the link list
*/
@ -80,8 +103,7 @@ static void remove_link (struct link_name *ln)
* check_link - see if a file is really a link
*/
static struct link_name *check_link (const char *name,
const struct stat *sb)
static struct link_name *check_link (const char *name, const struct stat *sb)
{
struct link_name *lp;
int src_len;
@ -119,9 +141,7 @@ static struct link_name *check_link (const char *name,
* as it goes.
*/
int
copy_tree (const char *src_root, const char *dst_root, uid_t uid,
gid_t gid)
int copy_tree (const char *src_root, const char *dst_root, uid_t uid, gid_t gid)
{
char src_name[1024];
char dst_name[1024];
@ -202,6 +222,9 @@ copy_tree (const char *src_root, const char *dst_root, uid_t uid,
* the user and then recursively copy that directory.
*/
#ifdef WITH_SELINUX
selinux_file_context (dst_name);
#endif
mkdir (dst_name, sb.st_mode & 0777);
chown (dst_name,
uid == (uid_t) - 1 ? sb.st_uid : uid,
@ -238,16 +261,19 @@ copy_tree (const char *src_root, const char *dst_root, uid_t uid,
break;
}
oldlink[len] = '\0'; /* readlink() does not NUL-terminate */
if (!strncmp
(oldlink, src_orig, strlen (src_orig))) {
if (!strncmp (oldlink, src_orig, strlen (src_orig))) {
snprintf (dummy, sizeof dummy, "%s%s",
dst_orig,
oldlink + strlen (src_orig));
strcpy (oldlink, dummy);
}
if (symlink(oldlink, dst_name) ||
lchown (dst_name, uid == (uid_t) -1 ? sb.st_uid:uid,
gid == (gid_t) -1 ? sb.st_gid:gid)) {
#ifdef WITH_SELINUX
selinux_file_context (dst_name);
#endif
if (symlink (oldlink, dst_name) ||
lchown (dst_name,
uid == (uid_t) - 1 ? sb.st_uid : uid,
gid == (gid_t) - 1 ? sb.st_gid : gid)) {
err++;
break;
}
@ -281,8 +307,10 @@ copy_tree (const char *src_root, const char *dst_root, uid_t uid,
*/
if (!S_ISREG (sb.st_mode)) {
if (mknod
(dst_name, sb.st_mode & ~07777, sb.st_rdev)
#ifdef WITH_SELINUX
selinux_file_context (dst_name);
#endif
if (mknod (dst_name, sb.st_mode & ~07777, sb.st_rdev)
|| chown (dst_name,
uid == (uid_t) - 1 ? sb.st_uid : uid,
gid == (gid_t) - 1 ? sb.st_gid : gid)
@ -302,6 +330,9 @@ copy_tree (const char *src_root, const char *dst_root, uid_t uid,
err++;
break;
}
#ifdef WITH_SELINUX
selinux_file_context (dst_name);
#endif
if ((ofd =
open (dst_name, O_WRONLY | O_CREAT | O_TRUNC, 0)) < 0
|| chown (dst_name,
@ -381,8 +412,7 @@ int remove_tree (const char *root)
* Make the filename for the current entry.
*/
if (strlen (root) + strlen (ent->d_name) + 2 >
sizeof new_name) {
if (strlen (root) + strlen (ent->d_name) + 2 > sizeof new_name) {
err++;
break;
}

View File

@ -30,7 +30,7 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: env.c,v 1.10 2003/04/22 10:59:22 kloczek Exp $")
RCSID ("$Id: env.c,v 1.11 2005/03/31 05:14:50 kloczek Exp $")
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -179,8 +179,7 @@ void set_env (int argc, char *const *argv)
continue; /* ignore long entries */
if (!(cp = strchr (*argv, '='))) {
snprintf (variable, sizeof variable, "L%d",
noname++);
snprintf (variable, sizeof variable, "L%d", noname++);
addenv (variable, *argv);
} else {
const char **p;

View File

@ -30,14 +30,13 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: failure.c,v 1.9 2003/04/25 21:11:08 kloczek Exp $")
RCSID ("$Id: failure.c,v 1.12 2005/04/12 14:12:26 kloczek Exp $")
#include <fcntl.h>
#include <stdio.h>
#include "defines.h"
#include "faillog.h"
#include "getdef.h"
#include "failure.h"
#define YEAR (365L*DAY)
/*
* failure - make failure entry
@ -227,9 +226,12 @@ void failprint (const struct faillog *fail)
if (*lasttime == ' ')
lasttime++;
#endif
printf (_("%d %s since last login. Last was %s on %s.\n"),
printf (ngettext("%d failure since last login.\n"
"Last was %s on %s.\n",
"%d failures since last login.\n"
"Last was %s on %s.\n",
fail->fail_cnt),
fail->fail_cnt,
fail->fail_cnt > 1 ? _("failures") : _("failure"),
lasttime, fail->fail_line);
}

View File

@ -1,4 +1,4 @@
/* $Id: failure.h,v 1.2 2000/08/26 18:27:17 marekm Exp $ */
/* $Id: failure.h,v 1.3 2005/03/31 05:14:50 kloczek Exp $ */
#ifndef _FAILURE_H_
#define _FAILURE_H_
@ -12,7 +12,7 @@
* failure() creates a new (struct faillog) entry or updates an
* existing one with the current failed login information.
*/
extern void failure(uid_t, const char *, struct faillog *);
extern void failure (uid_t, const char *, struct faillog *);
/*
* failcheck - check for failures > allowable
@ -22,7 +22,7 @@ extern void failure(uid_t, const char *, struct faillog *);
* returns FALSE to indicate that the login should be denied even though
* the password is valid.
*/
extern int failcheck(uid_t, struct faillog *, int);
extern int failcheck (uid_t, struct faillog *, int);
/*
* failprint - print line of failure information
@ -30,7 +30,7 @@ extern int failcheck(uid_t, struct faillog *, int);
* failprint takes a (struct faillog) entry and formats it into a
* message which is displayed at login time.
*/
extern void failprint(const struct faillog *);
extern void failprint (const struct faillog *);
/*
* failtmp - update the cummulative failure log
@ -38,7 +38,6 @@ extern void failprint(const struct faillog *);
* failtmp updates the (struct utmp) formatted failure log which
* maintains a record of all login failures.
*/
extern void failtmp(const struct utmp *);
extern void failtmp (const struct utmp *);
#endif

View File

@ -1,7 +1,7 @@
/* A Bison parser, made by GNU Bison 1.875d. */
/* A Bison parser, made by GNU Bison 1.875c. */
/* Skeleton parser for Yacc-like parsing with Bison,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
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
@ -347,7 +347,7 @@ typedef union YYSTYPE {
/* A type that is properly aligned for any stack member. */
union yyalloc
{
short int yyss;
short yyss;
YYSTYPE yyvs;
};
@ -357,7 +357,7 @@ union yyalloc
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
@ -399,7 +399,7 @@ union yyalloc
#if defined (__STDC__) || defined (__cplusplus)
typedef signed char yysigned_char;
#else
typedef short int yysigned_char;
typedef short yysigned_char;
#endif
/* YYFINAL -- State number of the termination state. */
@ -491,7 +491,7 @@ static const yysigned_char yyrhs[] =
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const unsigned short int yyrline[] =
static const unsigned short yyrline[] =
{
0, 191, 191, 192, 195, 198, 201, 204, 207, 210,
213, 219, 225, 234, 240, 252, 255, 259, 264, 268,
@ -518,7 +518,7 @@ static const char *const yytname[] =
# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
token YYLEX-NUM. */
static const unsigned short int yytoknum[] =
static const unsigned short yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 58,
@ -739,12 +739,12 @@ do { \
#if defined (__STDC__) || defined (__cplusplus)
static void
yy_stack_print (short int *bottom, short int *top)
yy_stack_print (short *bottom, short *top)
#else
static void
yy_stack_print (bottom, top)
short int *bottom;
short int *top;
short *bottom;
short *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
@ -1011,9 +1011,9 @@ yyparse ()
to reallocate them elsewhere. */
/* The state stack. */
short int yyssa[YYINITDEPTH];
short int *yyss = yyssa;
register short int *yyssp;
short yyssa[YYINITDEPTH];
short *yyss = yyssa;
register short *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
@ -1050,7 +1050,6 @@ yyparse ()
yyssp = yyss;
yyvsp = yyvs;
goto yysetstate;
/*------------------------------------------------------------.
@ -1076,7 +1075,7 @@ yyparse ()
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
short int *yyss1 = yyss;
short *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
@ -1104,7 +1103,7 @@ yyparse ()
yystacksize = YYMAXDEPTH;
{
short int *yyss1 = yyss;
short *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
@ -1646,8 +1645,8 @@ yyreduce:
}
/* Line 1010 of yacc.c. */
#line 1651 "getdate.c"
/* Line 1000 of yacc.c. */
#line 1650 "getdate.c"
yyvsp -= yylen;
yyssp -= yylen;

View File

@ -4,5 +4,5 @@
#include <config.h>
#include "defines.h"
time_t get_date(const char *, const time_t *);
time_t get_date (const char *, const time_t *);
#endif

View File

@ -30,7 +30,7 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: hushed.c,v 1.5 2003/04/22 10:59:22 kloczek Exp $")
RCSID ("$Id: hushed.c,v 1.6 2005/03/31 05:14:50 kloczek Exp $")
#include <sys/types.h>
#include <stdio.h>
#include "defines.h"
@ -64,8 +64,7 @@ int hushed (const struct passwd *pw)
*/
if (hushfile[0] != '/') {
snprintf (buf, sizeof (buf), "%s/%s", pw->pw_dir,
hushfile);
snprintf (buf, sizeof (buf), "%s/%s", pw->pw_dir, hushfile);
return (access (buf, F_OK) == 0);
}
@ -80,8 +79,7 @@ int hushed (const struct passwd *pw)
for (found = 0; !found && fgets (buf, sizeof buf, fp);) {
buf[strlen (buf) - 1] = '\0';
found = !strcmp (buf,
buf[0] ==
'/' ? pw->pw_shell : pw->pw_name);
buf[0] == '/' ? pw->pw_shell : pw->pw_name);
}
(void) fclose (fp);
return found;

View File

@ -41,7 +41,7 @@
#include <time.h>
#include "rcsid.h"
RCSID ("$Id: isexpired.c,v 1.11 2003/05/03 16:14:33 kloczek Exp $")
RCSID ("$Id: isexpired.c,v 1.12 2005/03/31 05:14:50 kloczek Exp $")
/*
* isexpired - determine if account is expired yet
@ -77,8 +77,7 @@ int isexpired (const struct passwd *pw, const struct spwd *sp)
* if /etc/shadow doesn't exist, getspnam() still succeeds and
* returns sp_lstchg==0 (must change password) instead of -1!
*/
if (sp->sp_lstchg == 0
&& !strcmp (pw->pw_passwd, SHADOW_PASSWD_STRING))
if (sp->sp_lstchg == 0 && !strcmp (pw->pw_passwd, SHADOW_PASSWD_STRING))
return 1;
if (sp->sp_lstchg > 0 && sp->sp_max >= 0 && sp->sp_inact >= 0 &&

View File

@ -34,8 +34,10 @@
#include <config.h>
#ifndef USE_PAM
#include "rcsid.h"
RCSID ("$Id: limits.c,v 1.14 2003/05/05 21:44:15 kloczek Exp $")
RCSID ("$Id: limits.c,v 1.16 2005/03/31 05:14:50 kloczek Exp $")
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
@ -248,8 +250,7 @@ static int do_user_limits (const char *buf, const char *name)
case 'm':
case 'M':
/* RLIMIT_MEMLOCK - max locked-in-memory address space (KB) */
retval |=
setrlimit_value (RLIMIT_MEMLOCK, pp, 1024);
retval |= setrlimit_value (RLIMIT_MEMLOCK, pp, 1024);
break;
#endif
#ifdef RLIMIT_NOFILE
@ -398,8 +399,7 @@ void setup_limits (const struct passwd *info)
exit (1);
}
#endif
for (cp = info->pw_gecos; cp != NULL;
cp = strchr (cp, ',')) {
for (cp = info->pw_gecos; cp != NULL; cp = strchr (cp, ',')) {
if (*cp == ',')
cp++;
@ -424,3 +424,5 @@ void setup_limits (const struct passwd *info)
}
}
}
#endif /* !USE_PAM */

View File

@ -30,17 +30,13 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: log.c,v 1.7 2003/12/17 12:52:25 kloczek Exp $")
RCSID ("$Id: log.c,v 1.9 2005/04/02 11:31:39 kloczek Exp $")
#include <sys/types.h>
#include <pwd.h>
#include <fcntl.h>
#include <time.h>
#include "defines.h"
#if HAVE_LASTLOG_H
#include <lastlog.h>
#else
#include "lastlog_.h"
#endif
/*
* dolastlog - create lastlog entry
*
@ -89,6 +85,7 @@ dolastlog (struct lastlog *ll, const struct passwd *pw, const char *line,
ll_time = newlog.ll_time;
time (&ll_time);
newlog.ll_time = ll_time;
strncpy (newlog.ll_line, line, sizeof newlog.ll_line);
#if HAVE_LL_HOST
strncpy (newlog.ll_host, host, sizeof newlog.ll_host);

View File

@ -1,74 +0,0 @@
/* Taken from logdaemon-5.0, only minimal changes. --marekm */
/************************************************************************
* Copyright 1995 by Wietse Venema. All rights reserved. Individual files
* may be covered by other copyrights (as noted in the file itself.)
*
* This material was originally written and compiled by Wietse Venema at
* Eindhoven University of Technology, The Netherlands, in 1990, 1991,
* 1992, 1993, 1994 and 1995.
*
* Redistribution and use in source and binary forms are permitted
* provided that this entire copyright notice is duplicated in all such
* copies.
*
* This software is provided "as is" and without any expressed or implied
* warranties, including, without limitation, the implied warranties of
* merchantibility and fitness for any particular purpose.
************************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef DES_RPC
#include "rcsid.h"
RCSID ("$Id: login_desrpc.c,v 1.8 2003/04/22 10:59:22 kloczek Exp $")
#include "defines.h"
/*
* Decrypt the user's secret secure RPC key and stores it into the
* keyserver. Returns 0 if successful, -1 on failure.
*
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
*/
#include <stdio.h>
#include <rpc/rpc.h>
#include <rpc/key_prot.h>
#if !(defined __GLIBC__ && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 0)))
/* these don't seem to be in any header file (libc-5.4.33) */
/* but will be in glibc 2.1 <rpc/auth.h> and <rpc/auth_des.h> */
extern int getnetname (char *);
extern int getsecretkey (const char *, char *, const char *);
extern int key_setsecret (const char *);
#endif
int login_desrpc (const char *passwd)
{
char netname[MAXNETNAMELEN + 1];
char secretkey[HEXKEYBYTES + 1];
if (getnetname (netname) == 0)
return -1;
if (getsecretkey (netname, secretkey, passwd) == 0)
return -1;
if (secretkey[0] == 0) {
fprintf (stderr,
_
("Password does not decrypt secret key for %s.\n"),
netname);
return -1;
}
if (key_setsecret (secretkey) < 0) {
fprintf (stderr,
_
("Could not set %s's secret key: is the keyserv daemon running?\n"),
netname);
return -1;
}
return 0;
}
#else
extern int errno; /* warning: ANSI C forbids an empty source file */
#endif

View File

@ -1,58 +0,0 @@
/* Taken from logdaemon-5.0, only minimal changes. --marekm */
/************************************************************************
* Copyright 1995 by Wietse Venema. All rights reserved. Individual files
* may be covered by other copyrights (as noted in the file itself.)
*
* This material was originally written and compiled by Wietse Venema at
* Eindhoven University of Technology, The Netherlands, in 1990, 1991,
* 1992, 1993, 1994 and 1995.
*
* Redistribution and use in source and binary forms are permitted
* provided that this entire copyright notice is duplicated in all such
* copies.
*
* This software is provided "as is" and without any expressed or implied
* warranties, including, without limitation, the implied warranties of
* merchantibility and fitness for any particular purpose.
************************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef KERBEROS
#include "rcsid.h"
RCSID ("$Id: login_krb.c,v 1.4 2003/04/22 10:59:22 kloczek Exp $")
#include <krb.h>
/*
* Do an equivalent to kinit here. We need to do the kinit before trying to
* cd to the home directory, because it might be on a remote filesystem that
* uses Kerberos authentication. We also need to do this after we've
* setuid() to the user, or krb_get_pw_in_tkt() won't know where to put the
* ticket.
*
* We don't really care about whether or not it succeeds; if it fails, we'll
* just carry on bravely.
*
* NB: we assume: local realm, same username and password as supplied to login.
*
* Security note: if pp is NULL, login doesn't have the password. This is
* common when it's called by rlogind. Since this is almost always a remote
* connection, we don't want to risk asking for the password by supplying a
* NULL pp to krb_get_pw_in_tkt(), because somebody could be listening. So
* we'll just forget the whole thing. -jdd
*/
int login_kerberos (const char *username, const char *password)
{
char realm[REALM_SZ];
(void) krb_get_lrealm (realm, 1);
if (password != 0)
(void) krb_get_pw_in_tkt (username, "", realm, "krbtgt",
realm, DEFAULT_TKT_LIFE,
password);
}
#else
extern int errno; /* warning: ANSI C forbids an empty source file */
#endif /* KERBEROS */

View File

@ -30,7 +30,7 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: loginprompt.c,v 1.7 2003/04/22 10:59:22 kloczek Exp $")
RCSID ("$Id: loginprompt.c,v 1.8 2005/03/31 05:14:50 kloczek Exp $")
#include <stdio.h>
#include <signal.h>
#include <ctype.h>
@ -144,8 +144,7 @@ void login_prompt (const char *prompt, char *name, int namesize)
envp[envc] = nvar;
} else {
envp[envc] = xmalloc (strlen (nvar) + 32);
sprintf (envp[envc], "L%d=%s", count++,
nvar);
sprintf (envp[envc], "L%d=%s", count++, nvar);
}
}
set_env (envc, envp);

View File

@ -30,7 +30,7 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: motd.c,v 1.4 2003/04/22 10:59:22 kloczek Exp $")
RCSID ("$Id: motd.c,v 1.5 2005/03/31 05:14:50 kloczek Exp $")
#include <stdio.h>
#include "prototypes.h"
#include "defines.h"
@ -54,8 +54,7 @@ void motd (void)
strncpy (motdlist, mb, sizeof (motdlist));
motdlist[sizeof (motdlist) - 1] = '\0';
for (mb = motdlist; (motdfile = strtok (mb, ":")) != NULL;
mb = NULL) {
for (mb = motdlist; (motdfile = strtok (mb, ":")) != NULL; mb = NULL) {
if ((fp = fopen (motdfile, "r")) != NULL) {
while ((c = getc (fp)) != EOF)
putchar (c);

View File

@ -29,8 +29,10 @@
#include <config.h>
#ifndef USE_PAM
#include "rcsid.h"
RCSID ("$Id: obscure.c,v 1.11 2003/05/05 21:44:15 kloczek Exp $")
RCSID ("$Id: obscure.c,v 1.12 2005/03/24 04:29:23 kloczek Exp $")
/*
* This version of obscure.c contains modifications to support "cracklib"
@ -273,3 +275,5 @@ int obscure (const char *old, const char *new, const struct passwd *pwdp)
}
return 1;
}
#endif /* !USE_PAM */

View File

@ -3,7 +3,7 @@
#ifdef USE_PAM
#include "rcsid.h"
RCSID ("$Id: pam_pass.c,v 1.9 2003/07/29 09:05:39 kloczek Exp $")
RCSID ("$Id: pam_pass.c,v 1.10 2005/03/31 05:14:50 kloczek Exp $")
/*
* Change the user's password using PAM. Requires libpam and libpam_misc
@ -41,13 +41,12 @@ void do_pam_passwd (const char *user, int silent, int change_expired)
ret = pam_chauthtok (pamh, flags);
if (ret != PAM_SUCCESS) {
fprintf (stderr, _("passwd: %s\n"),
pam_strerror (pamh, ret));
fprintf (stderr, _("passwd: %s\n"), pam_strerror (pamh, ret));
pam_end (pamh, ret);
exit (10); /* XXX */
}
fputs(_("passwd: password updated successfully\n"), stderr);
fputs (_("passwd: password updated successfully\n"), stderr);
pam_end (pamh, PAM_SUCCESS);
}
#else /* !USE_PAM */

View File

@ -1,7 +1,7 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: pwdcheck.c,v 1.4 2004/11/02 18:46:30 kloczek Exp $")
RCSID ("$Id: pwdcheck.c,v 1.5 2005/03/31 05:14:50 kloczek Exp $")
#include "prototypes.h"
#include "defines.h"
#include <pwd.h>
@ -13,8 +13,7 @@ RCSID ("$Id: pwdcheck.c,v 1.4 2004/11/02 18:46:30 kloczek Exp $")
#include "pam_defs.h"
#endif
#define WRONGPWD2 "incorrect password for `%s'"
void
passwd_check (const char *user, const char *passwd, const char *progname)
void passwd_check (const char *user, const char *passwd, const char *progname)
{
#ifdef USE_PAM
pam_handle_t *pamh = NULL;

View File

@ -32,13 +32,12 @@
#ifdef RLOGIN
#include "rcsid.h"
RCSID ("$Id: rlogin.c,v 1.7 2005/01/20 12:47:20 kloczek Exp $")
RCSID ("$Id: rlogin.c,v 1.9 2005/03/31 05:14:50 kloczek Exp $")
#include "prototypes.h"
#include "defines.h"
#include <stdio.h>
#include <pwd.h>
#include <unistd.h>
#include <netdb.h>
static struct {
int spd_name;
int spd_baud;

View File

@ -8,13 +8,12 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: salt.c,v 1.6 2003/04/22 10:59:22 kloczek Exp $")
RCSID ("$Id: salt.c,v 1.7 2005/04/06 00:21:37 kloczek Exp $")
#include <sys/time.h>
#include <stdlib.h>
#include "prototypes.h"
#include "defines.h"
#include <sys/time.h>
#if 1
#include "getdef.h"
extern char *l64a ();
/*
* Generate 8 base64 ASCII characters of random salt. If MD5_CRYPT_ENAB
@ -44,21 +43,3 @@ char *crypt_make_salt (void)
return result;
}
#else
/*
* This is the old style random salt generator...
*/
char *crypt_make_salt (void)
{
time_t now;
static unsigned long x;
static char result[3];
time (&now);
x += now + getpid () + clock ();
result[0] = i64c (((x >> 18) ^ (x >> 6)) & 077);
result[1] = i64c (((x >> 12) ^ x) & 077);
result[2] = '\0';
return result;
}
#endif

View File

@ -34,7 +34,7 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: setugid.c,v 1.7 2003/04/22 10:59:22 kloczek Exp $")
RCSID ("$Id: setugid.c,v 1.9 2005/03/31 05:14:50 kloczek Exp $")
#include <stdio.h>
#include <grp.h>
#include "prototypes.h"
@ -80,12 +80,7 @@ int change_uid (const struct passwd *info)
/*
* Set the real UID to the UID value in the password file.
*/
#ifndef BSD
if (setuid (info->pw_uid))
#else
if (setreuid (info->pw_uid, info->pw_uid))
#endif
{
if (setuid (info->pw_uid)) {
perror ("setuid");
SYSLOG ((LOG_ERR, "bad user ID `%d' for user `%s': %m\n",
(int) info->pw_uid, info->pw_name));

View File

@ -34,7 +34,7 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: setupenv.c,v 1.13 2003/05/05 21:44:15 kloczek Exp $")
RCSID ("$Id: setupenv.c,v 1.14 2005/03/31 05:14:50 kloczek Exp $")
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
@ -44,8 +44,7 @@ RCSID ("$Id: setupenv.c,v 1.13 2003/05/05 21:44:15 kloczek Exp $")
#include <pwd.h>
#include "getdef.h"
static void
addenv_path (const char *varname, const char *dirname,
const char *filename)
addenv_path (const char *varname, const char *dirname, const char *filename)
{
char *buf;

View File

@ -30,7 +30,7 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: shell.c,v 1.9 2003/05/05 21:49:56 kloczek Exp $")
RCSID ("$Id: shell.c,v 1.10 2005/03/31 05:14:50 kloczek Exp $")
#include <stdio.h>
#include <errno.h>
#include "prototypes.h"
@ -67,8 +67,7 @@ void shell (const char *file, const char *arg)
*/
if (arg == (char *) 0) {
snprintf (arg0, sizeof arg0, "-%s",
Basename ((char *) file));
snprintf (arg0, sizeof arg0, "-%s", Basename ((char *) file));
arg = arg0;
}
#ifdef DEBUG

View File

@ -34,7 +34,7 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: strtoday.c,v 1.9 2003/04/22 10:59:22 kloczek Exp $")
RCSID ("$Id: strtoday.c,v 1.10 2005/03/31 05:14:50 kloczek Exp $")
#include "defines.h"
#ifndef USE_GETDATE
#define USE_GETDATE 1
@ -190,8 +190,7 @@ long strtoday (const char *str)
*/
total = (long) ((year - 1970) * 365L) + (((year + 1) - 1970) / 4);
total += (long) juldays[month] + (month > 2
&& (year % 4) == 0 ? 1 : 0);
total += (long) juldays[month] + (month > 2 && (year % 4) == 0 ? 1 : 0);
total += (long) day - 1;
return total;

View File

@ -30,7 +30,7 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: sulog.c,v 1.7 2003/04/22 10:59:22 kloczek Exp $")
RCSID ("$Id: sulog.c,v 1.8 2005/03/31 05:14:50 kloczek Exp $")
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
@ -41,8 +41,7 @@ RCSID ("$Id: sulog.c,v 1.7 2003/04/22 10:59:22 kloczek Exp $")
/*
* sulog - log a SU command execution result
*/
void
sulog (const char *tty, int success, const char *oldname, const char *name)
void sulog (const char *tty, int success, const char *oldname, const char *name)
{
char *sulog_file;
time_t now;

View File

@ -30,16 +30,14 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: ttytype.c,v 1.7 2004/08/18 09:53:58 kloczek Exp $")
RCSID ("$Id: ttytype.c,v 1.9 2005/03/31 05:14:50 kloczek Exp $")
#include <stdio.h>
#include "prototypes.h"
#include "defines.h"
#include "getdef.h"
/*
* ttytype - set ttytype from port to terminal type mapping database
*/
void ttytype (const char *line)
{
FILE *fp;
@ -67,16 +65,9 @@ void ttytype (const char *line)
if ((cp = strchr (buf, '\n')))
*cp = '\0';
#if defined(SUN) || defined(BSD) || defined(SUN4)
if ((sscanf (buf, "%s \"%*[^\"]\" %s", port, type) == 2 ||
sscanf (buf, "%s %*s %s", port, type) == 2) &&
strcmp (line, port) == 0)
break;
#else /* USG */
if (sscanf (buf, "%s %s", type, port) == 2 &&
strcmp (line, port) == 0)
break;
#endif
}
if (!feof (fp) && !ferror (fp))
addenv ("TERM", type);

View File

@ -41,7 +41,7 @@
#include <stdio.h>
#include "rcsid.h"
RCSID ("$Id: utmp.c,v 1.14 2003/12/17 12:52:25 kloczek Exp $")
RCSID ("$Id: utmp.c,v 1.15 2005/03/31 05:14:50 kloczek Exp $")
#if HAVE_UTMPX_H
struct utmpx utxent;
#endif
@ -108,8 +108,7 @@ void checkutmp (int picky)
utent.ut_pid = pid;
strncpy (utent.ut_line, line, sizeof utent.ut_line);
/* XXX - assumes /dev/tty?? */
strncpy (utent.ut_id, utent.ut_line + 3,
sizeof utent.ut_id);
strncpy (utent.ut_id, utent.ut_line + 3, sizeof utent.ut_id);
strcpy (utent.ut_user, "LOGIN");
utent.ut_time = time (NULL);
}
@ -175,11 +174,9 @@ void checkutmp (int picky)
}
if (strncmp (line, "/dev/", 5) == 0)
line += 5;
strncpy (utent.ut_line, line,
sizeof utent.ut_line);
strncpy (utent.ut_line, line, sizeof utent.ut_line);
#if HAVE_UTMPX_H
strncpy (utxent.ut_line, line,
sizeof utxent.ut_line);
strncpy (utxent.ut_line, line, sizeof utxent.ut_line);
#endif
}
} else {
@ -201,15 +198,13 @@ void checkutmp (int picky)
#if HAVE_UTMPX_H
strncpy (utxent.ut_line, line, sizeof utxent.ut_line);
if ((utx = getutxline (&utxent)))
strncpy (utxent.ut_id, utx->ut_id,
sizeof utxent.ut_id);
strncpy (utxent.ut_id, utx->ut_id, sizeof utxent.ut_id);
strcpy (utxent.ut_user, "LOGIN");
utxent.ut_pid = utent.ut_pid;
utxent.ut_type = utent.ut_type;
if (sizeof (utxent.ut_tv) == sizeof (struct timeval))
gettimeofday ((struct timeval *) &utxent.ut_tv,
NULL);
gettimeofday ((struct timeval *) &utxent.ut_tv, NULL);
else {
struct timeval tv;
@ -393,8 +388,7 @@ void setutmp (const char *name, const char *line, const char *host)
}
utline.ut_time = utxline.ut_tv.tv_sec;
strncpy (utxline.ut_host, host ? host : "",
sizeof utxline.ut_host);
strncpy (utxline.ut_host, host ? host : "", sizeof utxline.ut_host);
pututxline (&utxline);
pututline (&utline);

View File

@ -10,10 +10,9 @@
#include <config.h>
#include "rcsid.h"
RCSID ("$Id: xmalloc.c,v 1.5 2004/05/06 21:31:33 kloczek Exp $")
RCSID ("$Id: xmalloc.c,v 1.6 2005/03/31 05:14:50 kloczek Exp $")
#include <stdio.h>
#include "defines.h"
char *xmalloc (size_t size)
{
char *ptr;

366
ltmain.sh
View File

@ -33,6 +33,9 @@ basename="s,^.*/,,g"
# function.
progpath="$0"
# RH: define SED for historic ltconfig's generated by Libtool 1.3
[ -z "$SED" ] && SED=sed
# The name of this program:
progname=`echo "$progpath" | $SED $basename`
modename="$progname"
@ -43,14 +46,9 @@ EXIT_FAILURE=1
PROGRAM=ltmain.sh
PACKAGE=libtool
VERSION=1.5.10
TIMESTAMP=" (1.1220.2.131 2004/09/19 12:46:56)"
VERSION=1.5.6
TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42)"
# See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes.
if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
fi
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
@ -240,122 +238,6 @@ func_infer_tag () {
esac
fi
}
# func_extract_archives gentop oldlib ...
func_extract_archives () {
my_gentop="$1"; shift
my_oldlibs=${1+"$@"}
my_oldobjs=""
my_xlib=""
my_xabs=""
my_xdir=""
my_status=""
$show "${rm}r $my_gentop"
$run ${rm}r "$my_gentop"
$show "$mkdir $my_gentop"
$run $mkdir "$my_gentop"
my_status=$?
if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
exit $my_status
fi
for my_xlib in $my_oldlibs; do
# Extract the objects.
case $my_xlib in
[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
*) my_xabs=`pwd`"/$my_xlib" ;;
esac
my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
my_xdir="$my_gentop/$my_xlib"
$show "${rm}r $my_xdir"
$run ${rm}r "$my_xdir"
$show "$mkdir $my_xdir"
$run $mkdir "$my_xdir"
status=$?
if test "$status" -ne 0 && test ! -d "$my_xdir"; then
exit $status
fi
case $host in
*-darwin*)
$show "Extracting $my_xabs"
# Do not bother doing anything if just a dry run
if test -z "$run"; then
darwin_orig_dir=`pwd`
cd $my_xdir || exit $?
darwin_archive=$my_xabs
darwin_curdir=`pwd`
darwin_base_archive=`basename $darwin_archive`
darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
if test -n "$darwin_arches"; then
darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
darwin_arch=
$show "$darwin_base_archive has multiple architectures $darwin_arches"
for darwin_arch in $darwin_arches ; do
mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
# Remove the table of contents from the thin files.
$AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF 2>/dev/null || true
$AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF\ SORTED 2>/dev/null || true
cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
$AR -xo "${darwin_base_archive}"
rm "${darwin_base_archive}"
cd "$darwin_curdir"
done # $darwin_arches
## Okay now we have a bunch of thin objects, gotta fatten them up :)
darwin_filelist=`find unfat-$$ -type f | xargs basename | sort -u | $NL2SP`
darwin_file=
darwin_files=
for darwin_file in $darwin_filelist; do
darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
lipo -create -output "$darwin_file" $darwin_files
done # $darwin_filelist
rm -rf unfat-$$
cd "$darwin_orig_dir"
else
cd $darwin_orig_dir
(cd $my_xdir && $AR x $my_xabs) || exit $?
fi # $darwin_arches
fi # $run
;;
*)
# We will extract separately just the conflicting names and we will
# no longer touch any unique names. It is faster to leave these
# extract automatically by $AR in one run.
$show "(cd $my_xdir && $AR x $my_xabs)"
$run eval "(cd \$my_xdir && $AR x \$my_xabs)" || exit $?
if ($AR t "$my_xabs" | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
$AR t "$my_xabs" | sort | uniq -cd | while read -r count name
do
i=1
while test "$i" -le "$count"
do
# Put our $i before any first dot (extension)
# Never overwrite any file
name_to="$name"
while test "X$name_to" = "X$name" || test -f "$my_xdir/$name_to"
do
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
done
$show "(cd $my_xdir && $AR xN $i $my_xabs '$name' && $mv '$name' '$name_to')"
$run eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $mv '$name' '$name_to')" || exit $?
i=`expr $i + 1`
done
done
fi
;;
esac
my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
done
func_extract_archives_result="$my_oldobjs"
}
# End of Shell function definitions
#####################################
@ -2099,22 +1981,7 @@ EOF
fi
case $linkmode in
lib)
valid_a_lib=no
case $deplibs_check_method in
match_pattern*)
set dummy $deplibs_check_method
match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
if eval $echo \"$deplib\" 2>/dev/null \
| $SED 10q \
| $EGREP "$match_pattern_regex" > /dev/null; then
valid_a_lib=yes
fi
;;
pass_all)
valid_a_lib=yes
;;
esac
if test "$valid_a_lib" != yes; then
if test "$deplibs_check_method" != pass_all; then
$echo
$echo "*** Warning: Trying to link with static lib archive $deplib."
$echo "*** I have the capability to make that library automatically link in when"
@ -2287,17 +2154,10 @@ EOF
absdir="$libdir"
fi
else
if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
dir="$ladir"
absdir="$abs_ladir"
# Remove this search path later
notinst_path="$notinst_path $abs_ladir"
else
dir="$ladir/$objdir"
absdir="$abs_ladir/$objdir"
# Remove this search path later
notinst_path="$notinst_path $abs_ladir"
fi
dir="$ladir/$objdir"
absdir="$abs_ladir/$objdir"
# Remove this search path later
notinst_path="$notinst_path $abs_ladir"
fi # $installed = yes
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
@ -2518,7 +2378,6 @@ EOF
if test "$linkmode" = prog || test "$mode" != relink; then
add_shlibpath=
add_prefix_dir=
add_dir=
add=
lib_linked=yes
@ -2644,22 +2503,10 @@ EOF
add="-l$name"
fi
if test -n "$inst_prefix_dir"; then
case "$libdir" in
[\\/]*)
add_prefix_dir="-L$inst_prefix_dir$libdir"
;;
esac
fi
# add_prefix_dir must be appended instead, otherwise it can
# possibly be overrided by any hardcoded -L/... path in deplibs
if test "$linkmode" = prog; then
test -n "$add_prefix_dir" && finalize_deplibs="$finalize_deplibs $add_prefix_dir"
test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
else
test -n "$add_prefix_dir" && deplibs="$deplibs $add_prefix_dir"
test -n "$add_dir" && deplibs="$add_dir $deplibs"
test -n "$add" && deplibs="$add $deplibs"
fi
@ -3097,7 +2944,7 @@ EOF
# Check that each of the things are valid numbers.
case $current in
0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
[0-9]*) ;;
*)
$echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
@ -3106,7 +2953,7 @@ EOF
esac
case $revision in
0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
[0-9]*) ;;
*)
$echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
@ -3115,7 +2962,7 @@ EOF
esac
case $age in
0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
[0-9]*) ;;
*)
$echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
@ -3143,7 +2990,7 @@ EOF
versuffix="$major.$age.$revision"
# Darwin ld doesn't like 0 for these options...
minor_current=`expr $current + 1`
verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
;;
freebsd-aout)
@ -3831,13 +3678,67 @@ EOF
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
else
gentop="$output_objdir/${outputname}x"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
status=$?
if test "$status" -ne 0 && test ! -d "$gentop"; then
exit $status
fi
generated="$generated $gentop"
func_extract_archives $gentop $convenience
libobjs="$libobjs $func_extract_archives_result"
for xlib in $convenience; do
# Extract the objects.
case $xlib in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
xdir="$gentop/$xlib"
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
$show "$mkdir $xdir"
$run $mkdir "$xdir"
status=$?
if test "$status" -ne 0 && test ! -d "$xdir"; then
exit $status
fi
# We will extract separately just the conflicting names and we will no
# longer touch any unique names. It is faster to leave these extract
# automatically by $AR in one run.
$show "(cd $xdir && $AR x $xabs)"
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
$AR t "$xabs" | sort | uniq -cd | while read -r count name
do
i=1
while test "$i" -le "$count"
do
# Put our $i before any first dot (extension)
# Never overwrite any file
name_to="$name"
while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
do
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
done
$show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
$run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
i=`expr $i + 1`
done
done
fi
libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
done
fi
fi
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
eval flag=\"$thread_safe_flag_spec\"
linker_flags="$linker_flags $flag"
@ -4075,10 +3976,64 @@ EOF
eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
else
gentop="$output_objdir/${obj}x"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
status=$?
if test "$status" -ne 0 && test ! -d "$gentop"; then
exit $status
fi
generated="$generated $gentop"
func_extract_archives $gentop $convenience
reload_conv_objs="$reload_objs $func_extract_archives_result"
for xlib in $convenience; do
# Extract the objects.
case $xlib in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
xdir="$gentop/$xlib"
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
$show "$mkdir $xdir"
$run $mkdir "$xdir"
status=$?
if test "$status" -ne 0 && test ! -d "$xdir"; then
exit $status
fi
# We will extract separately just the conflicting names and we will no
# longer touch any unique names. It is faster to leave these extract
# automatically by $AR in one run.
$show "(cd $xdir && $AR x $xabs)"
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
$AR t "$xabs" | sort | uniq -cd | while read -r count name
do
i=1
while test "$i" -le "$count"
do
# Put our $i before any first dot (extension)
# Never overwrite any file
name_to="$name"
while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
do
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
done
$show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
$run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
i=`expr $i + 1`
done
done
fi
reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
done
fi
fi
@ -4859,7 +4814,7 @@ sed_quote_subst='$sed_quote_subst'
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
relink_command=\"$relink_command\"
@ -5036,10 +4991,65 @@ fi\
if test -n "$addlibs"; then
gentop="$output_objdir/${outputname}x"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
status=$?
if test "$status" -ne 0 && test ! -d "$gentop"; then
exit $status
fi
generated="$generated $gentop"
func_extract_archives $gentop $addlibs
oldobjs="$oldobjs $func_extract_archives_result"
# Add in members from convenience archives.
for xlib in $addlibs; do
# Extract the objects.
case $xlib in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
xdir="$gentop/$xlib"
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
$show "$mkdir $xdir"
$run $mkdir "$xdir"
status=$?
if test "$status" -ne 0 && test ! -d "$xdir"; then
exit $status
fi
# We will extract separately just the conflicting names and we will no
# longer touch any unique names. It is faster to leave these extract
# automatically by $AR in one run.
$show "(cd $xdir && $AR x $xabs)"
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
$AR t "$xabs" | sort | uniq -cd | while read -r count name
do
i=1
while test "$i" -le "$count"
do
# Put our $i before any first dot (extension)
# Never overwrite any file
name_to="$name"
while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
do
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
done
$show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
$run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
i=`expr $i + 1`
done
done
fi
oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
done
fi
# Do each command in the archive commands.
@ -5684,13 +5694,9 @@ relink_command=\"$relink_command\""
if test "$finalize" = yes && test -z "$run"; then
tmpdir="/tmp"
test -n "$TMPDIR" && tmpdir="$TMPDIR"
tmpdir="$tmpdir/libtool-$$"
save_umask=`umask`
umask 0077
tmpdir=`mktemp -d $tmpdir/libtool-XXXXXX 2> /dev/null`
if test $? = 0 ; then :
else
tmpdir="$tmpdir/libtool-$$"
fi
if $mkdir "$tmpdir"; then
umask $save_umask
else

View File

@ -19,6 +19,7 @@ man_MANS = \
grpck.8 \
grpconv.8 \
grpunconv.8 \
gshadow.5 \
lastlog.8 \
limits.5 \
login.1 \

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -99,17 +99,16 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBCRACK = @LIBCRACK@
LIBCRYPT = @LIBCRYPT@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBMD = @LIBMD@
LIBOBJS = @LIBOBJS@
LIBPAM = @LIBPAM@
LIBS = @LIBS@
LIBSELINUX = @LIBSELINUX@
LIBSKEY = @LIBSKEY@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
@ -203,6 +202,7 @@ man_MANS = \
grpck.8 \
grpconv.8 \
grpunconv.8 \
gshadow.5 \
lastlog.8 \
limits.5 \
login.1 \
@ -247,9 +247,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu man/Makefile
$(AUTOMAKE) --foreign man/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@ -465,7 +465,13 @@ uninstall-man8:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -477,7 +483,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@ -485,7 +491,13 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@ -506,7 +518,7 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \

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