[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(&a