Compare commits

..

832 Commits

Author SHA1 Message Date
Adrian Bunk
abac5f8d6c ELA 1:4.5-1.1+deb10u1 2024-10-27 01:42:43 +03:00
Andreas Henriksson
88de51965d Stop shipping su and break old util-linux version. (See #833256)
Breaks on old version to force lockstep upgrade, which should
really be a depends-new-version (and can be switched around
together with util-linux once the transition is finished).
Using Breaks/Depends the 'wrong' way around is to make apt
unpack things in the 'right' order (avoiding any gaps where
/bin/su is not available during the upgrade phase).
2018-07-28 17:31:41 +08:00
Balint Reczey
df6b651325 Update changelog 2017-09-27 12:56:13 -04:00
Balint Reczey
406a28db14 Use my @ubuntu.com email address in Maintainer field 2017-09-27 12:45:10 -04:00
Balint Reczey
00bcf65d58 Revert "Add pts/0 and pts/1 to securetty"
Adding pts/* defeats the purpose of securetty. Let containers add it if
needed as described in #830255.

This reverts commit 8b5c7cace3
2017-09-17 23:42:28 +02:00
Balint Reczey
9105fcd24c Update changelog 2017-08-22 16:44:34 +02:00
Balint Reczey
ba18b6cab2 Cut redundant information from Debian-specific README files 2017-08-12 18:48:09 -04:00
Balint Reczey
b43b5a89d1 Drop patches manipulating su argument concatenation:
- 523_su_arguments_are_concatenated
- su_arguments_are_no_more_concatenated_by_default
2017-08-11 11:16:45 -04:00
Balint Reczey
591aa8debe Refresh patches
Dropped patches:
- 0001-Typos-fix-in-german-translation-of-man-pages.patch
- 0002-Last-bits-of-enabling-subuids.patch
- 0003-Dutch-translation-update.patch
- 0004-Updated-Czech-translation.patch
- 0005-Update-for-German-man-pages.patch
- 0006-French-manpage-translation.patch
- 0007-Fix-some-spelling-issues-in-the-Norwegian-translatio.patch
- 0008-su-properly-clear-child-PID.patch
- 1010_vietnamese_translation
- 301-Reset-pid_child-only-if-waitpid-was-successful.patch
2017-08-10 18:36:48 -04:00
Balint Reczey
bcd42a4c62 Merge tag 'upstream/4.5'
Upstream version 4.5

# gpg: Signature made 2017. aug. 10., csütörtök, 18:26:48 EDT
# gpg:                using RSA key F664D256B4691A7D
# gpg:                issuer "balint.reczey@canonical.com"
# gpg: Good signature from "Balint Reczey <rbalint@ubuntu.com>" [unknown]
# gpg:                 aka "Balint Reczey <balint@balintreczey.hu>" [unknown]
# gpg:                 aka "Balint Reczey <rbalint@debian.org>" [unknown]
# gpg:                 aka "Balint Reczey <balint@cursorinsight.com>" [unknown]
# gpg:                 aka "Balint Reczey <balint.reczey@interri.com>" [unknown]
# gpg:                 aka "Balint Reczey <balint.reczey@canonical.com>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 8A12 5F69 8A1F 7762 B5D5  363E 55AD 1415 21E7 64DF
#      Subkey fingerprint: 397A 4810 EEB1 3306 8C2E  8B7A F664 D256 B469 1A7D
2017-08-10 18:26:49 -04:00
Balint Reczey
589f97ade4 New upstream version 4.5 2017-08-10 18:26:45 -04:00
Salvatore Bonaccorso
d7f24f954e Import Debian changes 1:4.4-4.1
shadow (1:4.4-4.1) unstable; urgency=high

  * Non-maintainer upload.
  * Reset pid_child only if waitpid was successful.
    This is a regression fix for CVE-2017-2616. If su receives a signal like
    SIGTERM, it is not propagated to the child. (Closes: #862806)
2017-08-10 18:25:45 -04:00
Balint Reczey
f9176c3be3 Update changelog 2017-02-24 01:50:13 +01:00
Balint Reczey
bc6cd09194 su: properly clear child PID (CVE-2017-2616)
Closes: #855943
2017-02-24 01:50:09 +01:00
Balint Reczey
b8a7c3ac04 Update changelog 2017-01-25 16:43:47 +01:00
Stéphane Graber
133b10b734 Add missing /etc/{subgid|subuid} in postinst 2017-01-20 20:53:36 +01:00
Balint Reczey
40146019e6 Sync motd handling with sshd
Using patch from Ubuntu

Closes: #757148
2017-01-20 20:41:49 +01:00
Balint Reczey
3588f5d2a3 Clean up stale locks on boot
Closes: #478771
2017-01-20 20:11:49 +01:00
Balint Reczey
af6b417156 Start working on next upload 2017-01-20 20:08:36 +01:00
Balint Reczey
9b4168f0b2 Update changelog 2017-01-19 18:55:32 +01:00
Balint Reczey
fd20e4fe4b Add ttySC[4-9] to securetty
Closes: #768020
2017-01-19 18:55:32 +01:00
Balint Reczey
d779e83350 Add ttySAC* to securetty
Closes: #824391
2017-01-19 18:55:32 +01:00
Balint Reczey
8b5c7cace3 Add pts/0 and pts/1 to securetty
Closes: #830255
2017-01-19 18:55:32 +01:00
Lars Bahner
182a8cf464 Fix some spelling issues in the Norwegian translation
Closes: #800553
2017-01-19 18:55:28 +01:00
Thomas Blein
b20639f055 French manpage translation
Closes: #805182
2017-01-19 18:25:01 +01:00
Holger Wansing
0531cb85a4 Update for German man pages 2017-01-19 18:25:00 +01:00
Miroslav Kuře
19ebc9d55a Updated Czech translation
Closes: #759113
2017-01-19 18:24:54 +01:00
Trần Ngọc Quân
f19610854c Update Vietnamese translation
Closes: #777107
2017-01-19 17:24:11 +01:00
Frans Spiesschaert
398a6d383a Dutch translation update
Closes: #772470
2017-01-19 17:17:57 +01:00
Balint Reczey
70c472f91d Add call to pam_keyinit for login pam service
This module is linux-any only, so copy what openssh has already done and
remove the call at build time for other architectures.

The call to this module is needed to have proper per-session kernel
keyring.

Closes: #734671
2017-01-19 16:14:42 +01:00
Christian Perrier
3b66774757 Include groupmems(8) in the passwd package
Closes: #663117
2017-01-18 18:19:11 +01:00
Christian Perrier
a975974d2c Fix typos in login.pam (thanks to Jakub Wilk for reporting)
Closes: #747115
2017-01-18 18:17:55 +01:00
Balint Reczey
25df6ffc55 Send 1000_configure_userns patch upstream 2017-01-18 18:14:19 +01:00
Balint Reczey
9eb5f5e758 Fix typos in German man pages
Closes: #734609
2017-01-18 18:12:18 +01:00
Balint Reczey
e530aed7c6 Don't .gitignore patches 2017-01-18 18:11:14 +01:00
Balint Reczey
39c9155f66 Update patch naming docmentation 2017-01-18 18:09:35 +01:00
Laurent Bigonville
60d4dc5ae0 Move pam_selinux open call higher in the session stack
Closes: #747313
2017-01-18 17:05:36 +01:00
Balint Reczey
5a3eada191 Replace user´s -> user's to make login.def file valid ASCII
Closes: #850338
2017-01-18 16:58:05 +01:00
Balint Reczey
616a2b0c7b Always use /bin/sh shell in the build
Closes: #817971
2017-01-18 13:38:50 +01:00
Balint Reczey
9089583e08 Update homepage to new upstream 2017-01-07 19:43:54 +01:00
Balint Reczey
b89c17643b Start working on next upload 2017-01-07 19:42:10 +01:00
Balint Reczey
83c828d86a Update changelog 2017-01-06 17:42:24 +01:00
Balint Reczey
786bb46ef9 Tag login package as essential properly 2017-01-06 17:29:01 +01:00
Balint Reczey
d4fc50519b Stop build-depending on build-essential dpkg-dev 2017-01-06 16:24:48 +01:00
Balint Reczey
45c29ff8ce Add myself to Uploaders 2016-12-01 13:47:51 +01:00
Balint Reczey
8e21a0615d Update d/control using cme fix 2016-12-01 13:47:09 +01:00
Balint Reczey
b679e205d8 ACK NMU by Samuel Thibault 2016-11-30 23:06:24 +01:00
Balint Reczey
186f8f8c5a Update changelog 2016-11-30 23:05:02 +01:00
Balint Reczey
d53df510ec Bump debhelper compat level to 10 2016-11-30 03:05:17 +01:00
Balint Reczey
569a90cd97 Disable Vietnamese translation patch because it does not apply cleanly 2016-11-30 03:03:43 +01:00
Balint Reczey
b5d9320f6d Update changelog 2016-11-30 03:03:39 +01:00
Balint Reczey
f1e917cc43 Merge tag 'upstream/4.4'
Upstream version 4.4

Conflicts:
	.gitignore
	po/bs.po
	po/ca.po
	po/cs.po
	po/da.po
	po/de.po
	po/dz.po
	po/el.po
	po/es.po
	po/eu.po
	po/fi.po
	po/fr.po
	po/gl.po
	po/he.po
	po/hu.po
	po/id.po
	po/it.po
	po/ja.po
	po/kk.po
	po/km.po
	po/ko.po
	po/nb.po
	po/ne.po
	po/nl.po
	po/nn.po
	po/pl.po
	po/pt.po
	po/pt_BR.po
	po/ro.po
	po/ru.po
	po/shadow.pot
	po/sk.po
	po/sq.po
	po/sv.po
	po/tl.po
	po/tr.po
	po/uk.po
	po/vi.po
	po/zh_CN.po
	po/zh_TW.po
2016-11-30 02:44:37 +01:00
Balint Reczey
365658d0f3 Imported Upstream version 4.4 2016-11-30 02:36:06 +01:00
Balint Reczey
83e36d1e1b Update debian/watch to use GitHub releases 2016-11-30 02:25:33 +01:00
Serge Hallyn
d9e428fd63 Imported Debian patch 1:4.4-1 2016-10-13 10:19:55 -05:00
Serge Hallyn
3fcf082618 Imported Upstream version 4.4 2016-10-13 10:14:46 -05:00
Serge Hallyn
68cd195044 add three security patches
Signed-off-by: Serge Hallyn <serge@hallyn.com>
2016-08-05 17:44:27 -05:00
Serge Hallyn
d8af4b7e5b debian/control: use https in VCS fields 2016-07-30 23:36:32 -05:00
Serge Hallyn
598853e638 debian/control: replace nekral with myself in Uploaders
Closes #832380
2016-07-30 23:32:45 -05:00
Serge Hallyn
5a6e0c0ebd Merge upstream 4.3 2016-07-30 23:29:49 -05:00
Christian Perrier
f9aecd19f3 Don't forget the English manpage for groupmems 2014-05-09 22:55:10 +02:00
Christian Perrier
14d5db18a8 Next release will be 4.2.1 2014-05-09 19:52:30 +02:00
Christian Perrier
7df6dd8cf2 Next release will be 4.2.1 2014-05-09 19:18:43 +02:00
Christian Perrier
d5849a0f2b Drop patches merged upstream or no longer used 2014-05-09 19:16:39 +02:00
Christian Perrier
e56640f2af Merge upstream 4.2.1 2014-05-09 19:14:14 +02:00
Christian Perrier
bfaa59229d Imported Upstream version 4.2.1 2014-05-09 19:05:47 +02:00
Christian Perrier
a497c3663f No idea what these are about but they're here after 'make redist' so better have them in the VCS 2014-05-09 18:31:32 +02:00
Christian Perrier
07dea48511 Version is no 4.2.1 2014-05-09 13:53:24 +02:00
Christian Perrier
0f4406b757 Regenerate manpages PO files 2014-05-09 13:06:57 +02:00
Christian Perrier
2141c2f804 Regenerate PO files 2014-05-09 13:06:33 +02:00
Christian Perrier
c3503a0b5c Issue a warning if no manpages have been generated 2014-05-09 12:29:49 +02:00
Christian Perrier
63448ba21d Update NEWS file 2014-05-09 12:28:45 +02:00
Christian Perrier
a933847574 German translation update 2014-05-09 12:24:41 +02:00
Christian Perrier
6e19e48f9b French translation update 2014-05-09 12:23:51 +02:00
Christian Perrier
de99d9b9d6 ietnamese translation update 2014-05-09 12:22:51 +02:00
Christian Perrier
03c52251fb Configure userns 2014-05-09 12:21:45 +02:00
Christian Perrier
aadd2f332c Debian patch: Fix typo in su.1.xml 2014-05-09 12:17:43 +02:00
Christian Perrier
c634bfd35c Mark that I 'released' 4.2 on Apr 30th 2014-05-09 12:16:46 +02:00
Christian Perrier
e1782606c1 Include groupmems(8) in the passwd package. Closes: #663117 2014-05-09 12:12:46 +02:00
Christian Perrier
11e8de1be1 Fix a typo in su manpage. Done as an upstream patch, as of now and will be part of 4.2.1 Closes: #730692 2014-05-08 10:49:25 +02:00
Christian Perrier
dedf96dd6f Fix some typos and errors in German translation of manpages. Done as an upstream patch, as of now and will be part of 4.2.1 Closes: #734609 2014-05-08 10:44:29 +02:00
Christian Perrier
4ea3973200 Update French translations of programs messages and manpages. Done as an upstream patch, as of now and will be part of 4.2.1 Closes: #725793 2014-05-08 10:09:46 +02:00
Christian Perrier
2fb68149d6 Move pam_selinux open call higher in the session stack. Closes: #747313 2014-05-08 08:48:00 +02:00
Laurent Bigonville
a154eb5401 Move pam_selinux open call higher in the session stack 2014-05-08 08:46:37 +02:00
Christian Perrier
4a2fadfa21 Fix typos in login.pam (thanks to Jakub Wilk for reporting) Closes: #747115 2014-05-06 07:39:52 +02:00
Christian Perrier
1566e6de21 I forgot the cheese name. Really really release 4.2-2 2014-05-04 19:50:54 +02:00
Christian Perrier
acf9e8fa4a Release 4.2-3 in unsctable 2014-05-04 19:39:31 +02:00
Christian Perrier
6c29058c9f Fix typo in changelog entry 2014-05-04 19:38:27 +02:00
Christian Perrier
16e593e364 * Check upstream signing key in debian/watch 2014-05-04 19:38:08 +02:00
Christian Perrier
e8c4143fdc Properly name the upstream signing key file 2014-05-04 19:36:54 +02:00
Christian Perrier
b4ad01d830 Add upstream signing key as debian/upstream-signing-key.asc 2014-05-04 19:01:50 +02:00
Christian Perrier
ea64aa07a8 Release 4.2-2 to unstable 2014-05-04 18:05:05 +02:00
Christian Perrier
523b9000fd Add a lintian override for newuidmap and newgidmap setuid binaries 2014-05-04 18:04:15 +02:00
Christian Perrier
71869c2d24 Don't forget the series file 2014-04-30 22:56:50 +02:00
Christian Perrier
2aa9297367 Vietnamese translation update. 2014-04-30 22:56:20 +02:00
Christian Perrier
9bc936e018 Fix conflict in debian/changelog 2014-04-30 22:53:53 +02:00
Christian Perrier
2ef82ecb53 Revert Vietnamese translation update. It should go in upstream patches 2014-04-30 22:53:10 +02:00
Christian Perrier
5fc7602f3e Enable libaudit support. Closes: #745774 2014-04-30 22:29:03 +02:00
Christian Perrier
0274441ec5 Vietnamese translation update. 2014-04-30 22:26:25 +02:00
Christian Perrier
60c9571605 use the new pam_exec functionality from pam 1.1.8-1 to implement the dynamic motd, rather than using /run/motd.dynamic from initscripts. This will allow initscripts to drop /etc/init.d/motd. Closes: #741129 2014-04-30 22:23:26 +02:00
Christian Perrier
c7e2932be4 Enable the login package on hurd-any, but without /bin/login, still provided by the hurd package. Closes: #737805. This fix was accidentally forgotten in 1:4.2-1 2014-04-30 22:20:05 +02:00
Christian Perrier
d480b7dfee Add 1:4.1.5.1-1.1 NMU changelog entries 2014-04-30 22:17:11 +02:00
Christian Perrier
260b0eb77a Last upload integrates the use of dh_autoreconf which has the same effect then Eric Dorland's patch in 1:4.1.5.1-1.1 NMU to drop the use of automake1.9. Closes: #724434 2014-04-30 22:16:01 +02:00
Christian Perrier
34599da75c Release to experimental 2014-04-22 09:02:17 +02:00
Christian Perrier
aeb11d0c3e Really bump Standards to 3.9.5 2014-04-18 08:30:35 +02:00
Christian Perrier
9c7fd6b104 Explicitly point to GPL-2 document in debian/copyright 2014-04-18 08:29:43 +02:00
Christian Perrier
1f40da3a5f Use 'set -e' in postinst scripts and not in thei shebang line 2014-04-18 08:27:30 +02:00
Christian Perrier
c84a3fd5f8 Bump Standards to 3.9.5 (checked) 2014-04-18 08:25:16 +02:00
Christian Perrier
25cba03d2d Fix 1000_configure_userns to avoid dropping a needed #endif Closes: #744877 2014-04-16 06:27:01 +02:00
Christian Perrier
68ee6e45ad Unfuzz all patches 2014-03-15 17:31:14 +01:00
Christian Perrier
00e4c00838 Changelog entries for Laurent patches 2014-03-15 12:14:27 +01:00
Laurent Bigonville
45c41f0de6 Switch to dpkg-source 3.0 (quilt) format 2014-03-15 12:12:50 +01:00
Laurent Bigonville
b27aad278a Add build-dependency against bison 2014-03-15 12:12:09 +01:00
Laurent Bigonville
57283d75f7 Call dh-autoreconf since we need to regenerate all the autofoo files
The .gitignore is removing all the autofoo files and we need to
regenerate them at build time
2014-03-15 12:11:45 +01:00
Christian Perrier
ec09609355 Imported Upstream version 4.2 2014-03-14 21:57:15 +01:00
Christian Perrier
ad21753e53 Delete extraneous files 2014-03-14 21:52:12 +01:00
Christian Perrier
2649a0dc50 Delete extraneous files 2014-03-14 21:51:48 +01:00
Christian Perrier
68fb7adaf7 Adapt userns patches to 4.2.0 (hopefully) 2014-03-14 21:51:03 +01:00
Christian Perrier
bbfcca9015 Merge tag 'upstream/4.2'
Upstream version 4.2
2014-03-01 19:59:51 +01:00
Micah Anderson
0e011449f7 fix installation of setuid/setgid/newuidmap/newgidmap man pages 2014-02-26 11:42:34 -05:00
Micah Anderson
99a8e345da login.postinst: install a default /etc/subuid and /etc/subgid 2014-02-25 23:11:41 -05:00
Micah Anderson
7573a1f684 Update documentation of UMASK: Explain that USERGROUPS_ENAB will modify this default for UPGs. (Closes: #583971) 2014-02-25 23:11:41 -05:00
Micah Anderson
d89d44af82 add LXC devices to debian/securetty.linux 2014-02-25 23:11:41 -05:00
Micah Anderson
13f031cd67 Add debian/patches/userns: patches to enable use of subuids (Closes: #739981) 2014-02-25 23:11:31 -05:00
Nicolas François
0c7f32eab6 Set default editor to sensible-editor for vipw.
* debian/rules: Set default editor to sensible-editor for vipw.
    Closes: #688252
2013-08-25 21:05:03 +02:00
Nicolas François
16796d7e3b Document bug closed in next version.
- vipw: Fix error reporting when editor fails. Closes: #688260
2013-08-25 21:00:41 +02:00
Nicolas François
371d5aa969 Close #705301 and #720004
* Document the upstream update of the Japanese translation.
  * debian/login.su.pam: Enable pam_limits by default. Closes: #705301
2013-08-23 23:21:50 +02:00
Nicolas François
0687637b17 Remove TODO entries no more relevant. 2013-08-16 00:50:34 +02:00
Nicolas François
4294d76926 Updated to current upstream. 2013-08-16 00:49:34 +02:00
Nicolas François
e2fa8501ca Set uidmap as priority optional. 2013-08-16 00:48:52 +02:00
Nicolas François
0047ae2042 Document bugs closed in next version.
- su: child cleanup is performed before terminating PAM sessions. This
      avoids anoying "...terminated" messages when PAM module send signal to
      su during session close. Closes: #670132
    - vipw/vigr is checking arguments provided after options. Closes: #677812
2013-08-16 00:45:22 +02:00
Nicolas François
820997101a Install translated manpages. 2013-08-10 00:07:09 +02:00
Nicolas François
2e8f003402 Add uidmap package, based on Ubuntu.
* passwd.install: add new subuid.5 and subgid.5 manpages
  * debian/rules, debian/control, debian/uidmap.install: create new uidmap
    package containing the new setuid-root binaries newuidmap and newgidmap
2013-08-09 23:54:47 +02:00
Nicolas François
2e014282f7 Debian bug #675824 will be fixed in next version.
- Support C libraries with unknown fields in struct passwd.
      Closes: #675824
2013-08-07 02:01:11 +02:00
Nicolas François
be2dc119ed Bug#677275 will be closed in next release. 2013-08-05 15:34:59 +02:00
Christian Perrier
1e2d22eb6b Russian translation update. Closes: #718356 2013-08-01 21:26:01 +02:00
Christian Perrier
35d80a0a73 login.defs will be fixed by next upstream 2013-07-28 19:05:49 +02:00
Christian Perrier
f06ef92c66 German manpages translation will be fixed by next upstream 2013-07-28 18:58:29 +02:00
Christian Perrier
22d833f38e Use Laurent's patch 2013-07-28 18:51:01 +02:00
Christian Perrier
08807ee3fc Add pam_loginuid to login PAM sattings. Closes: #677441 2013-07-28 18:49:00 +02:00
Christian Perrier
80a1bae6fe One more bug foxed upstream 2013-07-28 14:43:20 +02:00
Christian Perrier
e8bdaa552b Document issues fixed by the next upstream release 2013-07-28 14:19:11 +02:00
Christian Perrier
60bf0e1338 Moved to git: replace Vcs-Git in place of Vcs-Svn and adapt Vcs-Browser. 2013-07-27 20:15:27 +02:00
Christian Perrier
33f491513e Merge tag 'upstream/4.1.5.1'
Upstream version 4.1.5.1
2013-07-27 18:42:28 +02:00
Christian Perrier
36ff9fa1df Merge branch 'upstream' 2013-07-27 18:41:48 +02:00
Christian Perrier
c0dbed948f Drop tests from master 2013-07-27 18:39:30 +02:00
Christian Perrier
03e6eeb8bb Move Debian-related files to debian/ 2013-07-27 18:36:40 +02:00
nekral-guest
9cf5fea519 Updated timestamp. 2012-05-25 17:32:12 +00:00
bubulle
62c424ce33 Another change suggested by Roger 2012-05-22 18:43:16 +00:00
nekral-guest
346bc7c0df * debian/control: Bump Standards-Version to 3.9.3 (no changes needed).
* debian/rules: Simplify setting of hardening flags. cdbs 0.4.103 needed to
    get hardened version of shadow-utils. Restore previous requirement on
    dpkg-dev to 1.13.5.
2012-05-20 15:30:55 +00:00
nekral-guest
d977bc5d19 - useradd(8): Return code 13 no more documented. Closes: #661802 2012-05-20 12:28:09 +00:00
nekral-guest
4a0d11ba27 Update debian/patches/series because 428_grpck_add_prune_option was
removed.
2012-05-20 11:06:53 +00:00
nekral-guest
8d3f289bd8 - manpages: .so links point to paths relative to the top-level manual
hierarchy. Closes: #661025
2012-05-20 11:05:39 +00:00
nekral-guest
7a04299f9e * German translation of manpages completed. Closes: #673234 2012-05-18 19:27:30 +00:00
nekral-guest
770fddc081 - userdel: Fix segfault when userdel removes the user's group.
Closes: #660406
2012-05-18 18:56:49 +00:00
nekral-guest
b079e4f331 Cleanup and new entry:
- login: log into utmp(x) but not into wtmp (this is done by pam_lastlog).
      Log to utmp(x) was broken by the fix for #605329. Closes: 659957
2012-05-18 18:29:59 +00:00
bubulle
ac43a9a2d5 Separation of static and dynamic motd components in login PAM module
Closes: #669698
2012-04-21 12:06:55 +00:00
bubulle
5c999162fa Complete Polish translation of logoutd(8. Closes: #668880 2012-04-15 10:54:54 +00:00
nekral-guest
4d45becee0 #657763 was closed in 1:4.1.5-1. 2012-02-16 20:30:43 +00:00
nekral-guest
057ad9bb69 * debian/patches/428_grpck_add_prune_option: removed -p option. The option
was not documented and was meant to fix consequences of a bug now fixed
    more than 10 years ago.
Note that debian/patches/428_grpck_add_prune_option was broken by the
refresh in 4.1.5-1
  * debian/shadowconfig.sh: Display issues, but dot not prompt interactively
    to fix passwd/group/shadow/gshadow issues. Closes: #638263
2012-02-16 20:28:21 +00:00
nekral-guest
27c3b04789 Added common chroot files for i386. 2012-02-12 22:19:32 +00:00
nekral-guest
553718623c Do not copy the .svn directories when preparing a chroot. 2012-02-12 22:19:05 +00:00
nekral-guest
438596a720 Update release date. 2012-02-12 21:34:49 +00:00
nekral-guest
5e3b5ba676 * execute missing tests
* make sure /etc/shadow remain owned by group shadow after each test execution
* make sure /nonexistent is not created after each test execution
2012-02-04 16:10:02 +00:00
nekral-guest
7ca179b885 Add 24 tests for the --root options 2012-02-04 16:07:22 +00:00
nekral-guest
1bd5acfa3f * debian/login.defs: Set the default encryption method to SHA512.
Closes: #657717
2012-01-28 19:05:05 +00:00
nekral-guest
a10d121ff7 * debian/control: depends on dpkg-dev (>= 1.16.1~) for including
/usr/share/dpkg/buildflags.mk
  * debian/control: Standards-Version: bumped to 3.9.2. No changes.
2012-01-28 18:57:31 +00:00
bubulle
c16590aaf3 Add bug closure 2012-01-28 13:30:33 +00:00
bubulle
013637e2de Bug closures for French translation updates 2012-01-27 18:46:51 +00:00
bubulle
c8c3924815 Add bug closure for Danish manpages translation 2012-01-26 18:59:09 +00:00
bubulle
18d4a7a6a9 Add bug closure for Danish translation 2012-01-26 18:55:36 +00:00
nekral-guest
36018131dd * debian/rules: Do not hard-code CFLAGS and LDFLAGS. Build with all
hardening flags set. Closes: #657010
2012-01-24 22:23:06 +00:00
nekral-guest
f35045dcf1 * Raisethe security issue at the top of the debian changelog.
* Refreshed patches
2012-01-24 19:36:45 +00:00
bubulle
2a2cee4a95 Portuguese. Closes: #623722, #656686 2012-01-21 07:18:05 +00:00
bubulle
30eae84422 German. Closes: #622908, #656503 2012-01-19 19:38:49 +00:00
nekral-guest
62c0ed4fcb * debian/control: Add Build-Depends on libsemanage1-dev [linux-any] 2012-01-15 21:24:44 +00:00
nekral-guest
315479a6ce gpasswd sets the /etc/group's password to 'x' when the /etc/shadow is
updated.
2012-01-15 14:24:01 +00:00
nekral-guest
a240b74921 Updated usage message for chpasswd, userdel, and usermod. 2012-01-15 14:21:47 +00:00
nekral-guest
48841074a0 Updated chgpasswd usage message. 2012-01-15 14:20:17 +00:00
bubulle
c55dcada36 Bug closure 2012-01-14 13:29:44 +00:00
bubulle
b7d5465b0e Add bug closure for #655194 2012-01-09 19:01:02 +00:00
nekral-guest
5f5b7d56a6 Remove data files generated by the tests. 2011-11-20 14:52:44 +00:00
nekral-guest
ca30001269 Ignore generated log files. 2011-11-20 14:25:58 +00:00
nekral-guest
e45face1d2 Ignore generated log files. 2011-11-20 14:17:48 +00:00
nekral-guest
2ad689b454 Updated comments. 2011-11-20 14:05:25 +00:00
nekral-guest
53b76ca815 Ignore generated log files. 2011-11-20 13:33:21 +00:00
nekral-guest
21b505094a Refreshed patches. 2011-11-19 15:13:17 +00:00
nekral-guest
89c37173e1 * debian/patches/506_relaxed_usernames: Also forbid names containing a
comma.
2011-11-19 15:09:54 +00:00
nekral-guest
7ab1a77227 * debian/patches/901_testsuite_gcov: Do not revert the locale when testing
with gcov to avoid coverage false negatives. This does not impact the
    debian binary package, only the test package.
2011-11-19 15:01:22 +00:00
nekral-guest
1d04d40bc6 Add tests
* grpck (1)
 * pwck (11)
2011-11-14 23:09:09 +00:00
nekral-guest
3bde6ef31b Add failure tests
* pwck (9)
 * groupmems (2)
2011-11-14 21:05:26 +00:00
nekral-guest
2dd2472e22 Add /etc/default/useradd to avoid creating spool files. 2011-11-14 21:00:41 +00:00
nekral-guest
e065751f91 Only report the requested access mode because the complete mode differs on
different architectures.
2011-11-14 20:57:22 +00:00
nekral-guest
f2973dcc5a Fix test (avoid fixed date). 2011-11-14 20:55:36 +00:00
nekral-guest
907c0ab20b Change in cppw error message. 2011-11-14 20:54:54 +00:00
nekral-guest
9171ec4eae Newlines were introduced in the useradd error messages. 2011-11-14 20:53:58 +00:00
nekral-guest
f21fe99292 newusers was fixed not to set the password to x in /etc/group when there
are no gshadow file.
2011-11-14 20:50:05 +00:00
nekral-guest
96845a5867 Update newusers usage message with the --root option. 2011-11-14 20:49:08 +00:00
nekral-guest
d984dcb999 Fix test. 2011-11-14 20:42:35 +00:00
nekral-guest
eafbe03cc8 /etc/default/useradd is mandatory for the correct operation of useradd. 2011-11-14 20:39:28 +00:00
nekral-guest
b63ac7ac95 Update the lastlog and faillog usage with the --root option. 2011-11-14 20:34:09 +00:00
nekral-guest
3dc001c683 Relax timeout checks. 2011-11-14 20:33:29 +00:00
nekral-guest
3cb3fec04a Add one test for passwd. 2011-11-14 20:28:33 +00:00
nekral-guest
d6508a4fed Add 3 tests for expiry. 2011-11-14 20:26:11 +00:00
nekral-guest
3b694115de Use simple test (without expect) for usage checking. 2011-11-14 20:25:01 +00:00
nekral-guest
903f041993 Add tests
* pwconv (2)
 * pwunconv (2)
 * grpconv (2)
 * grpunconv (2)
2011-11-14 20:19:14 +00:00
nekral-guest
9811f7fd4a The pwconv, pwunconv, grpconv, and grpunconv utils now have complete usage
message and report a usage error if needed.
2011-11-14 19:45:13 +00:00
nekral-guest
5852c4eb9b Fix the file ownership. 2011-11-14 19:43:28 +00:00
nekral-guest
b954300b83 Add 2 tests for chsh. 2011-11-14 19:35:35 +00:00
nekral-guest
a2c7f4c8a5 Update chsh usage with the --root option. 2011-11-14 19:33:55 +00:00
nekral-guest
8e85d1cb82 Update chage error message. 2011-11-14 19:32:54 +00:00
nekral-guest
ec7f69e97a Add one test for chage. 2011-11-14 19:32:08 +00:00
nekral-guest
fbdc52a86d Update the chage usage with the --root option. 2011-11-14 19:28:42 +00:00
nekral-guest
dff2fa836e chage/31_chage_interractive_date_invalid is currently failing and chage
gets killed.
Cleanup the lock files anyway.
2011-11-14 19:27:43 +00:00
nekral-guest
190dfc30eb Add one test for cppw. 2011-11-14 19:22:28 +00:00
nekral-guest
8ba58a61d5 Update cppw error message. 2011-11-14 19:21:04 +00:00
nekral-guest
c980cb6b3a Update the chpasswd, userdel, and usermod usage with the --root option. 2011-11-14 19:19:57 +00:00
nekral-guest
30b6ca81e0 /etc/default/useradd is necessary for the correct operation of useradd. 2011-11-14 19:18:53 +00:00
nekral-guest
541f6a66b8 useradd was fixed and does not set the password to x when there are no
shadow file.
2011-11-14 19:16:02 +00:00
nekral-guest
c6175f07e3 Update useradd usage with the --root option. 2011-11-14 19:15:10 +00:00
nekral-guest
0b8b6534cc Update the gpasswd and chgpasswd usage with the --root option. 2011-11-14 19:13:46 +00:00
nekral-guest
f6de85357c Add one test for groupmod. 2011-11-14 19:12:47 +00:00
nekral-guest
913827c3c1 Update groupmod usage with --root option. 2011-11-14 19:11:57 +00:00
nekral-guest
5fdb900d7b Add one test for groupadd. 2011-11-14 19:11:18 +00:00
nekral-guest
7803aa52ab Updated usage with the --root option. 2011-11-14 19:10:21 +00:00
nekral-guest
54746f0d92 Add 2 tests for groupdel. 2011-11-14 18:59:14 +00:00
nekral-guest
dd612ca974 Updated usage with options. 2011-11-14 18:58:15 +00:00
nekral-guest
55b516ba94 Add 8 tests for groupmems 2011-11-14 18:47:05 +00:00
nekral-guest
bda5661096 Fix test purpose. 2011-11-14 18:27:50 +00:00
nekral-guest
186f0b002a Usage message reported to stdout with the now valid -h option 2011-11-14 18:26:56 +00:00
nekral-guest
ce533f3250 Typo fixed in grpck. 2011-11-14 18:26:01 +00:00
nekral-guest
eb3cd52450 Update grpck usage message. 2011-11-14 18:25:11 +00:00
nekral-guest
28af4c5bc5 * debian/patches/401_cppw_src.dpatch: Detect as well too many and too
few arguments.
  * Fix section of debian changelog where update of patches are documented
2011-11-13 16:30:37 +00:00
nekral-guest
5bb64ec036 * debian/securetty.linux: Add s390/s390x ports ttysclp0. Closes: #647469 2011-11-06 19:14:12 +00:00
nekral-guest
6b8409e9e8 Refreshed patches. 2011-11-06 19:08:11 +00:00
nekral-guest
4a5447d4d7 Fix issue introduced by the synchronization with coding style. 2011-11-06 19:06:37 +00:00
nekral-guest
1c619c768d * New upstream release:
- groupmod: document that /etc/passwd can be modified by groupmod -g.
      Closes: #647308
2011-11-06 19:05:27 +00:00
nekral-guest
af075bffc9 - debian/patches/506_relaxed_usernames: Really check if the user/group
name starts with a dash. Also forbid names starting with '+' or '~'.
      Document the naming policy in useradd.8 / groupadd.8.
2011-10-31 22:54:38 +00:00
nekral-guest
971f260e94 Only report the requested access mode because the complete mode differs on different architectures. 2011-10-20 18:17:28 +00:00
nekral-guest
9f71e81c91 Usage of useradd was updated. 2011-10-20 18:15:31 +00:00
nekral-guest
7dc1f3b2dd Usage messages of cppw and grpconv were missing. 2011-10-20 18:13:50 +00:00
nekral-guest
5431d2abe2 cppw error returned in case of bad usage was changed (1->2). 2011-10-20 18:12:03 +00:00
nekral-guest
47bbcf4dc4 Fix messages. 2011-10-20 18:11:29 +00:00
nekral-guest
b512961c12 Continue synchronization with coding style
* Use of gettext (even if no messages would be translated in the current
   infrastructure)
 * report an additional strerror only if a message was provided
 * fix issue when cppwexit is called before the copy of file
2011-10-20 18:09:12 +00:00
nekral-guest
efab223b05 - debian/patches/401_cppw_src.dpatch, debian/patches/402_cppw_selinux:
Synchronize with coding style.
2011-10-18 22:44:46 +00:00
nekral-guest
cd964eccb5 - debian/patches/402_cppw_selinux: Avoid implicit conversion between
integer and boolean.
    - debian/patches/401_cppw_src.dpatch: Replace progname by Prog. Rename
      create_backup_file to create_copy. The lock functions do not ser errno.
      Do not report the error string on cppwexit.
2011-10-18 21:58:33 +00:00
nekral-guest
1ce22b1adc Refresh patches. 2011-10-18 21:29:56 +00:00
nekral-guest
6c4c7f47a0 * Add the new tests.
* Stop executing tests when RUN_TEST.STOP exists
 * Reset permissions on gcda files after running tests for suid tools (su).
2011-10-16 16:15:04 +00:00
nekral-guest
53ba4f6fc6 Add tests for:
* chage (6)
 * chsh (2)
 * cppw (3)
 * gpasswd (11)
 * grpconv (4)
 * grpunconv (4)
 * newusers (10)
 * pwconv (5)
 * pwunconv (4)
 * useradd (11)
2011-10-16 14:45:54 +00:00
nekral-guest
2d0341ae26 Added 4 failure tests for userdel. 2011-10-16 14:39:08 +00:00
nekral-guest
edc2bc5556 * Fix typos in comments.
* Remove generated directory.
2011-10-16 14:37:49 +00:00
nekral-guest
a3e655cc19 * The logs may be dated from the previous minute.
* Reverse the diff.
2011-10-16 14:34:17 +00:00
nekral-guest
34e67733ad Add 10 tests for cppw. 2011-10-16 14:32:34 +00:00
nekral-guest
f261f8897d Cleanup. 2011-10-16 14:30:56 +00:00
nekral-guest
b2f829c0d9 Add 2 other open failure libraries. 2011-10-16 14:24:39 +00:00
nekral-guest
e44a7c5333 Test that only O_RDWR is set.
Rename internal symbols to *open64.
2011-10-16 14:24:11 +00:00
nekral-guest
5256839da0 Add 12 tests for chsh. 2011-09-25 13:53:11 +00:00
nekral-guest
053fd6f667 Add 36 tests for chage. 2011-09-24 07:32:13 +00:00
nekral-guest
d25fbce118 Usage was fixed (LOGIN mandatory) 2011-09-24 07:30:56 +00:00
nekral-guest
4d3d2852df Fix typo. 2011-09-24 07:30:34 +00:00
nekral-guest
35f6fa4fb2 Add 12 tests for newusers. 2011-09-24 07:29:31 +00:00
nekral-guest
8c79098041 Add tests for
* userdel (9)
 * useradd (68)
2011-09-24 07:27:38 +00:00
nekral-guest
227e780644 When there is a gshadow file, gshadow is activated.
Then a group password change puts the password in the gshadow file (create
an entry) and the group's password is set to 'x'.
2011-09-23 17:50:59 +00:00
nekral-guest
85f90d1aa2 Add 12 tests for gpasswd. 2011-09-23 17:46:57 +00:00
nekral-guest
2fcaf22140 Add separation for the logs. 2011-09-23 17:45:06 +00:00
nekral-guest
ff97ca76fc Remove tmp directory. 2011-09-23 17:43:42 +00:00
nekral-guest
b7a8fec626 Remove tmp directories. 2011-09-23 17:42:54 +00:00
nekral-guest
7d143a73d5 Depending on the system's load, there can be some variability in the
elapsed time.
2011-09-23 17:42:26 +00:00
nekral-guest
fd69ebf5a9 Added tests:
* pwunconv  (2)
 * grpunconv (3)
 * pwconv    (1)
 * grpconv   (1)
2011-09-23 17:36:45 +00:00
nekral-guest
9fa842ffbf Remove generated test log file. 2011-09-23 17:30:31 +00:00
nekral-guest
5305181f4e * debian/rules, debian/man.insert, debian/man.insert.sed: Bug #507673 has
been closed. It is no more needed to patch the generated manpages. This
    also fix failures to build twice is a row. Closes: #636047
2011-08-17 17:36:54 +00:00
nekral-guest
5760010c6a * Added execution of missing tests
* Fix permissions on the .gcda files.
2011-07-26 15:38:45 +00:00
nekral-guest
ed983623b7 Cleanup. Remove gdb. 2011-07-26 15:35:59 +00:00
nekral-guest
871df6e34b Added tests for faillog. 2011-07-26 15:33:12 +00:00
nekral-guest
279b8e9b69 Fix TTY detection. use the lowest unused TTY ID. 2011-07-26 15:25:15 +00:00
nekral-guest
9540ec861e Added test for pwconv. 2011-07-26 15:23:49 +00:00
nekral-guest
d408a3cdda Use a more common config with password in shadow instead of passwd.
(Other tests focus on the less frequent use cases)
2011-07-26 15:23:03 +00:00
nekral-guest
51520f2c77 Added missing cleanup. 2011-07-26 15:17:04 +00:00
nekral-guest
c0a26b82ae Added test for chpasswd. 2011-07-26 15:14:38 +00:00
nekral-guest
133092e437 Fix expected test results. 2011-07-26 14:12:08 +00:00
nekral-guest
6f7963a3ea Added test for expiry. 2011-07-26 14:08:36 +00:00
nekral-guest
d2b12355ee Added changelog entries for issues closed in the new upstream version. 2011-07-24 16:26:51 +00:00
bubulle
c0e2ae0e41 Add bug closure 2011-07-19 08:37:20 +00:00
bubulle
6e0036f616 Use "linux-any" instead of a negated list of architectures in
Build-Depends
2011-07-19 08:36:15 +00:00
nekral-guest
12e0029b68 Remove unused files or files identical to config. 2011-07-17 12:00:16 +00:00
nekral-guest
efd41d31d8 Added missing cleanup. 2011-07-16 18:13:27 +00:00
nekral-guest
ea725da60f Ignore log files. 2011-07-16 18:04:54 +00:00
nekral-guest
ec9d756fc7 Hide failure library's warnings. 2011-07-16 17:36:18 +00:00
nekral-guest
e74300f9f3 Fix test. 2011-07-16 17:33:02 +00:00
nekral-guest
ce687005c7 Fix typo in log message. 2011-07-16 16:12:01 +00:00
nekral-guest
645829be3b Added tests for chpasswd (PAM variant) 2011-07-16 16:11:08 +00:00
nekral-guest
87134054ab Use valid files for 03_chpasswd_no_shadow_file.
This avoid a failure.
The failure will be tested later.
2011-07-16 16:08:51 +00:00
nekral-guest
f26adb9373 Added tests for chpasswd and chgpasswd. 2011-07-16 16:01:27 +00:00
nekral-guest
563facd989 Added tests for chgpasswd. 2011-07-16 15:56:21 +00:00
nekral-guest
5292e8e37e Additional tests for grpck. 2011-07-16 15:45:04 +00:00
nekral-guest
4a79eb6418 Added tests for grpck. 2011-07-16 15:44:21 +00:00
nekral-guest
d36e1588a4 Added library to change the time. 2011-07-15 16:27:27 +00:00
nekral-guest
3a8fc569dc Added tests for lastlog.
--This line, and those below, will be ignored--

A    log
A    log/lastlog
A    log/lastlog/03_lastlog_format
A    log/lastlog/03_lastlog_format/config.txt
AM   log/lastlog/03_lastlog_format/login.exp
AM   log/lastlog/03_lastlog_format/lastlog.test
A    log/lastlog/03_lastlog_format/config
A    log/lastlog/03_lastlog_format/config/etc
A    log/lastlog/03_lastlog_format/config/etc/passwd
A    log/lastlog/03_lastlog_format/config/etc/shadow
A    log/lastlog/03_lastlog_format/config/etc/group
A    log/lastlog/03_lastlog_format/config/etc/gshadow
A    log/lastlog/03_lastlog_format/data
A    log/lastlog/03_lastlog_format/data/lastlog.out
A    log/lastlog/14_lastlog-u_range_invalid3
A    log/lastlog/14_lastlog-u_range_invalid3/config.txt
AM   log/lastlog/14_lastlog-u_range_invalid3/lastlog.test
A    log/lastlog/14_lastlog-u_range_invalid3/config
A    log/lastlog/14_lastlog-u_range_invalid3/config/etc
A    log/lastlog/14_lastlog-u_range_invalid3/config/etc/passwd
A    log/lastlog/14_lastlog-u_range_invalid3/config/etc/shadow
A    log/lastlog/14_lastlog-u_range_invalid3/config/etc/group
A    log/lastlog/14_lastlog-u_range_invalid3/config/etc/gshadow
A    log/lastlog/14_lastlog-u_range_invalid3/data
A    log/lastlog/14_lastlog-u_range_invalid3/data/lastlog.err
A    log/lastlog/04_lastlog_mulitple
A    log/lastlog/04_lastlog_mulitple/config.txt
AM   log/lastlog/04_lastlog_mulitple/login.exp
AM   log/lastlog/04_lastlog_mulitple/lastlog.test
A    log/lastlog/04_lastlog_mulitple/config
A    log/lastlog/04_lastlog_mulitple/config/etc
A    log/lastlog/04_lastlog_mulitple/config/etc/passwd
A    log/lastlog/04_lastlog_mulitple/config/etc/shadow
A    log/lastlog/04_lastlog_mulitple/config/etc/group
A    log/lastlog/04_lastlog_mulitple/config/etc/gshadow
A    log/lastlog/04_lastlog_mulitple/data
A    log/lastlog/04_lastlog_mulitple/data/lastlog.list
A    log/lastlog/08_lastlog-u_name_invalid
A    log/lastlog/08_lastlog-u_name_invalid/config.txt
AM   log/lastlog/08_lastlog-u_name_invalid/lastlog.test
A    log/lastlog/08_lastlog-u_name_invalid/config
A    log/lastlog/08_lastlog-u_name_invalid/config/etc
A    log/lastlog/08_lastlog-u_name_invalid/config/etc/passwd
A    log/lastlog/08_lastlog-u_name_invalid/config/etc/shadow
A    log/lastlog/08_lastlog-u_name_invalid/config/etc/group
A    log/lastlog/08_lastlog-u_name_invalid/config/etc/gshadow
A    log/lastlog/08_lastlog-u_name_invalid/data
A    log/lastlog/08_lastlog-u_name_invalid/data/lastlog.err
A    log/lastlog/19_lastlog-t_invalid
A    log/lastlog/19_lastlog-t_invalid/tmp
A    log/lastlog/19_lastlog-t_invalid/config.txt
AM   log/lastlog/19_lastlog-t_invalid/lastlog.test
A    log/lastlog/19_lastlog-t_invalid/config
A    log/lastlog/19_lastlog-t_invalid/config/etc
A    log/lastlog/19_lastlog-t_invalid/config/etc/passwd
A    log/lastlog/19_lastlog-t_invalid/config/etc/shadow
A    log/lastlog/19_lastlog-t_invalid/config/etc/group
A    log/lastlog/19_lastlog-t_invalid/config/etc/gshadow
A    log/lastlog/19_lastlog-t_invalid/data
A    log/lastlog/19_lastlog-t_invalid/data/lastlog.err
A    log/lastlog/01_lastlog_no_lastlog
A    log/lastlog/01_lastlog_no_lastlog/config.txt
AM   log/lastlog/01_lastlog_no_lastlog/lastlog.test
A    log/lastlog/01_lastlog_no_lastlog/config
A    log/lastlog/01_lastlog_no_lastlog/config/etc
A    log/lastlog/01_lastlog_no_lastlog/config/etc/passwd
A    log/lastlog/01_lastlog_no_lastlog/config/etc/shadow
A    log/lastlog/01_lastlog_no_lastlog/config/etc/group
A    log/lastlog/01_lastlog_no_lastlog/config/etc/gshadow
A    log/lastlog/01_lastlog_no_lastlog/data
A    log/lastlog/01_lastlog_no_lastlog/data/lastlog.err
A    log/lastlog/05_lastlog-u_ID
A    log/lastlog/05_lastlog-u_ID/config.txt
AM   log/lastlog/05_lastlog-u_ID/lastlog.test
A    log/lastlog/05_lastlog-u_ID/config
A    log/lastlog/05_lastlog-u_ID/config/etc
A    log/lastlog/05_lastlog-u_ID/config/etc/passwd
A    log/lastlog/05_lastlog-u_ID/config/etc/shadow
A    log/lastlog/05_lastlog-u_ID/config/etc/group
A    log/lastlog/05_lastlog-u_ID/config/etc/gshadow
A    log/lastlog/05_lastlog-u_ID/data
A    log/lastlog/05_lastlog-u_ID/data/lastlog.list
A    log/lastlog/02_lastlog_usage
A    log/lastlog/02_lastlog_usage/config.txt
AM   log/lastlog/02_lastlog_usage/lastlog.test
A    log/lastlog/02_lastlog_usage/config
A    log/lastlog/02_lastlog_usage/config/etc
A    log/lastlog/02_lastlog_usage/config/etc/passwd
A    log/lastlog/02_lastlog_usage/config/etc/shadow
A    log/lastlog/02_lastlog_usage/config/etc/group
A    log/lastlog/02_lastlog_usage/config/etc/gshadow
A    log/lastlog/02_lastlog_usage/data
A    log/lastlog/02_lastlog_usage/data/usage.out
A    log/lastlog/20_lastlog-b_invalid
A    log/lastlog/20_lastlog-b_invalid/config.txt
AM   log/lastlog/20_lastlog-b_invalid/lastlog.test
A    log/lastlog/20_lastlog-b_invalid/config
A    log/lastlog/20_lastlog-b_invalid/config/etc
A    log/lastlog/20_lastlog-b_invalid/config/etc/passwd
A    log/lastlog/20_lastlog-b_invalid/config/etc/shadow
A    log/lastlog/20_lastlog-b_invalid/config/etc/group
A    log/lastlog/20_lastlog-b_invalid/config/etc/gshadow
A    log/lastlog/20_lastlog-b_invalid/data
A    log/lastlog/20_lastlog-b_invalid/data/lastlog.err
A    log/lastlog/09_lastlog-u_range
A    log/lastlog/09_lastlog-u_range/config.txt
AM   log/lastlog/09_lastlog-u_range/lastlog.test
A    log/lastlog/09_lastlog-u_range/config
A    log/lastlog/09_lastlog-u_range/config/etc
A    log/lastlog/09_lastlog-u_range/config/etc/passwd
A    log/lastlog/09_lastlog-u_range/config/etc/shadow
A    log/lastlog/09_lastlog-u_range/config/etc/group
A    log/lastlog/09_lastlog-u_range/config/etc/gshadow
A    log/lastlog/09_lastlog-u_range/data
A    log/lastlog/09_lastlog-u_range/data/lastlog.list
A    log/lastlog/18_lastlog-b
A    log/lastlog/18_lastlog-b/config.txt
AM   log/lastlog/18_lastlog-b/login.exp
AM   log/lastlog/18_lastlog-b/lastlog.test
A    log/lastlog/18_lastlog-b/config
A    log/lastlog/18_lastlog-b/config/etc
A    log/lastlog/18_lastlog-b/config/etc/passwd
A    log/lastlog/18_lastlog-b/config/etc/shadow
A    log/lastlog/18_lastlog-b/config/etc/group
A    log/lastlog/18_lastlog-b/config/etc/gshadow
A    log/lastlog/18_lastlog-b/data
A    log/lastlog/18_lastlog-b/data/lastlog.list
A    log/lastlog/07_lastlog-u_ID_invalid
A    log/lastlog/07_lastlog-u_ID_invalid/tmp
A    log/lastlog/07_lastlog-u_ID_invalid/tmp/lastlog.list
A    log/lastlog/07_lastlog-u_ID_invalid/config.txt
AM   log/lastlog/07_lastlog-u_ID_invalid/lastlog.test
A    log/lastlog/07_lastlog-u_ID_invalid/config
A    log/lastlog/07_lastlog-u_ID_invalid/config/etc
A    log/lastlog/07_lastlog-u_ID_invalid/config/etc/passwd
A    log/lastlog/07_lastlog-u_ID_invalid/config/etc/shadow
A    log/lastlog/07_lastlog-u_ID_invalid/config/etc/group
A    log/lastlog/07_lastlog-u_ID_invalid/config/etc/gshadow
A    log/lastlog/07_lastlog-u_ID_invalid/data
A    log/lastlog/07_lastlog-u_ID_invalid/data/lastlog.list
A    log/lastlog/10_lastlog-u_open_range
A    log/lastlog/10_lastlog-u_open_range/config.txt
AM   log/lastlog/10_lastlog-u_open_range/lastlog.test
A    log/lastlog/10_lastlog-u_open_range/config
A    log/lastlog/10_lastlog-u_open_range/config/etc
A    log/lastlog/10_lastlog-u_open_range/config/etc/passwd
A    log/lastlog/10_lastlog-u_open_range/config/etc/shadow
A    log/lastlog/10_lastlog-u_open_range/config/etc/group
A    log/lastlog/10_lastlog-u_open_range/config/etc/gshadow
A    log/lastlog/10_lastlog-u_open_range/data
A    log/lastlog/10_lastlog-u_open_range/data/lastlog.list
A    log/lastlog/11_lastlog-u_range_open
A    log/lastlog/11_lastlog-u_range_open/config.txt
AM   log/lastlog/11_lastlog-u_range_open/lastlog.test
A    log/lastlog/11_lastlog-u_range_open/config
A    log/lastlog/11_lastlog-u_range_open/config/etc
A    log/lastlog/11_lastlog-u_range_open/config/etc/passwd
A    log/lastlog/11_lastlog-u_range_open/config/etc/shadow
A    log/lastlog/11_lastlog-u_range_open/config/etc/group
A    log/lastlog/11_lastlog-u_range_open/config/etc/gshadow
A    log/lastlog/11_lastlog-u_range_open/data
A    log/lastlog/11_lastlog-u_range_open/data/lastlog.list
A    log/lastlog/16_lastlog_extra_arg
A    log/lastlog/16_lastlog_extra_arg/config.txt
AM   log/lastlog/16_lastlog_extra_arg/lastlog.test
A    log/lastlog/16_lastlog_extra_arg/config
A    log/lastlog/16_lastlog_extra_arg/config/etc
A    log/lastlog/16_lastlog_extra_arg/config/etc/passwd
A    log/lastlog/16_lastlog_extra_arg/config/etc/shadow
A    log/lastlog/16_lastlog_extra_arg/config/etc/group
A    log/lastlog/16_lastlog_extra_arg/config/etc/gshadow
A    log/lastlog/16_lastlog_extra_arg/data
A    log/lastlog/16_lastlog_extra_arg/data/usage.out
A    log/lastlog/15_lastlog_bad_option
A    log/lastlog/15_lastlog_bad_option/config.txt
AM   log/lastlog/15_lastlog_bad_option/lastlog.test
A    log/lastlog/15_lastlog_bad_option/config
A    log/lastlog/15_lastlog_bad_option/config/etc
A    log/lastlog/15_lastlog_bad_option/config/etc/passwd
A    log/lastlog/15_lastlog_bad_option/config/etc/shadow
A    log/lastlog/15_lastlog_bad_option/config/etc/group
A    log/lastlog/15_lastlog_bad_option/config/etc/gshadow
A    log/lastlog/15_lastlog_bad_option/data
A    log/lastlog/15_lastlog_bad_option/data/usage.out
A    log/lastlog/12_lastlog-u_range_invalid1
A    log/lastlog/12_lastlog-u_range_invalid1/config.txt
AM   log/lastlog/12_lastlog-u_range_invalid1/lastlog.test
A    log/lastlog/12_lastlog-u_range_invalid1/config
A    log/lastlog/12_lastlog-u_range_invalid1/config/etc
A    log/lastlog/12_lastlog-u_range_invalid1/config/etc/passwd
A    log/lastlog/12_lastlog-u_range_invalid1/config/etc/shadow
A    log/lastlog/12_lastlog-u_range_invalid1/config/etc/group
A    log/lastlog/12_lastlog-u_range_invalid1/config/etc/gshadow
A    log/lastlog/12_lastlog-u_range_invalid1/data
A    log/lastlog/12_lastlog-u_range_invalid1/data/lastlog.err
A    log/lastlog/06_lastlog-u_name
A    log/lastlog/06_lastlog-u_name/config.txt
AM   log/lastlog/06_lastlog-u_name/lastlog.test
A    log/lastlog/06_lastlog-u_name/config
A    log/lastlog/06_lastlog-u_name/config/etc
A    log/lastlog/06_lastlog-u_name/config/etc/passwd
A    log/lastlog/06_lastlog-u_name/config/etc/shadow
A    log/lastlog/06_lastlog-u_name/config/etc/group
A    log/lastlog/06_lastlog-u_name/config/etc/gshadow
A    log/lastlog/06_lastlog-u_name/data
A    log/lastlog/06_lastlog-u_name/data/lastlog.list
A    log/lastlog/17_lastlog-t
A    log/lastlog/17_lastlog-t/config.txt
AM   log/lastlog/17_lastlog-t/login.exp
AM   log/lastlog/17_lastlog-t/lastlog.test
A    log/lastlog/17_lastlog-t/config
A    log/lastlog/17_lastlog-t/config/etc
A    log/lastlog/17_lastlog-t/config/etc/passwd
A    log/lastlog/17_lastlog-t/config/etc/shadow
A    log/lastlog/17_lastlog-t/config/etc/group
A    log/lastlog/17_lastlog-t/config/etc/gshadow
A    log/lastlog/17_lastlog-t/data
A    log/lastlog/17_lastlog-t/data/lastlog.list
A    log/lastlog/13_lastlog-u_range_invalid2
A    log/lastlog/13_lastlog-u_range_invalid2/config.txt
AM   log/lastlog/13_lastlog-u_range_invalid2/lastlog.test
A    log/lastlog/13_lastlog-u_range_invalid2/config
A    log/lastlog/13_lastlog-u_range_invalid2/config/etc
A    log/lastlog/13_lastlog-u_range_invalid2/config/etc/passwd
A    log/lastlog/13_lastlog-u_range_invalid2/config/etc/shadow
A    log/lastlog/13_lastlog-u_range_invalid2/config/etc/group
A    log/lastlog/13_lastlog-u_range_invalid2/config/etc/gshadow
A    log/lastlog/13_lastlog-u_range_invalid2/data
A    log/lastlog/13_lastlog-u_range_invalid2/data/lastlog.err
2011-07-15 16:26:34 +00:00
nekral-guest
d88fee56d0 Updated to include the new Chinese translations and the groupmems manpages
(built for the tested package, but not in Debian).
2011-07-14 17:27:27 +00:00
nekral-guest
8c071f98f4 Updated error message. 2011-07-14 17:26:26 +00:00
nekral-guest
17589834e9 The reason for the lock failure is now indicated in the failure message. 2011-07-14 17:25:48 +00:00
nekral-guest
b1dcbb9109 Added tests for groupadd and groupmod 2011-07-14 17:22:15 +00:00
nekral-guest
ff21533772 The reason for the lock failure is now indicated in the failure message. 2011-07-14 17:20:29 +00:00
nekral-guest
8e4062eaad If there are no gshadow entry, but group indicate that gshadow is enabled,
a gshadow entry is created.
2011-07-14 17:19:14 +00:00
nekral-guest
3e7c866497 Since there are no gshadow, it is more logical to have a password (rather
than x).
2011-07-14 17:18:07 +00:00
nekral-guest
25eb9fd7e9 Added grpck tests. 2011-07-14 17:08:39 +00:00
nekral-guest
a472a22b42 Added some groupmod / usermod tests. 2011-07-14 16:41:17 +00:00
nekral-guest
528435663e Added 2 libraries to support error injection. 2011-07-14 16:40:03 +00:00
nekral-guest
13125b6596 Fix typos. 2011-07-14 16:39:22 +00:00
nekral-guest
e642700f7c Added tests for groupadd and groupdel. 2011-07-14 16:38:47 +00:00
nekral-guest
1c05718b49 Updated warnings. 2011-07-14 16:35:57 +00:00
nekral-guest
21b28d9ac2 Lock failures now receive an extra message. 2011-07-14 16:34:53 +00:00
nekral-guest
31b4793161 userdel now warns when the user's mail spool cannot be found. 2011-07-14 16:24:26 +00:00
nekral-guest
831ca2acc0 Added tests for usermod. 2011-07-14 16:19:27 +00:00
nekral-guest
c959b173fa - Spaces have been added between options and arguments in theRussian
manpages. Closes: #606159
2011-06-25 09:14:20 +00:00
nekral-guest
494fe327a2 - passwd(1) references chpasswd(8). Closes: #609117 2011-06-25 09:03:46 +00:00
nekral-guest
32ee5cf5a4 - userdel error message has been clarified when the user is still
executing processes (it used to complain that the user is logged in).
      Closes: #603315
2011-06-25 08:58:55 +00:00
nekral-guest
1dab661a88 The new Simplified Chinese manpages translation should have fix #602264. 2011-06-25 08:54:02 +00:00
nekral-guest
5c743da48c * debian/securetty.linux: Fixed typo: ttyama -> ttyAMA. Closes: #544184 2011-06-24 21:50:20 +00:00
nekral-guest
34b64c6a5c - name the next release (which should be a 4.1.5)
- reindent according to previous entry, and use the same bug closing
   style
 - document bugs closed by the latest upstream
 - refresh patch according to latest upstream
 - remove patch not needed with latest upstream
 - sort translations alphabetically
 - debian/control: mark passwd as 'Multi-Arch: foreign'. Closes: #614321
 - debian/securetty.linux: Add IBM pSeries console ports. Closes: #597661
 - debian/securetty.linux: Add serial Console for MIPS Swarm.
   (http://lists.debian.org/debian-release/2011/02/msg00320.html)
2011-06-24 21:44:27 +00:00
bubulle
520c3d2ee8 * New upstream version
* Upstream fixes:
  - Fix several typos in manpages. Thanks to Simon Brandmair
* Upstream translation updates from Debian BTS:
  - Japanese (Closes: #620978)
  - Kazakh (Closes: #620930)
  - Danish (Closes: #621330)
  - Swedish (Closes: #621126)
  - Russian (Closes: #622106)
  - Brazilian Portuguese (Closes: #622834)
  - German (Closes: #622908)
  - French (Closes: #623608)
  - Portuguese (Closes: #623722)
  - Catalan (Closes: #627526)
  - Spanish (Closes: #630618)
* Upstream manpages translation updates from Debian BTS:
  - French (Closes: #630250)
  - German (Closes: #628777)
2011-06-18 05:33:43 +00:00
bubulle
edc1e3de4c French manpages translation update (Closes: #630250) 2011-06-12 19:57:02 +00:00
nekral-guest
51c1b4fd6e Added missing pieces from 1:4.1.4.2+svn3283-3 2011-06-04 07:42:27 +00:00
bubulle
dc8ebb9a93 German manpages translation update (Closes: #628777) 2011-06-01 12:20:08 +00:00
bubulle
3f81b32b3a Pending changes in new upstream 2011-06-01 12:01:01 +00:00
bubulle
05712cf244 French and Portuguese translation updates 2011-04-25 10:07:09 +00:00
bubulle
3cd211df74 German translation update (Closes: #622908) 2011-04-16 07:33:17 +00:00
bubulle
eed7f843e5 Brazilian Portuguese translation update (Closes: #622834) 2011-04-15 06:22:02 +00:00
bubulle
0dd4550277 Bug closure for Russian translation 2011-04-10 15:51:20 +00:00
bubulle
4f0461c5aa Translations fixes in upcoming release 2011-04-05 18:04:48 +00:00
bubulle
801dc30dc9 Fix typo in /etc/pam.d/login comments. Thanks to Ferenc Wagner.
Closes: #598717
2010-10-02 11:30:52 +00:00
bubulle
81d3f93571 Release 1:4.1.4.2+svn3283-2 2010-10-02 11:24:43 +00:00
bubulle
2bbe223879 Fix backup command line in cron.daily script. Closes: #596283 2010-09-12 13:00:49 +00:00
nekral-guest
5a13d590df New version will be based on revision 3283. 2010-09-05 16:21:31 +00:00
nekral-guest
150d37d441 Fix typo. 2010-08-29 19:26:34 +00:00
nekral-guest
92ada6ae8c Next version should be based on upstream trunk, revision 3280. 2010-08-29 19:17:50 +00:00
nekral-guest
f844f3fc1f * New upstream release:
- Fixed comma splice in chsh(1). Closes: #582166
2010-08-28 20:17:28 +00:00
nekral-guest
f04a81b799 Add the other failure libraries. 2010-08-28 20:07:14 +00:00
nekral-guest
ac62509912 When /var/log/auth.log is checked, flush file system buffers.
And add debug information (content of /var/log/auth.log).
2010-08-28 19:51:48 +00:00
nekral-guest
090dcd4714 Updated default ENV_SUPATH. 2010-08-28 19:50:13 +00:00
nekral-guest
2772f3caaf Even with -p, PATH is reset. This is now documented and tested. 2010-08-28 19:49:12 +00:00
nekral-guest
d4da487911 * debian/rules: Disable new features: --without-acl --without-attr
--without-tcb
2010-08-28 19:44:52 +00:00
nekral-guest
26d47d4a13 Avoid spurious warning messages.
Only display the messages from stderr if the passwords do not match.
2010-08-28 18:05:03 +00:00
nekral-guest
7aa5afbe3e Use an empty /etc/profile to avoid interferences. 2010-08-28 18:03:43 +00:00
nekral-guest
8e07b2236e Add two tests for pwck. 2010-08-27 18:13:35 +00:00
nekral-guest
b82323f6fc SUpport for dash. 2010-08-27 18:07:51 +00:00
nekral-guest
2da85fc32b Updated list of installed files. 2010-08-27 18:05:48 +00:00
nekral-guest
036fdfd2cb Behavior of newusers has changed regarding systeml users (allocation starting from the higest limit and going down). It makes more sens to pass this test with users alredy allocated that way.
etc/passwd changed and data/passwd data/group changed to match the new request's results.
2010-08-27 18:03:36 +00:00
nekral-guest
3081241777 Behavior of usermod was improved regarding (re)moving the old homedir. 2010-08-27 17:58:24 +00:00
nekral-guest
3472bee15a Behavior of usermod was improved regarding (re)moving the old homedir. 2010-08-27 17:57:42 +00:00
nekral-guest
a6336f11f8 * The PAM version now allows chpasswd an user when there are no shadow entries
(or maybe PAM behavior changed).
 * Document the differences between the 2 versions (PAM will add a shadow entry
   and the !PAM version will just update the passwd entry).
   This may have to be fixed later, but is not a clear bug.
 * Remove unnecessary files
2010-08-27 17:53:14 +00:00
nekral-guest
3b6a675f3f Use a PAM configuration with the pam_unix md5 option. 2010-08-26 21:31:56 +00:00
nekral-guest
bcd3d8c1b8 Use a PAM configuration without a specific hash option => default to DES. 2010-08-26 21:29:46 +00:00
nekral-guest
7de171da64 Use a PAM configuration with the pam_unix sha256 option. 2010-08-26 21:28:34 +00:00
nekral-guest
fc3fa0e293 Use a pam configuration with the pam_unix sha512 option 2010-08-26 21:27:17 +00:00
nekral-guest
53b2f99d37 Use a default pam configuration using pam_unix sha512 option. 2010-08-26 21:25:48 +00:00
nekral-guest
056347f7a0 The order of groups returned by id has changed. 2010-08-26 21:16:35 +00:00
nekral-guest
80d3925cc1 * Updated for dash
* There is no need to send a wrong password. The expect script is already changing the password to a wrong one
 * Updated ignore property
2010-08-26 21:11:33 +00:00
nekral-guest
4ff6fdd350 Added missing data files and updated ignore property. 2010-08-26 21:07:25 +00:00
nekral-guest
6fd2918f82 sha512 is now the default pam_unix configuration. 2010-08-26 21:02:41 +00:00
nekral-guest
991d707460 groupmod usage output was changed. 2010-08-26 19:40:23 +00:00
nekral-guest
6268434a34 Error message was updated. 2010-08-26 19:39:20 +00:00
nekral-guest
79bd47d726 * Support for dash
* chage usage is sent to stdout instead of stderr
2010-08-26 19:39:01 +00:00
nekral-guest
6a94f65dc6 Updated debug & log information 2010-08-26 19:37:38 +00:00
nekral-guest
f38390ecf8 Support for dash. 2010-08-26 19:36:43 +00:00
nekral-guest
1906527bb8 Support for dash. 2010-08-26 19:34:04 +00:00
nekral-guest
4de1bfac9c Additional debug information. 2010-08-26 19:32:38 +00:00
nekral-guest
ce8580ca6d Add the last 2 tests to the default tests. 2010-08-26 19:32:12 +00:00
nekral-guest
78fd15bab1 Added 2 tests for su. 2010-08-26 19:30:52 +00:00
nekral-guest
f32335f6f9 System's default PATH has been updated. 2010-08-26 19:27:03 +00:00
nekral-guest
c7df39a736 Support for dash. 2010-08-26 19:24:28 +00:00
nekral-guest
cc5a9f7708 Fix typo is the log rationale. 2010-08-26 19:18:29 +00:00
nekral-guest
f1bb2c3848 Added support for dash. 2010-08-26 19:16:40 +00:00
nekral-guest
5f632d1a86 Explicitly set PS1 in order to support test environments where the default shell is set to dash. 2010-08-26 19:13:30 +00:00
bubulle
56545b1b78 Mark translation update bugfix 2010-06-24 18:43:55 +00:00
nekral-guest
43c4c62ad7 * debian/control: Do not repeat the Section and Priority fields for the
binary packages.
2010-04-05 15:59:06 +00:00
nekral-guest
9530fa372c * debian/passwd.lintian-overrides: Remove old entries relevant for
passwd.config.
2010-04-04 23:14:09 +00:00
nekral-guest
26691d3301 Document the change of Standards-Version. 2010-04-04 23:11:36 +00:00
nekral-guest
a8a28eba99 * debian/control: Standards-Version: bumped to 3.8.4. No changes. 2010-04-02 22:16:29 +00:00
nekral-guest
3cdfbb6cef * debian/rules, debian/man.insert, debian/man.insert.sed: Hack to avoid bug
507673, causing missing apostrophes in the manpages generated by
    docbook-xsl.
2010-04-02 22:12:29 +00:00
nekral-guest
250ed8cf16 Document the addition of ttyPZ0..3 2010-04-01 15:41:44 +00:00
nekral-guest
c6e3185f0c * debian/securetty.linux: Reorganise and synchronise with
Documentation/devices.txt
2010-03-30 23:47:25 +00:00
nekral-guest
cd10fe20c5 * debian/login.defs: Updated description of UMASK (used by pam_umask). 2010-03-26 11:51:51 +00:00
nekral-guest
31678f87d9 * New upstream release:
- mail checking is no more mentioned in login(1) since it is done by PAM.
      Closes: #470059
    - The -e (and -c and -m) option was restored in chpasswd (which still uses
      PAM by default).  Closes: #539354
2010-03-25 19:49:31 +00:00
nekral-guest
b318b6721e * New upstream release:
- Fix interruption of su, newgrp, vipw with Ctrl-Z. Closes: 530231
2010-03-23 13:07:12 +00:00
nekral-guest
0fe9b6b867 * New upstream release:
- pwck and grpck stop sorting at the first line which begins with a '+'.
      This will avoid messing up with NIS entries. Closes: #567836
2010-03-20 22:10:26 +00:00
nekral-guest
3a91912281 Apply patch already described in the curent changelog:
* debian/login.pam: return back to mostly "requisite" for the pam_securetty
    PAM module, but ignore PAM_USER_UNKNOWN. This will avoid root from
    entering a password, and will also avoid user enumeration attacks.
    Mis-typed root login are not protected, only root can be blamed for
    mis-typing and entering a password on an insecure line. Users willing to
    protect against mis-typed root login can use "requisite", but will be
    vulnerable to user enumeration attacks on insecure lines, and should use
    pam 1.1.0-4 at least. Closes: #574082, #531341
2010-03-20 10:57:44 +00:00
nekral-guest
b1286d31fd - Remove patches applied upstream:
+ debian/patches/483_su_fakelogin_wrong_arg0
2010-03-20 10:52:52 +00:00
nekral-guest
5c8a6cd6eb - Updated patches:
+ debian/patches/542_useradd-O_option
2010-03-20 10:45:49 +00:00
nekral-guest
68fdd46a81 * debian/passwd.cron.daily: Handle the backups of the user and group
databases so that it can be removed from the standard daily cron job.
    Closes: #554170
2010-03-20 10:45:12 +00:00
nekral-guest
76097618c2 - Fixed parsing of gshadow. This fix password support in newgrp.
Closes: #569899
2010-03-18 12:18:02 +00:00
nekral-guest
fe99e0edd8 - This also allows, in the chage interactive mode, to specify -1 as the
expiration date to disable it. Closes: #573018
2010-03-18 12:10:09 +00:00
nekral-guest
a000373d8d - Added support for dates already specified as a number of days since
Epoch in useradd, usermod and chage. Closes: #562221
2010-03-18 11:56:44 +00:00
bubulle
8c5876cef0 Add bug closure 2010-03-16 08:41:49 +00:00
bubulle
f5e0895b3a Revert pam_securetty to "requisite" 2010-03-16 06:59:46 +00:00
nekral-guest
da9a0615de * debian/rules: Added DEB_AUTO_UPDATE_LIBTOOL = pre. Closes: #560633 2010-03-15 10:11:01 +00:00
nekral-guest
1640002065 * debian/login.defs: Improve documentation of USERGROUPS_ENAB.
Closes: #572687
2010-03-15 10:06:34 +00:00
nekral-guest
53f2df3ded - Remove patches applied upstream:
+ debian/patches/008_su_no_sanitize_env
2010-03-15 10:00:24 +00:00
nekral-guest
49a95f6c07 - Updated patches:
+ debian/patches/523_su_arguments_are_no_more_concatenated_by_default
2010-03-15 09:59:54 +00:00
nekral-guest
3ababb2263 * debian/control: Removed Martin Quinson from the Uploaders, on his request. 2010-01-24 17:30:36 +00:00
nekral-guest
20ba2e50ab - Remove patches applied upstream:
+ debian/patches/008_su_no_sanitize_env
2010-01-24 17:29:33 +00:00
nekral-guest
282bbb9cfc This patch will be applied in the next release. 2010-01-24 17:28:24 +00:00
nekral-guest
52f620f78d 1:4.1.4.3-1 is not yet released. 2010-01-24 17:27:55 +00:00
bubulle
0bdd59ac57 Bug closure 2009-09-27 06:24:47 +00:00
bubulle
f1127e1aac Mark upstream translation as pending 2009-09-24 20:23:20 +00:00
nekral-guest
e9e97852cf * debian/securetty.linux: Added support for embedded ARM AMBA PL011 ports
(e.g. emulated by QEMU). Closes: #544184
2009-09-05 20:50:24 +00:00
nekral-guest
43cd3dc662 * debian/securetty.kfreebsd: On GNU/kFreeBSD the serial devices have change
from /dev/cuuaX to /dev/ttydX in kernel 6.0. Closes: #544523
2009-09-01 13:32:06 +00:00
nekral-guest
070ba9d6d4 * New upstream release:
- Fix formatting of the login.defs.5 manpage. Closes: #542804
2009-08-21 15:17:09 +00:00
nekral-guest
ce9ed32e74 * debian/control: Standards-Version: bumped to 3.8.2. No changes. 2009-07-24 03:03:14 +00:00
nekral-guest
9e83d9f840 * debian/login.dirs, debian/passwd.dirs: Removed usr/share/linda/overrides. 2009-07-24 02:03:43 +00:00
nekral-guest
96866ff296 * debian/shadowconfig.sh: Do not run shadowoff() and shadowon() in subshell.
This also remove a dependency on bash (even though /bin/sh would have been
    sufficient). Thanks to Luk for spotting this.
2009-07-23 20:58:02 +00:00
nekral-guest
1a58cb2346 * debian/login.pam: pam_securetty included as a required module instead of
requisite to avoid leak of user name information. Closes: #531341
2009-07-23 20:56:32 +00:00
nekral-guest
01b11c5f84 - Added support for shells being shell scripts without a shebang.
Closes: #479406
2009-07-20 19:11:13 +00:00
nekral-guest
91c630033d * debian/patches/506_relaxed_usernames: Fixed typo. groupadd(8) should
document therestriction on groupnames, not usernames.
2009-07-18 18:08:18 +00:00
nekral-guest
8422a00909 * The "Tome des Bauges" release.
* New upstream release:
     - Updated Basque translation. Closes: #535553
     - Fixed some translatable string. Closes: #525726
     - Fixed documentation of the short option for --mindays in passwd(1).
       Closes: #531983
  * debian/securetty.linux: Added Embedded Renesas SuperH ports.
    Closes: #535927
  * debian/securetty.linux: Added ttyS2 to ttyS5. Some extension card provide
    more serial ports, but that should be sufficient until there is a support
    for regular expressions. Closes: #534244
2009-07-18 18:01:54 +00:00
nekral-guest
fa16e07b2e Prepare next release. 2009-05-22 14:30:12 +00:00
nekral-guest
bf28febe2f Added new tests to the testsuite script. 2009-05-22 11:51:00 +00:00
nekral-guest
4375e97124 Added tests for SULOG. 2009-05-22 11:50:26 +00:00
nekral-guest
b42d7cf631 Check the right place for the user's homedir. 2009-05-22 11:48:23 +00:00
nekral-guest
b3a4a77b46 Updated ignore list. 2009-05-22 11:47:18 +00:00
nekral-guest
65269966d5 Make sure the process started by su is killed.
Avoid messages on, stderr.
Make sure the process started by su is actually started when userdel is run.
2009-05-22 11:46:57 +00:00
nekral-guest
86ce147df1 Added tests for userdel. 2009-05-22 11:44:54 +00:00
nekral-guest
d868434939 Updated traps. Avoid removal of files not created by the testsuite 2009-05-22 11:44:21 +00:00
nekral-guest
3e50639cba Added failure libraries to test rmdir and unlink failures. 2009-05-22 11:19:38 +00:00
nekral-guest
d3a0659e13 Added support for adding files that do not exist on the system.
These files are removed later during the cleanup.
2009-05-22 11:19:10 +00:00
nekral-guest
199d8b2719 Added 6 failure tests for userdel. 2009-05-22 11:18:07 +00:00
nekral-guest
e9b12a545d Updated to the new version and updated ignore list. 2009-05-22 11:16:51 +00:00
nekral-guest
0d29450314 * New upstream release:
- newgrp and sg return the exit status of their child. Closes: #529897
2009-05-22 11:13:08 +00:00
nekral-guest
96432cb7a1 Added an userdel failure test. 2009-05-21 16:46:43 +00:00
nekral-guest
d2a6818f17 Run with set -e. 2009-05-21 16:12:47 +00:00
nekral-guest
c2b51209bb su now logs a full tty path (/dev/ used to be strip out). 2009-05-21 16:08:45 +00:00
nekral-guest
436996ed07 Updated to the new passwd message. 2009-05-21 16:07:44 +00:00
nekral-guest
3d5b4ce121 * debian/patches/506_relaxed_usernames: usernames with a slash will not only
break one option. Move to the discussion on the usernames.
2009-05-21 15:55:29 +00:00
nekral-guest
f121e979bb * debian/patches/*: Updated patches to the new quilt and shadow versions. 2009-05-21 15:30:36 +00:00
nekral-guest
cb8f35691a * debian/login.defs: Removed comment about MD5_CRYPT. MD5_CRYPT_ENAB is no
more used by chpasswd and newusers.
2009-05-21 15:19:02 +00:00
nekral-guest
0ea08a3961 - Updated patches:
+ debian/patches/506_relaxed_usernames
2009-05-21 15:17:46 +00:00
nekral-guest
9ef58601e0 * The "Chevrotin" release.
* New upstream release:
     - Fixed typo in the French vipw usage. Closes: #528486
     - Fixed failure to delete an user (wrongly detected as still logged in).
       On Linux, userdel checks if the user has some running processes.
       Otherwise, it still check with utmp if the user is logged in and check
       if the process indicated by utmp is still running to avoid
       mis-detection of logged-in users. Closes: #528060
2009-05-21 15:15:22 +00:00
nekral-guest
130e26d582 Added 3 tests for userdel. 2009-05-20 21:48:16 +00:00
nekral-guest
3462794b84 Added missing file. 2009-05-20 21:44:52 +00:00
nekral-guest
f82f0de34e Added 2 new userdel tests. 2009-05-20 21:23:32 +00:00
nekral-guest
eb61b09070 cleanup. Remove unneeded files. 2009-05-20 21:21:55 +00:00
nekral-guest
a97b3a382b * The "Banonet" release.
* debian/login.pam: Really ignore pam_selinux.so failures when the module do
    not exist. Closes: #528673
2009-05-16 10:15:38 +00:00
nekral-guest
f3ef07b8c7 * debian/rules: Install the lintian overrides with dh_lintian.
* debian/control: Raised dependency on debhelper (>= 6.0.7~) for dh_lintian.
  * debian/compat: Raised to 6
2009-05-14 20:40:43 +00:00
nekral-guest
8f4d210b31 Updated to clean the gcov files. Not used on Debian. 2009-05-14 19:51:55 +00:00
nekral-guest
6ff5ab6af4 * debian/login.pam: Ignore pam_selinux.so failures when the module do not
exist. A required pam_selinux.so makes login fail when the module does not
    exist (e.g. on architecture without SE Linux support). Closes: #528673
2009-05-14 19:11:38 +00:00
nekral-guest
cfbe85f1f0 * debian/login.postinst: Install /var/log/faillog during initial installs
only. This permits admins to disable failed logins recording.
    Closes: #488420
2009-05-12 20:05:53 +00:00
nekral-guest
6752d525c3 * The "Banon" release.
* debian/rules, debian/passwd.linda-overrides, debian/login.linda-overrides:
    Removed linda-overrides files.
2009-05-11 20:30:36 +00:00
nekral-guest
36595ad2cd * debian/control: Standards-Version bumped to 3.8.1. No changes.
* debian/control: Changed gnome-doc-utils dependency to >= 0.4.3 (instead
    of >= 0.4.3-1)
  * debian/control: Added ${misc:Depends} to the passwd's Depends and login's
    Pre-Depends.
2009-05-10 22:30:50 +00:00
nekral-guest
88e88fbf27 * debian/securetty.linux: Added some local X displays. See LP #104957. But
only a limited set of displays were added.
2009-05-10 22:01:48 +00:00
nekral-guest
f2915bc349 Next upstream release will be 4.1.4. 2009-05-10 20:05:43 +00:00
nekral-guest
fca246813e Updated patch for the testsuite. 2009-05-10 19:48:42 +00:00
nekral-guest
9292f7b951 Add the username in failures reports.
Add support for rounds checking in SHA512
Remove the password to extract the salt for MD5.
2009-05-10 19:36:36 +00:00
nekral-guest
ff0f6c28eb Added new tests, and tag PAM and non-PAM specific tests. 2009-05-10 19:29:29 +00:00
nekral-guest
c556de2b56 Added newusers tests specific to the PAM version, to replace the one which use the non-PAM specific options. 2009-05-10 19:27:29 +00:00
nekral-guest
7890eab89b Added PAM configuration files to support the PAM versions of newusers. 2009-05-10 19:18:25 +00:00
nekral-guest
f9aee80330 newusers now sets the lstchg field in shadow. 2009-05-10 19:15:17 +00:00
nekral-guest
d9b8c55516 New release name: Chambérat.
Added entries for new translation and sort translations alphabetically.
2009-05-10 17:12:40 +00:00
nekral-guest
c3e1c92fa7 # 402 should be merged in 401, but should be reviewed by SE Linux experts first 2009-05-10 14:10:11 +00:00
nekral-guest
8cd330b97a - Remove patches applied upstream:
+ debian/patches/403_fix_PATH-MAX_hurd
2009-05-10 14:09:16 +00:00
nekral-guest
156bd855d4 Since chpasswd is now PAM enabled, the crypt tests are passed with chgpasswd.
Do not copy the database which should not change. Directly compare the system files with the files from config/.
Update some test descriptions.
2009-05-09 22:39:12 +00:00
nekral-guest
5324b00638 There were changes in the exit codes of gpasswd. 2009-05-09 22:32:10 +00:00
nekral-guest
ba569f80b6 Added tests for passwd which interractively change (or attemptto change) a password. 2009-05-09 22:30:21 +00:00
nekral-guest
d6495cab07 There is no need to use expect for these tests.
Only check the stdout/stderr output.
2009-05-09 22:27:13 +00:00
nekral-guest
5520ea45cc Added missing PAM configuration files for chpasswd. 2009-05-09 22:23:32 +00:00
nekral-guest
98df44c5a1 Added tests for the PAM version of chpasswd. 2009-05-09 22:20:43 +00:00
nekral-guest
e5aa1773d3 * debian/login.pam: Updated support for SELinux. Closes: #527106 2009-05-09 21:34:55 +00:00
nekral-guest
f810e0a171 Fixed in next release:
- pwck and grpck warn when the shadowed and non-shadowed files contain
       an entry for the same user or group and the non shadowed file password
       field is not 'x'. Closes: #501869
       Other topics raised in this bug were fixed previously.
2009-05-09 21:27:32 +00:00
nekral-guest
4e2e230b07 * debian/rules, debian/passwd.newusers.pam, debian/passwd.chpasswd.pam:
Install the newusers and chpasswd PAM service configuration files.
    newusers and chpasswd now use PAM to update the passwords.
    Closes: #525153
2009-05-09 17:03:49 +00:00
nekral-guest
d65a81cc37 - Updated patches:
+ debian/patches/008_login_log_failure_in_FTMP
        + debian/patches/401_cppw_src.dpatch
        + debian/patches/429_login_FAILLOG_ENAB
        + debian/patches/463_login_delay_obeys_to_PAM
2009-05-09 14:30:06 +00:00
bubulle
9febd5c52e Bug closure 2009-05-08 17:23:06 +00:00
bubulle
c9eb7cb521 Add bug closure 2009-05-08 04:54:49 +00:00
nekral-guest
d6271f27b8 * debian/securetty.linux: Added Freescale i.MX ports. Closes: #527095 2009-05-07 17:23:45 +00:00
nekral-guest
4d7d93d08a Fixed bug number. 2009-04-28 22:04:41 +00:00
nekral-guest
127ac7cf5e - Fixed lastlog. 4.1.3 only reported empty logs. Closes: #52473 2009-04-28 20:48:33 +00:00
nekral-guest
292b47c386 - passwd: Report password properties changes if the password is not
actually changed. Closes: #525967
2009-04-28 20:46:52 +00:00
nekral-guest
2d99df028e Name the release ("Rollot").
Added other bug closures.
2009-04-26 12:52:05 +00:00
bubulle
8009e96f35 Bug closure 2009-04-26 12:29:09 +00:00
nekral-guest
d485633edc Added login tests. 2009-04-15 23:36:17 +00:00
nekral-guest
81c1f063d2 Updated to 4.1.3.1. 2009-04-15 23:35:57 +00:00
nekral-guest
067fb2ff47 GID_MIN was set to 1000. 2009-04-15 23:35:43 +00:00
nekral-guest
3052b0306d ignore log files. 2009-04-15 23:34:44 +00:00
nekral-guest
1b0a6b20be Another bug came in the mean time. 2009-04-15 23:00:59 +00:00
nekral-guest
bce89b7cad - removed debian/patches/302_vim_selinux_support: Applied upstream. 2009-04-15 21:59:18 +00:00
nekral-guest
0a6760339d Added 3 tests for login. 2009-04-15 21:55:36 +00:00
nekral-guest
e379403368 Updated for 1:4.1.3.1. 2009-04-15 21:52:26 +00:00
nekral-guest
02cfa1e96e Added tests for IDs set to -1
long username for gpasswd
and system users with newusers.
2009-04-14 22:26:30 +00:00
nekral-guest
ae2a17ec1c * debian/login.defs: Update GID_MIN to 1000. This is more consistent with
UID_MIN, SYS_GID_MAX and the usage of the same ID for UID and GIDs. This
    should also be more consistent with the assignment of system group IDs
    starting from GID_MAX and going down.
2009-04-14 21:38:52 +00:00
nekral-guest
7b6b6a081f add a patch to update the nb translation (was not included in 4.1.3). 2009-04-14 20:51:58 +00:00
bubulle
a89ae2b415 Bug closure for nb translation 2009-04-12 17:49:14 +00:00
nekral-guest
f6b6e256d0 Fixed typo. 2009-04-12 02:53:21 +00:00
nekral-guest
95611179d1 This is more realistic to have a shell. 2009-04-12 02:26:17 +00:00
nekral-guest
a8fe4890d5 New locale: kk. Removed manpages: es. 2009-04-12 02:25:51 +00:00
nekral-guest
4c58978bf2 Added /usr/local/games to ENV_PATH on Debian 2009-04-12 02:24:44 +00:00
nekral-guest
d97b4164c7 Updated chage usage message. 2009-04-12 02:23:55 +00:00
nekral-guest
049e27557a New system ID allocation. 2009-04-12 02:23:18 +00:00
nekral-guest
11e7186926 * debian/login.defs: Added /usr/local/games/ to ENV_PATH (for regular
users). Closes: #487105
2009-04-12 00:53:09 +00:00
nekral-guest
40065af03f Removed debian/patches/431_su_uid_0_not_root (applied upstream). 2009-04-12 00:36:24 +00:00
nekral-guest
b30988f25e Removed patch applied upstream: 415_login_put-echoctl-back.
Tag #498788 as fixed
2009-04-12 00:19:35 +00:00
nekral-guest
99858683d0 Updated debian/patches/542_useradd-O_option for shadow 4.1.3. 2009-04-11 23:37:38 +00:00
nekral-guest
d3b0033664 * debian/securetty.linux: Removed devfs devices. Usage of devfs enabled
kernel in Lenny was not supported. Closes: #511961
2009-04-11 23:35:49 +00:00
bubulle
e1d86d97bb Updated changelog entry 2009-04-11 13:55:45 +00:00
nekral-guest
a1a7ad3bee Added tests for newusers. 2009-04-11 11:55:40 +00:00
nekral-guest
beb38aa933 Added test for newusers. 2009-04-11 11:36:33 +00:00
nekral-guest
a3a623daed Added tests for newusers. 2009-04-11 11:25:12 +00:00
nekral-guest
d2bd32ab51 Added new newusers tests. 2009-04-11 11:15:13 +00:00
nekral-guest
420463e136 Added new tests. Fixed alphabetical order. 2009-04-10 23:14:57 +00:00
nekral-guest
34cc1b4591 Do not create a passw.new file.
Remove those files.
2009-04-10 23:08:02 +00:00
nekral-guest
40f31fe111 Added new SHA256 test cases. 2009-04-10 23:05:41 +00:00
nekral-guest
66d1c537b8 Fix the tests for SHA256 and SHA512 passwords.
They were testing DES.
2009-04-10 23:00:50 +00:00
nekral-guest
0d5d805ba3 Added support for SHA256 and SHA512 tests. 2009-04-10 22:58:06 +00:00
nekral-guest
af0a5b3a7e Added tests for expiry. 2009-04-10 22:47:47 +00:00
nekral-guest
e6fdd218b5 Added tests for passwd. 2009-04-10 22:45:47 +00:00
nekral-guest
9c9b12ccfb Ignore log files. 2009-04-10 22:43:54 +00:00
nekral-guest
208cc24840 Ignore the log files. 2009-04-10 22:42:08 +00:00
nekral-guest
00fa6ffc89 Added existing tests. 2009-04-06 00:02:22 +00:00
nekral-guest
562ea47e66 Adde test for grpck. 2009-04-06 00:01:30 +00:00
nekral-guest
33d5f5d307 Added tests for pwck. 2009-04-05 23:59:24 +00:00
nekral-guest
7ab05204f9 Added test for chgpasswd. 2009-04-05 23:58:31 +00:00
nekral-guest
7ff74651d9 Added tests for chpasswd. 2009-04-05 23:57:26 +00:00
nekral-guest
b13dde1746 Tagged bugs already fixed upstream. 2009-04-05 23:53:53 +00:00
nekral-guest
5ef093d38e Fix the call to fsync. 2009-03-22 12:08:43 +00:00
nekral-guest
d56e6d08bc * debian/patches/401_cppw_src.dpatch: Call fsync before closing the backup
file descriptor. This ensures that the backup file will be available on
    the storage medium.
2009-03-21 20:40:52 +00:00
nekral-guest
b98c5149da The date changes everyday. Use @TODAY@ instead of the date when the test case was created. 2009-03-18 21:22:22 +00:00
nekral-guest
1ccdb08ab2 Ignore generated files. 2009-03-18 21:21:30 +00:00
nekral-guest
39553bc84a Ignore generated log files. 2009-03-18 21:13:07 +00:00
nekral-guest
2a3f424d3d Ignore generated log files. 2009-03-18 21:11:04 +00:00
nekral-guest
49db6466e1 Ignore generated log files. 2009-03-18 21:01:58 +00:00
nekral-guest
b09af63a5d Ignore generated log files. 2009-03-18 20:54:03 +00:00
nekral-guest
d9a24cc82c Ignore generated log files. 2009-03-18 20:53:16 +00:00
nekral-guest
ab1840c6d6 Ignore generated log files. 2009-03-18 20:34:58 +00:00
nekral-guest
14aaa22238 Ignore generated log files. 2009-03-18 20:30:37 +00:00
nekral-guest
e7bb558118 Ignore generated log files. 2009-03-18 20:29:21 +00:00
nekral-guest
bb269e44d7 ignore generated log files. 2009-03-18 20:27:20 +00:00
nekral-guest
2ad293e849 Ignore the generated log files 2009-03-18 20:25:34 +00:00
nekral-guest
e6bc2c9f9b Fix the exit sequence. 2009-03-18 15:19:44 +00:00
nekral-guest
af76777327 UPdated to new version. 2009-03-18 15:18:30 +00:00
nekral-guest
4d7b872d28 Fixed path of test newusers/29. 2009-03-18 15:17:18 +00:00
nekral-guest
bc66fb0ed3 Added the svn:executable property on the run_groupmems.exp scripts. 2009-03-18 15:13:10 +00:00
nekral-guest
a295dc0f1b Make sure no lock files remain after teh execution of each test.
Added invokation of new test cases.
2009-03-16 23:23:08 +00:00
nekral-guest
097d6864f7 Ignore the .svn directories in the config directories. 2009-03-16 23:21:15 +00:00
nekral-guest
b7bf03b161 Added interposition library necessary for the failures tests. 2009-03-16 23:20:43 +00:00
nekral-guest
7a78d9c181 Added new test cases. 2009-03-16 23:19:40 +00:00
nekral-guest
d548fe213b gshadow is removed anyway in this test. Make it a valid gshadow matching the group file. 2009-03-16 23:06:27 +00:00
nekral-guest
0423800e3e Fix typo. 2009-03-16 22:53:29 +00:00
nekral-guest
e98619c71c Make sure tests fail by exiting a non nul value. 2009-03-16 22:52:47 +00:00
nekral-guest
8f364eb05a Make sure tests fail by exiting a non nul value. 2009-03-16 22:48:45 +00:00
nekral-guest
0ca7b0bfb3 Added new test case. 2009-03-16 22:43:07 +00:00
nekral-guest
09b2603e32 Updated to new shadow version. 2009-03-16 22:37:02 +00:00
nekral-guest
cd0a2dd06d Added new test cases. 2009-03-16 22:32:32 +00:00
nekral-guest
d4931a4aef Updated to new shadow version. 2009-03-16 22:11:32 +00:00
nekral-guest
0b36e4e59f Fix logs. 2009-03-16 22:11:01 +00:00
nekral-guest
51c59171e4 Make sure tests fail by exiting a non nul value. 2009-03-16 22:08:42 +00:00
nekral-guest
474d525137 Added 2 new test cases. 2009-03-16 21:31:26 +00:00
nekral-guest
f0866cc1fb Intent of 14_useradd_out_of_range_UID.test was to test with UID=2**32, not 2**31. Although the limit for UIDs used to be 2**31-1. 2009-03-16 21:27:45 +00:00
nekral-guest
f4c395459d Updated to new shadow version. 2009-03-16 21:19:35 +00:00
nekral-guest
8f64322393 Added new tests. 2009-03-15 23:23:58 +00:00
nekral-guest
5e45536e26 Updated since it is not an error. 2009-03-15 23:13:32 +00:00
nekral-guest
a645f89697 When groupmod only changes the GID, gshadow is not touched and thus it is not required to lock gshadow. 2009-03-15 23:08:40 +00:00
nekral-guest
02e5dbd136 Updated to new shadow version. 2009-03-15 22:54:37 +00:00
nekral-guest
fd204abcae Make sure test fail by exiting a non nul value. 2009-03-15 22:50:11 +00:00
nekral-guest
9fb40391f8 Fix for new shadow version. 2009-03-15 22:37:49 +00:00
nekral-guest
6657ff38e5 Fix message. Did not end with a new line. 2009-03-15 22:36:21 +00:00
nekral-guest
43515a0924 Cleanup for current upstream SVN version. 2009-03-14 17:46:26 +00:00
nekral-guest
66c00bd2be - Translations
+ New Kazakh translation. Closes: #517809
2009-03-03 20:57:50 +00:00
nekral-guest
101469c265 * debian/securetty.linux: Added ttyPZ0, ttyPZ1, ttyPZ2, ttyPZ3 for PowerMac
machines.  Closes: #511739
2009-01-13 22:44:59 +00:00
nekral-guest
dbe74223ee Updated patches for upstream 4.1.3. 2008-09-14 14:10:48 +00:00
nekral-guest
9d3a7eb59a - Remove patches applied upstream (4.1.3):
+ debian/patches/200_Czech_binary_translation
      + debian/patches/302_remove_non_translated_polish_manpages
      + debian/patches/494_passwd_lock-no_account_lock
2008-09-14 14:02:45 +00:00
nekral-guest
21d6b34360 groupmems needs to be setuid, not setgid.
include common-auth and common-account instead of pam_permit.so
2008-09-14 13:52:21 +00:00
nekral-guest
da34d2eac4 Alphabetical order. 2008-09-14 12:28:42 +00:00
nekral-guest
f34f017160 Added missing file. 2008-09-14 12:23:07 +00:00
nekral-guest
0323eeb589 Some Polish manpages were removed. 2008-09-14 12:22:31 +00:00
nekral-guest
26d0bcb51f Updated error messages. 2008-09-14 12:21:19 +00:00
nekral-guest
c5d02f1f2f Updated error messages. 2008-09-14 12:20:52 +00:00
nekral-guest
3ccb21e2ff Updated error messages. 2008-09-14 12:20:15 +00:00
nekral-guest
fe497cb98e Updated error messages. 2008-09-14 12:19:00 +00:00
nekral-guest
557a602026 Updated error messages. 2008-09-14 12:17:29 +00:00
nekral-guest
57d512829c Updated error messages. 2008-09-14 12:16:10 +00:00
nekral-guest
d7e3907ab6 Update for the new error messages. 2008-09-14 12:09:57 +00:00
nekral-guest
6d4f30fbeb Added tests for groupmems. 2008-09-14 11:55:34 +00:00
nekral-guest
f7ea46fe79 - Remove patches applied upstream:
+ debian/patches/301_manpages_missing_options
2008-09-13 17:53:56 +00:00
nekral-guest
1c142ff073 - Remove patches applied upstream:
+ debian/patches/300_SHA_crypt_method
2008-09-13 17:52:09 +00:00
nekral-guest
6edf9089ec - Remove patches applied upstream:
+ debian/patches/414_remove-unwise-advices
2008-09-13 17:50:46 +00:00
nekral-guest
af8755d005 - Remove patches applied upstream:
+ debian/patches/406_vipw_resume_properly
2008-09-13 17:49:05 +00:00
nekral-guest
0c13397839 - Remove patches applied upstream:
+ debian/patches/487_passwd_chauthtok_failed_message
2008-09-13 17:46:57 +00:00
nekral-guest
ec60f91bc5 - Remove patches applied upstream:
+ debian/patches/491_configure.in_friendly_selinux_detection
2008-09-13 17:45:51 +00:00
nekral-guest
1e73fef46e 454_userdel_no_MAIL_FILE was wrong. 2008-09-13 17:42:43 +00:00
nekral-guest
469a214650 Removed 434_login_stop_checking_args_after-- (applied upstream) 2008-09-13 17:42:04 +00:00
nekral-guest
d638e563b6 - Remove patches applied upstream:
+ debian/patches/434_login_stop_checking_args_after--
2008-09-13 17:41:18 +00:00
nekral-guest
ae59303366 * debian/patches/900_testsuite_groupmems, debian/patches/901_testsuite_gcov:
Added patches, only intended to be used in the testsuite.
2008-09-13 17:38:04 +00:00
nekral-guest
291b61a6c3 428_grpck_add_prune_option updated for upstream version 4.1.2. 2008-09-13 17:33:52 +00:00
nekral-guest
515dbe2f9a Fixed typo. 2008-09-13 17:32:52 +00:00
nekral-guest
f1fd47e349 * debian/patches/402_cppw_selinux: Add SE Linux support for cppw / cpgr. 2008-09-13 17:29:48 +00:00
nekral-guest
d181848c75 * debian/patches/454_userdel_no_MAIL_FILE: Patch removed. If MAIL_FILE is
defined, the mailbox is not in MAIL_SPOOL_DIR.
2008-09-13 17:27:12 +00:00
nekral-guest
c0dda226c3 507_32char_grnames.dpatch updated for upstream version 4.1.2. 2008-09-13 17:24:05 +00:00
nekral-guest
7c0c287396 429_login_FAILLOG_ENAB updated for upstream version 4.1.2. 2008-09-13 17:23:17 +00:00
nekral-guest
6232365cea 008_login_log_failure_in_FTMP updated for upstream version 4.1.2. 2008-09-13 17:22:30 +00:00
nekral-guest
455c9e8673 302_vim_selinux_support updated for upstream version 4.1.2. 2008-09-13 17:21:50 +00:00
nekral-guest
3c064bcebb 008_su_get_PAM_username updated for upstream version 4.1.2. 2008-09-13 17:21:05 +00:00
nekral-guest
3152fbd0d2 494_passwd_lock-no_account_lock updated for upstream 4.1.2.
Mention that it is fixed in 4.1.3.
2008-09-13 17:19:29 +00:00
nekral-guest
560095862a Indicate the upstream version where the fix will be present. 2008-09-13 17:18:07 +00:00
nekral-guest
126500c911 * debian/patches/504_undef_USE_PAM.dpatch: USE_PAM needs to be undef after
inclusion of "defines.h".
  * added note about current upstream.
2008-09-13 17:17:21 +00:00
nekral-guest
855c092543 Fixed typo in a comment. 2008-09-13 17:14:42 +00:00
nekral-guest
b705ca4d97 A configure option was added upstream. To be tested with 4.1.3. 2008-09-13 17:13:59 +00:00
nekral-guest
9fc3874093 * debian/patches/506_relaxed_usernames: Use an extra paragraph for the note
on username with a '/'.
2008-09-13 17:11:22 +00:00
nekral-guest
e780891e11 200_Czech_binary_translation updated for upstream version 4.1.2. 2008-09-13 17:09:44 +00:00
nekral-guest
22278063de 579_chowntty_debug updated for upstream version 4.1.2. 2008-09-13 17:09:06 +00:00
nekral-guest
edde4d731d Updated for upstream version 4.1.2. 2008-09-13 17:06:57 +00:00
nekral-guest
30c5ceb601 Updated for upstream version 4.1.2. 2008-09-13 17:04:57 +00:00
nekral-guest
22a26e92e4 debian/patches/505_useradd_recommend_adduser was already included in 1:4.1.1-2 2008-09-13 17:02:03 +00:00
nekral-guest
2d5f7a20d7 Merge changes from the lenny branch:
svn merge svn://svn.debian.org/svn/pkg-shadow/debian/branches/lenny@2000 svn//svn.debian.org/svn/pkg-shadow/debian/branches/lenny@2271 svn://svn.debian.org/svn/pkg-shadow/debian/trunk
Previous changes moved to 4.1.2-1 (experimental).
2008-08-31 19:16:54 +00:00
nekral-guest
8d682b7f61 Remove the transition proposal email for bug 276419.
The transition is now over one year.
2008-05-24 19:20:33 +00:00
bubulle
39c3a9c268 Versioned Replaces on manpages-tr 2008-04-22 20:54:58 +00:00
nekral-guest
510226f810 * The "Brie de Meaux" and "Brie de Melun" double cheese release.
* debian/patches/505_useradd_recommend_adduser: Fix typo: userdel is used
  to remove an user, not to add one. Closes: #475795
2008-04-13 21:21:00 +00:00
bubulle
0db4a29c22 Simplify Replaces by dropping all pre-Etch versions 2008-04-07 21:11:46 +00:00
bubulle
e5dd164814 Versioned Replaces on manpages-zh after 1.5.1-1 upload of that package 2008-04-07 21:05:22 +00:00
nekral-guest
a80f47a81d Add a cheesy check. 2008-04-04 19:43:33 +00:00
nekral-guest
40461f86ed Remove debian/passwd.postrm, which is now empty. Thanks lintian. 2008-04-03 00:03:20 +00:00
nekral-guest
5a1749e06e Alphabetical order. 2008-04-02 23:31:31 +00:00
nekral-guest
7500d0ec1c Prepare the 1:4.1.1-1 release.
Add a Homepage field.
2008-04-02 23:29:34 +00:00
bubulle
6da3c2ba7f German translation update 2008-04-01 19:01:46 +00:00
bubulle
4fa62a74e2 Bug closure for basque translation update 2008-03-31 17:55:24 +00:00
bubulle
5901e73a95 Add bug closure 2008-03-30 12:20:40 +00:00
nekral-guest
79081455e3 Really Update the link to the new repository layout and Add a Vcs-Browser field. 2008-03-29 13:34:40 +00:00
nekral-guest
73fe74c374 Change XS-X-Vcs-Svn to Vcs-Svn. Update the link to the new repository
layout.  Add a Vcs-Browser field.
2008-03-29 12:19:03 +00:00
nekral-guest
d56b246d1b The Slovak translation was also updated upstream. This closes #471802. 2008-03-28 23:25:04 +00:00
nekral-guest
792ea0fa66 4.1.1 also fixes 445484:
Option --password added to groupadd / groupmod (like useradd / usermod).
2008-03-28 21:52:11 +00:00
nekral-guest
42f0bdb7aa Added ttyUSB0, ttyUSB1, ttyUSB2, and MPC5200 serial ports (ttyPSC0,
ttyPSC1, ttyPSC2, ttyPSC3, ttyPSC4, ttyPSC5).  Closes: #461374
2008-03-28 21:40:18 +00:00
nekral-guest
eeccfb8f62 The passwd's Replaces on manpages-de can be versionned again. The su(1) manpage was removed from manpages-de. 2008-03-28 21:00:26 +00:00
nekral-guest
90895612f1 There's no need for a dependency on login (now that it is unversionned; see above) in the passwd package. 2008-03-28 20:46:03 +00:00
nekral-guest
c284183a26 Continue the dependencies cleanup:
libpam-runtime (>= 0.76-14) was already provided by libpam-runtime in Sarge (now oldstable).
2008-03-28 20:42:40 +00:00
nekral-guest
bf4b725f01 Move the dependency on libpam-modules from Depends to Pre-Depends. The
login package is Essential, and without libpam-modules, login or su are
not functional. Thanks to Steve Langasek for pointing this out.
2008-03-28 20:33:32 +00:00
nekral-guest
20de595e37 Simplify the dependencies:
login (>= 970502-1) was already provided by login in Hamm.
libpam-modules (>= 0.72-5) was already provided by libpam-modules in Potato.
2008-03-28 20:18:50 +00:00
bubulle
92ff2a501d Italian translation update: bug closure 2008-03-27 18:57:31 +00:00
nekral-guest
6aec5248e8 New upstream will also fix #472575 2008-03-26 22:04:49 +00:00
bubulle
dbecb8a7c0 Bug closure for the Russian translation update 2008-03-24 18:35:04 +00:00
bubulle
61fb780f5c Mark Debian bugs for l10n as closed by the new upstream upload 2008-03-23 08:42:44 +00:00
nekral-guest
ac4b6af8e9 Do not recode the manpages in UTF-8. 2008-03-19 21:26:12 +00:00
nekral-guest
5f027bb6a4 Fix other dpkg-shlibdeps warnings. 2008-03-19 21:24:15 +00:00
nekral-guest
c53557d535 407_adduser_disable_PUG_with-n was applied upstream. 2008-03-19 20:26:36 +00:00
nekral-guest
afce34ff40 Updated patch to 4.1.1 2008-03-19 20:24:54 +00:00
nekral-guest
312f23ab50 Updated patches to 1.1.1 2008-03-19 20:23:42 +00:00
nekral-guest
93933b959d Updated patch for 1.1.1 2008-03-19 20:19:49 +00:00
nekral-guest
5af0050d0a 412_lastlog_-u_numerical_range was applied upstream. 2008-03-19 19:30:30 +00:00
nekral-guest
993f5134fd 408_passwd_check_arguments was applied upstream. 2008-03-19 19:25:51 +00:00
nekral-guest
89e6ca0d7e 496_login_init_session was applied upstream. 2008-03-19 19:20:38 +00:00
nekral-guest
7857beaf95 480_getopt_args_reorder was applied upstream. 2008-03-19 18:47:33 +00:00
nekral-guest
86aaea0978 466_fflush-prompt was applied upstream. 2008-03-19 18:45:41 +00:00
nekral-guest
8779ad5ec2 Support for -r, --system was added upstream. (467_useradd_-r_LSB) 2008-03-19 18:43:46 +00:00
nekral-guest
eb2337b2c7 462_warn_to_edit_shadow was applied upstream. 2008-03-19 18:41:31 +00:00
nekral-guest
ac972ba6fb 451_login_PATH was applied upstream. 2008-03-19 18:39:15 +00:00
nekral-guest
e8f45d238f 451_login_PATH was applied upstream. 2008-03-19 18:38:28 +00:00
nekral-guest
d27a65e33b Prepare next release.
Indicate bugs fixed in the new upstream release.
2008-03-19 18:37:09 +00:00
nekral-guest
0c6a55969e Fix tests data that depend on the date of execution. 2008-03-19 18:18:21 +00:00
nekral-guest
b3acd37d6d Added debug to find out what happens when it fails. 2008-03-19 18:16:56 +00:00
nekral-guest
99c78a4ae3 The behavior of useradd changed for the creation of groups. Now it
respects GID_MAX.
2008-03-19 18:14:32 +00:00
nekral-guest
ffddc3dbf8 Ad cleanup of tmp/out. 2008-03-19 18:13:25 +00:00
nekral-guest
aaa2195044 Add cleanup of tmp/out. 2008-03-19 18:13:12 +00:00
nekral-guest
9c9b24acaa Print the UID, then the GID. 2008-03-19 18:12:13 +00:00
nekral-guest
bebb89c93b Update to new newusers behavior:
* users are not added automatically to the list of supplementary groups
 * newusers use the same algorithm as useradd to define the new UIDs.
2008-03-09 01:59:59 +00:00
nekral-guest
b53ea15a4d Added tests for the split group feature (MAX_MEMBERS_PER_GROUP). 2008-03-09 00:20:48 +00:00
nekral-guest
a2054f9a9d Added tests for pwconv and pwunconv. 2008-03-09 00:18:07 +00:00
nekral-guest
ed328dc03c Added tests for groupdel. 2008-03-09 00:14:34 +00:00
nekral-guest
f3b4069ba4 Remove generated file. 2008-03-09 00:14:11 +00:00
nekral-guest
dac2b189c2 More tests for pwck and grpck. 2008-03-08 13:21:38 +00:00
nekral-guest
3f9037b282 Add tests for pwck and grpck. 2008-03-08 13:08:37 +00:00
nekral-guest
d4f56275e5 Fix typos groupadd -> groupmod. 2008-03-08 13:04:30 +00:00
nekral-guest
062eb42fd4 Added groupmod tests. 2008-03-08 11:03:49 +00:00
nekral-guest
9768aa54f9 Added groupadd tests. 2008-03-08 11:03:07 +00:00
nekral-guest
326c956bcd Added tests for groupadd. 2008-03-07 20:34:33 +00:00
nekral-guest
49c32e7ec1 Remove tm pdirectory. 2008-02-28 18:46:30 +00:00
nekral-guest
c8f4e36ebf Fix cut&paste typos. 2008-02-28 18:46:04 +00:00
nekral-guest
57d3f9fa83 Quote the salt because it may be an '*' and is expanded to filenames. 2008-02-27 00:27:18 +00:00
nekral-guest
aeae21cf6e Add 59 tests for gpasswd. 2008-02-27 00:02:18 +00:00
nekral-guest
857a615e2c Added watch file. 2008-02-24 17:36:57 +00:00
nekral-guest
7df22c6930 Added new usermod test: usermod can move the user's home directory, over a
new device and changes the owner of the user's file.
2008-02-17 17:09:42 +00:00
nekral-guest
d83880777a Added new usermod test: usermod checks if the uid is valid. 2008-02-17 17:05:17 +00:00
nekral-guest
f490e1a144 Added new usermod test: usermod can change the user's UID to an existing
UID (with -o).
2008-02-17 17:02:48 +00:00
nekral-guest
27ed5d04f7 Fix comment. 2008-02-17 17:02:03 +00:00
nekral-guest
98b7858e66 Added new usermod test: usermod tests if the new user's UID is already used. 2008-02-17 17:00:50 +00:00
nekral-guest
9c0339d436 Fix config description. 2008-02-17 16:58:46 +00:00
nekral-guest
48537b4957 Added new usermod test: usermod can change the user's UID. 2008-02-17 16:57:06 +00:00
nekral-guest
4146176c08 Added new usermod test: usermod -l fails if the gshadow file is locked. 2008-02-17 16:54:32 +00:00
nekral-guest
33ba4c0628 Added new usermod test: usermod -l fails if the group file is locked. 2008-02-17 16:53:05 +00:00
nekral-guest
3cf7c19a56 Added new usermod test: usermod -c does not check if the gshadow file is locked. 2008-02-17 16:49:21 +00:00
nekral-guest
29f48bafae Added new usermod test: usermod -c does not check if the group file is
locked.
2008-02-17 16:37:31 +00:00
nekral-guest
57da5c1045 Added new usermod test: usermod -G checks if the gshadow file is locked. 2008-02-17 16:34:38 +00:00
nekral-guest
897f8481b2 Added new usermod test: usermod -G checks if the shadow file is locked. 2008-02-17 16:33:29 +00:00
nekral-guest
2d428c52c9 Added new usermod test: usermod -G checks if the group file is locked. 2008-02-17 16:31:11 +00:00
nekral-guest
9d4c337ca1 Added new usermod test: usermod -G checks if the passwd file is locked. 2008-02-17 16:27:47 +00:00
nekral-guest
dfff7d3cfe Added new usermod test: usermod renames the user when requested to add an
user to a group it is already a member and to rename this user.
2008-02-17 16:14:58 +00:00
nekral-guest
67ac228c4a Added new usermod test: usermod does not fail when requested to add the
user to a group it is already a member.
2008-02-17 15:54:10 +00:00
nekral-guest
9e4d6448e6 Added new usermod test: usermod rename the user in the lists of members
and uses the right username when adding the user to supplementary groups.
2008-02-17 15:46:27 +00:00
nekral-guest
1cbb3cc320 Added new usermod test: usermod rename the user in the lists of members,
when an user is renamed with -l.
2008-02-17 15:43:32 +00:00
nekral-guest
30d2b24f04 Added new usermod test: usermod fails if asked to add an user to an
unknown numerical group.
2008-02-17 14:50:55 +00:00
nekral-guest
202fb5c463 Added new usermod test: usermod fails if asked to add an user to an
unknown named group.
2008-02-17 14:46:49 +00:00
nekral-guest
c203282681 Added new usermod test: usermod can change the list of supplementary
groups, with numerical groups.
2008-02-17 13:57:07 +00:00
nekral-guest
1937662816 Added new usermod test: usermod can clear the list of supplementary groups. 2008-02-17 13:53:24 +00:00
nekral-guest
d8b44cb331 Added new usermod test: usermod can change the list of supplementary groups. 2008-02-17 13:49:43 +00:00
nekral-guest
4399f64323 Added new usermod test: usermod keeps links or devices when it moves the
user's home directory.
2008-02-17 13:36:39 +00:00
nekral-guest
d17cbbac9f Added new usermod test: usermod does not move non-directory (regular file). 2008-02-17 13:25:52 +00:00
nekral-guest
d073acd750 12_usermod_move_homedir_dev_null test-case tests that usermod does not
move devices (/dev/null).
2008-02-17 13:25:13 +00:00
nekral-guest
1f7ad41762 Added new usermod test: usermod does not move non-directory. 2008-02-17 13:16:30 +00:00
nekral-guest
319a16fc84 Added new usermod test: usermod can move the user's home directory. 2008-02-17 13:05:07 +00:00
nekral-guest
6790d09e85 Added new userdel test: userdel does not delete the user's home directory
if it is not owned by the user.
2008-02-17 12:59:45 +00:00
nekral-guest
de17d213b2 Added new userdel test: userdel can delete the user's home directory. 2008-02-16 17:02:33 +00:00
nekral-guest
e1f8184dc3 Added new userdel test: userdel removes the user from lists in /etc/group
and /etc/gshadow.
2008-02-16 16:26:37 +00:00
nekral-guest
91a8f30a61 Added new userdel test: userdel removes the user from the admins lists of
/etc/gshadow.
2008-02-16 16:00:57 +00:00
nekral-guest
c155f2e39f Added new userdel test: userdel removes the user from the member lists of
/etc/gshadow.
2008-02-16 15:46:40 +00:00
nekral-guest
51f7bfdfde Added new userdel test: userdel removes the user from the member lists of
/etc/group.
2008-02-16 15:22:08 +00:00
nekral-guest
7fb73b155e Added tests to the automatic test suite:
usertools/01/17_useradd_create_homedir.test
  usertools/01/18_userdel_remove_homedir.test
  usertools/01/19_userdel_delete_user_in_group.test
  usertools/01/20_usermod_change_homedir.test
  usertools/01/21_usermod_change_and_move_homedir.test
  usertools/01/22_usermod_new_groups.test
  usertools/01/23_usermod_add_groups.test
  usertools/01/24_usermod_new_groups_remove_old_groups.test
2008-02-16 14:39:19 +00:00
nekral-guest
b088dfeff4 Added new newusers test: newusers can update the password of an existing
user with a pre-encrypted password.
2008-02-16 14:25:23 +00:00
nekral-guest
1dbaebde63 Add last three tests:
newusers/37_create_user_encrypt_MD5/newusers.test
 newusers/38_update_password_no_shadow_encrypted/newusers.test
 newusers/39_update_password_no_shadow_password_encrypted/newusers.test
2008-02-16 14:20:56 +00:00
nekral-guest
1023d83acd Added new newuser test: newusers can update the password of an existing
user with a pre-encrypted password, when this user has no shadow entry.
2008-02-16 14:16:49 +00:00
nekral-guest
d07207326e Added new newuser test: newusers can update the password of an existing
user in the passwd file, with a pre-encrypted password.
2008-02-16 14:11:43 +00:00
nekral-guest
2697c9817e Added new newuser test: newusers can encrypt the passwords with the MD5
algorithm.
2008-02-16 14:06:47 +00:00
nekral-guest
159fbaacc0 Added new newuser test: newusers can create a new user, and provide an
already encrypted password.
2008-02-11 22:46:08 +00:00
nekral-guest
f276efcb29 Added new newuser test: newusers can read the list from stdin. 2008-02-11 22:43:23 +00:00
nekral-guest
9300464b43 Added new newuser test: newusers can update the password of an existing
user, when there is no shadow file.
2008-02-11 22:42:01 +00:00
nekral-guest
52635a7d74 Added new newuser test: newusers can update the password of a user which
does not exist in shadow.
2008-02-11 22:37:17 +00:00
nekral-guest
e47fc28584 Added new newuser test: newusers fails if a user references a group which
exist in gshadow and not in group.
2008-02-11 22:33:46 +00:00
nekral-guest
37385ee60d dded new newuser test: newusers fails with invalid GID. 2008-02-11 22:29:35 +00:00
nekral-guest
7b44b22213 Added new newuser test: newusers can create a new user and new group with
different names.
2008-02-11 22:19:33 +00:00
nekral-guest
fa2b2e905d Added new newuser test: newusers fails if the groupname is invalid. 2008-02-11 22:10:07 +00:00
nekral-guest
494e15df37 Added new newuser test: newusers fails if the username is invalid. 2008-02-11 22:04:57 +00:00
nekral-guest
851446c287 Added new newuser test: newusers fails when there are no more available GIDs. 2008-02-11 22:01:32 +00:00
nekral-guest
0d183e6b94 Added new newuser test: newusers fails when there are no more available UIDs. 2008-02-11 21:52:56 +00:00
nekral-guest
ffe583db50 Added new newuser test: newusers fails with invalid UID. 2008-02-11 21:41:42 +00:00
nekral-guest
fffcc837ac Added new newuser test: newusers fails with negativ UID. 2008-02-11 21:38:56 +00:00
nekral-guest
1712aa91e9 Added new newuser test: newusers reuses a lower GID when GID_MAX is used. 2008-02-11 21:30:59 +00:00
nekral-guest
ee5bd9c521 Rewrite rational: newusers reuses a lower UID when UID_MAX is used. 2008-02-11 21:30:29 +00:00
nekral-guest
25b03d8cd7 Added new newuser test: newusers does not increment the UID when UID_MAX is used. 2008-02-11 21:25:06 +00:00
nekral-guest
4473bc6264 Added new newuser test: newusers can add multiple users. 2008-02-11 21:20:02 +00:00
nekral-guest
7be39fc4aa Added missing execution of 19_update_keep-old-home. 2008-02-11 21:11:50 +00:00
nekral-guest
f4d0f69e35 Added new grpunconv test: grpunconv checks if the gshadow file is locked. 2008-02-11 21:07:16 +00:00
nekral-guest
afabc3beb8 Added new grpunconv test: grpunconv checks if the group file is locked. 2008-02-11 21:06:13 +00:00
nekral-guest
7bbe585f1e Added new grpunconv test: grpunconv exits successfully when the gshadow
file does not exist.
2008-02-11 20:59:31 +00:00
nekral-guest
3ff563252e Added new grpconv test: grpconv tests if gshadow is locked. 2008-02-11 20:50:56 +00:00
nekral-guest
5b6ed9c678 Added new grpconv test. 2008-02-11 20:46:47 +00:00
nekral-guest
f9a23b8f67 Added new grpconv test. 2008-02-11 20:43:50 +00:00
nekral-guest
b140a0da35 Added new grpconv test. 2008-02-11 20:20:44 +00:00
nekral-guest
676f702362 Added new grpconv test. 2008-02-11 20:12:19 +00:00
nekral-guest
1beaa67010 Added new grpconv test. 2008-02-11 20:03:47 +00:00
nekral-guest
f7679480e6 Re-indent. 2008-02-11 19:48:56 +00:00
nekral-guest
3354e2dce7 Do not fail if the expected user is not present in the file, give an
useful warning.
2008-02-11 19:47:53 +00:00
nekral-guest
ca42fa251a Accept password file with multiple password specified as @PASS_MD5 ...@ 2008-02-11 19:46:33 +00:00
nekral-guest
bab3f92304 Accept password file with multiple password specified as @PASS_DES ...@ 2008-02-11 19:44:02 +00:00
nekral-guest
9b9f463b8f Remove the temporary files to permit the automatic tmp cleanup. 2008-01-30 21:15:23 +00:00
nekral-guest
3d84c8c91c Add tests for newusers 2008-01-29 22:12:45 +00:00
bubulle
54e3d28428 Prepare for release 2008-01-13 17:53:41 +00:00
bubulle
0a21c2438e Unversion the conflict with manpages-de, hopefully temporarily 2008-01-13 11:53:50 +00:00
bubulle
5a9ea180fa Release 4.1.0-1 2008-01-12 22:47:40 +00:00
nekral-guest
f77c7d061f Add script to generate coverage analysis of the testsuite. 2008-01-12 17:33:09 +00:00
nekral-guest
02d1ba5c99 Add the crypt tests. 2008-01-12 17:19:39 +00:00
nekral-guest
106a7a690c Fix test name. 2008-01-12 17:19:00 +00:00
bubulle
c3d6c6d5ce Update to Standards 3.7.3 2008-01-12 15:54:32 +00:00
nekral-guest
b2b7993cd0 Add tests for the different crypt methods (and different way to specify
which one shall be used).
2008-01-12 15:49:28 +00:00
nekral-guest
89c07802de Add common utility to compare the password and group files (with support
of variable data (password salt, date, etc.))
2008-01-12 15:47:10 +00:00
nekral-guest
285046bd1e Update the list of su and usertools tests. 2008-01-12 15:44:40 +00:00
nekral-guest
41d38991df Test usage of the default values from etc/default/useradd when an user is
created.
2008-01-12 15:43:37 +00:00
nekral-guest
517cc9fd79 Test setting of default values in useradd.default.
Start with different default values (compared to usertools/02)
2008-01-12 15:38:59 +00:00
nekral-guest
8b991cdd58 Add tests to test the options used to set the default values in the
useradd.default file.
2008-01-12 15:18:12 +00:00
nekral-guest
b1487cf3e6 Switch to the new infrastructure and split the old test in more atomic
tests.
2008-01-12 15:10:58 +00:00
nekral-guest
e158a89d37 Switch to the new config infrastructure. 2008-01-12 15:08:54 +00:00
nekral-guest
632a264077 Test the default ENV_SUPATH and ENV_PATH.
Same tests as su/08, with commented ENV_SUPATH and ENV_PATH in login.defs.
2008-01-12 14:38:01 +00:00
nekral-guest
201d2b1608 Same tests as su/02, with a different config. 2008-01-12 14:36:02 +00:00
nekral-guest
a48e84f0d6 Check non-log of successful su with SYSLOG_SU_ENAB set to "no". 2008-01-12 14:23:07 +00:00
nekral-guest
90b05a2679 Check log of successful su. 2008-01-12 14:22:06 +00:00
nekral-guest
36f46d4dfb Test identical to 04, with SYSLOG_SU_ENAB set to "no". 2008-01-12 14:15:07 +00:00
nekral-guest
4a57055073 Add tests to check the report and log of errors. 2008-01-12 14:05:04 +00:00
nekral-guest
e7ffab6b8e Add the new su/03 tests. 2008-01-12 13:38:45 +00:00
nekral-guest
46b0cb2db2 Split the test script in more atomic tests. 2008-01-12 13:25:11 +00:00
nekral-guest
bd4b7d0c23 Move to the new config infrastructure. 2008-01-12 13:23:19 +00:00
bubulle
960b18e52e Patches refreshed for 4.1.0 2008-01-12 13:17:04 +00:00
nekral-guest
dfcdbb7db5 Improve the securetty config file for Linux:
Add ttyS1. Better comments for the ttyS and xen consoles. Add a note for
the devfs consoles. They are no more needed for most users. Closes:
#454584. Thanks to Bastian Blank.
2008-01-11 22:26:27 +00:00
nekral-guest
dd712a6184 Update the list of tests. 2008-01-06 20:37:20 +00:00
nekral-guest
e4d00c832f Split run.exp and run.exp2 in separate tests for each
options/combinations.
2008-01-06 20:34:19 +00:00
nekral-guest
4cff2127e3 Switch to the new config file infrastructure. 2008-01-06 20:21:47 +00:00
nekral-guest
837e8bcd05 Updated tests to the new infrastructure. 2008-01-06 20:16:25 +00:00
nekral-guest
edb3448880 New config infrastructure. The config directory will be copied in the root
directory of the chroot, and the overwritten files will be restored at the
end of the test.
2008-01-06 20:02:39 +00:00
nekral-guest
2c6ecc3e02 Split run in 2 tests su to root and su to user. 2008-01-06 19:58:46 +00:00
nekral-guest
06f7f0d87f Added comments for the test log. 2008-01-06 19:55:54 +00:00
nekral-guest
80dcfd6690 Add default failure target if one step times out. 2008-01-06 19:53:47 +00:00
nekral-guest
f6249fb88a Fix script name in its usage. 2008-01-06 19:53:09 +00:00
nekral-guest
bb9ad48e4f Add language extension for run_su (run_su.exp). 2008-01-06 19:52:18 +00:00
nekral-guest
6cde8339cf Add helpers for an updated test infrastructure (handling of the chroot's
configuration).
2008-01-06 19:49:24 +00:00
nekral-guest
de62c3d005 Use unified diff for readability of the testsuite log. 2008-01-06 19:41:22 +00:00
nekral-guest
54d8487fe3 There is now a German su.1 manpage. 2008-01-06 19:40:19 +00:00
nekral-guest
cf35478f4d The usage strings now use spaces instead of tabs. 2008-01-06 19:38:29 +00:00
nekral-guest
1c33a0b2e5 Added needed empty line at the end of the testsuite.
Added comments.
2008-01-06 19:36:19 +00:00
nekral-guest
5c207aa3ac Provide progress information. 2008-01-06 19:34:50 +00:00
nekral-guest
fe6fa70efe Use one log file per test. This should ease the debugging.
The big testsuite.log is kept.
2008-01-06 19:32:49 +00:00
nekral-guest
abbf45f14f Make sure the messages of tools will not be localized in the testsuite. 2008-01-06 19:31:28 +00:00
nekral-guest
e3e826734c The only remaining chunk of 419_time_structures.dpatch was coming from
008_login_log_failure_in_FTMP.
Fix 008_login_log_failure_in_FTMP, and remove 419_time_structures.dpatch
2008-01-04 20:28:51 +00:00
nekral-guest
17026efc75 I finally reviewed 419_time_structures.dpatch, and it needs to be applied.
One chunk was not applied upstream.
2008-01-04 19:59:42 +00:00
nekral-guest
41a6258033 479_chowntty_debug is Debian specific (additional debugging to find a
non-reproducible bug).
2008-01-03 20:21:55 +00:00
nekral-guest
191be4c39f #454485 was also fixed upstream in 4.1.0 2008-01-03 20:15:17 +00:00
nekral-guest
09e267dad4 Remove Debian patches already applied in 4.1.0 (already marked as such in
the changelog and in the patches).
2007-12-26 14:56:06 +00:00
nekral-guest
459433e461 Upstream changed from tabulations to spaces in the Usage strings. 2007-11-27 18:59:51 +00:00
nekral-guest
5ec74ab450 Upstream moved from getpwnam to xgetpwnam. 2007-11-27 18:59:14 +00:00
nekral-guest
40d644c1b5 Yuri Kozlov also completed the manpages translation! 2007-11-22 00:16:36 +00:00
nekral-guest
11194f7e88 The updated Russian translation was committed upstream. 2007-11-22 00:07:16 +00:00
nekral-guest
9dcb747e52 compile with -W -Wall
large files are now supported by configure. Remove
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 from
CFLAGS.
2007-11-20 19:10:16 +00:00
nekral-guest
ab9d319d06 Updated to current upstream. 2007-11-20 19:04:43 +00:00
nekral-guest
8b6415c8cb Fix typo in documentation. 2007-11-20 19:04:01 +00:00
nekral-guest
5e1e47c89f Fix warning when compiled with -W -Wall. 2007-11-20 19:03:18 +00:00
nekral-guest
a1bb0a0c36 Fix typo. 2007-11-20 19:02:34 +00:00
nekral-guest
9765bc4a11 MD5_CRYPT_ENAB is back in login.defs to define the default crypt
algorithm. It is tagged as deprecated and ENCRYPT_METHOD is
recommended instead. New algorithms are also available.
Closes: #447747
2007-11-20 19:01:56 +00:00
nekral-guest
3bc2c036d4 Tag patches as fixed in the next release.
Next release will be 4.1.0-1.
#451518 and #451521 will also be closed by this new release.
2007-11-20 18:54:58 +00:00
nekral-guest
d0aa0033ee This patch was committed upstream. 2007-11-10 15:52:09 +00:00
bubulle
6d31d38571 4.0.18.2-1 released 2007-10-30 18:40:52 +00:00
nekral-guest
2e741e5948 New location for the upstream releases. 2007-10-28 18:12:44 +00:00
nekral-guest
8af99d4da2 Replace #bug_not_yet_reported_by_Sesse by an explanation about why audit
support was removed.
2007-10-28 17:47:16 +00:00
nekral-guest
6e28c75c09 Remove old patches. 2007-10-28 17:46:08 +00:00
nekral-guest
164c2b24bf Updated patches for 4.0.18.2:
* 409_man_generate_from_PO
   There is an Italian PO. Patch the Italian Makefile
 * 397_non_numerical_identifier
   usermod was patched. useradd is not patched yet.
2007-10-28 17:17:48 +00:00
nekral-guest
c6f0bda817 Update patches for 4.0.18.2 2007-10-28 17:15:48 +00:00
nekral-guest
8ebce60492 Updated patch. New ident information. 2007-10-28 17:12:43 +00:00
nekral-guest
52af2aa829 Update for 4.0.18.2.
Simplification of the patch. Prefer maintainability to indentation.
2007-10-28 17:07:45 +00:00
nekral-guest
62a24d7d0b Update patches (offsets only). 2007-10-28 17:02:44 +00:00
nekral-guest
a0d0068f7d 499_gettext-0.15 removed because upstream is built with gettext 0.16.
Remove other patches which are no more needed (because they are already applied).
2007-10-28 16:56:38 +00:00
bubulle
b2a73af945 We do not close the Xen console bug as it was closed by xen-tools upload(?) 2007-10-28 08:45:34 +00:00
bubulle
75ee1ef03b #448233 is also closed by next upstream 2007-10-28 08:43:58 +00:00
nekral-guest
9df5820cb5 Mark 442334 as being fixed in 4.0.18.2 2007-10-27 19:47:20 +00:00
nekral-guest
1e502d5cbc The next version will be 4.0.18.2.
Indicate that this release fixes #445480.
2007-10-27 14:01:01 +00:00
bubulle
e4feaa023e Patch 438 is applied 2007-10-27 13:51:33 +00:00
bubulle
e895c05aa3 Patch 433 is applied upstream 2007-10-27 13:45:39 +00:00
nekral-guest
21a85fb04a Fix a typo. Thanks to Justin Pryzby. Closes: #447757 2007-10-27 13:15:50 +00:00
bubulle
cf467c52af Merged upstream 2007-10-27 13:13:54 +00:00
bubulle
4442be02f7 404 is applied upstream 2007-10-27 13:05:47 +00:00
bubulle
1ed4974bf0 Patch 402 is applied upstream 2007-10-27 13:01:54 +00:00
bubulle
32d29775bc Applied upstream 2007-10-27 12:57:50 +00:00
bubulle
d0e332f49c Tag patches as fixed in upstream repository 2007-10-27 12:55:25 +00:00
nekral-guest
39beb1da3a 105_zn_CN was just applied to upstream repository.
Tag 104_man-sv, 101_ja, and 103_man-de as going to be fixed in 4.0.18.2.
2007-10-27 12:51:13 +00:00
10231 changed files with 407172 additions and 38555 deletions

3
.gitignore vendored
View File

@@ -17,6 +17,8 @@ Makefile.in
/ABOUT-NLS
/aclocal.m4
/autom4te.cache
/compile
/config.cache
/config.guess
/config.h
/config.h.in
@@ -44,4 +46,5 @@ Makefile.in
/po/stamp-po
/shadow.spec
/shadow-*.tar.*
/libmisc/getdate.c

20
.travis.yml Normal file
View File

@@ -0,0 +1,20 @@
sudo: false
language: c
compiler:
- gcc
- clang
addons:
apt:
packages:
- autopoint
- xsltproc
script:
- ./autogen.sh --without-selinux --disable-man
- grep ENABLE_ config.status
- make
# vim:et:ts=2:sw=2

View File

@@ -1,3 +1,84 @@
2016-05-17 Serge Hallyn <serge@hallyn.com>
* Release 4.5
2016-05-17 Serge Hallyn <serge@hallyn.com>
* Patch from Tobias Stoeckmann fixing regression in previous CVE fix
preventing SIGTERM to su from being propagated to the job.
* Patch from Chris Lamb making sp_lstchg shadow field reproducible.
* Merge Russian translation updates from Yuri Kozlov
* Fix missing close of subuid file on error
2016-02-23 Serge Hallyn <serge@hallyn.com>
* Merge patch by Tobias Stoeckmann <tobias@stoeckmann.org> to fix
the equivalent of util-linux CVE-2017-2616.
2016-02-08 Serge Hallyn <serge@hallyn.com>
* Update Kazakh translations
* Consult configuration before calculating subuids
* Remove misplaced semicolon
2016-01-29 Serge Hallyn <serge@hallyn.com>
* Patch from Fedora to improve performance with SSSD, Winbind,
or nss_ldap. (Tomas Mraz)
* Make sure knowndef_table is NULL-terminated. (Bernhard Rosenkränzer)
2016-12-21 Serge Hallyn <serge@hallyn.com>
* Drop leading underscore from _COMMONIO_H and _SHADOWIO_H
* Fix readability in usermod error messages.
* Reset user in tallylog
* Add audit support to su
2016-12-02 Serge Hallyn <serge@hallyn.com>
* changes since 4.4
- Use sizeof rather than hardcoding snprintf args
- Fix useradd improper default loading
- Update Vietnamese translations
- Update Polish translations
- Remove non-POSIX chmod option in Makefile
- Fix suidubins assignments
- Fix --add-subuids etc spelling in manpages
- Audit homedir ownership change.
- Print error on selinux file context update failure
- Keep original file perms when creating a backup
* (henceforth we'll update Changelog with each commit
and proper credit)
2016-12-02 Serge Hallyn <serge@hallyn.com>
* Changes since 4.2.1:
- Documentation, error report and translations updates
- Replace path_max with 32
- User namespace support fixes/updates including:
- Correct sanity checks in newXidmap
- Fix building without subuid support
- Add /etc/subuid support for UID matching
- Support subuid for nonlocal users
- Default to 65536 subuid allocations
- Respect -r
- Check for range overflows
- Add tests from svn tree
- Use AC_CHECK_SIZEOF for uid_t size checks
- Accomodate missing /etc and login.defs
- Support FORCE_SHADOW
- Be more robust in hostile environment
- Allow removing a primary group
- Clear passwords on __pw_dup errors
- Memory leak fix in commonio_update and get_map_ranges
- Fix resource leak in syslog_sg
- Fix user busy error at userdel
- Support set/clear lastlog record via lastlog command
- Add --no-create-home as longopt for -M
- Fix signal races
- Reduce syslog priority of common usage events
2013-08-25 Nicolas François <nicolas.francois@centraliens.net>
* src/vipw.c: After waitpid(), use errno only if waitpid returned

File diff suppressed because it is too large Load Diff

14677
ChangeLog~

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,5 @@
EXTRA_DIST = NEWS README TODO shadow.spec.in
AUTOMAKE_OPTIONS = 1.5 dist-bzip2 foreign
SUBDIRS = po man libmisc lib src \
contrib doc etc

3
README
View File

@@ -117,5 +117,6 @@ Maintainers
===========
Tomasz Kłoczko <kloczek@pld.org.pl> (2000-2007)
Nicolas François <nicolas.francois@centraliens.net> (2007-now)
Nicolas François <nicolas.francois@centraliens.net> (2007-2014)
Serge E. Hallyn <serge@hallyn.com> (2014-now)

View File

@@ -1,6 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT
AM_INIT_AUTOMAKE(shadow, 4.2)
AC_PREREQ([2.64])
AC_INIT([shadow], [4.5], [pkg-shadow-devel@lists.alioth.debian.org], [],
[https://github.com/shadow-maint/shadow])
AM_INIT_AUTOMAKE([1.11 foreign dist-xz])
AM_SILENT_RULES([yes])
AC_CONFIG_HEADERS([config.h])
dnl Some hacks...
@@ -335,16 +338,10 @@ if test "$enable_subids" != "no"; then
dnl
dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc
dnl
AC_RUN_IFELSE([AC_LANG_SOURCE([
#include <sys/types.h>
int main(void) {
uid_t u;
gid_t g;
return (sizeof u < 4) || (sizeof g < 4);
}
])], [id32bit="yes"], [id32bit="no"])
AC_CHECK_SIZEOF([uid_t],, [#include "sys/types.h"])
AC_CHECK_SIZEOF([gid_t],, [#include "sys/types.h"])
if test "x$id32bit" = "xyes"; then
if test "$ac_cv_sizeof_uid_t" -ge 4 && test "$ac_cv_sizeof_gid_t" -ge 4; then
AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.])
enable_subids="yes"
else

16
debian/Makefile vendored Normal file
View File

@@ -0,0 +1,16 @@
PKG=shadow
SITE=ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/
deb:: check_cheese
include /usr/share/quilt/quilt.debbuild.mk
check_cheese:
@dpkg-parsechangelog | grep -q "\* The \".*\".* release\." || { \
echo ""; \
echo " ** **"; \
echo " ** Warning: not a cheesy release! **"; \
echo " ** **"; \
echo ""; \
exit 1; \
}

36
debian/NEWS vendored Normal file
View File

@@ -0,0 +1,36 @@
shadow (1:4.0.15-5) unstable; urgency=low
* commands passed in argument to su must use su's -c option and must quote
the command if it contains a space, as in:
su - root -c "ls -l /"
The following commands won't work anymore:
su - root -c ls -l /
su - root "ls -l /"
su - root ls -l /
-- Christian Perrier <bubulle@debian.org> Sat, 8 Apr 2006 20:11:38 +0200
shadow (1:4.0.14-1) unstable; urgency=low
* passwd does not support the -f, -s, and -g options anymore. You should use
the chfn, chsh and gpasswd utilities instead.
* login now distributes the nologin utility, which can be used as a shell
to politely refuse a login
-- Christian Perrier <bubulle@debian.org> Thu, 5 Jan 2006 08:47:44 +0100
shadow (1:4.0.12-1) unstable; urgency=low
CLOSE_SESSIONS and other variables are not used anymore in
/etc/login/defs.
As shadow utilities which use this file now warn about unknown
entries there, administrators should remove such unknown entries.
The supplied login.defs file does not include them anymore.
dpasswd is no more distributed by upstream. Login do not support
dialup password anymore. Re-introducing this functionality in
upstream is not trivial.
-- Christian Perrier <bubulle@debian.org> Thu, 25 Aug 2005 08:38:47 +0200

62
debian/README.debian vendored Normal file
View File

@@ -0,0 +1,62 @@
Read this file first for a brief overview of the new versions of login
and passwd.
---Shadow passwords
The command `shadowconfig on' will turn on shadow password support.
`shadowconfig off' will turn it back off. If you turn on shadow
password support, you'll gain the ability to set password ages and
expirations with chage(1).
NOTE: If you use the nscd package, you may have problems with a
slight delay in updating the password information. You may notice
this during upgrades of certain packages that try to add a system
user and then access the users information immediately afterwards.
To avoid this, it is suggested that you stop the nscd daemon before
upgrades, then restart it again.
---General configuration
Most of the configuration for the shadow utilities is in
/etc/login.defs. See login.defs(5). The defaults are quite
reasonable.
Also see the /etc/pam.d/* files for each program to configure the PAM
support. PAM documentation is available in several formats in the
libpam-doc package.
---MD5 Encryption
This is enabled now using the /etc/pam.d/* files. Examples are given.
---Adding users and groups
Though you may add users and groups with the SysV type commands,
useradd and groupadd, I recommend you add them with Debian adduser
version 3+. adduser gives you more configuration and conforms to the
Debian UID and GID allocation.
Editing user and group parameters can be done with usermod and
groupmod. Removing users and groups can be done with userdel and
groupdel.
--- Group administration
Local group allocation is much easier. With gpasswd(1) you can
designate users to administer groups. They can then securely add or
remove users from the group.
--- What to read next?
Read the manpages, the other files in this directory, and the Shadow
Password HOWTO (included in the doc-linux package). A large portion
of these files deals with getting shadow installed. You can, of
course, ignore those parts.
Also, the libpam-doc package will go a long way to allowing you to take
full advantage of the PAM authentication scheme.

4
debian/README.source vendored Normal file
View File

@@ -0,0 +1,4 @@
A testsuite is also available. Instruction on how to run this testsuite
are available in tests/README
-- Balint Reczey <rbalint@ubuntu.com>, Sat, 12 Aug 2017 18:46:44 -0400

19
debian/TODO vendored Normal file
View File

@@ -0,0 +1,19 @@
Things that should be done:
* Verify the files left in debian/tmp
+ e.g. /etc/default/adduser should be installed
* Check the build system: rebuilding the package twoce in the same tree
doubles the size of the diff.gz file
Other points (not related to the release of a syncronized shadow):
* compare the source with the usages and man pages
+ probably add a sentence to chsh/chfn's manpages about authentication
required for ordinary users
* do something (a tool) for the variables in login.defs
In Debian, some tools are not compiled with the PAM support, so upstream
getdef.c won't be OK.
It should be nice to see in each man page the set of variables used.
The Debian package can now compile (export DEB_BUILD_OPTIONS='nostrip debug')
with the debugging informations. This may be used to extract the set of
variables used in Debian/for each tools.
* verify all the patches around (I've found patches for at least RedHat,
OWL, LFS, Mandriva, Gentoo; are they already applied?)

25
debian/bugs-usertags vendored Normal file
View File

@@ -0,0 +1,25 @@
This described the usertags used by the team.
For usertags documentation, see
http://lists.debian.org/debian-devel-announce/2005/09/msg00002.html
All bugs tagged by team members must be tagged with
"user pkg-shadow-devel@lists.alioth.debian.org"
Tags list
---------
toclose: This bug has been announced to be closed in case no more news
or information is received from the bug submitter or someone
else until the delay specified in the limits_YYYYMMDD tag
limits-YYYYMMDD: combine it with "toclose". Specifies the date after which
bugs can be closed without other action in case no news
is received
manpages-replace A bug reported angainst a manpages-xx package to indicate
conflicting man pages. This tag can be used to tune the
Replaces fields.
su-transition: This bug is related to the su transition (#276419)

3849
debian/changelog vendored Normal file

File diff suppressed because it is too large Load Diff

1
debian/compat vendored Normal file
View File

@@ -0,0 +1 @@
10

78
debian/control vendored Normal file
View File

@@ -0,0 +1,78 @@
Source: shadow
Maintainer: Shadow package maintainers <pkg-shadow-devel@lists.alioth.debian.org>
Uploaders: Christian Perrier <bubulle@debian.org>,
Balint Reczey <rbalint@ubuntu.com>,
Serge Hallyn <serge@hallyn.com>
Section: admin
Priority: required
Build-Depends: dh-autoreconf,
gettext,
libpam0g-dev,
debhelper (>= 10~),
quilt,
xsltproc,
docbook-xsl,
docbook-xml,
libxml2-utils,
cdbs,
libselinux1-dev [linux-any],
libsemanage1-dev [linux-any],
gnome-doc-utils,
bison,
libaudit-dev [linux-any]
Standards-Version: 3.9.5
Vcs-Browser: https://anonscm.debian.org/git/pkg-shadow/shadow.git
Vcs-Git: https://anonscm.debian.org/git/pkg-shadow/shadow.git
Homepage: https://github.com/shadow-maint/shadow
Package: passwd
Architecture: any
Multi-Arch: foreign
Depends: ${shlibs:Depends},
${misc:Depends},
libpam-modules
Replaces: manpages-tr (<< 1.0.5),
manpages-zh (<< 1.5.1-1)
Description: change and administer password and group data
This package includes passwd, chsh, chfn, and many other programs to
maintain password and group data.
.
Shadow passwords are supported. See /usr/share/doc/passwd/README.Debian
Package: login
Architecture: any
Essential: yes
Pre-Depends: ${shlibs:Depends},
${misc:Depends},
libpam-runtime,
libpam-modules (>= 1.1.8-1)
Breaks: coreutils (<< 8.21~) [hurd-any],
passwd (<< 1:4.1.5.1-2~) [hurd-any],
hurd (<< 20140206~) [hurd-any],
util-linux (<< 2.32-0.2~)
Conflicts: gnunet (<< 0.7.0c-2),
amavisd-new (<< 2.3.3-8),
python-4suite (<< 0.99cvs20060405-1),
backupninja (<< 0.9.3-5),
echolot (<< 2.1.8-4)
Replaces: manpages-de (<< 0.5-3),
manpages-tr (<< 1.0.5),
manpages-zh (<< 1.5.1-1),
passwd (<< 1:4.1.5.1-2~) [hurd-any],
coreutils (<< 8.21~) [hurd-any],
hurd (<< 20140206~) [hurd-any]
Description: system login tools
These tools are required to be able to login and use your system. The
login program invokes your user shell and enables command execution. The
newgrp program is used to change your effective group ID (useful for
workgroup type situations). The su program allows changing your effective
user ID (useful being able to execute commands as another user).
Package: uidmap
Architecture: any
Priority: optional
Depends: ${shlibs:Depends},
${misc:Depends}
Description: programs to help use subuids
These programs help unprivileged users to create uid and gid mappings in
user namespaces.

103
debian/copyright vendored Normal file
View File

@@ -0,0 +1,103 @@
This is Debian GNU/Linux's prepackaged version of the shadow utilities.
It was downloaded from: <ftp://ftp.pld.org.pl/software/shadow/>.
As of May 2007, this site is no longer available.
Copyright:
Parts of this software are copyright 1988 - 1994, Julianne Frances Haugh.
All rights reserved.
Parts of this software are copyright 1997 - 2001, Marek Michałkiewicz.
All rights reserved.
Parts of this software are copyright 2001 - 2004, Andrzej Krzysztofowicz
All rights reserved.
Parts of this software are copyright 2000 - 2007, Tomasz Kłoczko.
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.
This source code is currently archived on ftp.uu.net in the
comp.sources.misc portion of the USENET archives. You may also contact
the author, Julianne F. Haugh, at jockgrrl@ix.netcom.com if you have
any questions regarding this package.
THIS SOFTWARE IS BEING DISTRIBUTED AS-IS. THE AUTHORS DISCLAIM ALL
LIABILITY FOR ANY CONSEQUENCES OF USE. THE USER IS SOLELY RESPONSIBLE
FOR THE MAINTENANCE OF THIS SOFTWARE PACKAGE. THE AUTHORS ARE UNDER NO
OBLIGATION TO PROVIDE MODIFICATIONS OR IMPROVEMENTS. THE USER IS
ENCOURAGED TO TAKE ANY AND ALL STEPS NEEDED TO PROTECT AGAINST ACCIDENTAL
LOSS OF INFORMATION OR MACHINE RESOURCES.
Special thanks are due to Chip Rosenthal for his fine testing efforts;
to Steve Simmons for his work in porting this code to BSD; and to Bill
Kennedy for his contributions of LaserJet printer time and energies.
Also, thanks for Dennis L. Mumaugh for the initial shadow password
information and to Tony Walton (olapw@olgb1.oliv.co.uk) for the System
V Release 4 changes. Effort in porting to SunOS has been contributed
by Dr. Michael Newberry (miken@cs.adfa.oz.au) and Micheal J. Miller, Jr.
(mke@kaberd.rain.com). Effort in porting to AT&T UNIX System V Release
4 has been provided by Andrew Herbert (andrew@werple.pub.uu.oz.au).
Special thanks to Marek Michalkiewicz (marekm@i17linuxb.ists.pwr.wroc.pl)
for taking over the Linux port of this software.
Source files: login_access.c, login_desrpc.c, login_krb.c are derived
from the logdaemon-5.0 package, which is under the following license:
/************************************************************************
* Copyright 1995 by Wietse Venema. All rights reserved. Individual files
* may be covered by other copyrights (as noted in the file itself.)
*
* This material was originally written and compiled by Wietse Venema at
* Eindhoven University of Technology, The Netherlands, in 1990, 1991,
* 1992, 1993, 1994 and 1995.
*
* Redistribution and use in source and binary forms are permitted
* provided that this entire copyright notice is duplicated in all such
* copies.
*
* This software is provided "as is" and without any expressed or implied
* warranties, including, without limitation, the implied warranties of
* merchantibility and fitness for any particular purpose.
************************************************************************/
Some parts substantially in src/su.c derived from an ancestor of
su for GNU. Run a shell with substitute user and group IDs.
Copyright (C) 1992-2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
On Debian GNU/Linux systems, the complete text of the GNU General Public
License can be found in '/usr/share/common-licenses/GPL-2'

1
debian/cpgr.8 vendored Normal file
View File

@@ -0,0 +1 @@
.so man8/cppw.8

27
debian/cppw.8 vendored Normal file
View File

@@ -0,0 +1,27 @@
.TH CPPW 8 "7 Apr 2005"
.SH NAME
cppw, cpgr \- copy with locking the given file to the password or group file
.SH SYNOPSIS
\fBcppw\fR [\fB\-h\fR] [\fB\-s\fR] password_file
.br
\fBcpgr\fR [\fB\-h\fR] [\fB\-s\fR] group_file
.SH DESCRIPTION
.BR cppw " and " cpgr
will copy, with locking, the given file to
.IR /etc/passwd " and " /etc/group ", respectively."
With the \fB\-s\fR flag, they will copy the shadow versions of those files,
.IR /etc/shadow " and " /etc/gshadow ", respectively."
With the \fB\-h\fR flag, the commands display a short help message and exit
silently.
.SH "SEE ALSO"
.BR vipw (8),
.BR vigr (8),
.BR group (5),
.BR passwd (5),
.BR shadow (5),
.BR gshadow (5)
.SH AUTHOR
\fBcppw\fR and \fBcpgr\fR were written by Stephen Frost, based on
\fBvipw\fR and \fBvigr\fR written by Guy Maor.

94
debian/dependencies vendored Normal file
View File

@@ -0,0 +1,94 @@
Build-Depends:
==============
* autoconf
* automake1.9
works with 1.7 or 1.9 (at least)
* libtool
* gettext
POT, PO, GMO regenerated?
* libpam0g-dev
OK
* debhelper (>= 4.1.16)
* po-debconf
OK
* quilt
patch system
* dpkg-dev (>= 1.13.5)
* xsltproc
used to generate the manpages
* docbook-xsl
needed for /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl
* docbook-xml
manpages/docbook.xsl includes html/docbook.xsl
(But it is not strictly needed. The generated manpages are identical.
Without it, a warning is generated.)
Needed by JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN], [DocBook XML DTD V4.1.2], [], enable_man=no)
* libxml2-utils
needed by the JH_CHECK_XML_CATALOG macros
* cdbs
used in debian/rules
* libselinux1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64]
* gnome-doc-utils (>= 0.4.3-1)
xml2po, 0.4.3-1 needed for the -l switch.
passwd Depends:
===============
* ${shlibs:Depends}
OK
* ${loginpam}
- hurd
login
libpam-modules (>= 0.72-5)
- other archs
+ login (>= 970502-1)
login is needed because some passwd utils need /etc/login.defs
login is Essential, so this is just to enforce the version
+ libpam-modules (>= 0.72-5)
* debianutils (>= 2.15.2)
After 1:4.0.12-6, {add,remove}-shell are distributed in debianutils (2.15)
/etc/shell was forgotten and introduced in debianutils in 2.15.2
passwd Conflicts:
=================
passwd Replaces:
================
Some of the passwd man pages are also distributed in some manpages* packages.
Look at the debian/02/run test to optimize these dependencies.
NOTE: Not all maintainers have been notified.
* manpages-de (<< 0.4-9), manpages-fi (<< 0.2-4), manpages-fr (<<1.64.0-1), manpages-hu (<< 20010119-5), manpages-it (<< 0.3.4-3), manpages-ja (<< 0.5.0.0.20050915-1), manpages-ko (<< 20050219-2), manpages-es (<< 1.55-4), manpages-es-extra (<< 0.8a-15), manpages-ru (<< 0.98-3)
All those packages have been updated during sarge->etch. So these Replaces
should be removed after lenny release
* manpages-tr, manpages-zh
Those packages are still in etch, so the Replaces should be kept even
after lenny release
login Pre-Depends:
==================
* ${shlibs:Depends}
* libpam-runtime (>= 0.76-14)
sarge contained 0.76-22
Why Pre-Depends? (because it's an essential package?)
login Depends:
==============
* libpam-modules (>= 0.72-5)
libpam-modules is needed.
potato contained 0.72-9
login Conflicts:
================
login Replaces:
===============
* Some of the login man pages are also distributed in some manpages* packages.
Look at the debian/02/run test to optimize these dependencies.
NOTE: Not all maintainers have been notified.
- manpages-fi, manpages-fr (<<1.64.0-1), manpages-hu, manpages-it, manpages-ko, manpages-ja (<< 0.5.0.0.20050915-1), manpages-de (<< 0.4-10), manpages-es-extra (<<0.8a-15)
Those are packages that have been updated during sarge->etch. These
Replaces should be removed after lenny
- manpages-tr, manpages-zh
Those packages are still in etch, so the Replaces should be kept even
after lenny release

340
debian/login.defs vendored Normal file
View File

@@ -0,0 +1,340 @@
#
# /etc/login.defs - Configuration control definitions for the login package.
#
# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH.
# If unspecified, some arbitrary (and possibly incorrect) value will
# be assumed. All other items are optional - if not specified then
# the described action or option will be inhibited.
#
# Comment lines (lines beginning with "#") and blank lines are ignored.
#
# Modified for Linux. --marekm
# REQUIRED for useradd/userdel/usermod
# Directory where mailboxes reside, _or_ name of file, relative to the
# home directory. If you _do_ define MAIL_DIR and MAIL_FILE,
# MAIL_DIR takes precedence.
#
# Essentially:
# - MAIL_DIR defines the location of users mail spool files
# (for mbox use) by appending the username to MAIL_DIR as defined
# below.
# - MAIL_FILE defines the location of the users mail spool files as the
# fully-qualified filename obtained by prepending the user home
# directory before $MAIL_FILE
#
# NOTE: This is no more used for setting up users MAIL environment variable
# which is, starting from shadow 4.0.12-1 in Debian, entirely the
# job of the pam_mail PAM modules
# See default PAM configuration files provided for
# login, su, etc.
#
# This is a temporary situation: setting these variables will soon
# move to /etc/default/useradd and the variables will then be
# no more supported
MAIL_DIR /var/mail
#MAIL_FILE .mail
#
# Enable logging and display of /var/log/faillog login failure info.
# This option conflicts with the pam_tally PAM module.
#
FAILLOG_ENAB yes
#
# Enable display of unknown usernames when login failures are recorded.
#
# WARNING: Unknown usernames may become world readable.
# See #290803 and #298773 for details about how this could become a security
# concern
LOG_UNKFAIL_ENAB no
#
# Enable logging of successful logins
#
LOG_OK_LOGINS no
#
# Enable "syslog" logging of su activity - in addition to sulog file logging.
# SYSLOG_SG_ENAB does the same for newgrp and sg.
#
SYSLOG_SU_ENAB yes
SYSLOG_SG_ENAB yes
#
# If defined, all su activity is logged to this file.
#
#SULOG_FILE /var/log/sulog
#
# If defined, file which maps tty line to TERM environment parameter.
# Each line of the file is in a format something like "vt100 tty01".
#
#TTYTYPE_FILE /etc/ttytype
#
# If defined, login failures will be logged here in a utmp format
# last, when invoked as lastb, will read /var/log/btmp, so...
#
FTMP_FILE /var/log/btmp
#
# If defined, the command name to display when running "su -". For
# example, if this is defined as "su" then a "ps" will display the
# command is "-su". If not defined, then "ps" would display the
# name of the shell actually being run, e.g. something like "-sh".
#
SU_NAME su
#
# If defined, file which inhibits all the usual chatter during the login
# sequence. If a full pathname, then hushed mode will be enabled if the
# user's name or shell are found in the file. If not a full pathname, then
# hushed mode will be enabled if the file exists in the user's home directory.
#
HUSHLOGIN_FILE .hushlogin
#HUSHLOGIN_FILE /etc/hushlogins
#
# *REQUIRED* The default PATH settings, for superuser and normal users.
#
# (they are minimal, add the rest in the shell startup files)
ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
#
# Terminal permissions
#
# TTYGROUP Login tty will be assigned this group ownership.
# TTYPERM Login tty will be set to this permission.
#
# If you have a "write" program which is "setgid" to a special group
# which owns the terminals, define TTYGROUP to the group number and
# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign
# TTYPERM to either 622 or 600.
#
# In Debian /usr/bin/bsd-write or similar programs are setgid tty
# However, the default and recommended value for TTYPERM is still 0600
# to not allow anyone to write to anyone else console or terminal
# Users can still allow other people to write them by issuing
# the "mesg y" command.
TTYGROUP tty
TTYPERM 0600
#
# Login configuration initializations:
#
# ERASECHAR Terminal ERASE character ('\010' = backspace).
# KILLCHAR Terminal KILL character ('\025' = CTRL/U).
# UMASK Default "umask" value.
#
# The ERASECHAR and KILLCHAR are used only on System V machines.
#
# UMASK is the default umask value for pam_umask and is used by
# useradd and newusers to set the mode of the new home directories.
# 022 is the "historical" value in Debian for UMASK
# 027, or even 077, could be considered better for privacy
# There is no One True Answer here : each sysadmin must make up his/her
# mind.
#
# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value
# for private user groups, i. e. the uid is the same as gid, and username is
# the same as the primary group name: for these, the user permissions will be
# used as group permissions, e. g. 022 will become 002.
#
# Prefix these values with "0" to get octal, "0x" to get hexadecimal.
#
ERASECHAR 0177
KILLCHAR 025
UMASK 022
#
# Password aging controls:
#
# PASS_MAX_DAYS Maximum number of days a password may be used.
# PASS_MIN_DAYS Minimum number of days allowed between password changes.
# PASS_WARN_AGE Number of days warning given before a password expires.
#
PASS_MAX_DAYS 99999
PASS_MIN_DAYS 0
PASS_WARN_AGE 7
#
# Min/max values for automatic uid selection in useradd
#
UID_MIN 1000
UID_MAX 60000
# System accounts
#SYS_UID_MIN 100
#SYS_UID_MAX 999
#
# Min/max values for automatic gid selection in groupadd
#
GID_MIN 1000
GID_MAX 60000
# System accounts
#SYS_GID_MIN 100
#SYS_GID_MAX 999
#
# Max number of login retries if password is bad. This will most likely be
# overriden by PAM, since the default pam_unix module has it's own built
# in of 3 retries. However, this is a safe fallback in case you are using
# an authentication module that does not enforce PAM_MAXTRIES.
#
LOGIN_RETRIES 5
#
# Max time in seconds for login
#
LOGIN_TIMEOUT 60
#
# Which fields may be changed by regular users using chfn - use
# any combination of letters "frwh" (full name, room number, work
# phone, home phone). If not defined, no changes are allowed.
# For backward compatibility, "yes" = "rwh" and "no" = "frwh".
#
CHFN_RESTRICT rwh
#
# Should login be allowed if we can't cd to the home directory?
# Default in no.
#
DEFAULT_HOME yes
#
# If defined, this command is run when removing a user.
# It should remove any at/cron/print jobs etc. owned by
# the user to be removed (passed as the first argument).
#
#USERDEL_CMD /usr/sbin/userdel_local
#
# If set to yes, userdel will remove the user's group if it contains no
# more members, and useradd will create by default a group with the name
# of the user.
#
# Other former uses of this variable such as setting the umask when
# user==primary group are not used in PAM environments, such as Debian
#
USERGROUPS_ENAB yes
#
# Instead of the real user shell, the program specified by this parameter
# will be launched, although its visible name (argv[0]) will be the shell's.
# The program may do whatever it wants (logging, additional authentification,
# banner, ...) before running the actual shell.
#
# FAKE_SHELL /bin/fakeshell
#
# If defined, either full pathname of a file containing device names or
# a ":" delimited list of device names. Root logins will be allowed only
# upon these devices.
#
# This variable is used by login and su.
#
#CONSOLE /etc/consoles
#CONSOLE console:tty01:tty02:tty03:tty04
#
# List of groups to add to the user's supplementary group set
# when logging in on the console (as determined by the CONSOLE
# setting). Default is none.
#
# Use with caution - it is possible for users to gain permanent
# access to these groups, even when not logged in on the console.
# How to do it is left as an exercise for the reader...
#
# This variable is used by login and su.
#
#CONSOLE_GROUPS floppy:audio:cdrom
#
# If set to "yes", new passwords will be encrypted using the MD5-based
# algorithm compatible with the one used by recent releases of FreeBSD.
# It supports passwords of unlimited length and longer salt strings.
# Set to "no" if you need to copy encrypted passwords to other systems
# which don't understand the new algorithm. Default is "no".
#
# This variable is deprecated. You should use ENCRYPT_METHOD.
#
#MD5_CRYPT_ENAB no
#
# If set to MD5 , MD5-based algorithm will be used for encrypting password
# If set to SHA256, SHA256-based algorithm will be used for encrypting password
# If set to SHA512, SHA512-based algorithm will be used for encrypting password
# If set to DES, DES-based algorithm will be used for encrypting password (default)
# Overrides the MD5_CRYPT_ENAB option
#
# Note: It is recommended to use a value consistent with
# the PAM modules configuration.
#
ENCRYPT_METHOD SHA512
#
# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512.
#
# Define the number of SHA rounds.
# With a lot of rounds, it is more difficult to brute forcing the password.
# But note also that it more CPU resources will be needed to authenticate
# users.
#
# If not specified, the libc will choose the default number of rounds (5000).
# The values must be inside the 1000-999999999 range.
# If only one of the MIN or MAX values is set, then this value will be used.
# If MIN > MAX, the highest value will be used.
#
# SHA_CRYPT_MIN_ROUNDS 5000
# SHA_CRYPT_MAX_ROUNDS 5000
################# OBSOLETED BY PAM ##############
# #
# These options are now handled by PAM. Please #
# edit the appropriate file in /etc/pam.d/ to #
# enable the equivelants of them.
#
###############
#MOTD_FILE
#DIALUPS_CHECK_ENAB
#LASTLOG_ENAB
#MAIL_CHECK_ENAB
#OBSCURE_CHECKS_ENAB
#PORTTIME_CHECKS_ENAB
#SU_WHEEL_ONLY
#CRACKLIB_DICTPATH
#PASS_CHANGE_TRIES
#PASS_ALWAYS_WARN
#ENVIRON_FILE
#NOLOGINS_FILE
#ISSUE_FILE
#PASS_MIN_LEN
#PASS_MAX_LEN
#ULIMIT
#ENV_HZ
#CHFN_AUTH
#CHSH_AUTH
#FAIL_DELAY
################# OBSOLETED #######################
# #
# These options are no more handled by shadow. #
# #
# Shadow utilities will display a warning if they #
# still appear. #
# #
###################################################
# CLOSE_SESSIONS
# LOGIN_STRING
# NO_PASSWORD_CONSOLE
# QMAIL_DIR

1
debian/login.dirs vendored Normal file
View File

@@ -0,0 +1 @@
usr/share/lintian/overrides

22
debian/login.install vendored Normal file
View File

@@ -0,0 +1,22 @@
usr/share/locale/*/LC_MESSAGES/shadow.mo
usr/share/man/*/man1/login.1
usr/share/man/*/man1/newgrp.1
usr/share/man/*/man1/sg.1
usr/share/man/*/man5/faillog.5
usr/share/man/*/man5/login.defs.5
usr/share/man/*/man8/faillog.8
usr/share/man/*/man8/lastlog.8
usr/share/man/*/man8/nologin.8
usr/share/man/man1/login.1
usr/share/man/man1/newgrp.1
usr/share/man/man1/sg.1
usr/share/man/man5/faillog.5
usr/share/man/man5/login.defs.5
usr/share/man/man8/faillog.8
usr/share/man/man8/lastlog.8
usr/share/man/man8/nologin.8
usr/sbin/nologin
usr/bin/faillog
usr/bin/lastlog
usr/bin/newgrp
bin/login

1
debian/login.links vendored Normal file
View File

@@ -0,0 +1 @@
usr/bin/newgrp usr/bin/sg

3
debian/login.lintian-overrides vendored Normal file
View File

@@ -0,0 +1,3 @@
login: setuid-binary usr/bin/newgrp 4755 root/root
login: setuid-binary bin/su 4755 root/root
login: possible-missing-colon-in-closes l667:closes bug 336321

116
debian/login.pam vendored Normal file
View File

@@ -0,0 +1,116 @@
#
# The PAM configuration file for the Shadow `login' service
#
# Enforce a minimal delay in case of failure (in microseconds).
# (Replaces the `FAIL_DELAY' setting from login.defs)
# Note that other modules may require another minimal delay. (for example,
# to disable any delay, you should add the nodelay option to pam_unix)
auth optional pam_faildelay.so delay=3000000
# Outputs an issue file prior to each login prompt (Replaces the
# ISSUE_FILE option from login.defs). Uncomment for use
# auth required pam_issue.so issue=/etc/issue
# Disallows root logins except on tty's listed in /etc/securetty
# (Replaces the `CONSOLE' setting from login.defs)
#
# With the default control of this module:
# [success=ok new_authtok_reqd=ok ignore=ignore user_unknown=bad default=die]
# root will not be prompted for a password on insecure lines.
# if an invalid username is entered, a password is prompted (but login
# will eventually be rejected)
#
# You can change it to a "requisite" module if you think root may mis-type
# her login and should not be prompted for a password in that case. But
# this will leave the system as vulnerable to user enumeration attacks.
#
# You can change it to a "required" module if you think it permits to
# guess valid user names of your system (invalid user names are considered
# as possibly being root on insecure lines), but root passwords may be
# communicated over insecure lines.
auth [success=ok new_authtok_reqd=ok ignore=ignore user_unknown=bad default=die] pam_securetty.so
# Disallows other than root logins when /etc/nologin exists
# (Replaces the `NOLOGINS_FILE' option from login.defs)
auth requisite pam_nologin.so
# SELinux needs to be the first session rule. This ensures that any
# lingering context has been cleared. Without this it is possible
# that a module could execute code in the wrong domain.
# When the module is present, "required" would be sufficient (When SELinux
# is disabled, this returns success.)
session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close
# Sets the loginuid process attribute
session required pam_loginuid.so
# SELinux needs to intervene at login time to ensure that the process
# starts in the proper default security context. Only sessions which are
# intended to run in the user's context should be run after this.
session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open
# When the module is present, "required" would be sufficient (When SELinux
# is disabled, this returns success.)
# This module parses environment configuration file(s)
# and also allows you to use an extended config
# file /etc/security/pam_env.conf.
#
# parsing /etc/environment needs "readenv=1"
session required pam_env.so readenv=1
# locale variables are also kept into /etc/default/locale in etch
# reading this file *in addition to /etc/environment* does not hurt
session required pam_env.so readenv=1 envfile=/etc/default/locale
# Standard Un*x authentication.
@include common-auth
# This allows certain extra groups to be granted to a user
# based on things like time of day, tty, service, and user.
# Please edit /etc/security/group.conf to fit your needs
# (Replaces the `CONSOLE_GROUPS' option in login.defs)
auth optional pam_group.so
# Uncomment and edit /etc/security/time.conf if you need to set
# time restraint on logins.
# (Replaces the `PORTTIME_CHECKS_ENAB' option from login.defs
# as well as /etc/porttime)
# account requisite pam_time.so
# Uncomment and edit /etc/security/access.conf if you need to
# set access limits.
# (Replaces /etc/login.access file)
# account required pam_access.so
# Sets up user limits according to /etc/security/limits.conf
# (Replaces the use of /etc/limits in old login)
session required pam_limits.so
# Prints the last login info upon successful login
# (Replaces the `LASTLOG_ENAB' option from login.defs)
session optional pam_lastlog.so
# Prints the message of the day upon successful login.
# (Replaces the `MOTD_FILE' option in login.defs)
# This includes a dynamically generated part from /run/motd.dynamic
# and a static (admin-editable) part from /etc/motd.
session optional pam_motd.so motd=/run/motd.dynamic
session optional pam_motd.so noupdate
# Prints the status of the user's mailbox upon successful login
# (Replaces the `MAIL_CHECK_ENAB' option from login.defs).
#
# This also defines the MAIL environment variable
# However, userdel also needs MAIL_DIR and MAIL_FILE variables
# in /etc/login.defs to make sure that removing a user
# also removes the user's mail spool file.
# See comments in /etc/login.defs
session optional pam_mail.so standard
# Create a new session keyring.
session optional pam_keyinit.so force revoke
# Standard Un*x account and session
@include common-account
@include common-session
@include common-password

56
debian/login.postinst vendored Normal file
View File

@@ -0,0 +1,56 @@
#!/bin/sh
set -e
if test "$1" = configure
then
if test -f /etc/init.d/logoutd
then
if test "$(md5sum /etc/init.d/logoutd)" = "9080f92783dd53f6f2108e698c06bd53 /etc/init.d/logoutd"
then
echo "removing logoutd cruft"
rm /etc/init.d/logoutd
update-rc.d logoutd remove
fi
fi
fi
rm -f /etc/pam.d/login.pre-upgrade 2>/dev/null
if [ "$1" = "configure" ]; then
# Install faillog during initial installs only
if [ "$2" = "" ] && [ ! -f /var/log/faillog ] ; then
touch /var/log/faillog
chown root:root /var/log/faillog
chmod 644 /var/log/faillog
fi
# Create subuid/subgid if missing
if [ ! -e /etc/subuid ]; then
touch /etc/subuid
chown root:root /etc/subuid
chmod 644 /etc/subuid
fi
if [ ! -e /etc/subgid ]; then
touch /etc/subgid
chown root:root /etc/subgid
chmod 644 /etc/subgid
fi
fi
# Create subuid/subgid if missing
if [ ! -e /etc/subuid ]; then
touch /etc/subuid
chown root:root /etc/subuid
chmod 644 /etc/subuid
fi
if [ ! -e /etc/subgid ]; then
touch /etc/subgid
chown root:root /etc/subgid
chmod 644 /etc/subgid
fi
#DEBHELPER#
exit 0

52
debian/login.preinst vendored Normal file
View File

@@ -0,0 +1,52 @@
#! /bin/sh
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
#
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
remove_md5() {
if md5sum $1 2>/dev/null |grep -q $2; then
cp $1 $1.pre-upgrade
sed -e '/^[^#][ \t]*assword[ \t]*required[ \t]*pam_unix.so/ s/ md5$//' $1 >$1.post-upgrade \
&& mv $1.post-upgrade $1
fi
}
case "$1" in
install|upgrade)
if [ "x$2" != "x" ] ; then
if dpkg --compare-versions $2 lt 1:4.0.3 ; then
remove_md5 /etc/pam.d/login 5e61c3334e25625fe1fa4d79cf9123ff
fi
fi
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

61
debian/login.su.pam vendored Normal file
View File

@@ -0,0 +1,61 @@
#
# The PAM configuration file for the Shadow `su' service
#
# This allows root to su without passwords (normal operation)
auth sufficient pam_rootok.so
# Uncomment this to force users to be a member of group root
# before they can use `su'. You can also add "group=foo"
# to the end of this line if you want to use a group other
# than the default "root" (but this may have side effect of
# denying "root" user, unless she's a member of "foo" or explicitly
# permitted earlier by e.g. "sufficient pam_rootok.so").
# (Replaces the `SU_WHEEL_ONLY' option from login.defs)
# auth required pam_wheel.so
# Uncomment this if you want wheel members to be able to
# su without a password.
# auth sufficient pam_wheel.so trust
# Uncomment this if you want members of a specific group to not
# be allowed to use su at all.
# auth required pam_wheel.so deny group=nosu
# Uncomment and edit /etc/security/time.conf if you need to set
# time restrainst on su usage.
# (Replaces the `PORTTIME_CHECKS_ENAB' option from login.defs
# as well as /etc/porttime)
# account requisite pam_time.so
# This module parses environment configuration file(s)
# and also allows you to use an extended config
# file /etc/security/pam_env.conf.
#
# parsing /etc/environment needs "readenv=1"
session required pam_env.so readenv=1
# locale variables are also kept into /etc/default/locale in etch
# reading this file *in addition to /etc/environment* does not hurt
session required pam_env.so readenv=1 envfile=/etc/default/locale
# Defines the MAIL environment variable
# However, userdel also needs MAIL_DIR and MAIL_FILE variables
# in /etc/login.defs to make sure that removing a user
# also removes the user's mail spool file.
# See comments in /etc/login.defs
#
# "nopen" stands to avoid reporting new mail when su'ing to another user
session optional pam_mail.so nopen
# Sets up user limits according to /etc/security/limits.conf
# (Replaces the use of /etc/limits in old login)
session required pam_limits.so
# The standard Unix authentication modules, used with
# NIS (man nsswitch) as well as normal /etc/passwd and
# /etc/shadow entries.
@include common-auth
@include common-account
@include common-session

8
debian/passwd.chage.pam vendored Normal file
View File

@@ -0,0 +1,8 @@
# The PAM configuration file for the Shadow 'chage' service
#
# This allows root to change password aging being prompted for a password
auth sufficient pam_rootok.so
# checks for account validity
account required pam_permit.so

16
debian/passwd.chfn.pam vendored Normal file
View File

@@ -0,0 +1,16 @@
#
# The PAM configuration file for the Shadow `chfn' service
#
# This allows root to change user infomation without being
# prompted for a password
auth sufficient pam_rootok.so
# The standard Unix authentication modules, used with
# NIS (man nsswitch) as well as normal /etc/passwd and
# /etc/shadow entries.
@include common-auth
@include common-account
@include common-session

5
debian/passwd.chpasswd.pam vendored Normal file
View File

@@ -0,0 +1,5 @@
# The PAM configuration file for the Shadow 'chpasswd' service
#
@include common-password

20
debian/passwd.chsh.pam vendored Normal file
View File

@@ -0,0 +1,20 @@
#
# The PAM configuration file for the Shadow `chsh' service
#
# This will not allow a user to change their shell unless
# their current one is listed in /etc/shells. This keeps
# accounts with special shells from changing them.
auth required pam_shells.so
# This allows root to change user shell without being
# prompted for a password
auth sufficient pam_rootok.so
# The standard Unix authentication modules, used with
# NIS (man nsswitch) as well as normal /etc/passwd and
# /etc/shadow entries.
@include common-auth
@include common-account
@include common-session

9
debian/passwd.cron.daily vendored Normal file
View File

@@ -0,0 +1,9 @@
#!/bin/sh
cd /var/backups || exit 0
for FILE in passwd group shadow gshadow; do
test -f /etc/$FILE || continue
cmp -s $FILE.bak /etc/$FILE && continue
cp -p /etc/$FILE $FILE.bak && chmod 600 $FILE.bak
done

2
debian/passwd.dirs vendored Normal file
View File

@@ -0,0 +1,2 @@
usr/share/lintian/overrides
etc/default

1
debian/passwd.examples vendored Normal file
View File

@@ -0,0 +1 @@
debian/passwd.expire.cron

57
debian/passwd.expire.cron vendored Normal file
View File

@@ -0,0 +1,57 @@
#!/usr/bin/perl
#
# passwd.expire.cron: sample expiry notification script for use as a cronjob
#
# Copyright 1999 by Ben Collins <bcollins@debian.org>, complete rights granted
# for use, distribution, modification, etc.
#
# Usage:
# edit the listed options, including the actual email, then rename to
# /etc/cron.daily/passwd
#
# If your users don't have a valid login shell (ie. they are ftp or mail
# users only), they will need some other way to change their password
# (telnet will work since login will handle password aging, or a poppasswd
# program, if they are mail users).
# <CONFIG> #
# should be same as /etc/adduser.conf
$LOW_UID=1000;
$HIGH_UID=29999;
# this let's the MTA handle the domain,
# set it manually if you want. Make sure
# you also add the @ like "\@domain.com"
$MAIL_DOM="";
# </CONFIG> #
# Set the current day reference
$curdays = int(time() / (60 * 60 * 24));
# Now go through the list
open(SH, "< /etc/shadow");
while (<SH>) {
@shent = split(':', $_);
@userent = getpwnam($shent[0]);
if ($userent[2] >= $LOW_UID && $userent[2] <= $HIGH_UID) {
if ($curdays > $shent[2] + $shent[4] - $shent[5] &&
$shent[4] != -1 && $shent[4] != 0 &&
$shent[5] != -1 && $shent[5] != 0) {
$daysleft = ($shent[2] + $shent[4]) - $curdays;
if ($daysleft == 1) { $days = "day"; } else {$days = "days"; }
if ($daysleft < 0) { next; }
open (MAIL, "| mail -s '[WARNING] account will expire in $daysleft $days' $shent[0]${MAIL_DOM}");
print MAIL <<EOF;
Your account will expire in $daysleft $days. Please change your password before
then or your account will expire
EOF
close (MAIL);
# This makes sure we also get a list of almost expired users
print "$shent[0]'s account will expire in $daysleft days\n";
}
}
@userent = getpwent();
}

8
debian/passwd.groupadd.pam vendored Normal file
View File

@@ -0,0 +1,8 @@
# The PAM configuration file for the Shadow 'groupadd' service
#
# This allows root to add groups without being prompted for a password
auth sufficient pam_rootok.so
# checks for account validity
account required pam_permit.so

8
debian/passwd.groupdel.pam vendored Normal file
View File

@@ -0,0 +1,8 @@
# The PAM configuration file for the Shadow 'groupdel' service
#
# This allows root to remove groups without being prompted for a password
auth sufficient pam_rootok.so
# checks for account validity
account required pam_permit.so

8
debian/passwd.groupmod.pam vendored Normal file
View File

@@ -0,0 +1,8 @@
# The PAM configuration file for the Shadow 'groupmod' service
#
# This allows root to modify groups without being prompted for a password
auth sufficient pam_rootok.so
# checks for account validity
account required pam_permit.so

80
debian/passwd.install vendored Normal file
View File

@@ -0,0 +1,80 @@
usr/bin/chage
usr/bin/chfn
usr/bin/chsh
usr/bin/expiry
usr/bin/gpasswd
usr/bin/passwd
usr/sbin/chpasswd
usr/sbin/chgpasswd
usr/sbin/cppw
usr/sbin/groupadd
usr/sbin/groupdel
usr/sbin/groupmod
usr/sbin/groupmems
usr/sbin/grpck
usr/sbin/grpconv
usr/sbin/grpunconv
usr/sbin/newusers
usr/sbin/pwck
usr/sbin/pwconv
usr/sbin/pwunconv
usr/sbin/useradd
usr/sbin/userdel
usr/sbin/usermod
usr/sbin/vipw
usr/share/man/*/man1/chage.1
usr/share/man/*/man1/chfn.1
usr/share/man/*/man1/chsh.1
usr/share/man/*/man1/expiry.1
usr/share/man/*/man1/gpasswd.1
usr/share/man/*/man1/passwd.1
usr/share/man/*/man5/passwd.5
usr/share/man/*/man5/shadow.5
usr/share/man/*/man5/gshadow.5
usr/share/man/*/man8/chpasswd.8
usr/share/man/*/man8/groupadd.8
usr/share/man/*/man8/groupdel.8
usr/share/man/*/man8/groupmod.8
usr/share/man/*/man8/groupmems.8
usr/share/man/*/man8/grpck.8
usr/share/man/*/man8/grpconv.8
usr/share/man/*/man8/grpunconv.8
usr/share/man/*/man8/newusers.8
usr/share/man/*/man8/pwck.8
usr/share/man/*/man8/pwconv.8
usr/share/man/*/man8/pwunconv.8
usr/share/man/*/man8/useradd.8
usr/share/man/*/man8/userdel.8
usr/share/man/*/man8/usermod.8
usr/share/man/*/man8/vigr.8
usr/share/man/*/man8/vipw.8
usr/share/man/man1/chage.1
usr/share/man/man1/chfn.1
usr/share/man/man1/chsh.1
usr/share/man/man1/expiry.1
usr/share/man/man1/gpasswd.1
usr/share/man/man1/passwd.1
usr/share/man/man5/passwd.5
usr/share/man/man5/shadow.5
usr/share/man/man5/gshadow.5
usr/share/man/man5/subuid.5
usr/share/man/man5/subgid.5
usr/share/man/man5/subgid.5
usr/share/man/man5/subuid.5
usr/share/man/man8/chgpasswd.8
usr/share/man/man8/chpasswd.8
usr/share/man/man8/groupadd.8
usr/share/man/man8/groupdel.8
usr/share/man/man8/groupmod.8
usr/share/man/man8/grpck.8
usr/share/man/man8/grpconv.8
usr/share/man/man8/grpunconv.8
usr/share/man/man8/newusers.8
usr/share/man/man8/pwck.8
usr/share/man/man8/pwconv.8
usr/share/man/man8/pwunconv.8
usr/share/man/man8/useradd.8
usr/share/man/man8/userdel.8
usr/share/man/man8/usermod.8
usr/share/man/man8/vigr.8
usr/share/man/man8/vipw.8

2
debian/passwd.links vendored Normal file
View File

@@ -0,0 +1,2 @@
usr/sbin/vipw usr/sbin/vigr
usr/sbin/cppw usr/sbin/cpgr

6
debian/passwd.lintian-overrides vendored Normal file
View File

@@ -0,0 +1,6 @@
passwd: setgid-binary usr/bin/chage 2755 root/shadow
passwd: setuid-binary usr/bin/chfn 4755 root/root
passwd: setuid-binary usr/bin/chsh 4755 root/root
passwd: setgid-binary usr/bin/expiry 2755 root/shadow
passwd: setuid-binary usr/bin/gpasswd 4755 root/root
passwd: setuid-binary usr/bin/passwd 4755 root/root

5
debian/passwd.newusers.pam vendored Normal file
View File

@@ -0,0 +1,5 @@
# The PAM configuration file for the Shadow 'newusers' service
#
@include common-password

6
debian/passwd.passwd.pam vendored Normal file
View File

@@ -0,0 +1,6 @@
#
# The PAM configuration file for the Shadow `passwd' service
#
@include common-password

44
debian/passwd.postinst vendored Normal file
View File

@@ -0,0 +1,44 @@
#!/bin/sh
set -e
case "$1" in
configure)
# Fix permissions on various log files from old versions of the debian
# installer, some unrelated to passwd but we decided to put the fix
# here since there was no better place. This can safely be removed
# after etch is released.
if dpkg --compare-versions "$2" lt "1:4.0.14-9"; then
for log in /var/log/base-config* \
$(find /var/log/debian-installer/ /var/log/installer/ -type f 2>/dev/null ); do
if [ -e "$log" ]; then
chmod 600 "$log"
fi
done
fi
rm -f /etc/pam.d/passwd.pre-upgrade 2>/dev/null
if ! getent group shadow | grep -q '^shadow:[^:]*:42'
then
groupadd -g 42 shadow || (
cat <<EOF
Group ID 42 has been allocated for the shadow group. You have either
used 42 yourself or created a shadow group with a different ID.
Please correct this problem and reconfigure with ``dpkg --configure passwd''.
Note that both user and group IDs in the range 0-99 are globally
allocated by the Debian project and must be the same on every Debian
system.
EOF
exit 1
)
fi
;;
esac
# Run shadowconfig only on new installs
[ -z "$2" ] && shadowconfig on
#DEBHELPER#
exit 0

51
debian/passwd.preinst vendored Normal file
View File

@@ -0,0 +1,51 @@
#! /bin/sh
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
#
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
remove_md5() {
if md5sum $1 2>/dev/null |grep -q $2; then
cp $1 $1.pre-upgrade
sed -e '/^[^#]*[ \t]*password[ \t]*required[ \t]*pam_unix.so/ s/ md5$//' $1 >$1.post-upgrade \
&& mv $1.post-upgrade $1
fi
}
case "$1" in
install|upgrade)
if [ "x$2" != "x" ] ; then
if dpkg --compare-versions $2 lt 1:4.0.3 ; then
remove_md5 /etc/pam.d/passwd 23a5d1465bbc1e39ca6e0c32f22a75c9
fi
fi
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

8
debian/passwd.tmpfile vendored Normal file
View File

@@ -0,0 +1,8 @@
# If a password operation is in progress and we lose power, stale lockfiles
# can be left behind. Clear them on boot.
r! /etc/gshadow.lock
r! /etc/shadow.lock
r! /etc/passwd.lock
r! /etc/group.lock
r! /etc/subuid.lock
r! /etc/subgid.lock

8
debian/passwd.useradd.pam vendored Normal file
View File

@@ -0,0 +1,8 @@
# The PAM configuration file for the Shadow 'useradd' service
#
# This allows root to add users without being prompted for a password
auth sufficient pam_rootok.so
# checks for account validity
account required pam_permit.so

8
debian/passwd.userdel.pam vendored Normal file
View File

@@ -0,0 +1,8 @@
# The PAM configuration file for the Shadow 'userdel' service
#
# This allows root to remove users without being prompted for a password
auth sufficient pam_rootok.so
# checks for account validity
account required pam_permit.so

8
debian/passwd.usermod.pam vendored Normal file
View File

@@ -0,0 +1,8 @@
# The PAM configuration file for the Shadow 'groupdel' service
#
# This allows root to remove groups without being prompted for a password
auth sufficient pam_rootok.so
# checks for account validity
account required pam_permit.so

View File

@@ -0,0 +1,183 @@
From 11fc74ffc7172c587bbd2a6399defbd53eab97c6 Mon Sep 17 00:00:00 2001
From: Aleksa Sarai <asarai@suse.de>
Date: Thu, 15 Feb 2018 23:49:40 +1100
Subject: newgidmap: enforce setgroups=deny if self-mapping a group
This is necessary to match the kernel-side policy of "self-mapping in a
user namespace is fine, but you cannot drop groups" -- a policy that was
created in order to stop user namespaces from allowing trivial privilege
escalation by dropping supplementary groups that were "blacklisted" from
certain paths.
This is the simplest fix for the underlying issue, and effectively makes
it so that unless a user has a valid mapping set in /etc/subgid (which
only administrators can modify) -- and they are currently trying to use
that mapping -- then /proc/$pid/setgroups will be set to deny. This
workaround is only partial, because ideally it should be possible to set
an "allow_setgroups" or "deny_setgroups" flag in /etc/subgid to allow
administrators to further restrict newgidmap(1).
We also don't write anything in the "allow" case because "allow" is the
default, and users may have already written "deny" even if they
technically are allowed to use setgroups. And we don't write anything if
the setgroups policy is already "deny".
Ref: https://bugs.launchpad.net/ubuntu/+source/shadow/+bug/1729357
Fixes: CVE-2018-7169
Reported-by: Craig Furman <craig.furman89@gmail.com>
Signed-off-by: Aleksa Sarai <asarai@suse.de>
---
src/newgidmap.c | 89 ++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 80 insertions(+), 9 deletions(-)
diff --git a/src/newgidmap.c b/src/newgidmap.c
index b1e33513..59a2e75c 100644
--- a/src/newgidmap.c
+++ b/src/newgidmap.c
@@ -46,32 +46,37 @@
*/
const char *Prog;
-static bool verify_range(struct passwd *pw, struct map_range *range)
+
+static bool verify_range(struct passwd *pw, struct map_range *range, bool *allow_setgroups)
{
/* An empty range is invalid */
if (range->count == 0)
return false;
- /* Test /etc/subgid */
- if (have_sub_gids(pw->pw_name, range->lower, range->count))
+ /* Test /etc/subgid. If the mapping is valid then we allow setgroups. */
+ if (have_sub_gids(pw->pw_name, range->lower, range->count)) {
+ *allow_setgroups = true;
return true;
+ }
- /* Allow a process to map its own gid */
- if ((range->count == 1) && (pw->pw_gid == range->lower))
+ /* Allow a process to map its own gid. */
+ if ((range->count == 1) && (pw->pw_gid == range->lower)) {
+ /* noop -- if setgroups is enabled already we won't disable it. */
return true;
+ }
return false;
}
static void verify_ranges(struct passwd *pw, int ranges,
- struct map_range *mappings)
+ struct map_range *mappings, bool *allow_setgroups)
{
struct map_range *mapping;
int idx;
mapping = mappings;
for (idx = 0; idx < ranges; idx++, mapping++) {
- if (!verify_range(pw, mapping)) {
+ if (!verify_range(pw, mapping, allow_setgroups)) {
fprintf(stderr, _( "%s: gid range [%lu-%lu) -> [%lu-%lu) not allowed\n"),
Prog,
mapping->upper,
@@ -89,6 +94,70 @@ static void usage(void)
exit(EXIT_FAILURE);
}
+void write_setgroups(int proc_dir_fd, bool allow_setgroups)
+{
+ int setgroups_fd;
+ char *policy, policy_buffer[4096];
+
+ /*
+ * Default is "deny", and any "allow" will out-rank a "deny". We don't
+ * forcefully write an "allow" here because the process we are writing
+ * mappings for may have already set themselves to "deny" (and "allow"
+ * is the default anyway). So allow_setgroups == true is a noop.
+ */
+ policy = "deny\n";
+ if (allow_setgroups)
+ return;
+
+ setgroups_fd = openat(proc_dir_fd, "setgroups", O_RDWR|O_CLOEXEC);
+ if (setgroups_fd < 0) {
+ /*
+ * If it's an ENOENT then we are on too old a kernel for the setgroups
+ * code to exist. Emit a warning and bail on this.
+ */
+ if (ENOENT == errno) {
+ fprintf(stderr, _("%s: kernel doesn't support setgroups restrictions\n"), Prog);
+ goto out;
+ }
+ fprintf(stderr, _("%s: couldn't open process setgroups: %s\n"),
+ Prog,
+ strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+
+ /*
+ * Check whether the policy is already what we want. /proc/self/setgroups
+ * is write-once, so attempting to write after it's already written to will
+ * fail.
+ */
+ if (read(setgroups_fd, policy_buffer, sizeof(policy_buffer)) < 0) {
+ fprintf(stderr, _("%s: failed to read setgroups: %s\n"),
+ Prog,
+ strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+ if (!strncmp(policy_buffer, policy, strlen(policy)))
+ goto out;
+
+ /* Write the policy. */
+ if (lseek(setgroups_fd, 0, SEEK_SET) < 0) {
+ fprintf(stderr, _("%s: failed to seek setgroups: %s\n"),
+ Prog,
+ strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+ if (dprintf(setgroups_fd, "%s", policy) < 0) {
+ fprintf(stderr, _("%s: failed to setgroups %s policy: %s\n"),
+ Prog,
+ policy,
+ strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+
+out:
+ close(setgroups_fd);
+}
+
/*
* newgidmap - Set the gid_map for the specified process
*/
@@ -103,6 +172,7 @@ int main(int argc, char **argv)
struct stat st;
struct passwd *pw;
int written;
+ bool allow_setgroups = false;
Prog = Basename (argv[0]);
@@ -145,7 +215,7 @@ int main(int argc, char **argv)
(unsigned long) getuid ()));
return EXIT_FAILURE;
}
-
+
/* Get the effective uid and effective gid of the target process */
if (fstat(proc_dir_fd, &st) < 0) {
fprintf(stderr, _("%s: Could not stat directory for target %u\n"),
@@ -177,8 +247,9 @@ int main(int argc, char **argv)
if (!mappings)
usage();
- verify_ranges(pw, ranges, mappings);
+ verify_ranges(pw, ranges, mappings, &allow_setgroups);
+ write_setgroups(proc_dir_fd, allow_setgroups);
write_mapping(proc_dir_fd, ranges, mappings, "gid_map");
sub_gid_close();
--
2.30.2

View File

@@ -0,0 +1,142 @@
From cbfa2ff40ce629f55ddd67e3490c311dfcaa4462 Mon Sep 17 00:00:00 2001
From: Alejandro Colomar <alx@kernel.org>
Date: Sat, 10 Jun 2023 16:20:05 +0200
Subject: gpasswd(1): Fix password leak
How to trigger this password leak?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When gpasswd(1) asks for the new password, it asks twice (as is usual
for confirming the new password). Each of those 2 password prompts
uses agetpass() to get the password. If the second agetpass() fails,
the first password, which has been copied into the 'static' buffer
'pass' via STRFCPY(), wasn't being zeroed.
agetpass() is defined in <./libmisc/agetpass.c> (around line 91), and
can fail for any of the following reasons:
- malloc(3) or readpassphrase(3) failure.
These are going to be difficult to trigger. Maybe getting the system
to the limits of memory utilization at that exact point, so that the
next malloc(3) gets ENOMEM, and possibly even the OOM is triggered.
About readpassphrase(3), ENFILE and EINTR seem the only plausible
ones, and EINTR probably requires privilege or being the same user;
but I wouldn't discard ENFILE so easily, if a process starts opening
files.
- The password is longer than PASS_MAX.
The is plausible with physical access. However, at that point, a
keylogger will be a much simpler attack.
And, the attacker must be able to know when the second password is being
introduced, which is not going to be easy.
How to read the password after the leak?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Provoking the leak yourself at the right point by entering a very long
password is easy, and inspecting the process stack at that point should
be doable. Try to find some consistent patterns.
Then, search for those patterns in free memory, right after the victim
leaks their password.
Once you get the leak, a program should read all the free memory
searching for patterns that gpasswd(1) leaves nearby the leaked
password.
On 6/10/23 03:14, Seth Arnold wrote:
> An attacker process wouldn't be able to use malloc(3) for this task.
> There's a handful of tools available for userspace to allocate memory:
>
> - brk / sbrk
> - mmap MAP_ANONYMOUS
> - mmap /dev/zero
> - mmap some other file
> - shm_open
> - shmget
>
> Most of these return only pages of zeros to a process. Using mmap of an
> existing file, you can get some of the contents of the file demand-loaded
> into the memory space on the first use.
>
> The MAP_UNINITIALIZED flag only works if the kernel was compiled with
> CONFIG_MMAP_ALLOW_UNINITIALIZED. This is rare.
>
> malloc(3) doesn't zero memory, to our collective frustration, but all the
> garbage in the allocations is from previous allocations in the current
> process. It isn't leftover from other processes.
>
> The avenues available for reading the memory:
> - /dev/mem and /dev/kmem (requires root, not available with Secure Boot)
> - /proc/pid/mem (requires ptrace privileges, mediated by YAMA)
> - ptrace (requires ptrace privileges, mediated by YAMA)
> - causing memory to be swapped to disk, and then inspecting the swap
>
> These all require a certain amount of privileges.
How to fix it?
~~~~~~~~~~~~~~
memzero(), which internally calls explicit_bzero(3), or whatever
alternative the system provides with a slightly different name, will
make sure that the buffer is zeroed in memory, and optimizations are not
allowed to impede this zeroing.
This is not really 100% effective, since compilers may place copies of
the string somewhere hidden in the stack. Those copies won't get zeroed
by explicit_bzero(3). However, that's arguably a compiler bug, since
compilers should make everything possible to avoid optimizing strings
that are later passed to explicit_bzero(3). But we all know that
sometimes it's impossible to have perfect knowledge in the compiler, so
this is plausible. Nevertheless, there's nothing we can do against such
issues, except minimizing the time such passwords are stored in plain
text.
Security concerns
~~~~~~~~~~~~~~~~~
We believe this isn't easy to exploit. Nevertheless, and since the fix
is trivial, this fix should probably be applied soon, and backported to
all supported distributions, to prevent someone else having more
imagination than us to find a way.
Affected versions
~~~~~~~~~~~~~~~~~
All. Bug introduced in shadow 19990709. That's the second commit in
the git history.
Fixes: 45c6603cc86c ("[svn-upgrade] Integrating new upstream version, shadow (19990709)")
Reported-by: Alejandro Colomar <alx@kernel.org>
Cc: Serge Hallyn <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Seth Arnold <seth.arnold@canonical.com>
Cc: Christian Brauner <christian@brauner.io>
Cc: Balint Reczey <rbalint@debian.org>
Cc: Sam James <sam@gentoo.org>
Cc: David Runge <dvzrv@archlinux.org>
Cc: Andreas Jaeger <aj@suse.de>
Cc: <~hallyn/shadow@lists.sr.ht>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
src/gpasswd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/gpasswd.c b/src/gpasswd.c
index c4a492b1..cbbd8068 100644
--- a/src/gpasswd.c
+++ b/src/gpasswd.c
@@ -917,6 +917,7 @@ static void change_passwd (struct group *gr)
strzero (cp);
cp = getpass (_("Re-enter new password: "));
if (NULL == cp) {
+ memzero (pass, sizeof pass);
exit (1);
}
--
2.30.2

View File

@@ -0,0 +1,45 @@
From b42c60bc8f026b250810a75bafe865338d734ec3 Mon Sep 17 00:00:00 2001
From: tomspiderlabs <128755403+tomspiderlabs@users.noreply.github.com>
Date: Thu, 23 Mar 2023 23:39:38 +0000
Subject: Added control character check
Added control character check, returning -1 (to "err") if control characters are present.
---
lib/fields.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/lib/fields.c b/lib/fields.c
index 649fae17..b8f13ba7 100644
--- a/lib/fields.c
+++ b/lib/fields.c
@@ -44,9 +44,9 @@
*
* The supplied field is scanned for non-printable and other illegal
* characters.
- * + -1 is returned if an illegal character is present.
- * + 1 is returned if no illegal characters are present, but the field
- * contains a non-printable character.
+ * + -1 is returned if an illegal or control character is present.
+ * + 1 is returned if no illegal or control characters are present,
+ * but the field contains a non-printable character.
* + 0 is returned otherwise.
*/
int valid_field (const char *field, const char *illegal)
@@ -68,10 +68,13 @@ int valid_field (const char *field, const char *illegal)
}
if (0 == err) {
- /* Search if there are some non-printable characters */
+ /* Search if there are non-printable or control characters */
for (cp = field; '\0' != *cp; cp++) {
if (!isprint (*cp)) {
err = 1;
+ }
+ if (!iscntrl (*cp)) {
+ err = -1;
break;
}
}
--
2.30.2

View File

@@ -0,0 +1,61 @@
From 261c9cd274f07361c304d3993e325fe29d4bad14 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
Date: Fri, 31 Mar 2023 14:46:50 +0200
Subject: Overhaul valid_field()
e5905c4b ("Added control character check") introduced checking for
control characters but had the logic inverted, so it rejects all
characters that are not control ones.
Cast the character to `unsigned char` before passing to the character
checking functions to avoid UB.
Use strpbrk(3) for the illegal character test and return early.
---
lib/fields.c | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/lib/fields.c b/lib/fields.c
index b8f13ba7..191257e8 100644
--- a/lib/fields.c
+++ b/lib/fields.c
@@ -60,26 +60,22 @@ int valid_field (const char *field, const char *illegal)
/* For each character of field, search if it appears in the list
* of illegal characters. */
+ if (illegal && NULL != strpbrk (field, illegal)) {
+ return -1;
+ }
+
+ /* Search if there are non-printable or control characters */
for (cp = field; '\0' != *cp; cp++) {
- if (strchr (illegal, *cp) != NULL) {
+ unsigned char c = *cp;
+ if (!isprint (c)) {
+ err = 1;
+ }
+ if (iscntrl (c)) {
err = -1;
break;
}
}
- if (0 == err) {
- /* Search if there are non-printable or control characters */
- for (cp = field; '\0' != *cp; cp++) {
- if (!isprint (*cp)) {
- err = 1;
- }
- if (!iscntrl (*cp)) {
- err = -1;
- break;
- }
- }
- }
-
return err;
}
--
2.30.2

View File

@@ -0,0 +1,55 @@
Goal: Log login failures to the btmp file
Notes:
* I'm not sure login should add an entry in the FTMP file when PAM is used.
(but nothing in /etc/login.defs indicates that the failure is not logged)
Index: shadow-4.4/src/login.c
===================================================================
--- shadow-4.4.orig/src/login.c
+++ shadow-4.4/src/login.c
@@ -834,6 +834,24 @@ int main (int argc, char **argv)
(void) puts ("");
(void) puts (_("Login incorrect"));
+ if (getdef_str("FTMP_FILE") != NULL) {
+#ifdef USE_UTMPX
+ struct utmpx *failent =
+ prepare_utmpx (failent_user,
+ tty,
+ /* FIXME: or fromhost? */hostname,
+ utent);
+#else /* !USE_UTMPX */
+ struct utmp *failent =
+ prepare_utmp (failent_user,
+ tty,
+ hostname,
+ utent);
+#endif /* !USE_UTMPX */
+ failtmp (failent_user, failent);
+ free (failent);
+ }
+
if (failcount >= retries) {
SYSLOG ((LOG_NOTICE,
"TOO MANY LOGIN TRIES (%u)%s FOR '%s'",
Index: shadow-4.4/lib/getdef.c
===================================================================
--- shadow-4.4.orig/lib/getdef.c
+++ shadow-4.4/lib/getdef.c
@@ -57,7 +57,6 @@ struct itemdef {
{"ENVIRON_FILE", NULL}, \
{"ENV_TZ", NULL}, \
{"FAILLOG_ENAB", NULL}, \
- {"FTMP_FILE", NULL}, \
{"ISSUE_FILE", NULL}, \
{"LASTLOG_ENAB", NULL}, \
{"LOGIN_STRING", NULL}, \
@@ -88,6 +87,7 @@ static struct itemdef def_table[] = {
{"ERASECHAR", NULL},
{"FAIL_DELAY", NULL},
{"FAKE_SHELL", NULL},
+ {"FTMP_FILE", NULL},
{"GID_MAX", NULL},
{"GID_MIN", NULL},
{"HUSHLOGIN_FILE", NULL},

276
debian/patches/401_cppw_src.dpatch vendored Normal file
View File

@@ -0,0 +1,276 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## 401_cppw_src.dpatch by Nicolas FRANCOIS <nicolas.francois@centraliens.net>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Add cppw / cpgr
@DPATCH@
--- /dev/null
+++ b/src/cppw.c
@@ -0,0 +1,238 @@
+/*
+ cppw, cpgr copy with locking given file over the password or group file
+ with -s will copy with locking given file over shadow or gshadow file
+
+ Copyright (C) 1999 Stephen Frost <sfrost@snowman.net>
+
+ Based on vipw, vigr by:
+ Copyright (C) 1997 Guy Maor <maor@ece.utexas.edu>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ */
+
+#include <config.h>
+#include "defines.h"
+
+#include <errno.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <signal.h>
+#include <utime.h>
+#include "exitcodes.h"
+#include "prototypes.h"
+#include "pwio.h"
+#include "shadowio.h"
+#include "groupio.h"
+#include "sgroupio.h"
+
+
+const char *Prog;
+
+const char *filename, *filenewname;
+static bool filelocked = false;
+static int (*unlock) (void);
+
+/* local function prototypes */
+static int create_copy (FILE *fp, const char *dest, struct stat *sb);
+static void cppwexit (const char *msg, int syserr, int ret);
+static void cppwcopy (const char *file,
+ const char *in_file,
+ int (*file_lock) (void),
+ int (*file_unlock) (void));
+
+static int create_copy (FILE *fp, const char *dest, struct stat *sb)
+{
+ struct utimbuf ub;
+ FILE *bkfp;
+ int c;
+ mode_t mask;
+
+ mask = umask (077);
+ bkfp = fopen (dest, "w");
+ (void) umask (mask);
+ if (NULL == bkfp) {
+ return -1;
+ }
+
+ rewind (fp);
+ while ((c = getc (fp)) != EOF) {
+ if (putc (c, bkfp) == EOF) {
+ break;
+ }
+ }
+
+ if ( (c != EOF)
+ || (fflush (bkfp) != 0)) {
+ (void) fclose (bkfp);
+ (void) unlink (dest);
+ return -1;
+ }
+ if ( (fsync (fileno (bkfp)) != 0)
+ || (fclose (bkfp) != 0)) {
+ (void) unlink (dest);
+ return -1;
+ }
+
+ ub.actime = sb->st_atime;
+ ub.modtime = sb->st_mtime;
+ if ( (utime (dest, &ub) != 0)
+ || (chmod (dest, sb->st_mode) != 0)
+ || (chown (dest, sb->st_uid, sb->st_gid) != 0)) {
+ (void) unlink (dest);
+ return -1;
+ }
+ return 0;
+}
+
+static void cppwexit (const char *msg, int syserr, int ret)
+{
+ int err = errno;
+ if (filelocked) {
+ (*unlock) ();
+ }
+ if (NULL != msg) {
+ fprintf (stderr, "%s: %s", Prog, msg);
+ if (0 != syserr) {
+ fprintf (stderr, ": %s", strerror (err));
+ }
+ (void) fputs ("\n", stderr);
+ }
+ if (NULL != filename) {
+ fprintf (stderr, _("%s: %s is unchanged\n"), Prog, filename);
+ } else {
+ fprintf (stderr, _("%s: no changes\n"), Prog);
+ }
+
+ exit (ret);
+}
+
+static void cppwcopy (const char *file,
+ const char *in_file,
+ int (*file_lock) (void),
+ int (*file_unlock) (void))
+{
+ struct stat st1;
+ FILE *f;
+ char filenew[1024];
+
+ snprintf (filenew, sizeof filenew, "%s.new", file);
+ unlock = file_unlock;
+ filename = file;
+ filenewname = filenew;
+
+ if (access (file, F_OK) != 0) {
+ cppwexit (file, 1, 1);
+ }
+ if (file_lock () == 0) {
+ cppwexit (_("Couldn't lock file"), 0, 5);
+ }
+ filelocked = true;
+
+ /* file to copy has same owners, perm */
+ if (stat (file, &st1) != 0) {
+ cppwexit (file, 1, 1);
+ }
+ f = fopen (in_file, "r");
+ if (NULL == f) {
+ cppwexit (in_file, 1, 1);
+ }
+ if (create_copy (f, filenew, &st1) != 0) {
+ cppwexit (_("Couldn't make copy"), errno, 1);
+ }
+
+ /* XXX - here we should check filenew for errors; if there are any,
+ * fail w/ an appropriate error code and let the user manually fix
+ * it. Use pwck or grpck to do the check. - Stephen (Shamelessly
+ * stolen from '--marekm's comment) */
+
+ if (rename (filenew, file) != 0) {
+ fprintf (stderr, _("%s: can't copy %s: %s)\n"),
+ Prog, filenew, strerror (errno));
+ cppwexit (NULL,0,1);
+ }
+
+ (*file_unlock) ();
+}
+
+int main (int argc, char **argv)
+{
+ int flag;
+ bool cpshadow = false;
+ char *in_file;
+ int e = E_USAGE;
+ bool do_cppw = true;
+
+ (void) setlocale (LC_ALL, "");
+ (void) bindtextdomain (PACKAGE, LOCALEDIR);
+ (void) textdomain (PACKAGE);
+
+ Prog = Basename (argv[0]);
+ if (strcmp (Prog, "cpgr") == 0) {
+ do_cppw = false;
+ }
+
+ while ((flag = getopt (argc, argv, "ghps")) != EOF) {
+ switch (flag) {
+ case 'p':
+ do_cppw = true;
+ break;
+ case 'g':
+ do_cppw = false;
+ break;
+ case 's':
+ cpshadow = true;
+ break;
+ case 'h':
+ e = E_SUCCESS;
+ /*pass through*/
+ default:
+ (void) fputs (_("Usage:\n\
+`cppw <file>' copys over /etc/passwd `cppw -s <file>' copys over /etc/shadow\n\
+`cpgr <file>' copys over /etc/group `cpgr -s <file>' copys over /etc/gshadow\n\
+"), (E_SUCCESS != e) ? stderr : stdout);
+ exit (e);
+ }
+ }
+
+ if (argc != optind + 1) {
+ cppwexit (_("wrong number of arguments, -h for usage"),0,1);
+ }
+
+ in_file = argv[optind];
+
+ if (do_cppw) {
+ if (cpshadow) {
+ cppwcopy (SHADOW_FILE, in_file, spw_lock, spw_unlock);
+ } else {
+ cppwcopy (PASSWD_FILE, in_file, pw_lock, pw_unlock);
+ }
+ } else {
+#ifdef SHADOWGRP
+ if (cpshadow) {
+ cppwcopy (SGROUP_FILE, in_file, sgr_lock, sgr_unlock);
+ } else
+#endif /* SHADOWGRP */
+ {
+ cppwcopy (GROUP_FILE, in_file, gr_lock, gr_unlock);
+ }
+ }
+
+ return 0;
+}
+
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -30,6 +30,7 @@
ubin_PROGRAMS += newgidmap newuidmap
endif
usbin_PROGRAMS = \
+ cppw \
chgpasswd \
chpasswd \
groupadd \
@@ -90,6 +91,7 @@
chgpasswd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBSELINUX) $(LIBCRYPT)
chsh_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD)
chpasswd_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT)
+cppw_LDADD = $(LDADD) $(LIBSELINUX)
gpasswd_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
groupadd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
groupdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -85,6 +85,7 @@
src/chgpasswd.c
src/chpasswd.c
src/chsh.c
+src/cppw.c
src/expiry.c
src/faillog.c
src/gpasswd.c

64
debian/patches/402_cppw_selinux vendored Normal file
View File

@@ -0,0 +1,64 @@
Goal: Add selinux support to cppw
Fix:
Status wrt upstream: cppw is not available upstream.
The patch was made based on the
302_vim_selinux_support patch. It needs to be
reviewed by an SE-Linux aware person.
Depends on 401_cppw_src.dpatch
Index: git/src/cppw.c
===================================================================
--- git.orig/src/cppw.c
+++ git/src/cppw.c
@@ -34,6 +34,9 @@
#include <sys/types.h>
#include <signal.h>
#include <utime.h>
+#ifdef WITH_SELINUX
+#include <selinux/selinux.h>
+#endif /* WITH_SELINUX */
#include "exitcodes.h"
#include "prototypes.h"
#include "pwio.h"
@@ -139,6 +142,22 @@
if (access (file, F_OK) != 0) {
cppwexit (file, 1, 1);
}
+#ifdef WITH_SELINUX
+ /* if SE Linux is enabled then set the context of all new files
+ * to be the context of the file we are editing */
+ if (is_selinux_enabled () > 0) {
+ security_context_t passwd_context=NULL;
+ int ret = 0;
+ if (getfilecon (file, &passwd_context) < 0) {
+ cppwexit (_("Couldn't get file context"), errno, 1);
+ }
+ ret = setfscreatecon (passwd_context);
+ freecon (passwd_context);
+ if (0 != ret) {
+ cppwexit (_("setfscreatecon () failed"), errno, 1);
+ }
+ }
+#endif /* WITH_SELINUX */
if (file_lock () == 0) {
cppwexit (_("Couldn't lock file"), 0, 5);
}
@@ -167,6 +186,15 @@
cppwexit (NULL,0,1);
}
+#ifdef WITH_SELINUX
+ /* unset the fscreatecon */
+ if (is_selinux_enabled () > 0) {
+ if (setfscreatecon (NULL)) {
+ cppwexit (_("setfscreatecon() failed"), errno, 1);
+ }
+ }
+#endif /* WITH_SELINUX */
+
(*file_unlock) ();
}

88
debian/patches/429_login_FAILLOG_ENAB vendored Normal file
View File

@@ -0,0 +1,88 @@
Goal: Re-enable logging and displaying failures on login when login is
compiled with PAM and when FAILLOG_ENAB is set to yes. And create the
faillog file if it does not exist on postinst (as on Woody).
Depends: 008_login_more_LOG_UNKFAIL_ENAB
Fixes: #192849
Note: It could be removed if pam_tally could report the number of failures
preceding a successful login.
Index: shadow-4.4/src/login.c
===================================================================
--- shadow-4.4.orig/src/login.c
+++ shadow-4.4/src/login.c
@@ -131,9 +131,9 @@ static void update_utmp (const char *use
const char *host,
/*@null@*/const struct utmp *utent);
-#ifndef USE_PAM
static struct faillog faillog;
+#ifndef USE_PAM
static void bad_time_notify (void);
static void check_nologin (bool login_to_root);
#else
@@ -794,6 +794,9 @@ int main (int argc, char **argv)
SYSLOG ((LOG_NOTICE,
"TOO MANY LOGIN TRIES (%u)%s FOR '%s'",
failcount, fromhost, failent_user));
+ if ((NULL != pwd) && getdef_bool("FAILLOG_ENAB")) {
+ failure (pwd->pw_uid, tty, &faillog);
+ }
fprintf (stderr,
_("Maximum number of tries exceeded (%u)\n"),
failcount);
@@ -811,6 +814,14 @@ int main (int argc, char **argv)
pam_strerror (pamh, retcode)));
failed = true;
}
+ if ( (NULL != pwd)
+ && getdef_bool("FAILLOG_ENAB")
+ && ! failcheck (pwd->pw_uid, &faillog, failed)) {
+ SYSLOG((LOG_CRIT,
+ "exceeded failure limit for `%s' %s",
+ failent_user, fromhost));
+ failed = 1;
+ }
if (!failed) {
break;
@@ -834,6 +845,10 @@ int main (int argc, char **argv)
(void) puts ("");
(void) puts (_("Login incorrect"));
+ if ((NULL != pwd) && getdef_bool("FAILLOG_ENAB")) {
+ failure (pwd->pw_uid, tty, &faillog);
+ }
+
if (getdef_str("FTMP_FILE") != NULL) {
#ifdef USE_UTMPX
struct utmpx *failent =
@@ -1288,6 +1303,7 @@ int main (int argc, char **argv)
*/
#ifndef USE_PAM
motd (); /* print the message of the day */
+#endif
if ( getdef_bool ("FAILLOG_ENAB")
&& (0 != faillog.fail_cnt)) {
failprint (&faillog);
@@ -1300,6 +1316,7 @@ int main (int argc, char **argv)
username, (int) faillog.fail_cnt));
}
}
+#ifndef USE_PAM
if ( getdef_bool ("LASTLOG_ENAB")
&& (ll.ll_time != 0)) {
time_t ll_time = ll.ll_time;
Index: shadow-4.4/lib/getdef.c
===================================================================
--- shadow-4.4.orig/lib/getdef.c
+++ shadow-4.4/lib/getdef.c
@@ -86,6 +86,7 @@ static struct itemdef def_table[] = {
{"ENV_SUPATH", NULL},
{"ERASECHAR", NULL},
{"FAIL_DELAY", NULL},
+ {"FAILLOG_ENAB", NULL},
{"FAKE_SHELL", NULL},
{"FTMP_FILE", NULL},
{"GID_MAX", NULL},

View File

@@ -0,0 +1,101 @@
Goal: Do not hardcode pam_fail_delay and let pam_unix do its
job to set a delay...or not
Fixes: #87648
Status wrt upstream: Forwarded but not applied yet
Note: If removed, FAIL_DELAY must be re-added to /etc/login.defs
Index: shadow-4.4/src/login.c
===================================================================
--- shadow-4.4.orig/src/login.c
+++ shadow-4.4/src/login.c
@@ -525,7 +525,6 @@ int main (int argc, char **argv)
#if defined(HAVE_STRFTIME) && !defined(USE_PAM)
char ptime[80];
#endif
- unsigned int delay;
unsigned int retries;
bool subroot = false;
#ifndef USE_PAM
@@ -546,6 +545,7 @@ int main (int argc, char **argv)
pid_t child;
char *pam_user = NULL;
#else
+ unsigned int delay;
struct spwd *spwd = NULL;
#endif
/*
@@ -708,7 +708,6 @@ int main (int argc, char **argv)
}
environ = newenvp; /* make new environment active */
- delay = getdef_unum ("FAIL_DELAY", 1);
retries = getdef_unum ("LOGIN_RETRIES", RETRIES);
#ifdef USE_PAM
@@ -724,8 +723,7 @@ int main (int argc, char **argv)
/*
* hostname & tty are either set to NULL or their correct values,
- * depending on how much we know. We also set PAM's fail delay to
- * ours.
+ * depending on how much we know.
*
* PAM_RHOST and PAM_TTY are used for authentication, only use
* information coming from login or from the caller (e.g. no utmp)
@@ -734,10 +732,6 @@ int main (int argc, char **argv)
PAM_FAIL_CHECK;
retcode = pam_set_item (pamh, PAM_TTY, tty);
PAM_FAIL_CHECK;
-#ifdef HAS_PAM_FAIL_DELAY
- retcode = pam_fail_delay (pamh, 1000000 * delay);
- PAM_FAIL_CHECK;
-#endif
/* if fflg, then the user has already been authenticated */
if (!fflg) {
unsigned int failcount = 0;
@@ -778,12 +772,6 @@ int main (int argc, char **argv)
bool failed = false;
failcount++;
-#ifdef HAS_PAM_FAIL_DELAY
- if (delay > 0) {
- retcode = pam_fail_delay(pamh, 1000000*delay);
- PAM_FAIL_CHECK;
- }
-#endif
retcode = pam_authenticate (pamh, 0);
@@ -1106,14 +1094,17 @@ int main (int argc, char **argv)
free (username);
username = NULL;
+#ifndef USE_PAM
/*
* Wait a while (a la SVR4 /usr/bin/login) before attempting
* to login the user again. If the earlier alarm occurs
* before the sleep() below completes, login will exit.
*/
+ delay = getdef_unum ("FAIL_DELAY", 1);
if (delay > 0) {
(void) sleep (delay);
}
+#endif
(void) puts (_("Login incorrect"));
Index: shadow-4.4/lib/getdef.c
===================================================================
--- shadow-4.4.orig/lib/getdef.c
+++ shadow-4.4/lib/getdef.c
@@ -85,7 +85,6 @@ static struct itemdef def_table[] = {
{"ENV_PATH", NULL},
{"ENV_SUPATH", NULL},
{"ERASECHAR", NULL},
- {"FAIL_DELAY", NULL},
{"FAILLOG_ENAB", NULL},
{"FAKE_SHELL", NULL},
{"FTMP_FILE", NULL},

View File

@@ -0,0 +1,60 @@
Goal: save the [g]shadow files with the 'shadow' group and mode 0440
Fixes: #166793
--- a/lib/commonio.c
+++ b/lib/commonio.c
@@ -44,6 +44,7 @@
#include <errno.h>
#include <stdio.h>
#include <signal.h>
+#include <grp.h>
#include "nscd.h"
#ifdef WITH_TCB
#include <tcb.h>
@@ -963,12 +964,23 @@
goto fail;
}
} else {
+ struct group *grp;
/*
* Default permissions for new [g]shadow files.
*/
sb.st_mode = db->st_mode;
sb.st_uid = db->st_uid;
sb.st_gid = db->st_gid;
+
+ /*
+ * Try to retrieve the shadow's GID, and fall back to GID 0.
+ */
+ if (sb.st_gid == 0) {
+ if ((grp = getgrnam("shadow")) != NULL)
+ sb.st_gid = grp->gr_gid;
+ else
+ sb.st_gid = 0;
+ }
}
snprintf (buf, sizeof buf, "%s+", db->filename);
--- a/lib/sgroupio.c
+++ b/lib/sgroupio.c
@@ -229,7 +229,7 @@
#ifdef WITH_SELINUX
NULL, /* scontext */
#endif
- 0400, /* st_mode */
+ 0440, /* st_mode */
0, /* st_uid */
0, /* st_gid */
NULL, /* head */
--- a/lib/shadowio.c
+++ b/lib/shadowio.c
@@ -105,7 +105,7 @@
#ifdef WITH_SELINUX
NULL, /* scontext */
#endif /* WITH_SELINUX */
- 0400, /* st_mode */
+ 0440, /* st_mode */
0, /* st_uid */
0, /* st_gid */
NULL, /* head */

201
debian/patches/503_shadowconfig.8 vendored Normal file
View File

@@ -0,0 +1,201 @@
Goal: Document the shadowconfig utility
Status wrt upstream: The shadowconfig utility is debian specific.
Its man page also (but it used to be distributed)
Index: git/man/shadowconfig.8
===================================================================
--- /dev/null
+++ git/man/shadowconfig.8
@@ -0,0 +1,41 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "SHADOWCONFIG" 8 "19 Apr 1997" "" ""
+.SH NAME
+shadowconfig \- toggle shadow passwords on and off
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 13
+\fBshadowconfig\fR \fB\fIon\fR\fR | \fB\fIoff\fR\fR
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+\fBshadowconfig\fR on will turn shadow passwords on; \fIshadowconfig off\fR will turn shadow passwords off\&. \fBshadowconfig\fR will print an error message and exit with a nonzero code if it finds anything awry\&. If that happens, you should correct the error and run it again\&. Turning shadow passwords on when they are already on, or off when they are already off, is harmless\&.
+
+.PP
+Read \fI/usr/share/doc/passwd/README\&.Debian\fR for a brief introduction to shadow passwords and related features\&.
+
+.PP
+Note that turning shadow passwords off and on again will lose all password aging information\&.
+
Index: git/man/shadowconfig.8.xml
===================================================================
--- /dev/null
+++ git/man/shadowconfig.8.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+<refentry id='shadowconfig.8'>
+ <!-- $Id: shadowconfig.8.xml,v 1.6 2005/06/15 12:39:27 kloczek Exp $ -->
+ <refentryinfo>
+ <date>19 Apr 1997</date>
+ </refentryinfo>
+ <refmeta>
+ <refentrytitle>shadowconfig</refentrytitle>
+ <manvolnum>8</manvolnum>
+ <refmiscinfo class='date'>19 Apr 1997</refmiscinfo>
+ <refmiscinfo class='source'>Debian GNU/Linux</refmiscinfo>
+ </refmeta>
+ <refnamediv id='name'>
+ <refname>shadowconfig</refname>
+ <refpurpose>toggle shadow passwords on and off</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv id='synopsis'>
+ <cmdsynopsis>
+ <command>shadowconfig</command>
+ <group choice='plain'>
+ <arg choice='plain'><replaceable>on</replaceable></arg>
+ <arg choice='plain'><replaceable>off</replaceable></arg>
+ </group>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id='description'>
+ <title>DESCRIPTION</title>
+ <para><command>shadowconfig</command> on will turn shadow passwords on;
+ <emphasis remap='B'>shadowconfig off</emphasis> will turn shadow
+ passwords off. <command>shadowconfig</command> will print an error
+ message and exit with a nonzero code if it finds anything awry. If
+ that happens, you should correct the error and run it again. Turning
+ shadow passwords on when they are already on, or off when they are
+ already off, is harmless.
+ </para>
+
+ <para>
+ Read <filename>/usr/share/doc/passwd/README.Debian</filename> for a
+ brief introduction
+ to shadow passwords and related features.
+ </para>
+
+ <para>Note that turning shadow passwords off and on again will lose all
+ password
+ aging information.
+ </para>
+ </refsect1>
+</refentry>
Index: git/man/fr/shadowconfig.8
===================================================================
--- /dev/null
+++ git/man/fr/shadowconfig.8
@@ -0,0 +1,26 @@
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"$Id: shadowconfig.8,v 1.4 2001/08/23 23:10:48 kloczek Exp $
+.TH SHADOWCONFIG 8 "19 avril 1997" "Debian GNU/Linux"
+.SH NOM
+shadowconfig \- active ou désactive les mots de passe cachés
+.SH SYNOPSIS
+\fBshadowconfig\fP \fIon\fP | \fIoff\fP
+.SH DESCRIPTION
+.PP
+\fBshadowconfig on\fP active les mots de passe cachés («\ shadow passwords\ »)\ ; \fBshadowconfig off\fP les désactive. \fBShadowconfig\fP affiche un message
+d'erreur et quitte avec une valeur de retour non nulle s'il rencontre
+quelque chose d'inattendu. Dans ce cas, vous devrez corriger l'erreur avant
+de recommencer.
+
+Activer les mots de passe cachés lorsqu'ils sont déjà activés, ou les
+désactiver lorsqu'ils ne sont pas actifs est sans effet.
+
+Lisez \fI/usr/share/doc/passwd/README.Debian\fP pour une brève introduction aux
+mots de passe cachés et à leurs fonctionnalités.
+
+Notez que désactiver puis réactiver les mots de passe cachés aura pour
+conséquence la perte des informations d'âge sur les mots de passe.
+.SH TRADUCTION
+Nicolas FRANÇOIS, 2004.
+Veuillez signaler toute erreur à <\fIdebian\-l10\-french@lists.debian.org\fR>.
Index: git/man/ja/shadowconfig.8
===================================================================
--- /dev/null
+++ git/man/ja/shadowconfig.8
@@ -0,0 +1,25 @@
+.\" all right reserved,
+.\" Translated Tue Oct 30 11:59:11 JST 2001
+.\" by Maki KURODA <mkuroda@aisys-jp.com>
+.\"
+.TH SHADOWCONFIG 8 "19 Apr 1997" "Debian GNU/Linux"
+.SH 名前
+shadowconfig \- shadow パスワードの設定をオン及びオフに切替える
+.SH 書式
+.B "shadowconfig"
+.IR on " | " off
+.SH 説明
+.PP
+.B shadowconfig on
+は shadow パスワードを有効にする。
+.B shadowconfig off
+は shadow パスワードを無効にする。
+.B shadowconfig
+は何らかの間違いがあると、エラーメッセージを表示し、
+ゼロではない返り値を返す。
+もしそのようなことが起こった場合、エラーを修正し、再度実行しなければならない。
+shadow パスワードの設定がすでにオンの場合にオンに設定したり、
+すでにオフの場合にオフに設定しても、何の影響もない。
+
+.I /usr/share/doc/passwd/README.debian.gz
+には shadow パスワードとそれに関する特徴の簡単な紹介が書かれている。
Index: git/man/pl/shadowconfig.8
===================================================================
--- /dev/null
+++ git/man/pl/shadowconfig.8
@@ -0,0 +1,27 @@
+.\" $Id: shadowconfig.8,v 1.3 2001/08/23 23:10:51 kloczek Exp $
+.\" {PTM/WK/1999-09-14}
+.TH SHADOWCONFIG 8 "19 kwietnia 1997" "Debian GNU/Linux"
+.SH NAZWA
+shadowconfig - przełącza ochronę haseł i grup przez pliki shadow
+.SH SKŁADNIA
+.B "shadowconfig"
+.IR on " | " off
+.SH OPIS
+.PP
+.B shadowconfig on
+włącza ochronę haseł i grup przez dodatkowe, przesłaniane pliki (shadow);
+.B shadowconfig off
+wyłącza dodatkowe pliki haseł i grup.
+.B shadowconfig
+wyświetla komunikat o błędzie i kończy pracę z niezerowym kodem jeśli
+znajdzie coś nieprawidłowego. W takim wypadku powinieneś poprawić błąd
+.\" if it finds anything awry.
+i uruchomić program ponownie.
+
+Włączenie ochrony haseł, gdy jest ona już włączona lub jej wyłączenie,
+gdy jest wyłączona jest nieszkodliwe.
+
+Przeczytaj
+.IR /usr/share/doc/passwd/README.debian.gz ,
+gdzie znajdziesz krótkie wprowadzenie do ochrony haseł z użyciem dodatkowych
+plików haseł przesłanianych (shadow passwords) i związanych tematów.

View File

@@ -0,0 +1,40 @@
Goal: Recommend using adduser and deluser.
Fixes: #406046
Status wrt upstream: Debian specific patch.
Index: git/man/useradd.8.xml
===================================================================
--- git.orig/man/useradd.8.xml
+++ git/man/useradd.8.xml
@@ -105,6 +105,12 @@
<refsect1 id='description'>
<title>DESCRIPTION</title>
<para>
+ <command>useradd</command> is a low level utility for adding
+ users. On Debian, administrators should usually use
+ <citerefentry><refentrytitle>adduser</refentrytitle>
+ <manvolnum>8</manvolnum></citerefentry> instead.
+ </para>
+ <para>
When invoked without the <option>-D</option> option, the
<command>useradd</command> command creates a new user account using
the values specified on the command line plus the default values from
Index: git/man/userdel.8.xml
===================================================================
--- git.orig/man/userdel.8.xml
+++ git/man/userdel.8.xml
@@ -83,6 +83,12 @@
<refsect1 id='description'>
<title>DESCRIPTION</title>
<para>
+ <command>userdel</command> is a low level utility for removing
+ users. On Debian, administrators should usually use
+ <citerefentry><refentrytitle>deluser</refentrytitle>
+ <manvolnum>8</manvolnum></citerefentry> instead.
+ </para>
+ <para>
The <command>userdel</command> command modifies the system account
files, deleting all entries that refer to the user name <emphasis
remap='I'>LOGIN</emphasis>. The named user must exist.

106
debian/patches/506_relaxed_usernames vendored Normal file
View File

@@ -0,0 +1,106 @@
Goal: Relaxed usernames/groupnames checking patch.
Status wrt upstream: Debian specific. Not to be used upstream
Details:
Allows any non-empty user/grounames that don't contain ':', ',' or '\n'
characters and don't start with '-', '+', or '~'. This patch is more
restrictive than original Karl's version. closes: #264879
Also closes: #377844
Comments from Karl Ramm (shadow 1:4.0.3-9, 20 Aug 2003 02:06:50 -0400):
I can't come up with a good justification as to why characters other
than ':'s and '\0's should be disallowed in group and usernames (other
than '-' as the leading character). Thus, the maintenance tools don't
anymore. closes: #79682, #166798, #171179
Index: git/libmisc/chkname.c
===================================================================
--- git.orig/libmisc/chkname.c
+++ git/libmisc/chkname.c
@@ -48,6 +48,7 @@
static bool is_valid_name (const char *name)
{
+#if 0
/*
* User/group names must match [a-z_][a-z0-9_-]*[$]
*/
@@ -66,6 +67,26 @@
return false;
}
}
+#endif
+ /*
+ * POSIX indicate that usernames are composed of characters from the
+ * portable filename character set [A-Za-z0-9._-], and that the hyphen
+ * should not be used as the first character of a portable user name.
+ *
+ * Allow more relaxed user/group names in Debian -- ^[^-~+:,\s][^:,\s]*$
+ */
+ if ( ('\0' == *name)
+ || ('-' == *name)
+ || ('~' == *name)
+ || ('+' == *name)) {
+ return false;
+ }
+ do {
+ if ((':' == *name) || (',' == *name) || isspace(*name)) {
+ return false;
+ }
+ name++;
+ } while ('\0' != *name);
return true;
}
Index: git/man/useradd.8.xml
===================================================================
--- git.orig/man/useradd.8.xml
+++ git/man/useradd.8.xml
@@ -633,12 +633,20 @@
</para>
<para>
- Usernames must start with a lower case letter or an underscore,
+ It is usually recommended to only use usernames that begin with a lower case letter or an underscore,
followed by lower case letters, digits, underscores, or dashes.
They can end with a dollar sign.
In regular expression terms: [a-z_][a-z0-9_-]*[$]?
</para>
<para>
+ On Debian, the only constraints are that usernames must neither start
+ with a dash ('-') nor plus ('+') nor tilde ('~') nor contain a
+ colon (':'), a comma (','), or a whitespace (space: ' ',
+ end of line: '\n', tabulation: '\t', etc.). Note that using a slash
+ ('/') may break the default algorithm for the definition of the
+ user's home directory.
+ </para>
+ <para>
Usernames may only be up to 32 characters long.
</para>
</refsect1>
Index: git/man/groupadd.8.xml
===================================================================
--- git.orig/man/groupadd.8.xml
+++ git/man/groupadd.8.xml
@@ -256,12 +256,18 @@
<refsect1 id='caveats'>
<title>CAVEATS</title>
<para>
- Groupnames must start with a lower case letter or an underscore,
+ It is usually recommended to only use groupnames that begin with a lower case letter or an underscore,
followed by lower case letters, digits, underscores, or dashes.
They can end with a dollar sign.
In regular expression terms: [a-z_][a-z0-9_-]*[$]?
</para>
<para>
+ On Debian, the only constraints are that groupnames must neither start
+ with a dash ('-') nor plus ('+') nor tilde ('~') nor contain a
+ colon (':'), a comma (','), or a whitespace (space:' ',
+ end of line: '\n', tabulation: '\t', etc.).
+ </para>
+ <para>
Groupnames may only be up to &GROUP_NAME_MAX_LENGTH; characters long.
</para>
<para>

18
debian/patches/508_nologin_in_usr_sbin vendored Normal file
View File

@@ -0,0 +1,18 @@
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -24,7 +24,6 @@
# $prefix/bin and $prefix/sbin, no install-data hacks...)
bin_PROGRAMS = groups login su
-sbin_PROGRAMS = nologin
ubin_PROGRAMS = faillog lastlog chage chfn chsh expiry gpasswd newgrp passwd
if ENABLE_SUBIDS
ubin_PROGRAMS += newgidmap newuidmap
@@ -42,6 +41,7 @@
grpunconv \
logoutd \
newusers \
+ nologin \
pwck \
pwconv \
pwunconv \

43
debian/patches/542_useradd-O_option vendored Normal file
View File

@@ -0,0 +1,43 @@
Goal: accepts the -O flag for backward compatibility. (was used by adduser?)
Note: useradd.8 needs to be regenerated.
Status wrt upstream: not included as this is just specific
backward compatibility for Debian
--- a/man/useradd.8.xml
+++ b/man/useradd.8.xml
@@ -329,6 +329,11 @@
databases are reset to avoid reusing the entry from a previously
deleted user.
</para>
+ <para>
+ For the compatibility with previous Debian's
+ <command>useradd</command>, the <option>-O</option> option is
+ also supported.
+ </para>
</listitem>
</varlistentry>
<varlistentry>
--- a/src/useradd.c
+++ b/src/useradd.c
@@ -1059,9 +1059,9 @@
};
while ((c = getopt_long (argc, argv,
#ifdef WITH_SELINUX
- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:UZ:",
+ "b:c:d:De:f:g:G:hk:O:K:lmMNop:rR:s:u:UZ:",
#else /* !WITH_SELINUX */
- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:U",
+ "b:c:d:De:f:g:G:hk:O:K:lmMNop:rR:s:u:U",
#endif /* !WITH_SELINUX */
long_options, NULL)) != -1) {
switch (c) {
@@ -1184,6 +1184,7 @@
kflg = true;
break;
case 'K':
+ case 'O': /* compatibility with previous Debian useradd */
/*
* override login.defs defaults (-K name=value)
* example: -K UID_MIN=100 -K UID_MAX=499

81
debian/patches/900_testsuite_groupmems vendored Normal file
View File

@@ -0,0 +1,81 @@
--- a/debian/passwd.install
+++ b/debian/passwd.install
@@ -9,6 +9,7 @@
usr/sbin/cppw
usr/sbin/groupadd
usr/sbin/groupdel
+usr/sbin/groupmems
usr/sbin/groupmod
usr/sbin/grpck
usr/sbin/grpconv
@@ -33,6 +34,7 @@
usr/share/man/*/man8/chpasswd.8
usr/share/man/*/man8/groupadd.8
usr/share/man/*/man8/groupdel.8
+usr/share/man/*/man8/groupmems.8
usr/share/man/*/man8/groupmod.8
usr/share/man/*/man8/grpck.8
usr/share/man/*/man8/grpconv.8
@@ -59,6 +61,7 @@
usr/share/man/man8/chpasswd.8
usr/share/man/man8/groupadd.8
usr/share/man/man8/groupdel.8
+usr/share/man/man8/groupmems.8
usr/share/man/man8/groupmod.8
usr/share/man/man8/grpck.8
usr/share/man/man8/grpconv.8
--- a/debian/passwd.postinst
+++ b/debian/passwd.postinst
@@ -31,6 +31,24 @@
exit 1
)
fi
+ if ! getent group groupmems | grep -q '^groupmems:[^:]*:99'
+ then
+ groupadd -g 99 groupmems || (
+ cat <<EOF
+************************ TESTSUITE *****************************
+Group ID 99 has been allocated for the groupmems group. You have either
+used 99 yourself or created a groupmems group with a different ID.
+Please correct this problem and reconfigure with ``dpkg --configure passwd''.
+
+Note that both user and group IDs in the range 0-99 are globally
+allocated by the Debian project and must be the same on every Debian
+system.
+EOF
+ exit 1
+ )
+# FIXME
+ chgrp groupmems /usr/sbin/groupmems
+ fi
;;
esac
--- a/debian/rules
+++ b/debian/rules
@@ -60,6 +60,7 @@
dh_installpam -p passwd --name=chsh
dh_installpam -p passwd --name=chpasswd
dh_installpam -p passwd --name=newusers
+ dh_installpam -p passwd --name=groupmems
ifeq ($(DEB_HOST_ARCH_OS),hurd)
# login is not built on The Hurd, but some utilities of passwd depends on
# /etc/login.defs.
@@ -87,3 +88,6 @@
chgrp shadow debian/passwd/usr/bin/expiry
chmod g+s debian/passwd/usr/bin/chage
chmod g+s debian/passwd/usr/bin/expiry
+ chgrp groupmems debian/passwd/usr/sbin/groupmems
+ chmod u+s debian/passwd/usr/sbin/groupmems
+ chmod o-x debian/passwd/usr/sbin/groupmems
--- /dev/null
+++ b/debian/passwd.groupmems.pam
@@ -0,0 +1,8 @@
+# The PAM configuration file for the Shadow 'groupmod' service
+#
+
+# This allows root to modify groups without being prompted for a password
+auth sufficient pam_rootok.so
+
+@include common-auth
+@include common-account

76
debian/patches/901_testsuite_gcov vendored Normal file
View File

@@ -0,0 +1,76 @@
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,6 +1,8 @@
AUTOMAKE_OPTIONS = 1.0 foreign
+CFLAGS += -fprofile-arcs -ftest-coverage
+
DEFS =
noinst_LTLIBRARIES = libshadow.la
--- a/libmisc/Makefile.am
+++ b/libmisc/Makefile.am
@@ -1,6 +1,8 @@
EXTRA_DIST = .indent.pro xgetXXbyYY.c
+CFLAGS += -fprofile-arcs -ftest-coverage
+
INCLUDES = -I$(top_srcdir)/lib
noinst_LIBRARIES = libmisc.a
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -7,6 +7,8 @@
suidperms = 4755
sgidperms = 2755
+CFLAGS += -fprofile-arcs -ftest-coverage
+
INCLUDES = \
-I${top_srcdir}/lib \
-I$(top_srcdir)/libmisc
--- a/debian/rules
+++ b/debian/rules
@@ -40,6 +40,12 @@
endif
export CFLAGS
+clean:: clean_gcov
+
+clean_gcov:
+ find . -name "*.gcda" -delete
+ find . -name "*.gcno" -delete
+
# Add extras to the install process:
binary-install/login::
dh_installpam -p login
--- a/lib/defines.h
+++ b/lib/defines.h
@@ -174,23 +174,9 @@
trust the formatted time received from the unix domain (or worse,
UDP) socket. -MM */
/* Avoid translated PAM error messages: Set LC_ALL to "C".
+ * This is disabled for coverage testing
* --Nekral */
-#define SYSLOG(x) \
- do { \
- char *old_locale = setlocale (LC_ALL, NULL); \
- char *saved_locale = NULL; \
- if (NULL != old_locale) { \
- saved_locale = strdup (old_locale); \
- } \
- if (NULL != saved_locale) { \
- (void) setlocale (LC_ALL, "C"); \
- } \
- syslog x ; \
- if (NULL != saved_locale) { \
- (void) setlocale (LC_ALL, saved_locale); \
- free (saved_locale); \
- } \
- } while (false)
+#define SYSLOG(x) syslog x
#else /* !ENABLE_NLS */
#define SYSLOG(x) syslog x
#endif /* !ENABLE_NLS */

22
debian/patches/README.patches vendored Normal file
View File

@@ -0,0 +1,22 @@
Small intro to the system for numbering the patches here...
-The 00xx-... patches are forwarded to upstream's git repository
-The 0xx_... series of patches are patches isolated from the latest
version of the shadow Debian package not using quilt in order to
separate upstream from Debian-specific stuff.
NO MORE PATCHES SHOULD BE ADDED IN THESE SERIES
-The 4xx series are patches which have been applied to Debian's shadow
and have NOT been accepted and/or applied upstream. These patches MUST be kept
even after resynced with upstream
-The 5xx series are patches which are applied to Debian's shadow
and will never be proposed upstream because they're too specific
This list SHOULD BE AS SHORT AS POSSIBLE
In short, while we are working towards synchronisation with upstream,
our goal is to make 0xx patches disappear by moving them either to 3xx
series (things already implemented upstream) or to 4xx series
(Debian-specific patches).

20
debian/patches/series vendored Normal file
View File

@@ -0,0 +1,20 @@
# These patches are only for the testsuite:
#900_testsuite_groupmems
#901_testsuite_gcov
503_shadowconfig.8
008_login_log_failure_in_FTMP
429_login_FAILLOG_ENAB
401_cppw_src.dpatch
# 402 should be merged in 401, but should be reviewed by SE Linux experts first
402_cppw_selinux
506_relaxed_usernames
542_useradd-O_option
463_login_delay_obeys_to_PAM
508_nologin_in_usr_sbin
505_useradd_recommend_adduser
501_commonio_group_shadow
0001-newgidmap-enforce-setgroups-deny-if-self-mapping-a-g.patch
0002-gpasswd-1-Fix-password-leak.patch
0003-Added-control-character-check.patch
0004-Overhaul-valid_field.patch

96
debian/rules vendored Executable file
View File

@@ -0,0 +1,96 @@
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
# Enable PIE, BINDNOW, and possible future flags.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
# Call autoreconf since we need to regenerate all the autofoo files
include /usr/share/cdbs/1/rules/autoreconf.mk
include /usr/share/cdbs/1/rules/debhelper.mk
# Specify where dh_install will find the files that it needs to move:
DEB_DH_INSTALL_SOURCEDIR=debian/tmp
# Specify the destination of shadow's "make install"
# (This is only needed on The Hurd, where only one package is built. On
# the other arch, DEB_DESTDIR already points to debian/tmp)
DEB_DESTDIR=$(CURDIR)/debian/tmp
include /usr/share/cdbs/1/class/autotools.mk
# Adds extra options when calling the configure script:
DEB_CONFIGURE_EXTRA_FLAGS := --disable-shared \
--without-libcrack \
--mandir=/usr/share/man \
--with-libpam \
--enable-shadowgrp \
--enable-man \
--disable-account-tools-setuid \
--with-group-name-max-length=32 \
--without-acl \
--without-attr \
--without-tcb \
SHELL=/bin/sh
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
DEB_CONFIGURE_EXTRA_FLAGS += --host=$(DEB_HOST_GNU_TYPE)
endif
# Set the default editor for vipw/vigr
CFLAGS += -DDEFAULT_EDITOR=\\\"sensible-editor\\\"
# Add extras to the install process:
binary-install/login::
ifeq ($(DEB_HOST_ARCH_OS),hurd)
# /bin/login is provided by the hurd package.
rm -f debian/login/bin/login
endif
ifneq ($(DEB_HOST_ARCH_OS),linux)
sed -i 's/session optional pam_keyinit.so/# Linux only # session optional pam_keyinit.so/' debian/login.pam
endif
dh_installpam -p login
install -c -m 444 debian/login.defs debian/login/etc/login.defs
install -c -m 444 debian/securetty.$(DEB_HOST_ARCH_OS) debian/login/etc/securetty
dh_lintian -p login
binary-install/passwd::
install -c -m 444 man/shadowconfig.8 debian/passwd/usr/share/man/man8
install -c -m 444 man/ja/shadowconfig.8 debian/passwd/usr/share/man/ja/man8
install -c -m 444 man/pl/shadowconfig.8 debian/passwd/usr/share/man/pl/man8
install -c -m 444 man/fr/shadowconfig.8 debian/passwd/usr/share/man/fr/man8
# Distribute the pam.d files; unless for the commands with disabled PAM
# support
dh_installpam -p passwd --name=passwd
dh_installpam -p passwd --name=chfn
dh_installpam -p passwd --name=chsh
dh_installpam -p passwd --name=chpasswd
dh_installpam -p passwd --name=newusers
install -c -m 644 debian/useradd.default debian/passwd/etc/default/useradd
install -d debian/passwd/sbin
install -c -m 555 debian/shadowconfig.sh debian/passwd/sbin/shadowconfig
install -c -m 444 debian/cpgr.8 debian/passwd/usr/share/man/man8
install -c -m 444 debian/cppw.8 debian/passwd/usr/share/man/man8
dh_lintian -p passwd
binary-predeb/uidmap::
chmod u+s debian/uidmap/usr/bin/newuidmap
chmod u+s debian/uidmap/usr/bin/newgidmap
binary-predeb/login::
# No real need for login to be setuid root
# chmod u+s debian/login/bin/login
chmod u+s debian/login/usr/bin/newgrp
binary-predeb/passwd::
chmod u+s debian/passwd/usr/bin/chfn
chmod u+s debian/passwd/usr/bin/chsh
chmod u+s debian/passwd/usr/bin/gpasswd
chmod u+s debian/passwd/usr/bin/passwd
chgrp shadow debian/passwd/usr/bin/chage
chgrp shadow debian/passwd/usr/bin/expiry
chmod g+s debian/passwd/usr/bin/chage
chmod g+s debian/passwd/usr/bin/expiry
clean::
sed -i 's/# Linux only # //' debian/login.pam

71
debian/securetty.hurd vendored Normal file
View File

@@ -0,0 +1,71 @@
# /etc/securetty: list of terminals on which root is allowed to login.
# See securetty(5) and login(1).
console
# for people with serial port consoles
com0
# Standard consoles
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
tty12
tty13
tty14
tty15
tty16
tty17
tty18
tty19
tty20
tty21
tty22
tty23
tty24
tty25
tty26
tty27
tty28
tty29
tty30
tty31
tty32
tty33
tty34
tty35
tty36
tty37
tty38
tty39
tty40
tty41
tty42
tty43
tty44
tty45
tty46
tty47
tty48
tty49
tty50
tty51
tty52
tty53
tty54
tty55
tty56
tty57
tty58
tty59
tty60
tty61
tty62
tty63

24
debian/securetty.kfreebsd vendored Normal file
View File

@@ -0,0 +1,24 @@
# /etc/securetty: list of terminals on which root is allowed to login.
# See securetty(5) and login(1).
console
# for people with serial port consoles
ttyd0
ttyd1
# Standard consoles
ttyv0
ttyv1
ttyv2
ttyv3
ttyv4
ttyv5
ttyv6
ttyv7
ttyva
ttyvb
ttyvc
ttyvd
ttyve
ttyvf

12
debian/securetty.knetbsd vendored Normal file
View File

@@ -0,0 +1,12 @@
# /etc/securetty: list of terminals on which root is allowed to login.
# See securetty(5) and login(1).
console
# for people with serial port consoles
tty00
# Standard consoles
ttyE0
ttyE1
ttyE2
ttyE3

412
debian/securetty.linux vendored Normal file
View File

@@ -0,0 +1,412 @@
# /etc/securetty: list of terminals on which root is allowed to login.
# See securetty(5) and login(1).
console
# Local X displays (allows empty passwords with pam_unix's nullok_secure)
:0
:0.0
:0.1
:1
:1.0
:1.1
:2
:2.0
:2.1
:3
:3.0
:3.1
#...
# ==========================================================
#
# TTYs sorted by major number according to Documentation/devices.txt
#
# ==========================================================
# Virtual consoles
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
tty12
tty13
tty14
tty15
tty16
tty17
tty18
tty19
tty20
tty21
tty22
tty23
tty24
tty25
tty26
tty27
tty28
tty29
tty30
tty31
tty32
tty33
tty34
tty35
tty36
tty37
tty38
tty39
tty40
tty41
tty42
tty43
tty44
tty45
tty46
tty47
tty48
tty49
tty50
tty51
tty52
tty53
tty54
tty55
tty56
tty57
tty58
tty59
tty60
tty61
tty62
tty63
# UART serial ports
ttyS0
ttyS1
ttyS2
ttyS3
ttyS4
ttyS5
#...ttyS191
# Serial Mux devices (Linux/PA-RISC only)
ttyB0
ttyB1
#...
# Chase serial card
ttyH0
ttyH1
#...
# Cyclades serial cards
ttyC0
ttyC1
#...ttyC31
# Digiboard serial cards
ttyD0
ttyD1
#...
# Stallion serial cards
ttyE0
ttyE1
#...ttyE255
# Specialix serial cards
ttyX0
ttyX1
#...
# Comtrol Rocketport serial cards
ttyR0
ttyR1
#...
# SDL RISCom serial cards
ttyL0
ttyL1
#...
# Hayes ESP serial card
ttyP0
ttyP1
#...
# Computone IntelliPort II serial card
ttyF0
ttyF1
#...ttyF255
# Specialix IO8+ serial card
ttyW0
ttyW1
#...
# Comtrol VS-1000 serial controller
ttyV0
ttyV1
#...
# ISI serial card
ttyM0
ttyM1
#...
# Technology Concepts serial card
ttyT0
ttyT1
#...
# Specialix RIO serial card
ttySR0
ttySR1
#...ttySR511
# Chase Research AT/PCI-Fast serial card
ttyCH0
ttyCH1
#...ttyCH63
# Moxa Intellio serial card
ttyMX0
ttyMX1
#...ttyMX127
# SmartIO serial card
ttySI0
ttySI1
#...
# USB dongles
ttyUSB0
ttyUSB1
ttyUSB2
#...
# LinkUp Systems L72xx UARTs
ttyLU0
ttyLU1
ttyLU2
ttyLU3
# StrongARM builtin serial ports
ttySA0
ttySA1
ttySA2
# SCI serial port (SuperH) ports and SC26xx serial ports
ttySC0
ttySC1
ttySC2
ttySC3
ttySC4
ttySC5
ttySC6
ttySC7
ttySC8
ttySC9
# ARM "AMBA" serial ports
ttyAM0
ttyAM1
ttyAM2
ttyAM3
ttyAM4
ttyAM5
ttyAM6
ttyAM7
ttyAM8
ttyAM9
ttyAM10
ttyAM11
ttyAM12
ttyAM13
ttyAM14
ttyAM15
# Embedded ARM AMBA PL011 ports (e.g. emulated by QEMU)
ttyAMA0
ttyAMA1
ttyAMA2
ttyAMA3
# DataBooster serial ports
ttyDB0
ttyDB1
ttyDB2
ttyDB3
ttyDB4
ttyDB5
ttyDB6
ttyDB7
# SGI Altix console ports
ttySG0
# Motorola i.MX ports
ttySMX0
ttySMX1
ttySMX2
# Marvell MPSC ports
ttyMM0
ttyMM1
# PPC CPM (SCC or SMC) ports
ttyCPM0
ttyCPM1
ttyCPM2
ttyCPM3
ttyCPM4
ttyCPM5
# Altix serial cards
ttyIOC0
ttyIOC1
#...ttyIOC31
# NEC VR4100 series SIU
ttyVR0
# NEC VR4100 series SSIU
ttyVR1
# Altix ioc4 serial cards
ttyIOC84
ttyIOC85
#...ttyIOC115
# Altix ioc3 serial cards
ttySIOC0
ttySIOC1
#...ttySIOC31
# PPC PSC ports
ttyPSC0
ttyPSC1
ttyPSC2
ttyPSC3
ttyPSC4
ttyPSC5
# ATMEL serial ports
ttyAT0
ttyAT1
#...ttyAT15
# Hilscher netX serial port
ttyNX0
ttyNX1
#...ttyNX15
# Xilinx uartlite - port
ttyUL0
ttyUL1
ttyUL2
ttyUL3
# Xen virtual console - port 0
xvc0
# pmac_zilog - port
ttyPZ0
ttyPZ1
ttyPZ2
ttyPZ3
# TX39/49 serial port
ttyTX0
ttyTX1
ttyTX2
ttyTX3
ttyTX4
ttyTX5
ttyTX6
ttyTX7
# SC26xx serial ports (see SCI serial ports (SuperH))
# MAX3100 serial ports
ttyMAX0
ttyMAX1
ttyMAX2
ttyMAX3
# OMAP serial ports
ttyO0
ttyO1
ttyO2
ttyO3
# User space serial ports
ttyU0
ttyU1
# A2232 serial card
ttyY0
ttyY1
# IBM 3270 terminal Unix tty access
3270/tty1
3270/tty2
#...
# IBM iSeries/pSeries virtual console
hvc0
hvc1
#...
#IBM pSeries console ports
hvsi0
hvsi1
hvsi2
# Equinox SST multi-port serial boards
ttyEQ0
ttyEQ1
#...ttyEQ1027
# ==========================================================
#
# Not in Documentation/Devices.txt
#
# ==========================================================
# Embedded Freescale i.MX ports
ttymxc0
ttymxc1
ttymxc2
ttymxc3
ttymxc4
ttymxc5
# LXC (Linux Containers)
lxc/console
lxc/tty1
lxc/tty2
lxc/tty3
lxc/tty4
# Serial Console for MIPS Swarm
duart0
duart1
# s390 and s390x ports in LPAR mode
ttysclp0
# ODROID XU4 serial console
ttySAC0
ttySAC1
ttySAC2
ttySAC3

49
debian/shadowconfig.sh vendored Normal file
View File

@@ -0,0 +1,49 @@
#!/bin/sh
# turn shadow passwords on or off on a Debian system
set -e
shadowon () {
set -e
pwck -q -r
grpck -r
pwconv
grpconv
chown root:root /etc/passwd /etc/group
chmod 644 /etc/passwd /etc/group
chown root:shadow /etc/shadow /etc/gshadow
chmod 640 /etc/shadow /etc/gshadow
}
shadowoff () {
set -e
pwck -q -r
grpck -r
pwunconv
grpunconv
# sometimes the passwd perms get munged
chown root:root /etc/passwd /etc/group
chmod 644 /etc/passwd /etc/group
}
case "$1" in
"on")
if shadowon ; then
echo Shadow passwords are now on.
else
echo Please correct the error and rerun \`$0 on\'
exit 1
fi
;;
"off")
if shadowoff ; then
echo Shadow passwords are now off.
else
echo Please correct the error and rerun \`$0 off\'
exit 1
fi
;;
*)
echo Usage: $0 on \| off
;;
esac

1
debian/source/format vendored Normal file
View File

@@ -0,0 +1 @@
3.0 (quilt)

4
debian/uidmap.install vendored Normal file
View File

@@ -0,0 +1,4 @@
usr/bin/newuidmap
usr/bin/newgidmap
usr/share/man/man1/newuidmap.1
usr/share/man/man1/newgidmap.1

2
debian/uidmap.lintian-overrides vendored Normal file
View File

@@ -0,0 +1,2 @@
uidmap: setuid-binary usr/bin/newgidmap 4755 root/root
uidmap: setuid-binary usr/bin/newuidmap 4755 root/root

8196
debian/upstream/signing-key.asc vendored Normal file

File diff suppressed because it is too large Load Diff

37
debian/useradd.default vendored Normal file
View File

@@ -0,0 +1,37 @@
# Default values for useradd(8)
#
# The SHELL variable specifies the default login shell on your
# system.
# Similar to DHSELL in adduser. However, we use "sh" here because
# useradd is a low level utility and should be as general
# as possible
SHELL=/bin/sh
#
# The default group for users
# 100=users on Debian systems
# Same as USERS_GID in adduser
# This argument is used when the -n flag is specified.
# The default behavior (when -n and -g are not specified) is to create a
# primary user group with the same name as the user being added to the
# system.
# GROUP=100
#
# The default home directory. Same as DHOME for adduser
# HOME=/home
#
# The number of days after a password expires until the account
# is permanently disabled
# INACTIVE=-1
#
# The default expire date
# EXPIRE=
#
# The SKEL variable specifies the directory containing "skeletal" user
# files; in other words, files such as a sample .profile that will be
# copied to the new user's home directory when it is created.
# SKEL=/etc/skel
#
# Defines whether the mail spool should be created while
# creating the account
# CREATE_MAIL_SPOOL=yes

4
debian/watch vendored Normal file
View File

@@ -0,0 +1,4 @@
version=4
opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%shadow-$1.tar.gz%" \
https://github.com/shadow-maint/shadow/tags \
(?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate

View File

@@ -229,7 +229,7 @@ SYS_UID_MAX 999
# Extra per user uids
SUB_UID_MIN 100000
SUB_UID_MAX 600100000
SUB_UID_COUNT 10000
SUB_UID_COUNT 65536
#
# Min/max values for automatic gid selection in groupadd(8)
@@ -242,7 +242,7 @@ SYS_GID_MAX 999
# Extra per user group ids
SUB_GID_MIN 100000
SUB_GID_MAX 600100000
SUB_GID_COUNT 10000
SUB_GID_COUNT 65536
#
# Max number of login(1) retries if password is bad
@@ -393,3 +393,8 @@ USERGROUPS_ENAB yes
#
#CREATE_HOME yes
#
# Force use shadow, even if shadow passwd & shadow group files are
# missing.
#
#FORCE_SHADOW yes

View File

@@ -301,15 +301,12 @@ static int create_backup (const char *backup, FILE * fp)
struct utimbuf ub;
FILE *bkfp;
int c;
mode_t mask;
if (fstat (fileno (fp), &sb) != 0) {
return -1;
}
mask = umask (077);
bkfp = fopen (backup, "w");
(void) umask (mask);
bkfp = fopen_set_perms (backup, "w", &sb);
if (NULL == bkfp) {
return -1;
}
@@ -754,16 +751,16 @@ commonio_sort (struct commonio_db *db, int (*cmp) (const void *, const void *))
for (ptr = db->head;
(NULL != ptr)
#if KEEP_NIS_AT_END
&& (NULL != ptr->line)
&& ( ('+' != ptr->line[0])
&& ('-' != ptr->line[0]))
&& ((NULL == ptr->line)
|| (('+' != ptr->line[0])
&& ('-' != ptr->line[0])))
#endif
;
ptr = ptr->next) {
n++;
}
#if KEEP_NIS_AT_END
if ((NULL != ptr) && (NULL != ptr->line)) {
if (NULL != ptr) {
nis = ptr;
}
#endif
@@ -968,11 +965,10 @@ int commonio_close (struct commonio_db *db)
} else {
/*
* Default permissions for new [g]shadow files.
* (passwd and group always exist...)
*/
sb.st_mode = 0400;
sb.st_uid = 0;
sb.st_gid = 0;
sb.st_mode = db->st_mode;
sb.st_uid = db->st_uid;
sb.st_gid = db->st_gid;
}
snprintf (buf, sizeof buf, "%s+", db->filename);
@@ -1081,6 +1077,7 @@ int commonio_update (struct commonio_db *db, const void *eptr)
if (NULL != p) {
if (next_entry_by_name (db, p->next, db->ops->getname (eptr)) != NULL) {
fprintf (stderr, _("Multiple entries named '%s' in %s. Please fix this with pwck or grpck.\n"), db->ops->getname (eptr), db->filename);
db->ops->free (nentry);
return 0;
}
db->ops->free (p->eptr);

View File

@@ -31,8 +31,8 @@
*/
/* $Id$ */
#ifndef _COMMONIO_H
#define _COMMONIO_H
#ifndef COMMONIO_H
#define COMMONIO_H
#ifdef WITH_SELINUX
#include <selinux/selinux.h>
@@ -123,6 +123,12 @@ struct commonio_db {
#ifdef WITH_SELINUX
/*@null@*/security_context_t scontext;
#endif
/*
* Default permissions and owner for newly created data file.
*/
mode_t st_mode;
uid_t st_uid;
gid_t st_gid;
/*
* Head, tail, current position in linked list.
*/

View File

@@ -49,6 +49,32 @@ struct itemdef {
/*@null@*/char *value; /* value given, or NULL if no value */
};
#define PAMDEFS \
{"CHFN_AUTH", NULL}, \
{"CHSH_AUTH", NULL}, \
{"CRACKLIB_DICTPATH", NULL}, \
{"ENV_HZ", NULL}, \
{"ENVIRON_FILE", NULL}, \
{"ENV_TZ", NULL}, \
{"FAILLOG_ENAB", NULL}, \
{"FTMP_FILE", NULL}, \
{"ISSUE_FILE", NULL}, \
{"LASTLOG_ENAB", NULL}, \
{"LOGIN_STRING", NULL}, \
{"MAIL_CHECK_ENAB", NULL}, \
{"MOTD_FILE", NULL}, \
{"NOLOGINS_FILE", NULL}, \
{"OBSCURE_CHECKS_ENAB", NULL}, \
{"PASS_ALWAYS_WARN", NULL}, \
{"PASS_CHANGE_TRIES", NULL}, \
{"PASS_MAX_LEN", NULL}, \
{"PASS_MIN_LEN", NULL}, \
{"PORTTIME_CHECKS_ENAB", NULL}, \
{"QUOTAS_ENAB", NULL}, \
{"SU_WHEEL_ONLY", NULL}, \
{"ULIMIT", NULL},
#define NUMDEFS (sizeof(def_table)/sizeof(def_table[0]))
static struct itemdef def_table[] = {
{"CHFN_RESTRICT", NULL},
@@ -102,29 +128,7 @@ static struct itemdef def_table[] = {
{"USERDEL_CMD", NULL},
{"USERGROUPS_ENAB", NULL},
#ifndef USE_PAM
{"CHFN_AUTH", NULL},
{"CHSH_AUTH", NULL},
{"CRACKLIB_DICTPATH", NULL},
{"ENV_HZ", NULL},
{"ENVIRON_FILE", NULL},
{"ENV_TZ", NULL},
{"FAILLOG_ENAB", NULL},
{"FTMP_FILE", NULL},
{"ISSUE_FILE", NULL},
{"LASTLOG_ENAB", NULL},
{"LOGIN_STRING", NULL},
{"MAIL_CHECK_ENAB", NULL},
{"MOTD_FILE", NULL},
{"NOLOGINS_FILE", NULL},
{"OBSCURE_CHECKS_ENAB", NULL},
{"PASS_ALWAYS_WARN", NULL},
{"PASS_CHANGE_TRIES", NULL},
{"PASS_MAX_LEN", NULL},
{"PASS_MIN_LEN", NULL},
{"PORTTIME_CHECKS_ENAB", NULL},
{"QUOTAS_ENAB", NULL},
{"SU_WHEEL_ONLY", NULL},
{"ULIMIT", NULL},
PAMDEFS
#endif
#ifdef USE_SYSLOG
{"SYSLOG_SG_ENAB", NULL},
@@ -134,6 +138,15 @@ static struct itemdef def_table[] = {
{"TCB_AUTH_GROUP", NULL},
{"TCB_SYMLINKS", NULL},
{"USE_TCB", NULL},
#endif
{"FORCE_SHADOW", NULL},
{NULL, NULL}
};
#define NUMKNOWNDEFS (sizeof(knowndef_table)/sizeof(knowndef_table[0]))
static struct itemdef knowndef_table[] = {
#ifdef USE_PAM
PAMDEFS
#endif
{NULL, NULL}
};
@@ -397,10 +410,17 @@ static /*@observer@*/ /*@null@*/struct itemdef *def_find (const char *name)
* Item was never found.
*/
for (ptr = knowndef_table; NULL != ptr->name; ptr++) {
if (strcmp (ptr->name, name) == 0) {
goto out;
}
}
fprintf (stderr,
_("configuration error - unknown item '%s' (notify administrator)\n"),
name);
SYSLOG ((LOG_CRIT, "unknown configuration item `%s'", name));
out:
return (struct itemdef *) NULL;
}
@@ -416,23 +436,26 @@ static void def_load (void)
FILE *fp;
char buf[1024], *name, *value, *s;
/*
* Set the initialized flag.
* (do it early to prevent recursion in putdef_str())
*/
def_loaded = true;
/*
* Open the configuration definitions file.
*/
fp = fopen (def_fname, "r");
if (NULL == fp) {
if (errno == ENOENT)
return;
int err = errno;
SYSLOG ((LOG_CRIT, "cannot open login definitions %s [%s]",
def_fname, strerror (err)));
exit (EXIT_FAILURE);
}
/*
* Set the initialized flag.
* (do it early to prevent recursion in putdef_str())
*/
def_loaded = true;
/*
* Go through all of the lines in the file.
*/

View File

@@ -44,22 +44,19 @@
*/
int getulong (const char *numstr, /*@out@*/unsigned long int *result)
{
long long int val;
unsigned long int val;
char *endptr;
errno = 0;
val = strtoll (numstr, &endptr, 0);
val = strtoul (numstr, &endptr, 0);
if ( ('\0' == *numstr)
|| ('\0' != *endptr)
|| (ERANGE == errno)
/*@+ignoresigns@*/
|| (val != (unsigned long int)val)
/*@=ignoresigns@*/
) {
return 0;
}
*result = (unsigned long int)val;
*result = val;
return 1;
}

View File

@@ -130,6 +130,9 @@ static /*@owned@*/struct commonio_db group_db = {
#ifdef WITH_SELINUX
NULL, /* scontext */
#endif
0644, /* st_mode */
0, /* st_uid */
0, /* st_gid */
NULL, /* head */
NULL, /* tail */
NULL, /* cursor */
@@ -335,8 +338,7 @@ static /*@null@*/struct commonio_entry *merge_group_entries (
errno = ENOMEM;
return NULL;
}
snprintf(new_line, new_line_len, "%s\n%s", gr1->line, gr2->line);
new_line[new_line_len] = '\0';
snprintf(new_line, new_line_len + 1, "%s\n%s", gr1->line, gr2->line);
/* Concatenate the 2 list of members */
for (i=0; NULL != gptr1->gr_mem[i]; i++);

View File

@@ -1,458 +0,0 @@
/*
* Copyright (c) 1990 - 1994, Julianne Frances Haugh
* Copyright (c) 1996 - 2000, Marek Michałkiewicz
* Copyright (c) 2001 , Michał Moskal
* Copyright (c) 2005 , Tomasz Kłoczko
* Copyright (c) 2007 - 2010, Nicolas François
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the copyright holders or contributors may not be used to
* endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <config.h>
#ident "$Id$"
#include <assert.h>
#include <stdio.h>
#include "prototypes.h"
#include "defines.h"
#include "commonio.h"
#include "getdef.h"
#include "groupio.h"
static /*@null@*/struct commonio_entry *merge_group_entries (
/*@null@*/ /*@returned@*/struct commonio_entry *gr1,
/*@null@*/struct commonio_entry *gr2);
static int split_groups (unsigned int max_members);
static int group_open_hook (void);
static /*@null@*/ /*@only@*/void *group_dup (const void *ent)
{
const struct group *gr = ent;
return __gr_dup (gr);
}
static void group_free (/*@out@*/ /*@only@*/void *ent)
{
struct group *gr = ent;
gr_free (gr);
}
static const char *group_getname (const void *ent)
{
const struct group *gr = ent;
return gr->gr_name;
}
static void *group_parse (const char *line)
{
return (void *) sgetgrent (line);
}
static int group_put (const void *ent, FILE * file)
{
const struct group *gr = ent;
if ( (NULL == gr)
|| (valid_field (gr->gr_name, ":\n") == -1)
|| (valid_field (gr->gr_passwd, ":\n") == -1)
|| (gr->gr_gid == (gid_t)-1)) {
return -1;
}
/* FIXME: fail also if gr->gr_mem == NULL ?*/
if (NULL != gr->gr_mem) {
size_t i;
for (i = 0; NULL != gr->gr_mem[i]; i++) {
if (valid_field (gr->gr_mem[i], ",:\n") == -1) {
return -1;
}
}
}
return (putgrent (gr, file) == -1) ? -1 : 0;
}
static int group_close_hook (void)
{
unsigned int max_members = getdef_unum("MAX_MEMBERS_PER_GROUP", 0);
if (0 == max_members) {
return 1;
}
return split_groups (max_members);
}
static struct commonio_ops group_ops = {
group_dup,
group_free,
group_getname,
group_parse,
group_put,
fgetsx,
fputsx,
group_open_hook,
group_close_hook
};
static /*@owned@*/struct commonio_db group_db = {
GROUP_FILE, /* filename */
&group_ops, /* ops */
NULL, /* fp */
#ifdef WITH_SELINUX
NULL, /* scontext */
#endif
NULL, /* head */
NULL, /* tail */
NULL, /* cursor */
false, /* changed */
false, /* isopen */
false, /* locked */
false /* readonly */
};
int gr_setdbname (const char *filename)
{
return commonio_setname (&group_db, filename);
}
/*@observer@*/const char *gr_dbname (void)
{
return group_db.filename;
}
int gr_lock (void)
{
return commonio_lock (&group_db);
}
int gr_open (int mode)
{
return commonio_open (&group_db, mode);
}
/*@observer@*/ /*@null@*/const struct group *gr_locate (const char *name)
{
return commonio_locate (&group_db, name);
}
/*@observer@*/ /*@null@*/const struct group *gr_locate_gid (gid_t gid)
{
const struct group *grp;
gr_rewind ();
while ( ((grp = gr_next ()) != NULL)
&& (grp->gr_gid != gid)) {
}
return grp;
}
int gr_update (const struct group *gr)
{
return commonio_update (&group_db, (const void *) gr);
}
int gr_remove (const char *name)
{
return commonio_remove (&group_db, name);
}
int gr_rewind (void)
{
return commonio_rewind (&group_db);
}
/*@observer@*/ /*@null@*/const struct group *gr_next (void)
{
return commonio_next (&group_db);
}
int gr_close (void)
{
return commonio_close (&group_db);
}
int gr_unlock (void)
{
return commonio_unlock (&group_db);
}
void __gr_set_changed (void)
{
group_db.changed = true;
}
/*@dependent@*/ /*@null@*/struct commonio_entry *__gr_get_head (void)
{
return group_db.head;
}
/*@observer@*/const struct commonio_db *__gr_get_db (void)
{
return &group_db;
}
void __gr_del_entry (const struct commonio_entry *ent)
{
commonio_del_entry (&group_db, ent);
}
static int gr_cmp (const void *p1, const void *p2)
{
gid_t u1, u2;
if ((*(struct commonio_entry **) p1)->eptr == NULL) {
return 1;
}
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;
if (u1 < u2) {
return -1;
} else if (u1 > u2) {
return 1;
} else {
return 0;
}
}
/* Sort entries by GID */
int gr_sort ()
{
return commonio_sort (&group_db, gr_cmp);
}
static int group_open_hook (void)
{
unsigned int max_members = getdef_unum("MAX_MEMBERS_PER_GROUP", 0);
struct commonio_entry *gr1, *gr2;
if (0 == max_members) {
return 1;
}
for (gr1 = group_db.head; NULL != gr1; gr1 = gr1->next) {
for (gr2 = gr1->next; NULL != gr2; gr2 = gr2->next) {
struct group *g1 = (struct group *)gr1->eptr;
struct group *g2 = (struct group *)gr2->eptr;
if (NULL != g1 &&
NULL != g2 &&
0 == strcmp (g1->gr_name, g2->gr_name) &&
0 == strcmp (g1->gr_passwd, g2->gr_passwd) &&
g1->gr_gid == g2->gr_gid) {
/* Both group entries refer to the same
* group. It is a split group. Merge the
* members. */
gr1 = merge_group_entries (gr1, gr2);
if (NULL == gr1)
return 0;
/* Unlink gr2 */
if (NULL != gr2->next) {
gr2->next->prev = gr2->prev;
}
/* gr2 does not start with head */
assert (NULL != gr2->prev);
gr2->prev->next = gr2->next;
}
}
assert (NULL != gr1);
}
return 1;
}
/*
* Merge the list of members of the two group entries.
*
* The commonio_entry arguments shall be group entries.
*
* You should not merge the members of two groups if they don't have the
* same name, password and gid.
*
* It merge the members of the second entry in the first one, and return
* the modified first entry on success, or NULL on failure (with errno
* set).
*/
static /*@null@*/struct commonio_entry *merge_group_entries (
/*@null@*/ /*@returned@*/struct commonio_entry *gr1,
/*@null@*/struct commonio_entry *gr2)
{
struct group *gptr1;
struct group *gptr2;
char **new_members;
size_t members = 0;
char *new_line;
size_t new_line_len, i;
if (NULL == gr2 || NULL == gr1) {
errno = EINVAL;
return NULL;
}
gptr1 = (struct group *)gr1->eptr;
gptr2 = (struct group *)gr2->eptr;
if (NULL == gptr2 || NULL == gptr1) {
errno = EINVAL;
return NULL;
}
/* Concatenate the 2 lines */
new_line_len = strlen (gr1->line) + strlen (gr2->line) +2;
new_line = (char *)malloc ((new_line_len + 1) * sizeof(char*));
if (NULL == new_line) {
errno = ENOMEM;
return NULL;
}
snprintf(new_line, new_line_len, "%s\n%s", gr1->line, gr2->line);
new_line[new_line_len] = '\0';
/* Concatenate the 2 list of members */
for (i=0; NULL != gptr1->gr_mem[i]; i++);
members += i;
for (i=0; NULL != gptr2->gr_mem[i]; i++) {
char **pmember = gptr1->gr_mem;
while (NULL != *pmember) {
if (0 == strcmp(*pmember, gptr2->gr_mem[i])) {
break;
}
pmember++;
}
if (NULL == *pmember) {
members++;
}
}
new_members = (char **)malloc ( (members+1) * sizeof(char*) );
if (NULL == new_members) {
free (new_line);
errno = ENOMEM;
return NULL;
}
for (i=0; NULL != gptr1->gr_mem[i]; i++) {
new_members[i] = gptr1->gr_mem[i];
}
members = i;
for (i=0; NULL != gptr2->gr_mem[i]; i++) {
char **pmember = new_members;
while (NULL != *pmember) {
if (0 == strcmp(*pmember, gptr2->gr_mem[i])) {
break;
}
pmember++;
}
if (NULL == *pmember) {
new_members[members] = gptr2->gr_mem[i];
members++;
new_members[members] = NULL;
}
}
gr1->line = new_line;
gptr1->gr_mem = new_members;
return gr1;
}
/*
* Scan the group database and split the groups which have more members
* than specified, if this is the result from a current change.
*
* Return 0 on failure (errno set) and 1 on success.
*/
static int split_groups (unsigned int max_members)
{
struct commonio_entry *gr;
for (gr = group_db.head; NULL != gr; gr = gr->next) {
struct group *gptr = (struct group *)gr->eptr;
struct commonio_entry *new;
struct group *new_gptr;
unsigned int members = 0;
unsigned int i;
/* Check if this group must be split */
if (!gr->changed) {
continue;
}
if (NULL == gptr) {
continue;
}
for (members = 0; NULL != gptr->gr_mem[members]; members++);
if (members <= max_members) {
continue;
}
new = (struct commonio_entry *) malloc (sizeof *new);
if (NULL == new) {
errno = ENOMEM;
return 0;
}
new->eptr = group_dup(gr->eptr);
if (NULL == new->eptr) {
free (new);
errno = ENOMEM;
return 0;
}
new_gptr = (struct group *)new->eptr;
new->line = NULL;
new->changed = true;
/* Enforce the maximum number of members on gptr */
for (i = max_members; NULL != gptr->gr_mem[i]; i++) {
free (gptr->gr_mem[i]);
gptr->gr_mem[i] = NULL;
}
/* Shift all the members */
/* The number of members in new_gptr will be check later */
for (i = 0; NULL != new_gptr->gr_mem[i + max_members]; i++) {
if (NULL != new_gptr->gr_mem[i]) {
free (new_gptr->gr_mem[i]);
}
new_gptr->gr_mem[i] = new_gptr->gr_mem[i + max_members];
new_gptr->gr_mem[i + max_members] = NULL;
}
for (; NULL != new_gptr->gr_mem[i]; i++) {
free (new_gptr->gr_mem[i]);
new_gptr->gr_mem[i] = NULL;
}
/* insert the new entry in the list */
new->prev = gr;
new->next = gr->next;
gr->next = new;
}
return 1;
}

View File

@@ -55,15 +55,14 @@
gr->gr_name = strdup (grent->gr_name);
/*@=mustfreeonly@*/
if (NULL == gr->gr_name) {
free(gr);
gr_free(gr);
return NULL;
}
/*@-mustfreeonly@*/
gr->gr_passwd = strdup (grent->gr_passwd);
/*@=mustfreeonly@*/
if (NULL == gr->gr_passwd) {
free(gr->gr_name);
free(gr);
gr_free(gr);
return NULL;
}
@@ -73,21 +72,13 @@
gr->gr_mem = (char **) malloc ((i + 1) * sizeof (char *));
/*@=mustfreeonly@*/
if (NULL == gr->gr_mem) {
free(gr->gr_passwd);
free(gr->gr_name);
free(gr);
gr_free(gr);
return NULL;
}
for (i = 0; grent->gr_mem[i]; i++) {
gr->gr_mem[i] = strdup (grent->gr_mem[i]);
if (NULL == gr->gr_mem[i]) {
int j;
for (j=0; j<i; j++)
free(gr->gr_mem[j]);
free(gr->gr_mem);
free(gr->gr_passwd);
free(gr->gr_name);
free(gr);
gr_free(gr);
return NULL;
}
}

View File

@@ -179,6 +179,9 @@ extern int getrange (char *range,
unsigned long *min, bool *has_min,
unsigned long *max, bool *has_max);
/* gettime.c */
extern time_t gettime ();
/* get_uid.c */
extern int get_uid (const char *uidstr, uid_t *uid);

View File

@@ -105,6 +105,9 @@ static struct commonio_db passwd_db = {
#ifdef WITH_SELINUX
NULL, /* scontext */
#endif
0644, /* st_mode */
0, /* st_uid */
0, /* st_gid */
NULL, /* head */
NULL, /* tail */
NULL, /* cursor */

View File

@@ -56,45 +56,35 @@
pw->pw_name = strdup (pwent->pw_name);
/*@=mustfreeonly@*/
if (NULL == pw->pw_name) {
free(pw);
pw_free(pw);
return NULL;
}
/*@-mustfreeonly@*/
pw->pw_passwd = strdup (pwent->pw_passwd);
/*@=mustfreeonly@*/
if (NULL == pw->pw_passwd) {
free(pw->pw_name);
free(pw);
pw_free(pw);
return NULL;
}
/*@-mustfreeonly@*/
pw->pw_gecos = strdup (pwent->pw_gecos);
/*@=mustfreeonly@*/
if (NULL == pw->pw_gecos) {
free(pw->pw_passwd);
free(pw->pw_name);
free(pw);
pw_free(pw);
return NULL;
}
/*@-mustfreeonly@*/
pw->pw_dir = strdup (pwent->pw_dir);
/*@=mustfreeonly@*/
if (NULL == pw->pw_dir) {
free(pw->pw_gecos);
free(pw->pw_passwd);
free(pw->pw_name);
free(pw);
pw_free(pw);
return NULL;
}
/*@-mustfreeonly@*/
pw->pw_shell = strdup (pwent->pw_shell);
/*@=mustfreeonly@*/
if (NULL == pw->pw_shell) {
free(pw->pw_dir);
free(pw->pw_gecos);
free(pw->pw_passwd);
free(pw->pw_name);
free(pw);
pw_free(pw);
return NULL;
}

View File

@@ -40,6 +40,7 @@
#include "prototypes.h"
#include "defines.h"
#include "commonio.h"
#include "getdef.h"
#include "sgroupio.h"
/*@null@*/ /*@only@*/struct sgrp *__sgr_dup (const struct sgrp *sgent)
@@ -228,6 +229,9 @@ static struct commonio_db gshadow_db = {
#ifdef WITH_SELINUX
NULL, /* scontext */
#endif
0400, /* st_mode */
0, /* st_uid */
0, /* st_gid */
NULL, /* head */
NULL, /* tail */
NULL, /* cursor */
@@ -249,6 +253,8 @@ int sgr_setdbname (const char *filename)
bool sgr_file_present (void)
{
if (getdef_bool ("FORCE_SHADOW"))
return true;
return commonio_present (&gshadow_db);
}

View File

@@ -40,6 +40,7 @@
#include <shadow.h>
#include <stdio.h>
#include "commonio.h"
#include "getdef.h"
#include "shadowio.h"
#ifdef WITH_TCB
#include <tcb.h>
@@ -104,6 +105,9 @@ static struct commonio_db shadow_db = {
#ifdef WITH_SELINUX
NULL, /* scontext */
#endif /* WITH_SELINUX */
0400, /* st_mode */
0, /* st_uid */
0, /* st_gid */
NULL, /* head */
NULL, /* tail */
NULL, /* cursor */
@@ -125,6 +129,8 @@ int spw_setdbname (const char *filename)
bool spw_file_present (void)
{
if (getdef_bool ("FORCE_SHADOW"))
return true;
return commonio_present (&shadow_db);
}

View File

@@ -31,8 +31,8 @@
*/
/* $Id$ */
#ifndef _SHADOWIO_H
#define _SHADOWIO_H
#ifndef SHADOWIO_H
#define SHADOWIO_H
#include "defines.h"

View File

@@ -11,6 +11,8 @@
#include <stdio.h>
#include "commonio.h"
#include "subordinateio.h"
#include <sys/types.h>
#include <pwd.h>
struct subordinate_range {
const char *owner;
@@ -189,6 +191,15 @@ static const struct subordinate_range *find_range(struct commonio_db *db,
const char *owner, unsigned long val)
{
const struct subordinate_range *range;
/*
* Search for exact username/group specification
*
* This is the original method - go fast through the db, doing only
* exact username/group string comparison. Therefore we leave it as-is
* for the time being, in order to keep it equally fast as it was
* before.
*/
commonio_rewind(db);
while ((range = commonio_next(db)) != NULL) {
unsigned long first = range->start;
@@ -200,6 +211,76 @@ static const struct subordinate_range *find_range(struct commonio_db *db,
if ((val >= first) && (val <= last))
return range;
}
/*
* We only do special handling for these two files
*/
if ((0 != strcmp(db->filename, "/etc/subuid")) && (0 != strcmp(db->filename, "/etc/subgid")))
return NULL;
/*
* Search loop above did not produce any result. Let's rerun it,
* but this time try to matcha actual UIDs. The first entry that
* matches is considered a success.
* (It may be specified as literal UID or as another username which
* has the same UID as the username we are looking for.)
*/
struct passwd *pwd;
uid_t owner_uid;
char owner_uid_string[33] = "";
/* Get UID of the username we are looking for */
pwd = getpwnam(owner);
if (NULL == pwd) {
/* Username not defined in /etc/passwd, or error occured during lookup */
return NULL;
}
owner_uid = pwd->pw_uid;
sprintf(owner_uid_string, "%lu", (unsigned long int)owner_uid);
commonio_rewind(db);
while ((range = commonio_next(db)) != NULL) {
unsigned long first = range->start;
unsigned long last = first + range->count - 1;
/* For performance reasons check range before using getpwnam() */
if ((val < first) || (val > last)) {
continue;
}
/*
* Range matches. Check if range owner is specified
* as numeric UID and if it matches.
*/
if (0 == strcmp(range->owner, owner_uid_string)) {
return range;
}
/*
* Ok, this range owner is not specified as numeric UID
* we are looking for. It may be specified as another
* UID or as a literal username.
*
* If specified as another UID, the call to getpwnam()
* will return NULL.
*
* If specified as literal username, we will get its
* UID and compare that to UID we are looking for.
*/
const struct passwd *range_owner_pwd;
range_owner_pwd = getpwnam(range->owner);
if (NULL == range_owner_pwd) {
continue;
}
if (owner_uid == range_owner_pwd->pw_uid) {
return range;
}
}
return NULL;
}
@@ -460,6 +541,9 @@ static struct commonio_db subordinate_uid_db = {
#ifdef WITH_SELINUX
NULL, /* scontext */
#endif
0644, /* st_mode */
0, /* st_uid */
0, /* st_gid */
NULL, /* head */
NULL, /* tail */
NULL, /* cursor */
@@ -538,6 +622,9 @@ static struct commonio_db subordinate_gid_db = {
#ifdef WITH_SELINUX
NULL, /* scontext */
#endif
0644, /* st_mode */
0, /* st_uid */
0, /* st_gid */
NULL, /* head */
NULL, /* tail */
NULL, /* cursor */

View File

@@ -1,7 +1,7 @@
EXTRA_DIST = .indent.pro xgetXXbyYY.c
INCLUDES = -I$(top_srcdir)/lib
AM_CPPFLAGS = -I$(top_srcdir)/lib
noinst_LIBRARIES = libmisc.a
@@ -31,6 +31,7 @@ libmisc_a_SOURCES = \
getdate.y \
getgr_nam_gid.c \
getrange.c \
gettime.c \
hushed.c \
idmapping.h \
idmapping.c \

View File

@@ -1,6 +1,7 @@
/*
* Copyright (c) 1991 - 1994, Julianne Frances Haugh
* Copyright (c) 2008 - 2011, Nicolas François
* Copyright (c) 2014, Red Hat, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -38,6 +39,117 @@
#include "groupio.h"
#include "getdef.h"
/*
* get_ranges - Get the minimum and maximum ID ranges for the search
*
* This function will return the minimum and maximum ranges for IDs
*
* 0: The function completed successfully
* EINVAL: The provided ranges are impossible (such as maximum < minimum)
*
* preferred_min: The special-case minimum value for a specifically-
* requested ID, which may be lower than the standard min_id
*/
static int get_ranges (bool sys_group, gid_t *min_id, gid_t *max_id,
gid_t *preferred_min)
{
gid_t gid_def_max = 0;
if (sys_group) {
/* System groups */
/* A requested ID is allowed to be below the autoselect range */
*preferred_min = (gid_t) 1;
/* Get the minimum ID range from login.defs or default to 101 */
*min_id = (gid_t) getdef_ulong ("SYS_GID_MIN", 101UL);
/*
* If SYS_GID_MAX is unspecified, we should assume it to be one
* less than the GID_MIN (which is reserved for non-system accounts)
*/
gid_def_max = (gid_t) getdef_ulong ("GID_MIN", 1000UL) - 1;
*max_id = (gid_t) getdef_ulong ("SYS_GID_MAX",
(unsigned long) gid_def_max);
/* Check that the ranges make sense */
if (*max_id < *min_id) {
(void) fprintf (stderr,
_("%s: Invalid configuration: SYS_GID_MIN (%lu), "
"GID_MIN (%lu), SYS_GID_MAX (%lu)\n"),
Prog, (unsigned long) *min_id,
getdef_ulong ("GID_MIN", 1000UL),
(unsigned long) *max_id);
return EINVAL;
}
} else {
/* Non-system groups */
/* Get the values from login.defs or use reasonable defaults */
*min_id = (gid_t) getdef_ulong ("GID_MIN", 1000UL);
*max_id = (gid_t) getdef_ulong ("GID_MAX", 60000UL);
/*
* The preferred minimum should match the standard ID minimum
* for non-system groups.
*/
*preferred_min = *min_id;
/* Check that the ranges make sense */
if (*max_id < *min_id) {
(void) fprintf (stderr,
_("%s: Invalid configuration: GID_MIN (%lu), "
"GID_MAX (%lu)\n"),
Prog, (unsigned long) *min_id,
(unsigned long) *max_id);
return EINVAL;
}
}
return 0;
}
/*
* check_gid - See if the requested GID is available
*
* On success, return 0
* If the ID is in use, return EEXIST
* If the ID is outside the range, return ERANGE
* In other cases, return errno from getgrgid()
*/
static int check_gid (const gid_t gid,
const gid_t gid_min,
const gid_t gid_max,
bool *used_gids)
{
/* First test that the preferred ID is in the range */
if (gid < gid_min || gid > gid_max) {
return ERANGE;
}
/*
* Check whether we already detected this GID
* using the gr_next() loop
*/
if (used_gids != NULL && used_gids[gid]) {
return EEXIST;
}
/* Check if the GID exists according to NSS */
errno = 0;
if (getgrgid (gid) != NULL) {
return EEXIST;
} else {
/* getgrgid() was NULL
* we have to ignore errors as temporary
* failures of remote user identity services
* would completely block user/group creation
*/
}
/* If we've made it here, the GID must be available */
return 0;
}
/*
* find_new_gid - Find a new unused GID.
*
@@ -49,161 +161,338 @@
* Return 0 on success, -1 if no unused GIDs are available.
*/
int find_new_gid (bool sys_group,
gid_t *gid,
/*@null@*/gid_t const *preferred_gid)
gid_t *gid,
/*@null@*/gid_t const *preferred_gid)
{
const struct group *grp;
gid_t gid_min, gid_max, group_id;
bool *used_gids;
const struct group *grp;
gid_t gid_min, gid_max, preferred_min;
gid_t group_id, id;
gid_t lowest_found, highest_found;
int result;
int nospam = 0;
assert (gid != NULL);
assert(gid != NULL);
if (!sys_group) {
gid_min = (gid_t) getdef_ulong ("GID_MIN", 1000UL);
gid_max = (gid_t) getdef_ulong ("GID_MAX", 60000UL);
if (gid_max < gid_min) {
(void) fprintf (stderr,
_("%s: Invalid configuration: GID_MIN (%lu), GID_MAX (%lu)\n"),
Prog, (unsigned long) gid_min, (unsigned long) gid_max);
return -1;
}
} else {
gid_min = (gid_t) getdef_ulong ("SYS_GID_MIN", 101UL);
gid_max = (gid_t) getdef_ulong ("GID_MIN", 1000UL) - 1;
gid_max = (gid_t) getdef_ulong ("SYS_GID_MAX", (unsigned long) gid_max);
if (gid_max < gid_min) {
(void) fprintf (stderr,
_("%s: Invalid configuration: SYS_GID_MIN (%lu), GID_MIN (%lu), SYS_GID_MAX (%lu)\n"),
Prog, (unsigned long) gid_min, getdef_ulong ("GID_MIN", 1000UL), (unsigned long) gid_max);
/*
* First, figure out what ID range is appropriate for
* automatic assignment
*/
result = get_ranges (sys_group, &gid_min, &gid_max, &preferred_min);
if (result == EINVAL) {
return -1;
}
/* Check if the preferred GID is available */
if (preferred_gid) {
result = check_gid (*preferred_gid, preferred_min, gid_max, NULL);
if (result == 0) {
/*
* Make sure the GID isn't queued for use already
*/
if (gr_locate_gid (*preferred_gid) == NULL) {
*gid = *preferred_gid;
return 0;
}
/*
* gr_locate_gid() found the GID in an as-yet uncommitted
* entry. We'll proceed below and auto-set a GID.
*/
} else if (result == EEXIST || result == ERANGE) {
/*
* Continue on below. At this time, we won't
* treat these two cases differently.
*/
} else {
/*
* An unexpected error occurred. We should report
* this and fail the group creation.
* This differs from the automatic creation
* behavior below, since if a specific GID was
* requested and generated an error, the user is
* more likely to want to stop and address the
* issue.
*/
fprintf (stderr,
_("%s: Encountered error attempting to use "
"preferred GID: %s\n"),
Prog, strerror (result));
return -1;
}
}
/*
* Search the entire group file,
* looking for the next unused value.
*
* We first check the local database with gr_rewind/gr_next to find
* all local values that are in use.
*
* We then compare the next free value to all databases (local and
* remote) and iterate until we find a free one. If there are free
* values beyond the lowest (system groups) or highest (non-system
* groups), we will prefer those and avoid potentially reclaiming a
* deleted group (which can be a security issue, since it may grant
* access to files belonging to that former group).
*
* If there are no GIDs available at the end of the search, we will
* have no choice but to iterate through the range looking for gaps.
*
*/
/* Create an array to hold all of the discovered GIDs */
used_gids = malloc (sizeof (bool) * (gid_max +1));
if (NULL == used_gids) {
fprintf (stderr,
_("%s: failed to allocate memory: %s\n"),
Prog, strerror (errno));
_("%s: failed to allocate memory: %s\n"),
Prog, strerror (errno));
return -1;
}
memset (used_gids, false, sizeof (bool) * (gid_max + 1));
if ( (NULL != preferred_gid)
&& (*preferred_gid >= gid_min)
&& (*preferred_gid <= gid_max)
/* Check if the user exists according to NSS */
&& (getgrgid (*preferred_gid) == NULL)
/* Check also the local database in case of uncommitted
* changes */
&& (gr_locate_gid (*preferred_gid) == NULL)) {
*gid = *preferred_gid;
free (used_gids);
return 0;
}
/*
* Search the entire group file,
* looking for the largest unused value.
*
* We check the list of groups according to NSS (setgrent/getgrent),
* but we also check the local database (gr_rewind/gr_next) in case
* some groups were created but the changes were not committed yet.
*/
if (sys_group) {
gid_t id;
/* setgrent / getgrent / endgrent can be very slow with
* LDAP configurations (and many accounts).
* Since there is a limited amount of IDs to be tested
* for system accounts, we just check the existence
* of IDs with getgrgid.
/* First look for the lowest and highest value in the local database */
(void) gr_rewind ();
highest_found = gid_min;
lowest_found = gid_max;
while ((grp = gr_next ()) != NULL) {
/*
* Does this entry have a lower GID than the lowest we've found
* so far?
*/
group_id = gid_max;
for (id = gid_max; id >= gid_min; id--) {
if (getgrgid (id) != NULL) {
group_id = id - 1;
used_gids[id] = true;
}
if ((grp->gr_gid <= lowest_found) && (grp->gr_gid >= gid_min)) {
lowest_found = grp->gr_gid - 1;
}
(void) gr_rewind ();
while ((grp = gr_next ()) != NULL) {
if ((grp->gr_gid <= group_id) && (grp->gr_gid >= gid_min)) {
group_id = grp->gr_gid - 1;
}
/* create index of used GIDs */
if (grp->gr_gid <= gid_max) {
used_gids[grp->gr_gid] = true;
}
/*
* Does this entry have a higher GID than the highest we've found
* so far?
*/
if ((grp->gr_gid >= highest_found) && (grp->gr_gid <= gid_max)) {
highest_found = grp->gr_gid + 1;
}
} else {
group_id = gid_min;
setgrent ();
while ((grp = getgrent ()) != NULL) {
if ((grp->gr_gid >= group_id) && (grp->gr_gid <= gid_max)) {
group_id = grp->gr_gid + 1;
}
/* create index of used GIDs */
if (grp->gr_gid <= gid_max) {
used_gids[grp->gr_gid] = true;
}
}
endgrent ();
(void) gr_rewind ();
while ((grp = gr_next ()) != NULL) {
if ((grp->gr_gid >= group_id) && (grp->gr_gid <= gid_max)) {
group_id = grp->gr_gid + 1;
}
/* create index of used GIDs */
if (grp->gr_gid <= gid_max) {
used_gids[grp->gr_gid] = true;
}
/* create index of used GIDs */
if (grp->gr_gid >= gid_min
&& grp->gr_gid <= gid_max) {
used_gids[grp->gr_gid] = true;
}
}
/*
* If a group (resp. system group) with GID equal to GID_MAX (resp.
* GID_MIN) exists, the above algorithm will give us GID_MAX+1
* (resp. GID_MIN-1) even if not unique. Search for the first free
* GID starting with GID_MIN (resp. GID_MAX).
*/
if (sys_group) {
if (group_id < gid_min) {
for (group_id = gid_max; group_id >= gid_min; group_id--) {
if (false == used_gids[group_id]) {
break;
}
}
if (group_id < gid_min) {
fprintf (stderr,
_("%s: Can't get unique system GID (no more available GIDs)\n"),
Prog);
SYSLOG ((LOG_WARN,
"no more available GID on the system"));
/*
* For system groups, we want to start from the
* top of the range and work downwards.
*/
/*
* At the conclusion of the gr_next() search, we will either
* have a presumed-free GID or we will be at GID_MIN - 1.
*/
if (lowest_found < gid_min) {
/*
* In this case, a GID is in use at GID_MIN.
*
* We will reset the search to GID_MAX and proceed down
* through all the GIDs (skipping those we detected with
* used_gids) for a free one. It is a known issue that
* this may result in reusing a previously-deleted GID,
* so administrators should be instructed to use this
* auto-detection with care (and prefer to assign GIDs
* explicitly).
*/
lowest_found = gid_max;
}
/* Search through all of the IDs in the range */
for (id = lowest_found; id >= gid_min; id--) {
result = check_gid (id, gid_min, gid_max, used_gids);
if (result == 0) {
/* This GID is available. Return it. */
*gid = id;
free (used_gids);
return -1;
return 0;
} else if (result == EEXIST) {
/* This GID is in use, we'll continue to the next */
} else {
/*
* An unexpected error occurred.
*
* Only report it the first time to avoid spamming
* the logs
*
*/
if (!nospam) {
fprintf (stderr,
_("%s: Can't get unique system GID (%s). "
"Suppressing additional messages.\n"),
Prog, strerror (result));
SYSLOG ((LOG_ERR,
"Error checking available GIDs: %s",
strerror (result)));
nospam = 1;
}
/*
* We will continue anyway. Hopefully a later GID
* will work properly.
*/
}
}
} else {
if (group_id > gid_max) {
for (group_id = gid_min; group_id <= gid_max; group_id++) {
if (false == used_gids[group_id]) {
break;
/*
* If we get all the way through the loop, try again from GID_MAX,
* unless that was where we previously started. (NOTE: the worst-case
* scenario here is that we will run through (GID_MAX - GID_MIN - 1)
* cycles *again* if we fall into this case with lowest_found as
* GID_MAX - 1, all groups in the range in use and maintained by
* network services such as LDAP.)
*/
if (lowest_found != gid_max) {
for (id = gid_max; id >= gid_min; id--) {
result = check_gid (id, gid_min, gid_max, used_gids);
if (result == 0) {
/* This GID is available. Return it. */
*gid = id;
free (used_gids);
return 0;
} else if (result == EEXIST) {
/* This GID is in use, we'll continue to the next */
} else {
/*
* An unexpected error occurred.
*
* Only report it the first time to avoid spamming
* the logs
*
*/
if (!nospam) {
fprintf (stderr,
_("%s: Can't get unique system GID (%s). "
"Suppressing additional messages.\n"),
Prog, strerror (result));
SYSLOG ((LOG_ERR,
"Error checking available GIDs: %s",
strerror (result)));
nospam = 1;
}
/*
* We will continue anyway. Hopefully a later GID
* will work properly.
*/
}
}
if (group_id > gid_max) {
fprintf (stderr,
_("%s: Can't get unique GID (no more available GIDs)\n"),
Prog);
SYSLOG ((LOG_WARN, "no more available GID on the system"));
}
} else { /* !sys_group */
/*
* For non-system groups, we want to start from the
* bottom of the range and work upwards.
*/
/*
* At the conclusion of the gr_next() search, we will either
* have a presumed-free GID or we will be at GID_MAX + 1.
*/
if (highest_found > gid_max) {
/*
* In this case, a GID is in use at GID_MAX.
*
* We will reset the search to GID_MIN and proceed up
* through all the GIDs (skipping those we detected with
* used_gids) for a free one. It is a known issue that
* this may result in reusing a previously-deleted GID,
* so administrators should be instructed to use this
* auto-detection with care (and prefer to assign GIDs
* explicitly).
*/
highest_found = gid_min;
}
/* Search through all of the IDs in the range */
for (id = highest_found; id <= gid_max; id++) {
result = check_gid (id, gid_min, gid_max, used_gids);
if (result == 0) {
/* This GID is available. Return it. */
*gid = id;
free (used_gids);
return -1;
return 0;
} else if (result == EEXIST) {
/* This GID is in use, we'll continue to the next */
} else {
/*
* An unexpected error occurred.
*
* Only report it the first time to avoid spamming
* the logs
*
*/
if (!nospam) {
fprintf (stderr,
_("%s: Can't get unique GID (%s). "
"Suppressing additional messages.\n"),
Prog, strerror (result));
SYSLOG ((LOG_ERR,
"Error checking available GIDs: %s",
strerror (result)));
nospam = 1;
}
/*
* We will continue anyway. Hopefully a later GID
* will work properly.
*/
}
}
/*
* If we get all the way through the loop, try again from GID_MIN,
* unless that was where we previously started. (NOTE: the worst-case
* scenario here is that we will run through (GID_MAX - GID_MIN - 1)
* cycles *again* if we fall into this case with highest_found as
* GID_MIN + 1, all groups in the range in use and maintained by
* network services such as LDAP.)
*/
if (highest_found != gid_min) {
for (id = gid_min; id <= gid_max; id++) {
result = check_gid (id, gid_min, gid_max, used_gids);
if (result == 0) {
/* This GID is available. Return it. */
*gid = id;
free (used_gids);
return 0;
} else if (result == EEXIST) {
/* This GID is in use, we'll continue to the next */
} else {
/*
* An unexpected error occurred.
*
* Only report it the first time to avoid spamming
* the logs
*
*/
if (!nospam) {
fprintf (stderr,
_("%s: Can't get unique GID (%s). "
"Suppressing additional messages.\n"),
Prog, strerror (result));
SYSLOG ((LOG_ERR,
"Error checking available GIDs: %s",
strerror (result)));
nospam = 1;
}
/*
* We will continue anyway. Hopefully a later GID
* will work properly.
*/
}
}
}
}
/* The code reached here and found no available IDs in the range */
fprintf (stderr,
_("%s: Can't get unique GID (no more available GIDs)\n"),
Prog);
SYSLOG ((LOG_WARN, "no more available GIDs on the system"));
free (used_gids);
*gid = group_id;
return 0;
return -1;
}

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