Compare commits

..

745 Commits

Author SHA1 Message Date
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
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
11209 changed files with 152328 additions and 756077 deletions

47
.gitignore vendored Normal file
View File

@@ -0,0 +1,47 @@
*~
lib*.a
*.o
*.lo
*.la
*.gmo
.deps
.libs
*.patch
*.rej
*.orig
Makefile
Makefile.in
/ABOUT-NLS
/aclocal.m4
/autom4te.cache
/config.guess
/config.h
/config.h.in
/config.log
/config.rpath
/config.status
/config.sub
/configure
/depcomp
/install-sh
/libtool
/ltmain.sh
/m4
/missing
/stamp-h1
/ylwrap
/po/*.header
/po/*.sed
/po/*.sin
/po/Makefile.in.in
/po/Makevars.template
/po/POTFILES
/po/Rules-quot
/po/stamp-po
/shadow.spec
/libmisc/getdate.c

1282
ABOUT-NLS

File diff suppressed because it is too large Load Diff

View File

@@ -1,98 +0,0 @@
Thanks to at least the following people for sending patches, bug
reports and various comments. This list may be incomplete, I received
a lot of mail...
# Maintainers
* Marek Michałkiewicz <marekm72@gmail.com> (1995-2000)
* Tomasz Kłoczko <kloczek@pld.org.pl> (2000-2007)
* Nicolas François <nicolas.francois@centraliens.net> (2007-2014)
* Serge E. Hallyn <serge@hallyn.com> (2014-now)
* Christian Brauner <christian@brauner.io> (2019-now)
* Iker Pedrosa <ipedrosa@redhat.com> (2022-now)
* Alejandro Colomar <alx@kernel.org> (2023-now) (4.14 stable)
To verify signatures on releases, use the following keys under keys/ :
* Serge Hallyn: keys/66D0387DB85D320F8408166DB175CFA98F192AF2.asc
* Christian Brauner: keys/4880B8C9BD0E5106FC070F4F7B3C391EFEA93624.asc
* Iker Pedrosa: keys/4E80EF49C7987B6DE2F81F5005079C6C3A653E57.asc
* Alejandro Colomar: keys/A9348594CE31283A826FBDD8D57633D441E25BB5.asc
# Authors and contributors
* Adam Rudnicki <adam@v-lo.krakow.pl>
* Alan Curry <pacman@tardis.mars.net>
* Aleksa Sarai <cyphar@cyphar.com>
* Alexander O. Yuriev <alex@bach.cis.temple.edu>
* Algis Rudys <arudys@rice.edu>
* Andreas Jaeger <aj@arthur.rhein-neckar.de>
* Andy Zaugg <andy.zaugg@gmail.com>
* Aniello Del Sorbo <anidel@edu-gw.dia.unisa.it>
* Anton Gluck <gluc@midway.uchicago.edu>
* Arkadiusz Miskiewicz <misiek@pld.org.pl>
* Ben Collins <bcollins@debian.org>
* Brian R. Gaeke <brg@dgate.org>
* Calle Karlsson <ckn@kash.se>
* Chip Rosenthal <chip@unicom.com>
* Chris Evans <lady0110@sable.ox.ac.uk>
* Chris Lamb <chris@chris-lamb.co.uk>
* Cristian Gafton <gafton@sorosis.ro>
* Dan Walsh <dwalsh@redhat.com>
* Darcy Boese <possum@chardonnay.niagara.com>
* Dave Hagewood <admin@arrowweb.com>
* David A. Holland <dholland@hcs.harvard.edu>
* David Frey <David.Frey@lugs.ch>
* Ed Carp <ecarp@netcom.com>
* Ed Neville <ed@s5h.net>
* Eric W. Biederman" <ebiederm@xmission.com>
* Floody <flood@evcom.net>
* Frank Denis <j@4u.net>
* George Kraft IV <gk4@us.ibm.com>
* Greg Mortensen <loki@world.std.com>
* Guido van Rooij
* Guy Maor <maor@debian.org>
* Hrvoje Dogan <hdogan@bjesomar.srce.hr>
* Jakub Hrozek <jhrozek@redhat.com>
* Janos Farkas <chexum@bankinf.banki.hu>
* Jason Franklin <jason.franklin@quoininc.com>
* Jay Soffian <jay@lw.net>
* Jesse Thilo <Jesse.Thilo@pobox.com>
* Joey Hess <joey@kite.ml.org>
* John Adelsberger <jja@umr.edu>
* Jonathan Hankins <jhankins@mailserv.homewood.k12.al.us>
* Jon Lewis <jlewis@lewis.org>
* Joshua Cowan <jcowan@hermit.reslife.okstate.edu>
* Judd Bourgeois <shagboy@bluesky.net>
* Juergen Heinzl <unicorn@noris.net>
* Juha Virtanen <jiivee@iki.fi>
* Julian Pidancet <julian.pidancet@gmail.com>
* Julianne Frances Haugh <julie78787@gmail.com>
* Leonard N. Zubkoff <lnz@dandelion.com>
* Luca Berra <bluca@www.polimi.it>
* Lukáš Kuklínek <lkukline@redhat.com>
* Lutz Schwalowsky <schwalow@mineralogie.uni-hamburg.de>
* Marc Ewing <marc@redhat.com>
* Martin Bene <mb@sime.com>
* Martin Mares <mj@gts.cz>
* Michael Meskes <meskes@topsystem.de>
* Michael Talbot-Wilson <mike@calypso.bns.com.au>
* Michael Vetter <jubalh@iodoru.org>
* Mike Frysinger <vapier@gentoo.org>
* Mike Pakovic <mpakovic@users.southeast.net>
* Nicolas François <nicolas.francois@centraliens.net>
* Nikos Mavroyanopoulos <nmav@i-net.paiko.gr>
* Pavel Machek <pavel@bug.ucw.cz>
* Peter Vrabec <pvrabec@redhat.com>
* Phillip Street
* Rafał Maszkowski <rzm@icm.edu.pl>
* Rani Chouha <ranibey@smartec.com>
* Sami Kerola <kerolasa@rocketmail.com>
* Scott Garman <scott.a.garman@intel.com>
* Sebastian Rick Rijkers <srrijkers@gmail.com>
* Seraphim Mellos <mellos@ceid.upatras.gr>
* Shane Watts <shane@nexus.mlckew.edu.au>
* Steve M. Robbins <steve@nyongwa.montreal.qc.ca>
* Thorsten Kukuk <kukuk@suse.de>
* Tim Hockin <thockin@eagle.ais.net>
* Timo Karjalainen <timok@iki.fi>
* Ulisses Alonso Camaro <ulisses@pusa.eleinf.uv.es>
* Werner Fink <werner@suse.de>

143
COPYING
View File

@@ -1,41 +1,118 @@
SPDX-License-Identifier: BSD-3-Clause
NOTE:
This license has been obsoleted by the change to the BSD-style copyright.
You may continue to use this license if you wish, but you are under no
obligation to do so.
All files under this project either
(*
This document is freely plagiarised from the 'Artistic Licence',
distributed as part of the Perl v4.0 kit by Larry Wall, which is
available from most major archive sites. I stole it from CrackLib.
1. fall under the BSD 3 clause license (by default).
$Id$
*)
2. carry an SPDX header declaring what license applies.
This documents purpose is to state the conditions under which this
Package (See definition below) viz: "Shadow", the Shadow Password Suite
which is held by Julianne Frances Haugh, may be copied, such that the
copyright holder maintains some semblance of artistic control over the
development of the package, while giving the users of the package the
right to use and distribute the Package in a more-or-less customary
fashion, plus the right to make reasonable modifications.
or
So there.
3. list a full custom license
***************************************************************************
This software is originally
Definitions:
* Copyright (c) 1989 - 1994, Julianne Frances Haugh
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. 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.
A "Package" refers to the collection of files distributed by the
Copyright Holder, and derivatives of that collection of files created
through textual modification, or segments thereof.
"Standard Version" refers to such a Package if it has not been modified,
or has been modified in accordance with the wishes of the Copyright
Holder.
"Copyright Holder" is whoever is named in the copyright or copyrights
for the package.
"You" is you, if you're thinking about copying or distributing this
Package.
"Reasonable copying fee" is whatever you can justify on the basis of
media cost, duplication charges, time of people involved, and so on.
(You will not be required to justify it to the Copyright Holder, but
only to the computing community at large as a market that must bear the
fee.)
"Freely Available" means that no fee is charged for the item itself,
though there may be fees involved in handling the item. It also means
that recipients of the item may redistribute it under the same
conditions they received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated
disclaimers.
2. You may apply bug fixes, portability fixes and other modifications
derived from the Public Domain or from the Copyright Holder. A Package
modified in such a way shall still be considered the Standard Version.
3. You may otherwise modify your copy of this Package in any way,
provided that you insert a prominent notice in each changed file stating
how and when AND WHY you changed that file, and provided that you do at
least ONE of the following:
a) place your modifications in the Public Domain or otherwise make them
Freely Available, such as by posting said modifications to Usenet or an
equivalent medium, or placing the modifications on a major archive site
such as uunet.uu.net, or by allowing the Copyright Holder to include
your modifications in the Standard Version of the Package.
b) use the modified Package only within your corporation or organization.
c) rename any non-standard executables so the names do not conflict with
standard executables, which must also be provided, and provide separate
documentation for each non-standard executable that clearly documents
how it differs from the Standard Version.
d) make other distribution arrangements with the Copyright Holder.
4. You may distribute the programs of this Package in object code or
executable form, provided that you do at least ONE of the following:
a) distribute a Standard Version of the executables and library files,
together with instructions (in the manual page or equivalent) on where
to get the Standard Version.
b) accompany the distribution with the machine-readable source of the
Package with your modifications.
c) accompany any non-standard executables with their corresponding
Standard Version executables, giving the non-standard executables
non-standard names, and clearly documenting the differences in manual
pages (or equivalent), together with instructions on where to get the
Standard Version.
d) make other distribution arrangements with the Copyright Holder.
5. You may charge a reasonable copying fee for any distribution of this
Package. You may charge any fee you choose for support of this Package.
YOU MAY NOT CHARGE A FEE FOR THIS PACKAGE ITSELF. However, you may
distribute this Package in aggregate with other (possibly commercial)
programs as part of a larger (possibly commercial) software distribution
provided that YOU DO NOT ADVERTISE this package as a product of your
own.
6. The name of the Copyright Holder may not be used to endorse or
promote products derived from this software without specific prior
written permission.
7. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The End

403
ChangeLog
View File

@@ -1,362 +1,3 @@
2022-11-08 Serge Hallyn <serge@hallyn.com>
* useradd.8: fix default group ID (Tim Biermann)
* Revert drop of subid_init() (Serge Hallyn)
* Georgian translation (NorwayFun)
* useradd: Avoid taking unneeded space: do not reset non-existent data
in lastlog (David Kalnischkies)
* relax username restrictions (Alexander Kanavin)
* selinux: check MLS enabled before setting serange (genBTC)
* copy_tree: use fchmodat instead of chmod (Samanta Navarro)
* copy_tree: don't block on FIFOs (Samanta Navarro)
* add shell linter (Jan Macku)
* copy_tree: carefully treat permissions (Samanta Navarro)
* lib/commonio: make lock failures more detailed (Luca BRUNO)
* lib: use strzero and memzero where applicable (Christian Göttsche)
* Update Dutch translation (Frans Spiesschaert)
* Don't test for NULL before calling free (Alex Colomar)
* Use libc MAX() and MIN() (Alejandro Colomar)
* chage: Fix regression in print_date (Xiami)
* usermod: report error if homedir does not exist (Iker Pedrosa)
* libmisc: minimum id check for system accounts (Iker Pedrosa)
* fix usermod -rG x y wrongly adding a group (xyz)
* man: add missing space in useradd.8.xml (Iker Pedrosa)
* lastlog: check for localtime() return value (Iker Pedrosa)
* Raise limit for passwd and shadow entry length (Iker Pedrosa)
* Remove adduser-old.c (Alejandro Colomar)
* useradd: Fix buffer overflow when using a prefix (David Michael)
* Don't warn when failed to open /etc/nsswitch.conf (Serge Hallyn)
2022-08-15 Serge Hallyn <serge@hallyn.com>
* Address CVE-2013-4235 (TOCTTOU when copying directories)
(Christian Göttsche)
2022-08-15 Serge Hallyn <serge@hallyn.com>
* Fix uk manpages
2022-08-08 Serge Hallyn <serge@hallyn.com>
* Add absolute path hint to --root (Celeste Liu)
* Various cleanups (Christian Göttsche)
* Fix Ubuntu release used in CI tests (Jeremy Whiting)
* add -F options to useradd (and tests) (Masatake YAMATO)
* useradd manpage updates (Masatake YAMATO and Alexander Zhang))
* Check for ownerid (not just username) in subid ranges (Iker Pedrosa)
2022-07-04 Serge Hallyn <serge@hallyn.com>
* Declare file local functions static (Christian Göttsche)
* Use strict prototypes (Christian Göttsche)
* Do not drop const qualifier for Basename (Christian Göttsche)
* Constify various pointers (Christian Göttsche)
* Don't return uninitialized memory (Christian Göttsche)
* Don't let compiler optimize away memory cleaning (Christian Göttsche)
* Remove many obsolete compatibility checks and defines (Alejandro Colomar)
* Modify ID range check in useradd (Iker Pedrosa)
* Use "extern "C"" to make libsubid easier to use from C++ (Alois Wohlschlager)
* French translation updates (bubu)
* Fix s/with-pam/with-libpam/ (serge)
* Spanish translation updates (Fernando)
* French translation fixes (Balint Reczey)
* Default max group name length to 32 (Jami Kettunen)
* Fix PAM service files without-selinux (Ali Riza KESKIN)
* Improve manpages (Markus Hiereth)
- groupadd, useradd, usermod
- groups and id
- pwck
* Add fedora to CI builds (Iker Pedrosa)
* Fix condition under which pw_dir check happens (Ed Neville)
* logoutd: switch to strncat (Steve Grubb)
* AUTHORS: improve markdown output (Iker Pedrosa)
* Handle ERANGE errors correctly (Niko)
* Check for fopen NULL return (juyin)
* Split get_salt() into its own fn juyin)
* Get salt before chroot to ensure /dev/urandom. (juyin)
* Chpasswd code cleanup (juyin)
* Work around git safe.directory enforcement (serge)
* Alphabetize order in usermod help (Matheus Marques)
* Erase password copy on error branches (Christian Göttsche)
* Suggest using --badname if needed (Iker Pedrosa)
* Update translation files (Iker Pedrosa)
* Correct badnames option to badname (Iker Pedrosa)
* configure: replace obsolete autoconf macros (Christian Göttsche)
* tests: replace egrep with grep -E (Sam James)
* Update Ukrainian translations (Yuri Chornoivan)
* Cleanups (Iker Pedrosa)
- Remove redeclared variable
- Remove commented out code and FIXMEs
- Add header guards
- Initialize local variables
* CI updates (Iker Pedrosa)
- Create github workflow to install dependencies
- Enable CodeQL
- Update actions version
* libmisc: use /dev/urandom as fallback if other methods fail (Xi Ruoyao)
2022-01-02 Serge Hallyn <serge@hallyn.com>
* build: include lib/shadowlog_internal.h in dist tarballs (Sam James)
2022-01-02 Serge Hallyn <serge@hallyn.com>
* Handle possible TOCTTOU issues in usermod/userdel (edneville)
* (CVE-2013-4235)
* Use O_NOFOLLOW when copying file
* Kill all user tasks in userdel
* Fix useradd -D segfault (Xi Ruoyao)
* Clean up obsolete libc feature-check ifdefs (Alejandro Colomar)
* Fix -fno-common build breaks due to duplicate Prog declarations
(Adam Sampson)
* Have single date_to_str definition (Alejandro Colomar)
* Fix libsubid SONAME version (Sam James)
2021-12-19 Serge Hallyn <serge@hallyn.com>
Note: From this release forward, su from this package should be
considered deprecated. Please replace any users of it with su from
util-linux. Please open an issue if there is a problem with that.
We intend to remove it in an upcoming release.
* libsubid fixes (Xi Ruoyao, Serge Hallyn, Iker Pedrosa, Mike Gilbert,
GalaxyMaster, and Luís Ferreira)
* Rename the test program list_subid_ranges to getsubids, write
a manpage, so distros can ship it. (Iker Pedrosa)
* Add libeconf dep for new*idmap (Iker Pedrosa)
* Allow all group types with usermod -G (Iker Pedrosa)
* Avoid useradd generating empty subid range (Iker Pedrosa)
* Handle NULL pw_passwd (Jaroslav Jindrak)
* Fix default value SHA_get_salt_rounds (Mike Gilbert)
* Use https where possible in README (Paul Menzel)
* Update content and format of README (Iker Pedrosa)
* Translation updates (Balint Reczey, Frans Spiesschaert)
* Switch from xml2po to itstool in 'make dist' (Serge Hallyn)
* Fix double frees (Michael Vetter)
* Add LOG_INIT configurable to useradd (Andy Zaugg)
* Add CREATE_MAIL_SPOOL documentation (Andy Zaugg)
* Create a security.md
* Fix su never being SIGKILLd when trapping TERM (Ruihan li)
* Fix wrong SELinux labels in several possible cases (Iker Pedrosa)
* Fix missing chmod in chadowtb_move (GalaxyMaster)
* Handle malformed hushlogins entries (Tobias Stoeckmann)
* Fix groupdel segv when passwd does not exist (François Rigault)
* Fix covscan-found newgrp segfault (Iker Pedrosa)
* Remove trailing slash on hoedir (Ed Neville)
* Fix passwd -l message - it does not change expirey (Ed Neville)
* Fix SIGCHLD handling bugs in su and vipw (Tobias Stoeckmann)
* Remove special case for "" in usermod (Alejandro Colomar)
* Implement usermod -rG to remove a specific group
(Andy Zaugg)
* call pam_end() after fork in child path for su and login
(Björn Fischer)
* useradd: In absence of /etc/passwd, assume 0 == root
(Ludwig Nussel)
* lib: check NULL before freeing data (Iker Pedrosa)
* Fix pwck segfault (Iker Pedrosa)
2021-07-22 Serge Hallyn <serge@hallyn.com>
* Updated translations (Björn Esser, Juergen Hoetzel)
* Major salt updates (Björn Esser)
* Various coverity and cleanup fixes (Iker Pedrosa)
* Consistently use 0 to disable PASS_MIN_DAYS in man (tzccinct)
* Implement NSS support for subids and a libsubid (Serge Hallyn)
* setfcap: retain setfcap when mapping uid 0 (Christian Brauner)
* login.defs: include HMAC_CRYPTO_ALGO key (Iker Pedrosa)
* selinux fixes (Christian Göttsche)
* Fix path prefix path handling (Lucas Servén Marín)
* Manpage updates (tzccinct, Sevan Janiyan, Iker Pedrosa, Geert Ijewski,
谭九鼎, Jamin W. Collins, towerpark, andydna, Frans Spiesschaert)
* Treat an empty passwd field as invalid (Haelwenn Monnier)
* newxidmap: allow running under alternative gid (Martijn de Gouw)
* usermod: check that shell is executable (Geert Ijewski)
* Add yescript support (Rodolphe Bréard)
* useradd memleak fixes (whzhe)
* useradd: use built-in settings by default (Ludwig Nussel)
* getdefs: add foreign (non-shadow-utils) items (Karel Zak)
* buffer overflow fixes (Tobias Stoeckmann)
* Adding run-parts style for pre and post useradd/del (ed@s5h.net)
2020-01-23 Serge Hallyn <serge@hallyn.com>
* selinux: inclue stdio (Michael Vetter)
* man: don't suggest making groupmems user-writeable (Michael Weiser)
* Makefile: bail out on error in for loops (Wolfgang Bumiller)
* Adding logging of SSH_ORIGINAL_COMMAND to nologin. (ed@s5h.net)
* add new HOME_MODE login.defs option (Duncan Overbruck)
* Add tty logging to useradd (ed@s5h.net)
* Useradd: make non-executable shell check only a warning (Tomas Mraz)
* Update Dutch translation (Frans-Spiesschaert)
* user_busy: Do not mistake a regular user process for a namespaced one (Tomas Mraz)
* Revert "Honor --sbindir and --bindir for binary installation" Patrick McLean)
2019-12-20 Dave Reisner <dreisner@archlinux.org>
* Do not auto-enable acct_tools_setuid just because
pam is enabled. NOTE - any distros which are relying
on this behavior will need to switch to configure
--enable-account-tools-setuid
2019-12-01 Serge Hallyn <serge@hallyn.com>
* Release 4.8
* Initial optional bcrypt support.
* Make build/install of 'su' optional.
* Fix for vipw not resuming correctly when suspended
* Sync password field descriptions in manpages
* Check for valid shell argument in useradd
* Allow translation of new strings through POTFILES.in
* Migrate to itstool for translations
* Migrate to new SELinux api
* Support --enable-vendordir
* pwck: Only check homedir if set and not a system user
* Support nonstandard usernames
* sget{pw,gr}ent: check for data at EOL
* Add YYY-MM-DD support in chage
* Fix failing chmod calls for suidubins
* Fix --sbindir and --bindir for binary installations
* Fix LASTLOG_UID_MAX in login.defs
* Fix configure error with dash
2019-06-13 Serge Hallyn <serge@hallyn.com>
* Release 4.7
* Spawn: don't loop forever on ECHILD
* Do not fail locking if there is a stale lockfile Tomas Mraz)
* Use lckpwdf if prefix not set (Tomas Mraz)
* Build: check correct DocBook version (Jan Tojnar)
* Usermod: Print 'no changes' to stdout, not stderr (Serge Hallyn)
* Add support for btrfs subvolumes for home (Adam Majer)
* Fix chpasswd long line handling (Nathan Ruiz)
* Use secure_getenv for gettime (Chris Lamb)
* Make sp_lstchg reproducible (Chris Lamb)
* Do not crash commonio_close if db file is not open (Tomas Mraz)
* Don't flush nscd and sssd cache in read-only mode (Charlie Vuillemez)
* French manpage update (Alban VIDAL)
* Fix manpage defaults for SUB_UID/GID_COUNT (Tomas Mraz)
* Sync po files from shadow.pot (Alban VIDAL)
* Usermod: guard against unsafe chown of homedir contents (Tomas Mraz)
* Add LASTLOG_UID_MAX to login.defs (Tomas Mraz)
* new[ug]idmap file capabilities support (Giuseppe Scrivano and Christian Brauner)
* Fix segfault in useradd (Tomas Mraz)
* Coverity issues (Tomas Mraz)
* Flush sssd caches (Jakub Hrozek)
* Log UID in nologin (Vladimir Ivanov)
* run pam_getenvlist after setup_env in su.c (Michael Vogt)
* Support systems with only utmpx (A. Wilcox)
* Fix unguarded ENABLE_SUBIDS code (Jan Chren (rindeal))
* Update po/zh_CN translation (Lion Yang)
* Create parent dirs for useradd -m (Michael Vetter)
* Prevent usermod segv
* Fix usermod crash (fariouche)
2018-04-29 Serge Hallyn <serge@hallyn.com>
* Release 4.6
* Newgrp: avoid unnecessary lookups
* Make language less binary
* Add error when turning off man switch
* Spelling fixes
* Make userdel work with -R
* newgidmap: enforce setgroups=deny if self-mapping a group
* Norwegian bokmål translation
* pwck: prevent crash by not passing O_CREAT
* WITH_TCB fixes from Mandriva
* Fix pwconv and grpconv entry skips
* Fix -- slurping in su
* add --prefix option
2017-07-16 Serge Hallyn <serge@hallyn.com>
* Import new Dutch translations.
2017-07-10 Serge Hallyn <serge@hallyn.com>
* Expand error codes for groupmod.
2017-05-17 Serge Hallyn <serge@hallyn.com>
* Release 4.5
2017-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
2017-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.
2017-02-08 Serge Hallyn <serge@hallyn.com>
* Update Kazakh translations
* Consult configuration before calculating subuids
* Remove misplaced semicolon
2017-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
@@ -443,7 +84,7 @@
2013-08-15 Nicolas François <nicolas.francois@centraliens.net>
* src/usermod.c: Check early if /etc/subuid (/etc/subgid) exists
when option -v/-V (-w/-W) are provided.
when option -v/-V (-w/-W) are provided.
2013-08-15 Nicolas François <nicolas.francois@centraliens.net>
@@ -820,8 +461,8 @@
* configure.in: Prepare for next point release 4.2.
* if using the static char* for pw_dir, strdup it so
pw_free() can be used. (Closes: Debian#691459, alioth#313957)
* Kill the child process group, rather than just the
pw_free() can be used. (Closes: Debian#691459, alioth#313957)
* Kill the child process group, rather than just the
immediate child; this is needed now that su no
longer starts a controlling terminal when not running an
interactive shell (closes: Debian#713979)
@@ -1048,7 +689,7 @@
* po/pt.po: Updated to 557t.
2012-01-19 Holger Wansing <linux@wansing-online.de>
2012-01-19 Holger Wansing <linux@wansing-online.de>
* po/de.po: Updated to 557t.
@@ -1635,8 +1276,8 @@
* NEWS, src/chpasswd.c: Create a shadow entry if the password is
set to 'x' in passwd and there are no entry in shadow for the
user.
* NEWS, src/chgpasswd.c: Create a gshadow entry if the password is
set to 'x' in group and there are no entry in gshadow for the
* NEWS, src/chgpasswd.c: Create a gshadow entry if the password is
set to 'x' in group and there are no entry in gshadow for the
group.
2011-07-28 Nicolas François <nicolas.francois@centraliens.net>
@@ -1708,7 +1349,7 @@
2011-07-22 Nicolas François <nicolas.francois@centraliens.net>
* libmisc/find_new_gid.c, libmisc/find_new_uid.c: Fail in case of
invalid configuration.
invalid configuration.
* libmisc/find_new_gid.c, libmisc/find_new_uid.c: Updated
comments.
* libmisc/find_new_gid.c, libmisc/find_new_uid.c: Be more strict
@@ -1945,7 +1586,7 @@
man/login.defs.d/DEFAULT_HOME.xml,
man/login.defs.d/LOGIN_RETRIES.xml,
man/login.defs.d/MD5_CRYPT_ENAB.xml,
man/login.defs.d/PORTTIME_CHECKS_ENAB.xml,
man/login.defs.d/PORTTIME_CHECKS_ENAB.xml,
man/login.defs.d/SHA_CRYPT_MIN_ROUNDS.xml:
Fix typos
* man/po/de.po: German translation of manpages completed
@@ -1992,7 +1633,7 @@
2011-03-30 YunQiang Su <wzssyqa@gmail.com>
* man/po/zh_CN.po: convert Simplified Chinese translation
* man/po/zh_CN.po: convert Simplified Chinese translation
of manpages to gettext
* po/zh_CN.po: Simplified Chinese translation completed
@@ -2131,7 +1772,7 @@
boolean. safe_system last argument is a boolean.
* libmisc/system.c: Check return value of dup2.
* libmisc/system.c: Do not check *printf/*puts return value.
* libmisc/system.c: Do not check execve return value.
* libmisc/system.c: Do not check execve return value.
* libmisc/salt.c: Do not check *printf/*puts return value.
* libmisc/loginprompt.c: Do not check gethostname return value.
* libmisc/find_new_gid.c, libmisc/find_new_uid.c: Do not check
@@ -2284,7 +1925,7 @@
2010-04-04 Nicolas François <nicolas.francois@centraliens.net>
* src/useradd.c: spool is a constant string.
* src/useradd.c: Set the new copy_tree's paramater 'copy_root' to false
* src/useradd.c: Set the new copy_tree's paramater 'copy_root' to false
2010-04-04 Nicolas François <nicolas.francois@centraliens.net>
@@ -5133,7 +4774,7 @@
<sgrubb@redhat.com>
* src/groupadd.c: Log to audit with type AUDIT_ADD_GROUP instead
of AUDIT_USER_CHAUTHTOK.
* src/groupdel.c: Log to audit with type AUDIT_DEL_GROUP instead
* src/groupdel.c: Log to audit with type AUDIT_DEL_GROUP instead
of AUDIT_USER_CHAUTHTOK.
* src/useradd.c: Log to audit with type AUDIT_ADD_USER /
AUDIT_ADD_GROUP / AUDIT_USYS_CONFIG instead of
@@ -5389,7 +5030,7 @@
* NEWS, src/gpasswd.c: Use getopt_long instead of getopt. Added
support for long options --add (-a), --delete (-d),
--remove-password (-r), --restrict (-R), --administrators (-A),
and --members (-M)
and --members (-M)
* man/gpasswd.1.xml: Document the new long options.
* src/gpasswd.c: The sgrp structure is only used if SHADOWGRP is
defined.
@@ -7578,7 +7219,7 @@
to mimic useradd's behavior choices of UID and GID.
* src/newusers.c: Reuse the generic find_new_uid() and
find_new_gid() functions. This permits to respect the
UID_MIN/UID_MAX and GID_MIN/GID_MAX variables, should
UID_MIN/UID_MAX and GID_MIN/GID_MAX variables, should
* src/newusers.c: Check if the user or group exist using the
external databases (with the libc getpwnam/getgrnam functions).
Refuse to update an user which exist in an external database but
@@ -9375,7 +9016,7 @@
Debian's patch 202_it_man_uses_gettext. Thanks to Giuseppe
Sacco who contributed the Italian translation.
* man/de/de.po: (nearly) complete German translation of man pages
Imported from Debian's patch 203_de-man-update. Thanks to
Imported from Debian's patch 203_de-man-update. Thanks to
Simon Brandmair
* src/usermod.c: Clarify the online help of usermod for "-a"
Imported from Debian's patch 402-clarify_usermod_usage
@@ -9558,7 +9199,7 @@
* NEWS: release date corrected.
* NEWS, src/su.c:
fixed set environment too early when using PAM, so move it to !USE_PAM
fixed set enviroment too early when using PAM, so move it to !USE_PAM
(patch submitted by Mike Frysinger <vapier@gentoo.org>).
2006-07-30 Tomasz Kłoczko <kloczek@pld.org.pl>
@@ -10245,7 +9886,7 @@
* NEWS: cleanups.
* autogen.sh:
by default in development environment use CFLAGS="-O2 -Wall".
by default in development enviroment use CFLAGS="-O2 -Wall".
* src/chgpasswd.c (main): remove two unused variables (newgr and now).
@@ -11654,7 +11295,7 @@
in OPTIONS section). Describe -a and -k options.
* NEWS, src/su.c:
fixed twice copy environment which causes auth problems (bug was introduced in 4.0.12;
fixed twice copy enviroment which causes auth problems (bug was introduced in 4.0.12;
fix by Nicolas François <nicolas.francois@centraliens.net>).
* src/passwd.c, po/ja.po, po/ko.po, po/nb.po, po/nl.po, po/nn.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/sk.po, po/sq.po, po/sv.po, po/tl.po, po/tr.po, po/uk.po, po/vi.po, po/zh_CN.po, po/zh_TW.po, po/bs.po, po/ca.po, po/cs.po, po/da.po, po/de.po, po/el.po, po/es.po, po/eu.po, po/fi.po, po/fr.po, po/he.po, po/id.po, po/it.po:
@@ -12584,7 +12225,7 @@
http://bugs.debian.org/48002
* src/login.c, NEWS:
fixed loggin of username on successful login (was using the normal username,
fixed loggin of username on succesful login (was using the normal username,
when it should have used pam_user) http://bugs.debian.org/47819
2005-06-02 Tomasz Kłoczko <kloczek@pld.org.pl>
@@ -13029,7 +12670,7 @@
* man/pl/usermod.8: finish sync with english version.
* man/hu/login.1, man/pl/login.1, NEWS, man/Attic/login.1, man/de/login.1:
removed fragment about abilities pass environment variables in login prompt.
removed fragment about abilities pass enviroment variables in login prompt.
* man/Attic/gpasswd.1, man/Attic/newgrp.1:
fixes by Nicolas Nicolas François <nicolas.francois@centraliens.net> (not all
@@ -13508,7 +13149,7 @@
removed not used translations.
* NEWS, src/su.c:
fix adding of pam_env env variables to environment (Martin Schlemmer <azarah@nosferatu.za.org>).
fix adding of pam_env env variables to enviroment (Martin Schlemmer <azarah@nosferatu.za.org>).
* NEWS, configure.in:
fixed filling MAIL_SPOOL_DIR and MAIL_SPOOL_FILE variables which was allways
@@ -13605,7 +13246,7 @@
* NEWS, src/su.c:
add pam_open_session() support. If builded without PAM support
propagate $DISPLAY and $XAUTHORITY environment variables.
propagate $DISPLAY and $XAUTHORITY enviroment variables.
Based on http://www.gentoo.org/cgi-bin/viewcvs.cgi/sys-apps/shadow/files/shadow-4.0.4.1-su-pam_open_session.patch?rev=1.1
2004-10-23 Tomasz Kłoczko <kloczek@pld.org.pl>

View File

@@ -1,27 +1,8 @@
## Process this file with automake to produce Makefile.in
SUBDIRS = lib
EXTRA_DIST = NEWS README TODO shadow.spec.in
if ENABLE_SUBIDS
SUBDIRS += libsubid
endif
AUTOMAKE_OPTIONS = 1.5 dist-bzip2 foreign
SUBDIRS += src po contrib doc etc tests/unit
if ENABLE_REGENERATE_MAN
SUBDIRS += man
endif
CLEANFILES = man/8.out man/po/remove-potcdate.* man/*/login.defs.d man/*/*.mo
EXTRA_DIST = NEWS README tests/
dist-hook:
chmod -R u+w $(distdir)/tests
chmod u+w $(distdir)
mv $(distdir)/tests/unit $(distdir)/realunittest
mv $(distdir)/tests/tests $(distdir)/realtests
rm -rf $(distdir)/tests
mv $(distdir)/realtests $(distdir)/tests
rm -rf $(distdir)/tests/unit $(distdir)/tests/Makefile*
mv $(distdir)/realunittest $(distdir)/tests/unit
SUBDIRS = po man libmisc lib src \
contrib doc etc

View File

@@ -1,904 +0,0 @@
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@ENABLE_SUBIDS_TRUE@am__append_1 = libsubid
@ENABLE_REGENERATE_MAN_TRUE@am__append_2 = man
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
$(am__configure_deps) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = man/po/Makefile
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
install-data-recursive install-dvi-recursive \
install-exec-recursive install-html-recursive \
install-info-recursive install-pdf-recursive \
install-ps-recursive install-recursive installcheck-recursive \
installdirs-recursive pdf-recursive ps-recursive \
tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
am__recursive_targets = \
$(RECURSIVE_TARGETS) \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir distdir-am dist dist-all distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
config.h.in
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
DIST_SUBDIRS = lib libsubid src po contrib doc etc tests/unit man
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/man/po/Makefile.in ABOUT-NLS AUTHORS.md COPYING \
ChangeLog NEWS README compile config.guess config.rpath \
config.sub install-sh ltmain.sh missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
if test -d "$(distdir)"; then \
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
am__post_remove_distdir = $(am__remove_distdir)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz
GZIP_ENV = --best
DIST_TARGETS = dist-xz dist-gzip
# Exists only to be overridden by the user if desired.
AM_DISTCHECK_DVI_TARGET = dvi
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CMOCKA_CFLAGS = @CMOCKA_CFLAGS@
CMOCKA_LIBS = @CMOCKA_LIBS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
ECONF_CPPFLAGS = @ECONF_CPPFLAGS@
EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GREP = @GREP@
GROUP_NAME_MAX_LENGTH = @GROUP_NAME_MAX_LENGTH@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBACL = @LIBACL@
LIBADD_DL = @LIBADD_DL@
LIBADD_DLD_LINK = @LIBADD_DLD_LINK@
LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBATTR = @LIBATTR@
LIBAUDIT = @LIBAUDIT@
LIBBSD = @LIBBSD@
LIBBSD_CFLAGS = @LIBBSD_CFLAGS@
LIBBSD_LIBS = @LIBBSD_LIBS@
LIBCRYPT = @LIBCRYPT@
LIBECONF = @LIBECONF@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBMD = @LIBMD@
LIBOBJS = @LIBOBJS@
LIBPAM = @LIBPAM@
LIBS = @LIBS@
LIBSELINUX = @LIBSELINUX@
LIBSEMANAGE = @LIBSEMANAGE@
LIBSKEY = @LIBSKEY@
LIBSUBID_ABI = @LIBSUBID_ABI@
LIBSUBID_ABI_MAJOR = @LIBSUBID_ABI_MAJOR@
LIBSUBID_ABI_MICRO = @LIBSUBID_ABI_MICRO@
LIBSUBID_ABI_MINOR = @LIBSUBID_ABI_MINOR@
LIBSYSTEMD = @LIBSYSTEMD@
LIBTCB = @LIBTCB@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LIYESCRYPT = @LIYESCRYPT@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
LT_DLLOADERS = @LT_DLLOADERS@
LT_DLPREOPEN = @LT_DLPREOPEN@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POSUB = @POSUB@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VENDORDIR = @VENDORDIR@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
XMLCATALOG = @XMLCATALOG@
XML_CATALOG_FILE = @XML_CATALOG_FILE@
XSLTPROC = @XSLTPROC@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
capcmd = @capcmd@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = lib $(am__append_1) src po contrib doc etc tests/unit \
$(am__append_2)
CLEANFILES = man/8.out man/po/remove-potcdate.* man/*/login.defs.d man/*/*.mo
EXTRA_DIST = NEWS README tests/
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
config.h: stamp-h1
@test -f $@ || rm -f stamp-h1
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h stamp-h1
man/po/Makefile: $(top_builddir)/config.status $(top_srcdir)/man/po/Makefile.in
cd $(top_builddir) && $(SHELL) ./config.status $@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool config.lt
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
# To change the values of 'make' variables: instead of editing Makefiles,
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(am__recursive_targets):
@fail=; \
if $(am__make_keepgoing); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-recursive
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscope: cscope.files
test ! -s cscope.files \
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
clean-cscope:
-rm -f cscope.files
cscope.files: clean-cscope cscopelist
cscopelist: cscopelist-recursive
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__post_remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__post_remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
dist-zstd: distdir
tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
$(am__post_remove_distdir)
dist-tarZ: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__post_remove_distdir)
dist dist-all:
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
$(am__post_remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
*.tar.zst*) \
zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build/sub \
&& ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__post_remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@test -n '$(distuninstallcheck_dir)' || { \
echo 'ERROR: trying to run $@ with an empty' \
'$$(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
$(am__cd) '$(distuninstallcheck_dir)' || { \
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile config.h
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr \
distclean-libtool distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am:
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am:
.MAKE: $(am__recursive_targets) all install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
am--refresh check check-am clean clean-cscope clean-generic \
clean-libtool cscope cscopelist-am ctags ctags-am dist \
dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \
dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \
distclean-generic distclean-hdr distclean-libtool \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am
.PRECIOUS: Makefile
dist-hook:
chmod -R u+w $(distdir)/tests
chmod u+w $(distdir)
mv $(distdir)/tests/unit $(distdir)/realunittest
mv $(distdir)/tests/tests $(distdir)/realtests
rm -rf $(distdir)/tests
mv $(distdir)/realtests $(distdir)/tests
rm -rf $(distdir)/tests/unit $(distdir)/tests/Makefile*
mv $(distdir)/realunittest $(distdir)/tests/unit
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

172
NEWS
View File

@@ -15,7 +15,7 @@ shadow-4.1.5.1 -> shadow-4.2 UNRELEASED
- su
* When su receives a signal (SIGTERM, or SIGINT/SIGQUIT in non
interactive mode), kill the child process group, rather than just the
interactive mode), kill the child process group, rather than just the
immediate child.
* Fix segmentation faults for users without a proper home or shell in
their passwd entries.
@@ -622,7 +622,7 @@ shadow-4.0.18.2 -> shadow-4.1.0 09-12-2007
- Add support for uClibc with no l64a().
- userdel, usermod: Fix infinite loop caused by erroneous group file
containing two entries with the same name. (The fix strategy differs
from
from
(https://bugzilla.redhat.com/show_bug.cgi?id=240915)
- userdel: Abort if an error is detected while updating the passwd or group
databases. The passwd or group files will not be written.
@@ -654,9 +654,9 @@ shadow-4.0.18.2 -> shadow-4.1.0 09-12-2007
- Use MD5_CRYPT_ENAB, ENCRYPT_METHOD, SHA_CRYPT_MIN_ROUNDS, and
SHA_CRYPT_MAX_ROUNDS to define the default encryption algorithm for the
passwords.
- chpasswd, chgpasswd, newusers: New options -c/--crypt-method and
- chpaswd, chgpasswd, newusers: New options -c/--crypt-method and
-s/--sha-rounds to supersede the system default encryption algorithm.
- chpasswd, chgpasswd, newusers: DES is no more the default algorithm. They
- chpaswd, chgpasswd, newusers: DES is no more the default algorithm. They
will respect the system default configured in /etc/login.defs
*** documentation:
@@ -696,19 +696,19 @@ shadow-4.0.18 -> shadow-4.0.18.1 03-08-2006
shadow-4.0.17 -> shadow-4.0.18 01-08-2006
*** general:
- su: fixed set environment too early when using PAM, so move it to !USE_PAM
- su: fixed set enviroment too early when using PAM, so move it to !USE_PAM
(patch submitted by Mike Frysinger <vapier@gentoo.org>),
- groupadd, groupmod, useradd, usermod: fixed UID/GID overflow (fixed
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=198920)
- passwd, useradd, usermod: fixed inactive/mindays/warndays/maxdays overflow
(similar to RH#198920),
- groupmems: rewritten for use PAM and getopt_long() and now it is enabled
(simillar to RH#198920),
- groupmems: rewrited for use PAM and getopt_long() and now it is enabled
for build and install (patch by George Kraft <gk4@swbell.net>),
- S/Key: removed assign getpass() to libshadow_getpass() on autoconf level
(patch by Ulrich Mueller <ulm@kph.uni-mainz.de>; http://bugs.gentoo.org/139966),
- usermod: back to previous -a option semantics and clarify -a behavior
on documentation level (by Greg Schafer <gschafer@zip.com.au>),
- chsh, groupmod: rewritten for use getopt_long().
- chsh, groupmod: rewrited for use getopt_long().
- updated translations: ca, cs, da, eu, fr, gl, hu, ko, pl, pt, ru, sv, tr, uk, vi.
*** documentation:
- fr and ru man pages are up to date,
@@ -743,7 +743,7 @@ shadow-4.0.15 -> shadow-4.0.16 05-06-2006
*** general:
- userdel: better fix for old CERT VU#312962 (which was fixed in shadow 4.0.8):
fixed forgotten checking of the return value from fchown() before
fixed forgoten checking of the return value from fchown() before
proceeding with the fchmod() (based on Owl patch prepared by
Rafal Wojtczuk <nergal@owl.openwall.com>),
- userdel: use login.defs::MAIL_DIR instead hardcoded /var/mail in created
@@ -755,7 +755,7 @@ shadow-4.0.15 -> shadow-4.0.16 05-06-2006
passwords and libshadow_getpass() is used only because libc getpass()
do not handles password prompting with echo enabled,
- move login.defs::MD5_CRYPT_ENAB to non-PAM part,
- userdel: rewritten for use getopt_log(),
- userdel: rewrited for use getopt_log(),
- install default/template configuration files:
-- if shadow is configured with use PAM install /etc/pam.d/* files,
-- if shadow do not uses PAM install /etc/{limits,login.acces} files,
@@ -793,7 +793,7 @@ shadow-4.0.15 -> shadow-4.0.16 05-06-2006
- updated ru login.defs(5), passwd(1), userdel(8), usermod(8) man pages,
- pw_auth(3) man page removed (outdated),
- install limits(5), login.access(5) and porttime(5) man pages only when
shadow is built with PAM support disabled,
shadow is builded with PAM support disabled,
- passwd(1): better document how password strength is checked
(fixed http://bugs.debian.org/115380),
- usermod(8): added missing -a option description
@@ -816,7 +816,7 @@ shadow-4.0.14 -> shadow-4.0.15 13-03-2006
- login: default UMASK if not specified in login.defs is 022 (pointed by
Peter Vrabec <pvrabec@redhat.com>),
- chgpasswd: new tool (by Jonas Meurer <mejo@debian.org>),
- lastlog: print the usage and exit if an additional argument is provided to
- lastlog: print the usage and exit if an additional argument is profided to
lastlog (merge 488_laslog_verify_arguments Debian patch),
- login, newgrp, nologin, su: do not link with libselinux (merge
490_link_selinux_only_when_needed Debian patch),
@@ -830,9 +830,9 @@ shadow-4.0.14 -> shadow-4.0.15 13-03-2006
tries exceeded,
- always prints the number of tries in the syslog entry.
- add special handling for PAM_ABORT
- add an entry to faillog, as when USE_PAM is not defined. (#53164)
- add an entry to failog, as when USE_PAM is not defined. (#53164)
- changed pam_end to PAM_END. This is certainly was a mistake. PAM_END is
pam_close_session + pam_end. Here, the session is still not open, we
pam_close_seesion + pam_end. Here, the session is still not open, we
don't have to close it.
- a HAVE_PAM_FAIL_DELAY is missing,
- su: fixed pam session support (patch from Topi Miettinen; fixed #57526,
@@ -840,7 +840,7 @@ shadow-4.0.14 -> shadow-4.0.15 13-03-2006
- userdel: user's group is already removed by update_groups().
remove_group() is not needed (bug introduced in 4.0.14 on merge FC fixes).
Fixed by Nicolas François <nicolas.francois@centraliens.net>,
- useradd: always remove group and gshadow databases lock, Fixed by Nicolas
- useradd: allways remove group and gshadow databases lock, Fixed by Nicolas
François <nicolas.francois@centraliens.net>
(http://bugs.debian.org/348250)
- auditing fixes:
@@ -848,14 +848,14 @@ shadow-4.0.14 -> shadow-4.0.15 13-03-2006
added audit_logger() prototype),
- useradd: fixed excess audit_logger() argument,
- chage: added missing \n on display password status if password must be
changed,
chaged,
- useradd: fixed allow non-unique UID (http://bugs.debian.org/351281),
- various code cleanups for make possible compilation of shadow with -Wall
- variouse code cleanups for make possible compilation of shadow with -Wall
-Werror (by Alexander Gattin <xrgtn@yandex.ru>),
- su: move exit() outside libmisc/shell.c::shell() for handle shell() errors
on higher level (now is better visable where some programs exit with 126
and 127 exit codes); added new shell() parameter (char *const envp[])
which allow fix preserving environment in su on using -p, (patch by
which allow fix preserving enviloment in su on using -p, (patch by
Alexander Gattin <xrgtn@yandex.ru>),
- su: added handle -c,--command option for GNU su compliance (merge
437_su_-c_option Debian patch),
@@ -903,7 +903,7 @@ shadow-4.0.13 -> shadow-4.0.14 03-01-2006
- userdel: make the -f option force the removal of the user's group (even if it
is the primary group of another user)
(merge 453_userdel_-f_removes_group Debian patch),
- usermod: rewritten for use getopt_long() (Christian Perrier <bubulle@kheops.frmug.org>),
- usermod: rewrited for use getopt_long() (Christian Perrier <bubulle@kheops.frmug.org>),
- grpck: fixed segmentation fault on using -s when /etc/gshadow is empty (fix by
Tomasz Lemiech <szpajder@staszic.waw.pl>),
- passwd: remove handle -f, -g and -s options.
@@ -912,7 +912,7 @@ shadow-4.0.13 -> shadow-4.0.14 03-01-2006
Nicolas François <nicolas.francois@centraliens.net>)
- su: export $USER and $SHELL as well as $HOME (http://bugs.debian.org/11003 and
http://bugs.debian.org/11189),
- su, vipw: rewritten for use getopt_long(),
- su, vipw: rewrited for use getopt_long(),
- su: log successful/failed through syslog (http://bugs.debian.org/190215),
- updated translations: ca, cs, da, eu, fi, fr, it, pl, pt, ru, sv, tl, vi,
- new translations: gl.
@@ -946,7 +946,7 @@ shadow-4.0.12 -> shadow-4.0.13 10-10-2005
*** general:
- chage: removed duplicated pam_start(),
- chfn, chsh: finished PAM support using pam_start() and co.,
- chfn, chsh: finished PAM support usin pam_start() and co.,
- userdel: userdel should not remove the group which is primary for someone else
(fix by Nicolas François <nicolas.francois@centraliens.net>
http://bugs.debian.org/295416),
@@ -955,7 +955,7 @@ shadow-4.0.12 -> shadow-4.0.13 10-10-2005
- fixedlib/commonio.c: don't assume selinux is enabled if is_selinux_enabled()
returns -1 (merge isSelinuxEnabled FC patch by Jeremy Katz <katzj@redhat.com>),
- login, su (non-PAM case): fixed setup max address space limits (added missing break
statement in case) spotted by Lasse Collin <lasse.collin@tukaani.org>,
statement in case) spoted by Lasse Collin <lasse.collin@tukaani.org>,
- auditing support added. Patch prepared by Peter Vrabec <pvrabec@redhat.com> basing
on work by Steve Grubb from http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=159215
Now auditing support have commands: chage, gpasswd, groupadd, groupdel, groupmod,
@@ -966,18 +966,18 @@ shadow-4.0.12 -> shadow-4.0.13 10-10-2005
to example described in ident(1) man page (modern compilers like latest GCC
removes not used functions by global optimization).
So "ident /usr/bin/passwd" will show again some useable informations
- su: fixed twice copy environment which causes auth problems
- su: fixed twice copy enviroment which causes auth problems
(bug was introduced in 4.0.12; fix by Nicolas François <nicolas.francois@centraliens.net>),
- chage: differentiate the different failure causes by the exit value
This will permit to adduser Debian script to detect if chage failed because the
system doesn't have shadowed passwords (fix for http://bugs.debian.org/317012),
- merge 010_more-i18ned-messages Debian patch which adds i18n support for few
more messages (originally patch was prepared by Guillem Jover <guillem@debian.org>),
more messages (orginaly patch was prepared by Guillem Jover <guillem@debian.org>),
- lastlog: added handle -b option which allow print only lastlog records older than
specified DAYS (fix by <miles@lubin.us>),
- chpasswd, gpasswd, newusers: fixed libmisc/salt.c for use login.defs::MD5_CRYPT_ENAB
only if PAM support is disabled (fix by John Gatewood Ham <zappaman@buraphalinux.org>),
- passwd: rewritten for use getopt_long(),
- passwd: rewrited for use getopt_long(),
- newgrp: when newgrp process sits between parent and child shells, it should
propagate STOPs from child to parent and CONTs from parent to child,
otherwise e.g. bash's "suspend" command won't work
@@ -987,11 +987,11 @@ shadow-4.0.12 -> shadow-4.0.13 10-10-2005
- chsh(1), groupadd(8), newusers(8), pwconv(8), useradd(8), userdel(8), usermod(8):
added missing references to /etc/login.defs and login.defs(5)
(Christian Perrier <bubulle@kheops.frmug.org>),
- passwd(5): rewritten based on work by Greg Wooledge <greg@wooledge.org>
- passwd(5): rewrited based on work by Greg Wooledge <greg@wooledge.org>
http://bugs.debian.org/328113
- login(1): added securetty(5) to SEE ALSO section
(fixed Debian bug http://bugs.debian.org/325773),
- groupadd(8), useradd(8): fix regular expression describing allowed login/group
- groupadd(8), useradd(8): fix regular expression describing alloved login/group
names (pointed by Nicolas François <nicolas.francois@centraliens.net>)
(correct is [a-z_][a-z0-9_-]*[$]),
- groupadd(8), useradd(8): documents in CAVEATS section the limitations shadow
@@ -1001,9 +1001,9 @@ shadow-4.0.12 -> shadow-4.0.13 10-10-2005
shadow-4.0.11.1 -> shadow-4.0.12 22-08-2005
*** general:
- newgrp, login: remove using login.defs::CLOSE_SESSIONS variable and always
- newgrp, login: remove using login.defs::CLOSE_SESSIONS variable and allways
close PAM session,
- fixed configure.in: really enable shadow group support by default (pointed by
- fixed configure.in: realy enable shadow group support by default (pointed by
Greg Schafer <gschafer@zip.com.au> and Peter Vrabec <pvrabec@redhat.com>),
- login.defs: removed handle QMAIL_DIR variable,
- login: allow regular user to login on read-only root file system (not only for root)
@@ -1028,9 +1028,9 @@ shadow-4.0.11.1 -> shadow-4.0.12 22-08-2005
period and permit brute-force attacks (fixed http://bugs.debian.org/288827),
- uClibc fixes (by Martin Schlemmer <azarah@nosferatu.za.org>):
added require ngettext (added [need-ngettext] to AM_GNU_GETTEXT() parameters)
and stub prototype for ngettext() in lib/prototypes.h (necessary if shadow
and stub prototype for ngettext() in lib/prototypes.h (neccessary if shadow
compiled with disabled NLS support)
- groupadd: rewritten for use getopt_long(),
- groupadd: rewrited for use getopt_long(),
- groupadd, groupdel, groupmod, userdel: do OPENLOG() before pam_start(),
- groupadd: fixed double OPENLOG(),
- removed lib/{grpack,gspack,pwpack,sppack}.c and prototypes from lib/prototypes.h
@@ -1066,7 +1066,7 @@ shadow-4.0.10 -> shadow-4.0.11 18-07-2005
- su: ignore SIGINT while authenticating. A ^C could defeat the waiting period and
permit brute-force attacks. Also ignore SIGQUIT.
Fixed: http://bugs.debian.org/52372 and http://bugs.debian.org/288827
- useradd: rewritten for use getopt_long(),
- useradd: rewrited for use getopt_long(),
- newgrp: add fix for handle splitted NIS groups: extends the functionality that,
if the requested group is given, all groups of the same GID are tested for
membership of the requesting user.
@@ -1080,7 +1080,7 @@ shadow-4.0.10 -> shadow-4.0.11 18-07-2005
- S/Key support is back,
- usermod: added -a option. This flag can only be used in conjunction with the -G
option. It cause usermod to append user to the current supplementary group list.
(patch by Peter Vrabec <pvrabec@redhat.com>)
(patch by Peter Vrabec <pvrabec@redhat.com>)
- chage: added missing \n in error messages,
- useradd, groupadd: change -O option to -K and document it in man page,
- su, sulogin, login: fixed erroneous warning messages when used with PAM about some
@@ -1097,7 +1097,7 @@ shadow-4.0.10 -> shadow-4.0.11 18-07-2005
- updated translations: cs, da, de, es, fi, pl, pt, ro, ru, sk.
*** documentation:
- pwck(8): document -q option (based on Debian patch for fix http://bugs.debian.org/309408)
- pwck(8): rewritten OPTIONS section and better SYNOPSIS,
- pwck(8): rewrited OPTIONS section and better SYNOPSIS,
- lastlog(8): document that lastlog is a sparse file, and don't need to be rotated
http://bugs.debian.org/219321
- login(8): better explain the respective roles of login, init and getty with regards
@@ -1111,12 +1111,12 @@ shadow-4.0.9 -> shadow-4.0.10 28-06-2005
*** general:
- mkpasswd: removed,
- userdel: now deletes user groups from /etc/gshadow as well as /etc/group.
- userdel: now deletes user groups from /etc/gshdow as well as /etc/group.
Fix by Nicolas François <nicolas.francois@centraliens.net>.
http://bugs.debian.org/99442
- usermod: when relocating a user's home directory, don't fail and remove the new
home directory if we can't remove the old home directory for some
reason; the results can be spectacularly poor if, for instance, only
reason; the results can be spectularly poort if, for instance, only
the rmdir() fails. Patch prepared by Timo Lindfors <lindi-spamtrap@newmail.com>.
http://bugs.debian.org/166369
- su: fix syslogs to be less ambiguous. Use old:new format instead of old-new
@@ -1124,23 +1124,23 @@ shadow-4.0.9 -> shadow-4.0.10 28-06-2005
http://bugs.debian.org/213592
- removed not used now libmisc/setup.c,
- login: use also UTMPX API instead UTMP on failure (login was affected for this
when shadow was built without PAM support)
when shadow was builded without PAM support)
patch by Nicolas François <nicolas.francois@centraliens.net>
- login: the PAM session needs to be closed as root, thus before change_uid()
http://bugs.debian.org/53570 http://bugs.debian.org/195048 http://bugs.debian.org/211884
- login: made login's -f option also able to use the username after -- if none
was passed as it's optarg
http://bugs.debian.org/53702
http://bugs.debian.org/53702
- login: check for hushed login and pass PAM_SILENT if true,
http://bugs.debian.org/48002
- login: fixed username on successful login (was using the normal username,
- login: fixed username on succesful login (was using the normal username,
when it should have used pam_user) http://bugs.debian.org/47819
- remove using SHADOWPWD #define so now shadow is always built with shadow
password support,
- chage: rewritten for use getopt_long(),
- remove using SHADOWPWD #define so now shadow is allways builded with shadow
passwowd support,
- chage: rewrited for use getopt_long(),
- updated translations: ca, cs, da, fi, pl, ru, zh_TW.
*** documentation:
- most of the man pages now are generated from XML files so in case submitting any
- most of the man pages now are generated from XML files so in case submiting any
chages to this resources please make diff to XML files,
- chfn: give more details about the influence of login.defs on what's allowed to
users.
@@ -1148,7 +1148,7 @@ shadow-4.0.9 -> shadow-4.0.10 28-06-2005
shadow-4.0.8 -> shadow-4.0.9 23-05-2005
*** general:
- passwd: fixed segfault in non-PAM configuration
- passwd: fixed segfault in non-PAM connfiguration
(submited by Greg Schafer <gschafer@zip.com.au>),
- newgrp: fixed NULL pointer dereference - getlogin() and ttyname() can
return NULL which is not checked (http://bugs.debian.org/162303),
@@ -1170,15 +1170,15 @@ shadow-4.0.7 -> shadow-4.0.8 26-04-2005
- configure.in: add using AC_GNU_SOURCE macro for kill compilation warnings about
implicit declaration of function `fseeko',
- faillog: changed faillog record display format for allow fit in 80 columns all
faillog attributes,
faillog atributies,
- removed NDBM code (unused),
- fixed use of SU_WHEEL_ONLY in su. Now su really is available for wheel group
- fixed use of SU_WHEEL_ONLY in su. Now su realy is avalaible for wheel group
members. Thanks to Mike Frysinger <vapier@gentoo.org> for report:
http://bugs.gentoo.org/show_bug.cgi?id=80345
- drop never finished kerberos and des_rpc support (for kerberos support back firs
must be prepared modularization),
- fixed UTMP path detection (by Kelledin <kelledin@users.sf.net>),
- useradd: rewritten group count to dynamic (by John Newbigin
- useradd: rewrited group count to dynamic (by John Newbigin
<jnewbigin@ict.swin.edu.au>),
- login: fixed create lastlog entry fo users never loged in on non-PAM
variant of login (fix by <oracular@ziplip.com>),
@@ -1193,7 +1193,7 @@ shadow-4.0.7 -> shadow-4.0.8 26-04-2005
fchmod() is executed. (Actually, we could also pass the final "mode" to
the open() call and then save the consequent fchmod().)
- SELinux changes: added changes in chage, chfn, chsh, passwd for allow
construct more grained user password/account properties on SELinux
construct more grained user password/accuunt properties on SELinux
policies level. Patch originally based on RH changes (submited by Chris
PeBenito <pebenito@gentoo.org>),
- added SELinux changes: in libmisc/copydir.c (based on Fedora patch),
@@ -1208,11 +1208,11 @@ shadow-4.0.7 -> shadow-4.0.8 26-04-2005
-- new: chage.1, chpasswd.8, expiry.1, faillog.5, faillog.8, getspnam.3,
logoutd.8, porttime.5, pwck.8, shadow.3, shadowconfig.8, su.1,
- passwd(1): fix #160477 Debian bug: improve -S output description,
- newgrp(1): fix #251926, #166173, #113191 Debian bugs: explain why editing /etc/group
- newgrp(1): fix #251926, #166173, #113191 Debian bugs: explain why editing /etc/group
(without gshadow) doesn't permit to use newgrp,
- newgrp(1): newgrp uses /bin/sh (not bash),
- faillog(8): updated after rewritten faillog command for use getopt_long(),
- login(1): removed fragment about abilities pass environment variables in login prompt,
- faillog(8): updated after rewrited faillog command for use getopt_long(),
- login(1): removed fragment about abilities pass enviroment variables in login prompt,
- gshadow(5): new file (by Nicolas Nicolas François <nicolas.francois@centraliens.net>),
- usermod(8): fixed #302388 Debian bug: added separated -o option description,
@@ -1229,24 +1229,24 @@ shadow-4.0.6 -> shadow-4.0.7 26-01-2005
-- use fseeko() instead fseek() and remove casting file offsets to unsigned
long.
- lastlog:
-- rewritten source code using the same style as in chpasswd.c,
-- open lastlog file after finish parse commandline options
(now --help output can be displayed for users without lastlog
-- rewrited source code using the same style as in chpasswd.c,
-- open lastlog file after finish parse comman line optiomns
(now --help otput can be displayd for users without lastlog
file read permission),
-- cleanups in lastlog(8) man page using the same style as in
chpasswd(8).
- chpasswd:
-- switch chpasswd to use getopt_long() and adds a --md5 option
(by Ian Gulliver <ian@penguinhosting.net>),
-- rewritten chpasswd(8) man page.
-- rewrited chpasswd(8) man page.
shadow-4.0.5 -> shadow-4.0.6 08-11-2004
- su: fixed adding of pam_env env variables to environment
- su: fixed adding of pam_env env variables to enviroment
(Martin Schlemmer <azarah@nosferatu.za.org>),
- autoconf: fixed filling MAIL_SPOOL_DIR and MAIL_SPOOL_FILE variables
which was always empty (Gregorio Guidi <g.guidi@sns.it>),
- really close security bug in libmisc/pwdcheck.c,
which was allways empty (Gregorio Guidi <g.guidi@sns.it>),
- realuy closse security bug in libmisc/pwdcheck.c,
- added missing template/example PAM service config files for chfn, chsh and
userdel,
- do not translate variable names from /etc/default/useradd during
@@ -1257,10 +1257,10 @@ shadow-4.0.4.1 -> shadow-4.0.5 27-10-2004
- change libmisc to private static library,
- added SELinux support (basing on patch from Gentoo),
- chage: more verbose/human readable -l output. This output is much more
better for send directly via email for each users as message with account
beter for send directly via email for each users as message with account
status (for example as message with warning about account/password expiration),
- login: fixed handle -f option: now it works correctly without specify "-h
<host>" if open login session locally is required (thanks for help
<host>" if open login session localy is required (thanks for help
investigate bug for Krzysztof Kotlenga),
- userdel: when removing a user with userdel, userdel was always exits with 1 (fixed).
Based on http://bugs.gentoo.org/show_bug.cgi?id=66687,
@@ -1274,8 +1274,8 @@ shadow-4.0.4.1 -> shadow-4.0.5 27-10-2004
makes httpd Option SymlinkIfOwnerMatch break for default weg pages
including symlinks placed into /etc/skel/public_html for example.
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=66819
- su: add pam_open_session() support. If built without PAM support
propagate $DISPLAY and $XAUTHORITY environment variables.
- su: add pam_open_session() support. If builded without PAM support
propagate $DISPLAY and $XAUTHORITY enviroment variables.
Based on http://www.gentoo.org/cgi-bin/viewcvs.cgi/sys-apps/shadow/files/shadow-4.0.4.1-su-pam_open_session.patch?rev=1.1
- applied 036_pam_access_with_preauth.patch Debian patch submited by Bjorn
Torkelsson <Bjorn.Torkelsson@hpc2n.umu.se>: add support for PAM account
@@ -1287,11 +1287,11 @@ shadow-4.0.4.1 -> shadow-4.0.5 27-10-2004
Use constant strings rather than argv[0] for syslog ident in the user
management commands,
shadow-4.0.4.1-owl-tmp.diff:
Remove using mktemp() if mkstemp() prototype not found (use always mkstemp()),
Remove using mktemp() if mkstemp() prototype not found (use allways mkstemp()),
shadow-4.0.4.1-owl-check-reads.diff:
Add checking for read errors in commonio and vipw/vigr (not doing so could
result in data loss when the records are written back),
- fixed security bug in libmisc/pwdcheck.c which allow unauthorized
- fixed securirty bug in libmisc/pwdcheck.c which allow unauthorized
account properties modification.
Affected tools: chfn and chsh.
Bug was discovered by Martin Schulze <joey@infodrom.org>.
@@ -1307,12 +1307,12 @@ shadow-4.0.4.1 -> shadow-4.0.5 27-10-2004
shadow-4.0.4 => shadow-4.0.4.1 14-01-2004
- bug fixes in automake files for generate correct tar ball on "make dist":
added missing "EXTRA_DIST = $(man_MANS)" in man/*/Makefile.am.
added mising "EXTRA_DIST = $(man_MANS)" in man/*/Makefile.am.
shadow-4.0.3 => shadow-4.0.4 14-01-2004
shadow-4.0.3 => shadow-4.0.4 14-01-2004
*** general:
- added missing information about -f options in groupadd usage message
- added missing information about -f options in groupadd usage mesage
(document this also in man page),
- removed TCFS support (tcfs is dead),
- convert all po/*.po files to utf-8,
@@ -1320,7 +1320,7 @@ shadow-4.0.3 => shadow-4.0.4 14-01-2004
per service flushing method instead HUPing nscd process),
- removed old AUTH_METHODS dependent code,
- chage: now all code depend on SHADOWPWD. If shadow will not be configured
on autoconf level for using shadow password chage is olny stub which
on autoconf level for using shadow possword chage is olny stub which
informs "chage not configured for shadow password support."
- dpasswd: removed,
- login: remove handle login.defs::DIALUPS_CHECK_ENAB code,
@@ -1328,7 +1328,7 @@ shadow-4.0.3 => shadow-4.0.4 14-01-2004
- ALL tools, libraries: remove old SVR4, SVR4_SI86_EUA BSD_QUOTA and ATT_AGE
dependent code,
- ALL: ready for gettext 0.11.5, automake 1.7.4, autoconf 2.57,
- logoutd, userd: handle also utmpx if available,
- logoutd, userd: handle also utmpx if avalaile,
- newgrp: fix for non-PAM version
Use CLOSE_SESSIONS depending code only when USE_PAM.
The problem was reported by Mattias Webjorn Eriksson using Slackware
@@ -1356,7 +1356,7 @@ shadow-4.0.3 => shadow-4.0.4 14-01-2004
shadow-4.0.2 => shadow-4.0.3 13-03-2002
- added various cs, de, fr, id, it, ko man pages found mainly in national
- added variouse cs, de, fr, id, it, ko man pages found mainly in national
man pages translations projects (this documents are not synced with
current en version but you know .. "Documentations is lik sex. When it is
good it very very good. Whet it is bad it is better than nothing."). Any
@@ -1372,9 +1372,9 @@ shadow-4.0.2 => shadow-4.0.3 13-03-2002
shadow-4.0.1 => shadow-4.0.2 17-02-2002
- resolve many fuzzy translations also all this which may cause problems on
displaying long uid/gid,
- allow use "$" on ending in created by useradd username accounts for allow
create machine accounts for samba (thanks to Jerome Borsboom
displaing long uid/gid,
- allow use "$" on ending in cereated by useradd usermname accounts for allow
create machine acounts for samba (thanks to Jerome Borsboom
<borsboom@tch.fgg.eur.nl> for point this problem in 4.0.1),
- fix small but ugly bug in configure.in in libpam_mics library detection.
@@ -1394,7 +1394,7 @@ shadow-4.0.0 => shadow-4.0.1
as root. If root does read-only, there's no lock needed. Added missing
"#include <errno.h>" for above (me).
shadow-4.0.0-owl-warnings.diff
Olny one fix from this patch was applied because other was fixed few days
Olny one fix from this patch was aplayd because other was fixed few days
before :)
shadow-4.0.0-owl-check_names.diff
Merge only prat this patch with checking login name matching; checking
@@ -1402,13 +1402,13 @@ shadow-4.0.0 => shadow-4.0.1
probably _POSIX_LOGIN_NAME_MAX from <bits/posix1_lim.h>,
shadow-4.0.0-owl-chage-drop-priv.diff
shadow-4.0.0-owl-pam-auth.diff
Merge part with reorder initialize PAM and checking if chage is runed by
Merge part with reorder initialize PAM and checkin is chage is runed by
root or not - now chage can be runed from non-root account for checking
by user own account information (if PAM enabled).
- fixes for handle/print correctly 32bit uid/gid (Thorsten Kukuk <kukuk@suse.de>),
- implemented functions for better reloading the nscd cache (per NSS map)
(Thorsten Kukuk <kukuk@suse.de>),
- fixed warnings "not used but defined" on compile using gcc 3.0.x
- fixed warnings "not used but defined" on compile using gcc 3.0.x
(bulletpr00ph <bullet@users.sourceforge.net>),
- added ja, ko translations found in SuSE,
- added symlinks: newgrp -> sg, vipw -> vigr,
@@ -1416,7 +1416,7 @@ shadow-4.0.0 => shadow-4.0.1
- added sg(1) man page as roff .so link to newgrp(1),
- installed fix for SEGV when using pwck -s on /etc/passwd file with
empty lines in it.
shadow-20001016 => shadow-4.0.0 06-01-2002
- fix bug discovered and fixed by Marcel Ritter
@@ -1446,30 +1446,30 @@ shadow-20001016 => shadow-4.0.0 06-01-2002
- much better automake support,
- added pt_BR man pages for gpasswd(1), groupadd(8), groupdel(8),
groupmod(8), shadow(5) (man pages for other nations also are welcome),
- many small fixes and updates nad improvements in man pages,
- applied Debian patch to man pages for shadowconfig,
- mamny small fixes and updates nad improvements in man pages,
- aplayed Debian patch to man pages for shadowconfig,
- remove limit to 6 chars logged tty name (012_libmisc_sulog.c.diff Debian
patch).
shadow-20001012 -> shadow-20001016:
- conditionally disabled body reload_nscd() because not every
- conditionaly disabled body reload_nscd() because not every
version of nscd can handle it (this can be enabled by define
ENABLE_NSCD_SIGHUP) (Marek Michałkiewicz <marekm@linux.org.pl>)
- fixes on autoconf/automake level for dist target,
- Julianne F. Haugh new contact address.
- Julianne F. Haugh new contact adress.
shadow-20000902 => shadow-20001012
- removed /redhat directory with obsoleted files (partially rewritten spec
- removed /redhat directory with obsoleted files (partialy rewrited spec
file is now in root directory),
- applied shadow-19990827-group.patch patch from RH wich prevents adduser
- aplayed shadow-19990827-group.patch patch from RH wich prevents adduser
overwrite previously existing groups in adduser,
- added PAM support for chage (bind to "chage" PAM config file) also
added PAM support for all other small tools like chpasswd, groupadd,
groupdel, groupmod, newusers, useradd, userdel, usermod (bind to common
"shadow" PAM config file) - this modifications mainly based on
groupdel, groupmod, newusers, useradd, userdel, usermod (bind to common
"shadow" PAM config file) - this modificaytions mainly based on
modifications prepared by Janek Rękojarski <baggins@pld.org.pl>,
- many small fixes and improvements in automake (mow "make dist"
- many small fixes and improvments in automake (mow "make dist"
works correctly),
- added cs translation (Jiri Pavlovsky <Jiri.Pavlovsky@ff.cuni.cz>).

148
README
View File

@@ -1,47 +1,121 @@
# shadow-utils
Shadow SITES
============
## Introduction
The shadow-utils package includes the necessary programs for
converting UNIX password files to the shadow password format, plus
programs for managing user and group accounts. The pwconv command
converts passwords to the shadow password format. The pwunconv command
unconverts shadow passwords and generates a passwd file (a standard
UNIX password file). The pwck command checks the integrity of password
and shadow files. The lastlog command prints out the last login times
for all users. The useradd, userdel, and usermod commands are used for
managing user accounts. The groupadd, groupdel, and groupmod commands
are used for managing group accounts.
Homepage
http://pkg-shadow.alioth.debian.org/
## Sites
* [Homepage](https://github.com/shadow-maint/shadow)
* [Issue tracker](https://github.com/shadow-maint/shadow/issues)
* [Releases](https://github.com/shadow-maint/shadow/releases)
FTP site
ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow
## Code
SVN repository
anonymous read only access: svn://svn.debian.org/pkg-shadow/upstream
The main development branch is at [https://github.com/shadow-maint/shadow.git](https://github.com/shadow-maint/shadow)
SVN web interface
http://svn.debian.org/wsvn/pkg-shadow/upstream
or
http://svn.debian.org/viewsvn/pkg-shadow/upstream
See [STABLE.md](https://github.com/shadow-maint/shadow/blob/master/STABLE.md) for a list of supported stable branches.
Mailing lists
for general discuss: pkg-shadow-devel@lists.alioth.debian.org
commit list: pkg-shadow-commits@lists.alioth.debian.org
## Contacts
There are several ways to contact us:
* [the general discussion mailing list](
https://alioth-lists.debian.net/mailman/listinfo/pkg-shadow-devel)
* the #shadow IRC channel on libera.chat:
* irc://irc.libera.chat/shadow
Mailing lists subscription
http://lists.alioth.debian.org/mailman/listinfo/pkg-shadow-devel
http://lists.alioth.debian.org/mailman/listinfo/pkg-shadow-commits
### Mailing archives
* [the general discussion mailing list archive](
https://alioth-lists.debian.net/pipermail/pkg-shadow-devel/)
* [the commit mailing list archive](
https://alioth-lists-archive.debian.net/pipermail/pkg-shadow-commits/),
only used for historical purposes
Mailing lists archives:
http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/
http://lists.alioth.debian.org/pipermail/pkg-shadow-commits/
## Contributions
S/Key support:
Shadow can be built with S/Key support using the S/Key package from:
Contributions are welcome. Follow the
[guidelines](doc/contributions/introduction.md) before posting any patches.
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libskey/
or
http://gentoo.osuosl.org/distfiles/skey-1.1.5.tar.bz2
Authors and contributors
========================
Thanks to at least the following people for sending patches, bug
reports and various comments. This list may be incomplete, I received
a lot of mail...
Adam Rudnicki <adam@v-lo.krakow.pl>
Alan Curry <pacman@tardis.mars.net>
Alexander O. Yuriev <alex@bach.cis.temple.edu>
Algis Rudys <arudys@rice.edu>
Andreas Jaeger <aj@arthur.rhein-neckar.de>
Aniello Del Sorbo <anidel@edu-gw.dia.unisa.it>
Anton Gluck <gluc@midway.uchicago.edu>
Arkadiusz Miskiewicz <misiek@pld.org.pl>
Ben Collins <bcollins@debian.org>
Brian R. Gaeke <brg@dgate.org>
Calle Karlsson <ckn@kash.se>
Chip Rosenthal <chip@unicom.com>
Chris Evans <lady0110@sable.ox.ac.uk>
Cristian Gafton <gafton@sorosis.ro>
Dan Walsh <dwalsh@redhat.com>
Darcy Boese <possum@chardonnay.niagara.com>
Dave Hagewood <admin@arrowweb.com>
David A. Holland <dholland@hcs.harvard.edu>
David Frey <David.Frey@lugs.ch>
Ed Carp <ecarp@netcom.com>
Floody <flood@evcom.net>
Frank Denis <j@4u.net>
George Kraft IV <gk4@us.ibm.com>
Greg Mortensen <loki@world.std.com>
Guido van Rooij
Guy Maor <maor@debian.org>
Hrvoje Dogan <hdogan@bjesomar.srce.hr>
Jakub Hrozek <jhrozek@redhat.com>
Janos Farkas <chexum@bankinf.banki.hu>
Jay Soffian <jay@lw.net>
Jesse Thilo <Jesse.Thilo@pobox.com>
Joey Hess <joey@kite.ml.org>
John Adelsberger <jja@umr.edu>
Jonathan Hankins <jhankins@mailserv.homewood.k12.al.us>
Jon Lewis <jlewis@lewis.org>
Joshua Cowan <jcowan@hermit.reslife.okstate.edu>
Judd Bourgeois <shagboy@bluesky.net>
Juergen Heinzl <unicorn@noris.net>
Juha Virtanen <jiivee@iki.fi>
Julian Pidancet <julian.pidancet@gmail.com>
Julianne Frances Haugh <jockgrrl@ix.netcom.com>
Leonard N. Zubkoff <lnz@dandelion.com>
Luca Berra <bluca@www.polimi.it>
Lukáš Kuklínek <lkukline@redhat.com>
Lutz Schwalowsky <schwalow@mineralogie.uni-hamburg.de>
Marc Ewing <marc@redhat.com>
Martin Bene <mb@sime.com>
Martin Mares <mj@gts.cz>
Michael Meskes <meskes@topsystem.de>
Michael Talbot-Wilson <mike@calypso.bns.com.au>
Mike Frysinger <vapier@gentoo.org>
Mike Pakovic <mpakovic@users.southeast.net>
Nicolas François <nicolas.francois@centraliens.net>
Nikos Mavroyanopoulos <nmav@i-net.paiko.gr>
Pavel Machek <pavel@bug.ucw.cz>
Peter Vrabec <pvrabec@redhat.com>
Phillip Street
Rafał Maszkowski <rzm@icm.edu.pl>
Rani Chouha <ranibey@smartec.com>
Sami Kerola <kerolasa@rocketmail.com>
Scott Garman <scott.a.garman@intel.com>
Sebastian Rick Rijkers <srrijkers@gmail.com>
Seraphim Mellos <mellos@ceid.upatras.gr>
Shane Watts <shane@nexus.mlckew.edu.au>
Steve M. Robbins <steve@nyongwa.montreal.qc.ca>
Thorsten Kukuk <kukuk@suse.de>
Tim Hockin <thockin@eagle.ais.net>
Timo Karjalainen <timok@iki.fi>
Ulisses Alonso Camaro <ulisses@pusa.eleinf.uv.es>
Werner Fink <werner@suse.de>
Maintainers
===========
Tomasz Kłoczko <kloczek@pld.org.pl> (2000-2007)
Nicolas François <nicolas.francois@centraliens.net> (2007-now)
## Authors and maintainers
Authors and maintainers are listed in [AUTHORS.md](
https://github.com/shadow-maint/shadow/blob/master/AUTHORS.md).

127
TODO Normal file
View File

@@ -0,0 +1,127 @@
* Create a common usage function that'd take the array of
long options and an array of descriptions and output that so things would
be standardized across the utils.
Usage strings should be normalized and split first.
Investigate optparse.
/etc/default/useradd
* GROUP=1000 should accept a group name.
Check when RLOGIN is enabled if ruserok() exists
Move selinux_file_context out of libmisc/copydir.c
Review hardcoded root account?
review all call to strto
libmisc/cleanup_user.c
cleanup needed (cleanup_report_add_user* not used)
libxcrypt support
* http://wiki.linuxfromscratch.org/patches/browser/trunk/shadow/shadow-4.0.18.1-owl_blowfish-1.patch
implement getlong, getulong.
avoid atoi, atol, atoul, strtol, strtoul, ...
manpages: comment the RLOGIN parts
Replace build_list (in lib/gshadow.c) and list (in lib/sgetgrent.c) by
comma_to_list()
Revert the modified files if all files could not be changed.
* or warn and indicate which files were modified and which were not.
* check the order the files are modified.
report nscd_flush_cache failures?
call nscd from the programs or from lib (commonio?)
PAM: check if a non-interactive conversation function could be used to set
the password in chpasswd and newusers
WITH_SELINUX
- review all tools to check that the strategies are consistent
chage, chfn, chsh: same change needed as in passwd.
- probably need moving check_selinux_access to a separate file.
testsuite
- newgrp
- test with unknown user's GID
newusers
- add logging to SYSLOG & AUDIT
- use CREATE_HOME
- Add a -Z option (see useradd / usermod)
Document when/where option appeared, document whether an option is standard
or not.
Check all the expiry semantics
ALL:
- move base passwd/shadow/group/gshadow operation to module for allow write
different backend modules for db, NIS, LDAP and others. Default backend it
will be goot if will be chosen depending on /etc/nsswitch.conf and allow
override this by -r <repository> options (where the <repository> can be
file, db, nis nisplus, ldap .. like on /etc/nsswitch.conf in service column).
passwd have old piece of code with handling -r option and it will be good
finish this and propagate on other shadow tools for allow operate on other
user databases by well known tools.
- Protect against signals. Register do_cleanups in a signal handler.
- login.defs
- generate depending on configuration
- useradd:
- add handle create user mail spool in maildir format.
- Add support for -k in -D mode
- Add support for -K in -D mode
- Add option to create or not the mail spool (and set the default in -D
mode)
- Change -l to reset the entry if an entry was already there
- set the mask in mkdir?
- userdel:
- add backup option for the removal of user resources,
- user_busy: check that the user is not running any processes.
- missing "deleting group" FAILED
- home dir removed, but userdel may fail and may leave the user
=> warning needed
- usermod
- add an option equivalent to useradd's -l (only when uid is changed)
- the mode of new home directories should be set according to the
original mode. Does copy_tree does this?
- user renamed, order is not kept in /etc/group (see
47_usermod-l_no_shadow_file). This is a problem when the first user is
considered as the admin.
- see mail "user ID change" on April, 15
+ fix call to chown (combination of -m and -u/-g)
+ add tests
- passwd:
- check combination of options (e.g. -u/-l)
- when -u refuse to unlock because it would create an empty password, it
should not display "Password changed."
exit instead?
- newgrp: check the USE_PAM section.
- pwck
- Add check to move passwd passwords to shadow if there is a shadow
entry (with a password).
- Add check to move passwd passwords to shadow if there is a shadow
file.
- Support an alternative /etc/tcb directory as second parameter.
- add options -g / -G to specify alternative group / gshadow files
- su
- add a login.defs configuration parameter to add variables to keep in
the environment with "su -l" (TERM/TERMCOLOR/...)
- vipw
- set ACLs and XATTRs on the temporary file (and backups?)
- vipw + selinux -> use lib/selinux.c

View File

@@ -6,7 +6,7 @@ AC_DEFUN([JH_PATH_XML_CATALOG],
[
# check for the presence of the XML catalog
AC_ARG_WITH([xml-catalog],
AS_HELP_STRING([--with-xml-catalog=CATALOG],
AC_HELP_STRING([--with-xml-catalog=CATALOG],
[path to xml catalog to use]),,
[with_xml_catalog=/etc/xml/catalog])
jh_found_xmlcatalog=true

2455
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

12
autogen.sh Executable file
View File

@@ -0,0 +1,12 @@
#! /bin/sh
autoreconf -v -f --install || exit 1
./configure \
CFLAGS="-O2 -Wall" \
--enable-man \
--enable-maintainer-mode \
--disable-shared \
--without-libpam \
--with-selinux \
"$@"

348
compile
View File

@@ -1,348 +0,0 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# 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.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN* | MSYS*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/* | msys/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

1754
config.guess vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,525 +0,0 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define if account management tools should be installed setuid and
authenticate the callers */
#undef ACCT_TOOLS_SETUID
/* Define to support lastlog. */
#undef ENABLE_LASTLOG
/* Define to manage session support with logind. */
#undef ENABLE_LOGIND
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
/* Define to support the subordinate IDs. */
#undef ENABLE_SUBIDS
/* Path for faillog file. */
#undef FAILLOG_FILE
/* Define to the type of elements in the array set by `getgroups'. Usually
this is either `int' or `gid_t'. */
#undef GETGROUPS_T
/* max group name length */
#undef GROUP_NAME_MAX_LENGTH
/* Define to 1 if you have the declaration of 'pam_fail_delay' */
#undef HAS_PAM_FAIL_DELAY
/* Defined to 1 if you have the declaration of 'secure_getenv' */
#undef HAS_SECURE_GETENV
/* Define to 1 if you have the <acl/libacl.h> header file. */
#undef HAVE_ACL_LIBACL_H
/* Define to 1 if you have the `arc4random_buf' function. */
#undef HAVE_ARC4RANDOM_BUF
/* Define to 1 if you have the <attr/error_context.h> header file. */
#undef HAVE_ATTR_ERROR_CONTEXT_H
/* Define to 1 if you have the <attr/libattr.h> header file. */
#undef HAVE_ATTR_LIBATTR_H
/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
#undef HAVE_CFLOCALECOPYCURRENT
/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
the CoreFoundation framework. */
#undef HAVE_CFPREFERENCESCOPYAPPVALUE
/* Define to 1 if you have the <crypt.h> header file. */
#undef HAVE_CRYPT_H
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
#undef HAVE_DCGETTEXT
/* Define to 1 if you have the declaration of `cygwin_conv_path', and to 0 if
you don't. */
#undef HAVE_DECL_CYGWIN_CONV_PATH
/* Define to 1 if you have the declaration of `PAM_DATA_SILENT', and to 0 if
you don't. */
#undef HAVE_DECL_PAM_DATA_SILENT
/* Define to 1 if you have the declaration of `PAM_DELETE_CRED', and to 0 if
you don't. */
#undef HAVE_DECL_PAM_DELETE_CRED
/* Define to 1 if you have the declaration of `PAM_ESTABLISH_CRED', and to 0
if you don't. */
#undef HAVE_DECL_PAM_ESTABLISH_CRED
/* Define to 1 if you have the declaration of `PAM_NEW_AUTHTOK_REQD', and to 0
if you don't. */
#undef HAVE_DECL_PAM_NEW_AUTHTOK_REQD
/* Define if you have the GNU dld library. */
#undef HAVE_DLD
/* Define to 1 if you have the `dlerror' function. */
#undef HAVE_DLERROR
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define if you have the _dyld_func_lookup function. */
#undef HAVE_DYLD
/* Define to 1 if you have the `explicit_bzero' function. */
#undef HAVE_EXPLICIT_BZERO
/* Defined to 1 if you have the declaration of 'fgetpwent_r' */
#undef HAVE_FGETPWENT_R
/* Define to 1 if you have the `futimes' function. */
#undef HAVE_FUTIMES
/* Define to 1 if you have the `getentropy' function. */
#undef HAVE_GETENTROPY
/* Define to 1 if you have the `getrandom' function. */
#undef HAVE_GETRANDOM
/* Define to 1 if you have the `getspnam' function. */
#undef HAVE_GETSPNAM
/* Define to 1 if you have the `getspnam_r' function. */
#undef HAVE_GETSPNAM_R
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
/* Define to 1 if you have the `getusershell' function. */
#undef HAVE_GETUSERSHELL
/* Define to 1 if you have the <gshadow.h> header file. */
#undef HAVE_GSHADOW_H
/* Define if you have the iconv() function and it works. */
#undef HAVE_ICONV
/* Define to 1 if you have the `initgroups' function. */
#undef HAVE_INITGROUPS
/* Define to 1 if you have the `innetgr' function. */
#undef HAVE_INNETGR
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <lastlog.h> header file. */
#undef HAVE_LASTLOG_H
/* Define to 1 if you have the `lckpwdf' function. */
#undef HAVE_LCKPWDF
/* Define if you have the libdl library or equivalent. */
#undef HAVE_LIBDL
/* Define if libdlloader will be built on this platform */
#undef HAVE_LIBDLLOADER
/* Define to 1 if you have the <linux/btrfs_tree.h> header file. */
#undef HAVE_LINUX_BTRFS_TREE_H
/* Define to 1 if you have the <linux/magic.h> header file. */
#undef HAVE_LINUX_MAGIC_H
/* Define if struct lastlog has ll_host */
#undef HAVE_LL_HOST
/* Define to 1 if you have the `lutimes' function. */
#undef HAVE_LUTIMES
/* Define to 1 if you have the `memset_explicit' function. */
#undef HAVE_MEMSET_EXPLICIT
/* Define to 1 if you have the <minix/config.h> header file. */
#undef HAVE_MINIX_CONFIG_H
/* Define to 1 if you have the <paths.h> header file. */
#undef HAVE_PATHS_H
/* Define to 1 if you have the `putgrent' function. */
#undef HAVE_PUTGRENT
/* Define to 1 if you have the `putpwent' function. */
#undef HAVE_PUTPWENT
/* Define to 1 if you have the `putspent' function. */
#undef HAVE_PUTSPENT
/* Define to 1 if you have the <readpassphrase.h> header file. */
#undef HAVE_READPASSPHRASE_H
/* Define to 1 if you have the <rpc/key_prot.h> header file. */
#undef HAVE_RPC_KEY_PROT_H
/* Define to 1 if you have the `rpmatch' function. */
#undef HAVE_RPMATCH
/* Define to 1 if you have the <security/openpam.h> header file. */
#undef HAVE_SECURITY_OPENPAM_H
/* Define to 1 if you have the <security/pam_misc.h> header file. */
#undef HAVE_SECURITY_PAM_MISC_H
/* Define to 1 if you have the <selinux/selinux.h> header file. */
#undef HAVE_SELINUX_SELINUX_H
/* Define to 1 if you have the <semanage/semanage.h> header file. */
#undef HAVE_SEMANAGE_SEMANAGE_H
/* Define to 1 if you have the `setgroups' function. */
#undef HAVE_SETGROUPS
/* Define to 1 if you have the `sgetgrent' function. */
#undef HAVE_SGETGRENT
/* Define to 1 if you have the `sgetpwent' function. */
#undef HAVE_SGETPWENT
/* Define to 1 if you have the `sgetspent' function. */
#undef HAVE_SGETSPENT
/* Define to 1 if you have the <sgtty.h> header file. */
#undef HAVE_SGTTY_H
/* Have working shadow group support in libc */
#undef HAVE_SHADOWGRP
/* Define if you have the shl_load function. */
#undef HAVE_SHL_LOAD
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `stpecpy' function. */
#undef HAVE_STPECPY
/* Define to 1 if you have the `stpeprintf' function. */
#undef HAVE_STPEPRINTF
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if `ut_addr' is a member of `struct utmpx'. */
#undef HAVE_STRUCT_UTMPX_UT_ADDR
/* Define to 1 if `ut_addr_v6' is a member of `struct utmpx'. */
#undef HAVE_STRUCT_UTMPX_UT_ADDR_V6
/* Define to 1 if `ut_host' is a member of `struct utmpx'. */
#undef HAVE_STRUCT_UTMPX_UT_HOST
/* Define to 1 if `ut_name' is a member of `struct utmpx'. */
#undef HAVE_STRUCT_UTMPX_UT_NAME
/* Define to 1 if `ut_syslen' is a member of `struct utmpx'. */
#undef HAVE_STRUCT_UTMPX_UT_SYSLEN
/* Define to 1 if `ut_time' is a member of `struct utmpx'. */
#undef HAVE_STRUCT_UTMPX_UT_TIME
/* Define to 1 if `ut_xtime' is a member of `struct utmpx'. */
#undef HAVE_STRUCT_UTMPX_UT_XTIME
/* Define to 1 if you have the <sys/capability.h> header file. */
#undef HAVE_SYS_CAPABILITY_H
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
/* Define to 1 if you have the <sys/random.h> header file. */
#undef HAVE_SYS_RANDOM_H
/* Define to 1 if you have the <sys/statfs.h> header file. */
#undef HAVE_SYS_STATFS_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <tcb.h> header file. */
#undef HAVE_TCB_H
/* Define to 1 if you have the <termio.h> header file. */
#undef HAVE_TERMIO_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `updwtmpx' function. */
#undef HAVE_UPDWTMPX
/* Define to 1 if you have the <utime.h> header file. */
#undef HAVE_UTIME_H
/* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present. */
#undef HAVE_UTIME_NULL
/* Define to 1 if you have the <utmp.h> header file. */
#undef HAVE_UTMP_H
/* Define to support vendor settings. */
#undef HAVE_VENDORDIR
/* Define to 1 if you have the <wchar.h> header file. */
#undef HAVE_WCHAR_H
/* Path for lastlog file. */
#undef LASTLOG_FILE
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
/* Location of system mail spool directory. */
#undef MAIL_SPOOL_DIR
/* Name of user's mail spool file if stored in user's home directory. */
#undef MAIL_SPOOL_FILE
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Path to passwd program. */
#undef PASSWD_PROGRAM
/* Define to support the shadow group file. */
#undef SHADOWGRP
/* PAM conversation to use */
#undef SHADOW_PAM_CONVERSATION
/* The default shell. */
#undef SHELL
/* The size of `gid_t', as computed by sizeof. */
#undef SIZEOF_GID_T
/* The size of `uid_t', as computed by sizeof. */
#undef SIZEOF_UID_T
/* Define to support S/Key logins. */
#undef SKEY
/* Define to support newer BSD S/Key API */
#undef SKEY_BSD_STYLE
/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#undef STDC_HEADERS
/* Define to support /etc/suauth su access control. */
#undef SU_ACCESS
/* Define to allow the bcrypt password encryption algorithm */
#undef USE_BCRYPT
/* Define to support flushing of nscd caches */
#undef USE_NSCD
/* Define to support Pluggable Authentication Modules */
#undef USE_PAM
/* Define to allow the SHA256 and SHA512 password encryption algorithms */
#undef USE_SHA_CRYPT
/* Define to support flushing of sssd caches */
#undef USE_SSSD
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable general extensions on macOS. */
#ifndef _DARWIN_C_SOURCE
# undef _DARWIN_C_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable X/Open compliant socket functions that do not require linking
with -lxnet on HP-UX 11.11. */
#ifndef _HPUX_ALT_XOPEN_SOCKET_API
# undef _HPUX_ALT_XOPEN_SOCKET_API
#endif
/* Identify the host operating system as Minix.
This macro does not affect the system headers' behavior.
A future release of Autoconf may stop defining this macro. */
#ifndef _MINIX
# undef _MINIX
#endif
/* Enable general extensions on NetBSD.
Enable NetBSD compatibility extensions on Minix. */
#ifndef _NETBSD_SOURCE
# undef _NETBSD_SOURCE
#endif
/* Enable OpenBSD compatibility extensions on NetBSD.
Oddly enough, this does nothing on OpenBSD. */
#ifndef _OPENBSD_SOURCE
# undef _OPENBSD_SOURCE
#endif
/* Define to 1 if needed for POSIX-compatible behavior. */
#ifndef _POSIX_SOURCE
# undef _POSIX_SOURCE
#endif
/* Define to 2 if needed for POSIX-compatible behavior. */
#ifndef _POSIX_1_SOURCE
# undef _POSIX_1_SOURCE
#endif
/* Enable POSIX-compatible threading on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
# undef __STDC_WANT_IEC_60559_BFP_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
# undef __STDC_WANT_IEC_60559_DFP_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
#endif
/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
# undef __STDC_WANT_IEC_60559_TYPES_EXT__
#endif
/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
#ifndef __STDC_WANT_LIB_EXT2__
# undef __STDC_WANT_LIB_EXT2__
#endif
/* Enable extensions specified by ISO/IEC 24747:2009. */
#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
# undef __STDC_WANT_MATH_SPEC_FUNCS__
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable X/Open extensions. Define to 500 only if necessary
to make mbstate_t available. */
#ifndef _XOPEN_SOURCE
# undef _XOPEN_SOURCE
#endif
/* Define to allow the yescrypt password encryption algorithm */
#undef USE_YESCRYPT
/* Directory for distribution provided configuration files */
#undef VENDORDIR
/* Version number of package */
#undef VERSION
/* Build shadow with ACL support */
#undef WITH_ACL
/* Build shadow with Extended Attributes support */
#undef WITH_ATTR
/* Define if you want to enable Audit messages */
#undef WITH_AUDIT
/* Build shadow with BtrFS support */
#undef WITH_BTRFS
/* Build shadow without libbsd support */
#undef WITH_LIBBSD
/* Build shadow with SELinux support */
#undef WITH_SELINUX
/* Build with su */
#undef WITH_SU
/* Build shadow with tcb support (incomplete) */
#undef WITH_TCB
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
/* Path for utmp file. */
#undef _UTMP_FILE
/* Path for wtmp file. */
#undef _WTMP_FILE
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t

View File

@@ -1,690 +0,0 @@
#! /bin/sh
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
# Copyright 1996-2014 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# The first argument passed to this file is the canonical host specification,
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
# should be set by the caller.
#
# The set of defined variables is at the end of this script.
# Known limitations:
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
# than 256 bytes, otherwise the compiler driver will dump core. The only
# known workaround is to choose shorter directory names for the build
# directory and/or the installation directory.
# All known linkers require a '.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
shrext=.so
host="$1"
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
# Code taken from libtool.m4's _LT_CC_BASENAME.
for cc_temp in $CC""; do
case $cc_temp in
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
\-*) ;;
*) break;;
esac
done
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
# Code taken from libtool.m4's _LT_COMPILER_PIC.
wl=
if test "$GCC" = yes; then
wl='-Wl,'
else
case "$host_os" in
aix*)
wl='-Wl,'
;;
mingw* | cygwin* | pw32* | os2* | cegcc*)
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
;;
irix5* | irix6* | nonstopux*)
wl='-Wl,'
;;
linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
ecc*)
wl='-Wl,'
;;
icc* | ifort*)
wl='-Wl,'
;;
lf95*)
wl='-Wl,'
;;
nagfor*)
wl='-Wl,-Wl,,'
;;
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
wl='-Wl,'
;;
ccc*)
wl='-Wl,'
;;
xl* | bgxl* | bgf* | mpixl*)
wl='-Wl,'
;;
como)
wl='-lopt='
;;
*)
case `$CC -V 2>&1 | sed 5q` in
*Sun\ F* | *Sun*Fortran*)
wl=
;;
*Sun\ C*)
wl='-Wl,'
;;
esac
;;
esac
;;
newsos6)
;;
*nto* | *qnx*)
;;
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
rdos*)
;;
solaris*)
case $cc_basename in
f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
wl='-Qoption ld '
;;
*)
wl='-Wl,'
;;
esac
;;
sunos4*)
wl='-Qoption ld '
;;
sysv4 | sysv4.2uw2* | sysv4.3*)
wl='-Wl,'
;;
sysv4*MP*)
;;
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
wl='-Wl,'
;;
unicos*)
wl='-Wl,'
;;
uts4*)
;;
esac
fi
# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
hardcode_minus_L=no
case "$host_os" in
cygwin* | mingw* | pw32* | cegcc*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
if test "$GCC" != yes; then
with_gnu_ld=no
fi
;;
interix*)
# we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes
;;
openbsd*)
with_gnu_ld=no
;;
esac
ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
# Set some defaults for GNU ld with shared library support. These
# are reset later if shared libraries are not supported. Putting them
# here allows them to be overridden if necessary.
# Unlike libtool, we use -rpath here, not --rpath, since the documented
# option of GNU ld is called -rpath, not --rpath.
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
case "$host_os" in
aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
fi
;;
amigaos*)
case "$host_cpu" in
powerpc)
;;
m68k)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
;;
esac
;;
beos*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
cygwin* | mingw* | pw32* | cegcc*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
haiku*)
;;
interix[3-9]*)
hardcode_direct=no
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
netbsd*)
;;
solaris*)
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
case `$LD -v 2>&1` in
*\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
ld_shlibs=no
;;
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
else
ld_shlibs=no
fi
;;
esac
;;
sunos4*)
hardcode_direct=yes
;;
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
esac
if test "$ld_shlibs" = no; then
hardcode_libdir_flag_spec=
fi
else
case "$host_os" in
aix3*)
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
if test "$GCC" = yes; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
fi
;;
aix[4-9]*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
else
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
break
fi
done
;;
esac
fi
hardcode_direct=yes
hardcode_libdir_separator=':'
if test "$GCC" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" && \
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
:
else
# We have old collect2
hardcode_direct=unsupported
hardcode_minus_L=yes
hardcode_libdir_flag_spec='-L$libdir'
hardcode_libdir_separator=
fi
;;
esac
fi
# Begin _LT_AC_SYS_LIBPATH_AIX.
echo 'int main () { return 0; }' > conftest.c
${CC} ${LDFLAGS} conftest.c -o conftest
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
fi
if test -z "$aix_libpath"; then
aix_libpath="/usr/lib:/lib"
fi
rm -f conftest.c conftest
# End _LT_AC_SYS_LIBPATH_AIX.
if test "$aix_use_runtimelinking" = yes; then
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
else
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
fi
fi
;;
amigaos*)
case "$host_cpu" in
powerpc)
;;
m68k)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
;;
esac
;;
bsdi[45]*)
;;
cygwin* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec=' '
libext=lib
;;
darwin* | rhapsody*)
hardcode_direct=no
if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
:
else
ld_shlibs=no
fi
;;
dgux*)
hardcode_libdir_flag_spec='-L$libdir'
;;
freebsd2.2*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
freebsd2*)
hardcode_direct=yes
hardcode_minus_L=yes
;;
freebsd* | dragonfly*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
hpux9*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
hpux10*)
if test "$with_gnu_ld" = no; then
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
fi
;;
hpux11*)
if test "$with_gnu_ld" = no; then
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
case $host_cpu in
hppa*64*|ia64*)
hardcode_direct=no
;;
*)
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
esac
fi
;;
irix5* | irix6* | nonstopux*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
netbsd*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
newsos6)
hardcode_direct=yes
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
*nto* | *qnx*)
;;
openbsd*)
if test -f /usr/libexec/ld.so; then
hardcode_direct=yes
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
else
case "$host_os" in
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
hardcode_libdir_flag_spec='-R$libdir'
;;
*)
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
esac
fi
else
ld_shlibs=no
fi
;;
os2*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
;;
osf3*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*)
if test "$GCC" = yes; then
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
# Both cc and cxx compiler support -rpath directly
hardcode_libdir_flag_spec='-rpath $libdir'
fi
hardcode_libdir_separator=:
;;
solaris*)
hardcode_libdir_flag_spec='-R$libdir'
;;
sunos4*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
;;
sysv4)
case $host_vendor in
sni)
hardcode_direct=yes # is this really true???
;;
siemens)
hardcode_direct=no
;;
motorola)
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
;;
esac
;;
sysv4.3*)
;;
sysv4*MP*)
if test -d /usr/nec; then
ld_shlibs=yes
fi
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
;;
sysv5* | sco3.2v5* | sco5v6*)
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
hardcode_libdir_separator=':'
;;
uts4*)
hardcode_libdir_flag_spec='-L$libdir'
;;
*)
ld_shlibs=no
;;
esac
fi
# Check dynamic linker characteristics
# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
# Unlike libtool.m4, here we don't care about _all_ names of the library, but
# only about the one the linker finds when passed -lNAME. This is the last
# element of library_names_spec in libtool.m4, or possibly two of them if the
# linker has special search rules.
library_names_spec= # the last element of library_names_spec in libtool.m4
libname_spec='lib$name'
case "$host_os" in
aix3*)
library_names_spec='$libname.a'
;;
aix[4-9]*)
library_names_spec='$libname$shrext'
;;
amigaos*)
case "$host_cpu" in
powerpc*)
library_names_spec='$libname$shrext' ;;
m68k)
library_names_spec='$libname.a' ;;
esac
;;
beos*)
library_names_spec='$libname$shrext'
;;
bsdi[45]*)
library_names_spec='$libname$shrext'
;;
cygwin* | mingw* | pw32* | cegcc*)
shrext=.dll
library_names_spec='$libname.dll.a $libname.lib'
;;
darwin* | rhapsody*)
shrext=.dylib
library_names_spec='$libname$shrext'
;;
dgux*)
library_names_spec='$libname$shrext'
;;
freebsd* | dragonfly*)
case "$host_os" in
freebsd[123]*)
library_names_spec='$libname$shrext$versuffix' ;;
*)
library_names_spec='$libname$shrext' ;;
esac
;;
gnu*)
library_names_spec='$libname$shrext'
;;
haiku*)
library_names_spec='$libname$shrext'
;;
hpux9* | hpux10* | hpux11*)
case $host_cpu in
ia64*)
shrext=.so
;;
hppa*64*)
shrext=.sl
;;
*)
shrext=.sl
;;
esac
library_names_spec='$libname$shrext'
;;
interix[3-9]*)
library_names_spec='$libname$shrext'
;;
irix5* | irix6* | nonstopux*)
library_names_spec='$libname$shrext'
case "$host_os" in
irix5* | nonstopux*)
libsuff= shlibsuff=
;;
*)
case $LD in
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
*) libsuff= shlibsuff= ;;
esac
;;
esac
;;
linux*oldld* | linux*aout* | linux*coff*)
;;
linux* | k*bsd*-gnu | kopensolaris*-gnu)
library_names_spec='$libname$shrext'
;;
knetbsd*-gnu)
library_names_spec='$libname$shrext'
;;
netbsd*)
library_names_spec='$libname$shrext'
;;
newsos6)
library_names_spec='$libname$shrext'
;;
*nto* | *qnx*)
library_names_spec='$libname$shrext'
;;
openbsd*)
library_names_spec='$libname$shrext$versuffix'
;;
os2*)
libname_spec='$name'
shrext=.dll
library_names_spec='$libname.a'
;;
osf3* | osf4* | osf5*)
library_names_spec='$libname$shrext'
;;
rdos*)
;;
solaris*)
library_names_spec='$libname$shrext'
;;
sunos4*)
library_names_spec='$libname$shrext$versuffix'
;;
sysv4 | sysv4.3*)
library_names_spec='$libname$shrext'
;;
sysv4*MP*)
library_names_spec='$libname$shrext'
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
library_names_spec='$libname$shrext'
;;
tpf*)
library_names_spec='$libname$shrext'
;;
uts4*)
library_names_spec='$libname$shrext'
;;
esac
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
# How to pass a linker flag through the compiler.
wl="$escaped_wl"
# Static library suffix (normally "a").
libext="$libext"
# Shared library suffix (normally "so").
shlibext="$shlibext"
# Format of library name prefix.
libname_spec="$escaped_libname_spec"
# Library names that the linker finds when passed -lNAME.
library_names_spec="$escaped_library_names_spec"
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator="$hardcode_libdir_separator"
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
# resulting binary.
hardcode_direct="$hardcode_direct"
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L="$hardcode_minus_L"
EOF

1890
config.sub vendored

File diff suppressed because it is too large Load Diff

22789
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,774 +0,0 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
m4_define([libsubid_abi_major], 5)
m4_define([libsubid_abi_minor], 0)
m4_define([libsubid_abi_micro], 0)
m4_define([libsubid_abi], [libsubid_abi_major.libsubid_abi_minor.libsubid_abi_micro])
AC_INIT([shadow], [4.17.2], [pkg-shadow-devel@lists.alioth.debian.org], [],
[https://github.com/shadow-maint/shadow])
AM_INIT_AUTOMAKE([1.11 foreign dist-xz subdir-objects tar-pax])
AC_CONFIG_MACRO_DIRS([m4])
AM_SILENT_RULES([yes])
AC_CONFIG_HEADERS([config.h])
AC_SUBST([LIBSUBID_ABI_MAJOR], [libsubid_abi_major])
AC_SUBST([LIBSUBID_ABI_MINOR], [libsubid_abi_minor])
AC_SUBST([LIBSUBID_ABI_MICRO], [libsubid_abi_micro])
AC_SUBST([LIBSUBID_ABI], [libsubid_abi])
dnl Some hacks...
test "$prefix" = "NONE" && prefix="/usr"
test "$prefix" = "/usr" && exec_prefix=""
AC_USE_SYSTEM_EXTENSIONS
AC_ENABLE_STATIC
AC_ENABLE_SHARED
AM_MAINTAINER_MODE
dnl Checks for programs.
AC_PROG_CC
AC_PROG_LN_S
AC_PROG_YACC
LT_INIT
LT_LIB_DLLOAD
dnl Checks for libraries.
dnl Checks for header files.
AC_CHECK_HEADERS(crypt.h utmp.h \
termio.h sgtty.h sys/ioctl.h paths.h \
sys/capability.h sys/random.h \
gshadow.h lastlog.h rpc/key_prot.h acl/libacl.h \
attr/libattr.h attr/error_context.h)
dnl shadow now uses the libc's shadow implementation
AC_CHECK_HEADER([shadow.h],,[AC_MSG_ERROR([You need a libc with shadow.h])])
AC_CHECK_FUNCS(arc4random_buf futimes \
getentropy getrandom getspnam getusershell \
initgroups lckpwdf lutimes \
setgroups updwtmpx innetgr \
getspnam_r \
rpmatch \
memset_explicit explicit_bzero stpecpy stpeprintf)
AC_SYS_LARGEFILE
dnl Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_MEMBERS([struct utmpx.ut_name,
struct utmpx.ut_host,
struct utmpx.ut_syslen,
struct utmpx.ut_addr,
struct utmpx.ut_addr_v6,
struct utmpx.ut_time,
struct utmpx.ut_xtime],,,[[#include <utmpx.h>]])
dnl Checks for library functions.
AC_TYPE_GETGROUPS
AC_FUNC_UTIME_NULL
AC_REPLACE_FUNCS(putgrent putpwent putspent)
AC_REPLACE_FUNCS(sgetgrent sgetpwent sgetspent)
AC_CHECK_FUNC(setpgrp)
AC_CHECK_FUNC(secure_getenv, [AC_DEFINE(HAS_SECURE_GETENV,
1,
[Defined to 1 if you have the declaration of 'secure_getenv'])])
if test "$ac_cv_header_shadow_h" = "yes"; then
AC_CACHE_CHECK(for working shadow group support,
ac_cv_libc_shadowgrp,
AC_RUN_IFELSE([AC_LANG_SOURCE([
#include <shadow.h>
#ifdef HAVE_GSHADOW_H
#include <gshadow.h>
#endif
int
main()
{
struct sgrp *sg = sgetsgent("test:x::");
/* NYS libc on Red Hat 3.0.3 has broken shadow group support */
return !sg || !sg->sg_adm || !sg->sg_mem;
}]
)],
[ac_cv_libc_shadowgrp=yes],
[ac_cv_libc_shadowgrp=no],
[ac_cv_libc_shadowgrp=no]
)
)
if test "$ac_cv_libc_shadowgrp" = "yes"; then
AC_DEFINE(HAVE_SHADOWGRP, 1, [Have working shadow group support in libc])
fi
fi
AC_CACHE_CHECK([location of shared mail directory], shadow_cv_maildir,
[for shadow_cv_maildir in /var/mail /var/spool/mail /usr/spool/mail /usr/mail none; do
if test -d $shadow_cv_maildir; then
break
fi
done])
if test $shadow_cv_maildir != none; then
AC_DEFINE_UNQUOTED(MAIL_SPOOL_DIR, "$shadow_cv_maildir",
[Location of system mail spool directory.])
fi
AC_CACHE_CHECK([location of user mail file], shadow_cv_mailfile,
[for shadow_cv_mailfile in Mailbox mailbox Mail mail .mail none; do
if test -f $HOME/$shadow_cv_mailfile; then
break
fi
done])
if test $shadow_cv_mailfile != none; then
AC_DEFINE_UNQUOTED(MAIL_SPOOL_FILE, "$shadow_cv_mailfile",
[Name of user's mail spool file if stored in user's home directory.])
fi
AC_CACHE_CHECK([location of utmp], shadow_cv_utmpdir,
[for shadow_cv_utmpdir in /var/run /var/adm /usr/adm /etc none; do
if test -f $shadow_cv_utmpdir/utmp; then
break
fi
done])
if test "$shadow_cv_utmpdir" = "none"; then
AC_MSG_WARN(utmp file not found)
fi
AC_DEFINE_UNQUOTED(_UTMP_FILE, "$shadow_cv_utmpdir/utmp",
[Path for utmp file.])
AC_CACHE_CHECK([location of faillog/lastlog/wtmp], shadow_cv_logdir,
[for shadow_cv_logdir in /var/log /var/adm /usr/adm /etc; do
if test -d $shadow_cv_logdir; then
break
fi
done])
AC_DEFINE_UNQUOTED(_WTMP_FILE, "$shadow_cv_logdir/wtmp",
[Path for wtmp file.])
AC_DEFINE_UNQUOTED(LASTLOG_FILE, "$shadow_cv_logdir/lastlog",
[Path for lastlog file.])
AC_DEFINE_UNQUOTED(FAILLOG_FILE, "$shadow_cv_logdir/faillog",
[Path for faillog file.])
AC_CACHE_CHECK([location of the passwd program], shadow_cv_passwd_dir,
[if test -f /usr/bin/passwd; then
shadow_cv_passwd_dir=/usr/bin
else
shadow_cv_passwd_dir=/bin
fi])
AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$shadow_cv_passwd_dir/passwd",
[Path to passwd program.])
AC_ARG_ENABLE(shadowgrp,
[AS_HELP_STRING([--enable-shadowgrp], [enable shadow group support @<:@default=yes@:>@])],
[case "${enableval}" in
yes) enable_shadowgrp="yes" ;;
no) enable_shadowgrp="no" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-shadowgrp) ;;
esac],
[enable_shadowgrp="yes"]
)
AC_ARG_ENABLE(man,
[AS_HELP_STRING([--enable-man],
[regenerate roff man pages from Docbook @<:@default=no@:>@])],
[enable_man="${enableval}"],
[enable_man="no"]
)
AC_ARG_ENABLE(account-tools-setuid,
[AS_HELP_STRING([--enable-account-tools-setuid],
[Install the user and group management tools setuid and authenticate the callers. This requires --with-libpam.])],
[case "${enableval}" in
yes) enable_acct_tools_setuid="yes" ;;
no) enable_acct_tools_setuid="no" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-account-tools-setuid)
;;
esac],
[enable_acct_tools_setuid="no"]
)
AC_ARG_ENABLE(subordinate-ids,
[AS_HELP_STRING([--enable-subordinate-ids],
[support subordinate ids @<:@default=yes@:>@])],
[enable_subids="${enableval}"],
[enable_subids="maybe"]
)
AC_ARG_ENABLE(lastlog,
[AS_HELP_STRING([--enable-lastlog],
[enable lastlog @<:@default=no@:>@])],
[enable_lastlog="${enableval}"],
[enable_lastlog="no"]
)
AC_ARG_ENABLE(logind,
[AS_HELP_STRING([--enable-logind],
[enable logind @<:@default=yes@:>@])],
[enable_logind="${enableval}"],
[enable_logind="yes"]
)
AC_ARG_WITH(audit,
[AS_HELP_STRING([--with-audit], [use auditing support @<:@default=yes if found@:>@])],
[with_audit=$withval], [with_audit=maybe])
AC_ARG_WITH(libpam,
[AS_HELP_STRING([--with-libpam], [use libpam for PAM support @<:@default=yes if found@:>@])],
[with_libpam=$withval], [with_libpam=maybe])
AC_ARG_WITH(btrfs,
[AS_HELP_STRING([--with-btrfs], [add BtrFS support @<:@default=yes if found@:>@])],
[with_btrfs=$withval], [with_btrfs=maybe])
AC_ARG_WITH(selinux,
[AS_HELP_STRING([--with-selinux], [use SELinux support @<:@default=yes if found@:>@])],
[with_selinux=$withval], [with_selinux=maybe])
AC_ARG_WITH(acl,
[AS_HELP_STRING([--with-acl], [use ACL support @<:@default=yes if found@:>@])],
[with_acl=$withval], [with_acl=maybe])
AC_ARG_WITH(attr,
[AS_HELP_STRING([--with-attr], [use Extended Attribute support @<:@default=yes if found@:>@])],
[with_attr=$withval], [with_attr=maybe])
AC_ARG_WITH(skey,
[AS_HELP_STRING([--with-skey], [use S/Key support @<:@default=no@:>@])],
[with_skey=$withval], [with_skey=no])
AC_ARG_WITH(tcb,
[AS_HELP_STRING([--with-tcb], [use tcb support (incomplete) @<:@default=yes if found@:>@])],
[with_tcb=$withval], [with_tcb=maybe])
AC_ARG_WITH(sha-crypt,
[AS_HELP_STRING([--with-sha-crypt], [allow the SHA256 and SHA512 password encryption algorithms @<:@default=yes@:>@])],
[with_sha_crypt=$withval], [with_sha_crypt=yes])
AC_ARG_WITH(bcrypt,
[AS_HELP_STRING([--with-bcrypt], [allow the bcrypt password encryption algorithm @<:@default=no@:>@])],
[with_bcrypt=$withval], [with_bcrypt=no])
AC_ARG_WITH(yescrypt,
[AS_HELP_STRING([--with-yescrypt], [allow the yescrypt password encryption algorithm @<:@default=no@:>@])],
[with_yescrypt=$withval], [with_yescrypt=no])
AC_ARG_WITH(nscd,
[AS_HELP_STRING([--with-nscd], [enable support for nscd @<:@default=yes@:>@])],
[with_nscd=$withval], [with_nscd=yes])
AC_ARG_WITH(sssd,
[AS_HELP_STRING([--with-sssd], [enable support for flushing sssd caches @<:@default=yes@:>@])],
[with_sssd=$withval], [with_sssd=yes])
AC_ARG_WITH(group-name-max-length,
[AS_HELP_STRING([--with-group-name-max-length], [set max group name length @<:@default=32@:>@])],
[with_group_name_max_length=$withval], [with_group_name_max_length=yes])
AC_ARG_WITH(su,
[AS_HELP_STRING([--with-su], [build and install su program and man page @<:@default=yes@:>@])],
[with_su=$withval], [with_su=yes])
AC_ARG_WITH(libbsd,
[AS_HELP_STRING([--with-libbsd], [use libbsd support @<:@default=yes if found@:>@])],
[with_libbsd=$withval], [with_libbsd=yes])
if test "$with_group_name_max_length" = "no" ; then
with_group_name_max_length=0
elif test "$with_group_name_max_length" = "yes" ; then
with_group_name_max_length=32
fi
AC_DEFINE_UNQUOTED(GROUP_NAME_MAX_LENGTH, $with_group_name_max_length, [max group name length])
AC_SUBST(GROUP_NAME_MAX_LENGTH)
GROUP_NAME_MAX_LENGTH="$with_group_name_max_length"
AM_CONDITIONAL(USE_SHA_CRYPT, test "x$with_sha_crypt" = "xyes")
if test "$with_sha_crypt" = "yes"; then
AC_DEFINE(USE_SHA_CRYPT, 1, [Define to allow the SHA256 and SHA512 password encryption algorithms])
fi
AM_CONDITIONAL(USE_BCRYPT, test "x$with_bcrypt" = "xyes")
if test "$with_bcrypt" = "yes"; then
AC_DEFINE(USE_BCRYPT, 1, [Define to allow the bcrypt password encryption algorithm])
fi
AM_CONDITIONAL(USE_YESCRYPT, test "x$with_yescrypt" = "xyes")
if test "$with_yescrypt" = "yes"; then
AC_DEFINE(USE_YESCRYPT, 1, [Define to allow the yescrypt password encryption algorithm])
fi
if test "$with_nscd" = "yes"; then
AC_CHECK_FUNC(posix_spawn,
[AC_DEFINE(USE_NSCD, 1, [Define to support flushing of nscd caches])],
[AC_MSG_ERROR([posix_spawn is needed for nscd support])])
fi
if test "$with_sssd" = "yes"; then
AC_CHECK_FUNC(posix_spawn,
[AC_DEFINE(USE_SSSD, 1, [Define to support flushing of sssd caches])],
[AC_MSG_ERROR([posix_spawn is needed for sssd support])])
fi
AS_IF([test "$with_su" != "no"], AC_DEFINE(WITH_SU, 1, [Build with su]))
AM_CONDITIONAL([WITH_SU], [test "x$with_su" != "xno"])
dnl Check for some functions in libc first, only if not found check for
dnl other libraries. This should prevent linking libnsl if not really
dnl needed (Linux glibc, Irix), but still link it if needed (Solaris).
AC_SEARCH_LIBS(gethostbyname, nsl)
PKG_CHECK_MODULES([CMOCKA], [cmocka], [have_cmocka="yes"],
[AC_MSG_WARN([libcmocka not found, cmocka tests will not be built])])
AM_CONDITIONAL([HAVE_CMOCKA], [test x$have_cmocka = xyes])
AC_CHECK_LIB([econf],[econf_readDirs],[LIBECONF="-leconf"],[LIBECONF=""])
if test -n "$LIBECONF"; then
AC_DEFINE_UNQUOTED([VENDORDIR], ["$enable_vendordir"],
[Directory for distribution provided configuration files])
ECONF_CPPFLAGS="-DUSE_ECONF=1"
AC_ARG_ENABLE([vendordir],
AS_HELP_STRING([--enable-vendordir=DIR], [Directory for distribution provided configuration files]),,[])
fi
AC_SUBST(ECONF_CPPFLAGS)
AC_SUBST(LIBECONF)
AC_SUBST([VENDORDIR], [$enable_vendordir])
if test "x$enable_vendordir" != x; then
AC_DEFINE(HAVE_VENDORDIR, 1, [Define to support vendor settings.])
fi
AM_CONDITIONAL([HAVE_VENDORDIR], [test "x$enable_vendordir" != x])
if test "$enable_shadowgrp" = "yes"; then
AC_DEFINE(SHADOWGRP, 1, [Define to support the shadow group file.])
fi
AM_CONDITIONAL(SHADOWGRP, test "x$enable_shadowgrp" = "xyes")
if test "$enable_man" = "yes"; then
dnl
dnl Check for xsltproc
dnl
AC_PATH_PROG([XSLTPROC], [xsltproc])
if test -z "$XSLTPROC"; then
enable_man=no
AC_MSG_ERROR([xsltproc is missing.])
fi
dnl check for DocBook DTD and stylesheets in the local catalog.
JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.5//EN],
[DocBook XML DTD V4.5], [], enable_man=no)
JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
[DocBook XSL Stylesheets >= 1.70.1], [], enable_man=no)
fi
AM_CONDITIONAL(ENABLE_REGENERATE_MAN, test "x$enable_man" != "xno")
if test "$enable_subids" != "no"; then
dnl
dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc
dnl
AC_CHECK_SIZEOF([uid_t],, [#include "sys/types.h"])
AC_CHECK_SIZEOF([gid_t],, [#include "sys/types.h"])
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
if test "x$enable_subids" = "xyes"; then
AC_MSG_ERROR([Cannot enable support the subordinate IDs on systems where gid_t or uid_t has less than 32 bits])
fi
enable_subids="no"
fi
fi
AM_CONDITIONAL(ENABLE_SUBIDS, test "x$enable_subids" != "xno")
if test "$enable_lastlog" = "yes" && test "$ac_cv_header_lastlog_h" = "yes"; then
AC_CACHE_CHECK(for ll_host in struct lastlog,
ac_cv_struct_lastlog_ll_host,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <lastlog.h>],
[struct lastlog ll; char *cp = ll.ll_host;]
)],
[ac_cv_struct_lastlog_ll_host=yes],
[ac_cv_struct_lastlog_ll_host=no]
)
)
if test "$ac_cv_struct_lastlog_ll_host" = "yes"; then
AC_DEFINE(HAVE_LL_HOST, 1,
[Define if struct lastlog has ll_host])
AC_DEFINE(ENABLE_LASTLOG, 1, [Define to support lastlog.])
enable_lastlog="yes"
else
AC_MSG_ERROR([Cannot enable support for lastlog on systems where the data structures aren't available])
enable_subids="no"
fi
fi
AM_CONDITIONAL(ENABLE_LASTLOG, test "x$enable_lastlog" != "xno")
AC_SUBST(LIBSYSTEMD)
if test "$enable_logind" = "yes"; then
AC_CHECK_LIB(systemd, sd_session_get_remote_host,
[enable_logind="yes"; [LIBSYSTEMD=-lsystemd];
AC_DEFINE(ENABLE_LOGIND, 1,
[Define to manage session support with logind.])],
[enable_logind="no"])
fi
AM_CONDITIONAL(ENABLE_LOGIND, test "x$enable_logind" != "xno")
AC_SUBST(LIBCRYPT)
AC_CHECK_LIB(crypt, crypt, [LIBCRYPT=-lcrypt],
[AC_MSG_ERROR([crypt() not found])])
AC_SUBST(LIYESCRYPT)
AC_CHECK_LIB(crypt, crypt, [LIYESCRYPT=-lcrypt],
[AC_MSG_ERROR([crypt() not found])])
AC_SUBST(LIBBSD)
if test "$with_libbsd" != "no"; then
AC_SEARCH_LIBS([readpassphrase], [bsd], [], [
AC_MSG_ERROR([readpassphrase() is missing, either from libc or libbsd])
])
AS_IF([test "$ac_cv_search_readpassphrase" = "-lbsd"], [
PKG_CHECK_MODULES([LIBBSD], [libbsd-overlay])
])
dnl Make sure either the libc or libbsd provide the header.
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $LIBBSD_CFLAGS"
AC_CHECK_HEADERS([readpassphrase.h])
AS_IF([test "$ac_cv_header_readpassphrase_h" != "yes"], [
AC_MSG_ERROR([readpassphrase.h is missing])
])
CFLAGS="$save_CFLAGS"
AC_DEFINE(WITH_LIBBSD, 1, [Build shadow with libbsd support])
else
AC_DEFINE(WITH_LIBBSD, 0, [Build shadow without libbsd support])
fi
AM_CONDITIONAL(WITH_LIBBSD, test x$with_libbsd = xyes)
AC_SUBST(LIBACL)
if test "$with_acl" != "no"; then
AC_CHECK_HEADERS(acl/libacl.h attr/error_context.h, [acl_header="yes"], [acl_header="no"])
if test "$acl_header$with_acl" = "noyes" ; then
AC_MSG_ERROR([acl/libacl.h or attr/error_context.h is missing])
elif test "$acl_header" = "yes" ; then
AC_CHECK_LIB(acl, perm_copy_file,
[AC_CHECK_LIB(acl, perm_copy_fd,
[acl_lib="yes"],
[acl_lib="no"])],
[acl_lib="no"])
if test "$acl_lib$with_acl" = "noyes" ; then
AC_MSG_ERROR([libacl not found])
elif test "$acl_lib" = "no" ; then
with_acl="no"
else
AC_DEFINE(WITH_ACL, 1,
[Build shadow with ACL support])
LIBACL="-lacl"
with_acl="yes"
fi
else
with_acl="no"
fi
fi
AC_SUBST(LIBATTR)
if test "$with_attr" != "no"; then
AC_CHECK_HEADERS(attr/libattr.h attr/error_context.h, [attr_header="yes"], [attr_header="no"])
if test "$attr_header$with_attr" = "noyes" ; then
AC_MSG_ERROR([attr/libattr.h or attr/error_context.h is missing])
elif test "$attr_header" = "yes" ; then
AC_CHECK_LIB(attr, attr_copy_file,
[AC_CHECK_LIB(attr, attr_copy_fd,
[attr_lib="yes"],
[attr_lib="no"])],
[attr_lib="no"])
if test "$attr_lib$with_attr" = "noyes" ; then
AC_MSG_ERROR([libattr not found])
elif test "$attr_lib" = "no" ; then
with_attr="no"
else
AC_DEFINE(WITH_ATTR, 1,
[Build shadow with Extended Attributes support])
LIBATTR="-lattr"
with_attr="yes"
fi
else
with_attr="no"
fi
fi
AC_SUBST(LIBAUDIT)
if test "$with_audit" != "no"; then
AC_CHECK_HEADER(libaudit.h, [audit_header="yes"], [audit_header="no"])
if test "$audit_header$with_audit" = "noyes" ; then
AC_MSG_ERROR([libaudit.h is missing])
elif test "$audit_header" = "yes"; then
AC_CHECK_DECL(AUDIT_ADD_USER,,[audit_header="no"],[#include <libaudit.h>])
AC_CHECK_DECL(AUDIT_DEL_USER,,[audit_header="no"],[#include <libaudit.h>])
AC_CHECK_DECL(AUDIT_ADD_GROUP,,[audit_header="no"],[#include <libaudit.h>])
AC_CHECK_DECL(AUDIT_DEL_GROUP,,[audit_header="no"],[#include <libaudit.h>])
if test "$audit_header$with_audit" = "noyes" ; then
AC_MSG_ERROR([AUDIT_ADD_USER AUDIT_DEL_USER AUDIT_ADD_GROUP or AUDIT_DEL_GROUP missing from libaudit.h])
fi
fi
if test "$audit_header" = "yes"; then
AC_CHECK_LIB(audit, audit_log_acct_message,
[audit_lib="yes"], [audit_lib="no"])
if test "$audit_lib$with_audit" = "noyes" ; then
AC_MSG_ERROR([libaudit not found])
elif test "$audit_lib" = "no" ; then
with_audit="no"
else
AC_DEFINE(WITH_AUDIT, 1,
[Define if you want to enable Audit messages])
LIBAUDIT="-laudit"
with_audit="yes"
fi
else
with_audit="no"
fi
fi
if test "$with_btrfs" != "no"; then
AC_CHECK_HEADERS([sys/statfs.h linux/magic.h linux/btrfs_tree.h], \
[btrfs_headers="yes"], [btrfs_headers="no"])
if test "$btrfs_headers$with_btrfs" = "noyes" ; then
AC_MSG_ERROR([One of sys/statfs.h linux/magic.h linux/btrfs_tree.h is missing])
fi
if test "$btrfs_headers" = "yes" ; then
AC_DEFINE(WITH_BTRFS, 1, [Build shadow with BtrFS support])
with_btrfs="yes"
fi
fi
AM_CONDITIONAL(WITH_BTRFS, test x$with_btrfs = xyes)
AC_SUBST(LIBSELINUX)
AC_SUBST(LIBSEMANAGE)
if test "$with_selinux" != "no"; then
AC_CHECK_HEADERS(selinux/selinux.h, [selinux_header="yes"], [selinux_header="no"])
if test "$selinux_header$with_selinux" = "noyes" ; then
AC_MSG_ERROR([selinux/selinux.h is missing])
fi
AC_CHECK_HEADERS(semanage/semanage.h, [semanage_header="yes"], [semanage_header="no"])
if test "$semanage_header$with_selinux" = "noyes" ; then
AC_MSG_ERROR([semanage/semanage.h is missing])
fi
if test "$selinux_header$semanage_header" = "yesyes" ; then
AC_CHECK_LIB(selinux, is_selinux_enabled, [selinux_lib="yes"], [selinux_lib="no"])
if test "$selinux_lib$with_selinux" = "noyes" ; then
AC_MSG_ERROR([libselinux not found])
fi
AC_CHECK_LIB(semanage, semanage_connect, [semanage_lib="yes"], [semanage_lib="no"])
if test "$semanage_lib$with_selinux" = "noyes" ; then
AC_MSG_ERROR([libsemanage not found])
fi
if test "$selinux_lib$semanage_lib" = "yesyes" ; then
AC_DEFINE(WITH_SELINUX, 1,
[Build shadow with SELinux support])
LIBSELINUX="-lselinux"
LIBSEMANAGE="-lsemanage"
with_selinux="yes"
else
with_selinux="no"
fi
else
with_selinux="no"
fi
fi
AC_SUBST(LIBTCB)
if test "$with_tcb" != "no"; then
AC_CHECK_HEADERS(tcb.h, [tcb_header="yes"], [tcb_header="no"])
if test "$tcb_header$with_tcb" = "noyes" ; then
AC_MSG_ERROR([tcb.h is missing])
elif test "$tcb_header" = "yes" ; then
AC_CHECK_LIB(tcb, tcb_is_suspect, [tcb_lib="yes"], [tcb_lib="no"])
if test "$tcb_lib$with_tcb" = "noyes" ; then
AC_MSG_ERROR([libtcb not found])
elif test "$tcb_lib" = "no" ; then
with_tcb="no"
else
AC_DEFINE(WITH_TCB, 1, [Build shadow with tcb support (incomplete)])
LIBTCB="-ltcb"
with_tcb="yes"
fi
else
with_tcb="no"
fi
fi
AM_CONDITIONAL(WITH_TCB, test x$with_tcb = xyes)
AC_SUBST(LIBPAM)
if test "$with_libpam" != "no"; then
AC_CHECK_LIB(pam, pam_start,
[pam_lib="yes"], [pam_lib="no"])
if test "$pam_lib$with_libpam" = "noyes" ; then
AC_MSG_ERROR(libpam not found)
fi
LIBPAM="-lpam"
pam_conv_function="no"
AC_CHECK_LIB(pam, openpam_ttyconv,
[pam_conv_function="openpam_ttyconv"],
AC_CHECK_LIB(pam_misc, misc_conv,
[pam_conv_function="misc_conv"; LIBPAM="$LIBPAM -lpam_misc"])
)
if test "$pam_conv_function$with_libpam" = "noyes" ; then
AC_MSG_ERROR(PAM conversation function not found)
fi
pam_headers_found=no
AC_CHECK_HEADERS( [security/openpam.h security/pam_misc.h],
[ pam_headers_found=yes ; break ], [],
[ #include <security/pam_appl.h> ] )
if test "$pam_headers_found$with_libpam" = "noyes" ; then
AC_MSG_ERROR(PAM headers not found)
fi
if test "$pam_lib$pam_headers_found" = "yesyes" -a "$pam_conv_function" != "no" ; then
with_libpam="yes"
else
with_libpam="no"
unset LIBPAM
fi
fi
dnl Now with_libpam is either yes or no
if test "$with_libpam" = "yes"; then
AC_CHECK_DECLS([PAM_ESTABLISH_CRED,
PAM_DELETE_CRED,
PAM_NEW_AUTHTOK_REQD,
PAM_DATA_SILENT],
[], [], [#include <security/pam_appl.h>])
save_libs=$LIBS
LIBS="$LIBS $LIBPAM"
# We do not use AC_CHECK_FUNCS to avoid duplicated definition with
# Linux PAM.
AC_CHECK_FUNC(pam_fail_delay, [AC_DEFINE(HAS_PAM_FAIL_DELAY, 1, [Define to 1 if you have the declaration of 'pam_fail_delay'])])
LIBS=$save_libs
AC_DEFINE(USE_PAM, 1, [Define to support Pluggable Authentication Modules])
AC_DEFINE_UNQUOTED(SHADOW_PAM_CONVERSATION, [$pam_conv_function],[PAM conversation to use])
AM_CONDITIONAL(USE_PAM, [true])
AC_MSG_CHECKING(use login and su access checking if PAM not used)
AC_MSG_RESULT(no)
else
AC_DEFINE(SU_ACCESS, 1, [Define to support /etc/suauth su access control.])
AM_CONDITIONAL(USE_PAM, [false])
AC_MSG_CHECKING(use login and su access checking if PAM not used)
AC_MSG_RESULT(yes)
fi
if test "$enable_acct_tools_setuid" != "no"; then
if test "$with_libpam" != "yes"; then
if test "$enable_acct_tools_setuid" = "yes"; then
AC_MSG_ERROR(PAM support is required for --enable-account-tools-setuid)
else
enable_acct_tools_setuid="no"
fi
else
enable_acct_tools_setuid="yes"
fi
if test "$enable_acct_tools_setuid" = "yes"; then
AC_DEFINE(ACCT_TOOLS_SETUID,
1,
[Define if account management tools should be installed setuid and authenticate the callers])
fi
fi
AM_CONDITIONAL(ACCT_TOOLS_SETUID, test "x$enable_acct_tools_setuid" = "xyes")
AC_ARG_WITH(fcaps,
[AS_HELP_STRING([--with-fcaps], [use file capabilities instead of suid binaries for newuidmap/newgidmap @<:@default=no@:>@])],
[with_fcaps=$withval], [with_fcaps=no])
AM_CONDITIONAL(FCAPS, test "x$with_fcaps" = "xyes")
if test "x$with_fcaps" = "xyes"; then
AC_CHECK_PROGS(capcmd, "setcap")
if test "x$capcmd" = "x" ; then
AC_MSG_ERROR([setcap command not available])
fi
fi
AC_SUBST(LIBSKEY)
AC_SUBST(LIBMD)
if test "$with_skey" = "yes"; then
AC_CHECK_LIB(md, MD5Init, [LIBMD=-lmd])
AC_CHECK_LIB(skey, skeychallenge, [LIBSKEY=-lskey],
[AC_MSG_ERROR([libskey missing. You can download S/Key source code from http://rsync1.it.gentoo.org/gentoo/distfiles/skey-1.1.5.tar.bz2])])
AC_DEFINE(SKEY, 1, [Define to support S/Key logins.])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <skey.h>
]], [[
skeychallenge((void*)0, (void*)0, (void*)0, 0);
]])],[AC_DEFINE(SKEY_BSD_STYLE, 1, [Define to support newer BSD S/Key API])],[])
fi
AC_CHECK_FUNC(fgetpwent_r, [AC_DEFINE(HAVE_FGETPWENT_R, 1, [Defined to 1 if you have the declaration of 'fgetpwent_r'])])
AC_DEFINE_UNQUOTED(SHELL, ["$SHELL"], [The default shell.])
AM_GNU_GETTEXT_VERSION([0.19])
AM_GNU_GETTEXT([external], [need-ngettext])
AM_CONDITIONAL(USE_NLS, test "x$USE_NLS" = "xyes")
AC_CONFIG_FILES([
Makefile
po/Makefile.in
doc/Makefile
man/Makefile
man/config.xml
man/po/Makefile
man/cs/Makefile
man/da/Makefile
man/de/Makefile
man/es/Makefile
man/fi/Makefile
man/fr/Makefile
man/hu/Makefile
man/id/Makefile
man/it/Makefile
man/ja/Makefile
man/ko/Makefile
man/pl/Makefile
man/pt_BR/Makefile
man/ru/Makefile
man/sv/Makefile
man/tr/Makefile
man/uk/Makefile
man/zh_CN/Makefile
man/zh_TW/Makefile
lib/Makefile
libsubid/Makefile
libsubid/subid.h
src/Makefile
contrib/Makefile
etc/Makefile
etc/pam.d/Makefile
etc/shadow-maint/Makefile
tests/unit/Makefile
])
AC_OUTPUT
echo
echo "shadow will be compiled with the following features:"
echo
echo " auditing support: $with_audit"
echo " PAM support: $with_libpam"
if test "$with_libpam" = "yes"; then
echo " suid account management tools: $enable_acct_tools_setuid"
fi
echo " SELinux support: $with_selinux"
echo " BtrFS support: $with_btrfs"
echo " ACL support: $with_acl"
echo " Extended Attributes support: $with_attr"
echo " tcb support (incomplete): $with_tcb"
echo " shadow group support: $enable_shadowgrp"
echo " S/Key support: $with_skey"
echo " SHA passwords encryption: $with_sha_crypt"
echo " bcrypt passwords encryption: $with_bcrypt"
echo " yescrypt passwords encryption: $with_yescrypt"
echo " nscd support: $with_nscd"
echo " sssd support: $with_sssd"
echo " subordinate IDs support: $enable_subids"
echo " enable lastlog: $enable_lastlog"
echo " enable logind: $enable_logind"
echo " use file caps: $with_fcaps"
echo " install su: $with_su"
echo " enabled vendor dir: $enable_vendordir"
echo

685
configure.in Normal file
View File

@@ -0,0 +1,685 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT
AM_INIT_AUTOMAKE(shadow, 4.2)
AC_CONFIG_HEADERS([config.h])
dnl Some hacks...
test "$prefix" = "NONE" && prefix="/usr"
test "$prefix" = "/usr" && exec_prefix=""
AC_GNU_SOURCE
AM_DISABLE_SHARED
AM_ENABLE_STATIC
AM_MAINTAINER_MODE
dnl Checks for programs.
AC_PROG_CC
AC_ISC_POSIX
AC_PROG_LN_S
AC_PROG_YACC
AM_PROG_LIBTOOL
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_HEADER_STDBOOL
AC_CHECK_HEADERS(errno.h fcntl.h limits.h unistd.h sys/time.h utmp.h \
utmpx.h termios.h termio.h sgtty.h sys/ioctl.h syslog.h paths.h \
utime.h ulimit.h sys/resource.h gshadow.h lastlog.h \
locale.h rpc/key_prot.h netdb.h acl/libacl.h attr/libattr.h \
attr/error_context.h)
dnl shadow now uses the libc's shadow implementation
AC_CHECK_HEADER([shadow.h],,[AC_MSG_ERROR([You need a libc with shadow.h])])
AC_CHECK_FUNCS(l64a fchmod fchown fsync futimes getgroups gethostname getspnam \
gettimeofday getusershell getutent initgroups lchown lckpwdf lstat \
lutimes memcpy memset setgroups sigaction strchr updwtmp updwtmpx innetgr \
getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r getaddrinfo \
ruserok)
AC_SYS_LARGEFILE
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_UID_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_MODE_T
AC_HEADER_STAT
AC_CHECK_MEMBERS([struct stat.st_rdev])
AC_CHECK_MEMBERS([struct stat.st_atim])
AC_CHECK_MEMBERS([struct stat.st_atimensec])
AC_CHECK_MEMBERS([struct stat.st_mtim])
AC_CHECK_MEMBERS([struct stat.st_mtimensec])
AC_HEADER_TIME
AC_STRUCT_TM
AC_CHECK_MEMBERS([struct utmp.ut_type,
struct utmp.ut_id,
struct utmp.ut_name,
struct utmp.ut_user,
struct utmp.ut_host,
struct utmp.ut_syslen,
struct utmp.ut_addr,
struct utmp.ut_addr_v6,
struct utmp.ut_time,
struct utmp.ut_xtime,
struct utmp.ut_tv],,,[[#include <utmp.h>]])
dnl There are dependencies:
dnl If UTMPX has to be used, the utmp structure shall have a ut_id field.
if test "$ac_cv_header_utmpx_h" = "yes" &&
test "$ac_cv_member_struct_utmp_ut_id" != "yes"; then
AC_MSG_ERROR(Systems with UTMPX and no ut_id field in the utmp structure are not supported)
fi
AC_CHECK_MEMBERS([struct utmpx.ut_name,
struct utmpx.ut_host,
struct utmpx.ut_syslen,
struct utmpx.ut_addr,
struct utmpx.ut_addr_v6,
struct utmpx.ut_time,
struct utmpx.ut_xtime],,,[[#include <utmpx.h>]])
if test "$ac_cv_header_lastlog_h" = "yes"; then
AC_CACHE_CHECK(for ll_host in struct lastlog,
ac_cv_struct_lastlog_ll_host,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <lastlog.h>],
[struct lastlog ll; char *cp = ll.ll_host;]
)],
[ac_cv_struct_lastlog_ll_host=yes],
[ac_cv_struct_lastlog_ll_host=no]
)
)
if test "$ac_cv_struct_lastlog_ll_host" = "yes"; then
AC_DEFINE(HAVE_LL_HOST, 1,
[Define if struct lastlog has ll_host])
fi
fi
dnl Checks for library functions.
AC_TYPE_GETGROUPS
AC_TYPE_SIGNAL
AC_FUNC_UTIME_NULL
AC_FUNC_STRFTIME
AC_REPLACE_FUNCS(mkdir putgrent putpwent putspent rename rmdir)
AC_REPLACE_FUNCS(sgetgrent sgetpwent sgetspent)
AC_REPLACE_FUNCS(snprintf strcasecmp strdup strerror strstr)
AC_CHECK_FUNC(setpgrp)
if test "$ac_cv_header_shadow_h" = "yes"; then
AC_CACHE_CHECK(for working shadow group support,
ac_cv_libc_shadowgrp,
AC_RUN_IFELSE([AC_LANG_SOURCE([
#include <shadow.h>
main()
{
struct sgrp *sg = sgetsgent("test:x::");
/* NYS libc on Red Hat 3.0.3 has broken shadow group support */
return !sg || !sg->sg_adm || !sg->sg_mem;
}]
)],
[ac_cv_libc_shadowgrp=yes],
[ac_cv_libc_shadowgrp=no],
[ac_cv_libc_shadowgrp=no]
)
)
if test "$ac_cv_libc_shadowgrp" = "yes"; then
AC_DEFINE(HAVE_SHADOWGRP, 1, [Have working shadow group support in libc])
fi
fi
AC_CACHE_CHECK([location of shared mail directory], shadow_cv_maildir,
[for shadow_cv_maildir in /var/mail /var/spool/mail /usr/spool/mail /usr/mail none; do
if test -d $shadow_cv_maildir; then
break
fi
done])
if test $shadow_cv_maildir != none; then
AC_DEFINE_UNQUOTED(MAIL_SPOOL_DIR, "$shadow_cv_maildir",
[Location of system mail spool directory.])
fi
AC_CACHE_CHECK([location of user mail file], shadow_cv_mailfile,
[for shadow_cv_mailfile in Mailbox mailbox Mail mail .mail none; do
if test -f $HOME/$shadow_cv_mailfile; then
break
fi
done])
if test $shadow_cv_mailfile != none; then
AC_DEFINE_UNQUOTED(MAIL_SPOOL_FILE, "$shadow_cv_mailfile",
[Name of user's mail spool file if stored in user's home directory.])
fi
AC_CACHE_CHECK([location of utmp], shadow_cv_utmpdir,
[for shadow_cv_utmpdir in /var/run /var/adm /usr/adm /etc none; do
if test -f $shadow_cv_utmpdir/utmp; then
break
fi
done])
if test "$shadow_cv_utmpdir" = "none"; then
AC_MSG_WARN(utmp file not found)
fi
AC_DEFINE_UNQUOTED(_UTMP_FILE, "$shadow_cv_utmpdir/utmp",
[Path for utmp file.])
AC_CACHE_CHECK([location of faillog/lastlog/wtmp], shadow_cv_logdir,
[for shadow_cv_logdir in /var/log /var/adm /usr/adm /etc; do
if test -d $shadow_cv_logdir; then
break
fi
done])
AC_DEFINE_UNQUOTED(_WTMP_FILE, "$shadow_cv_logdir/wtmp",
[Path for wtmp file.])
AC_DEFINE_UNQUOTED(LASTLOG_FILE, "$shadow_cv_logdir/lastlog",
[Path for lastlog file.])
AC_DEFINE_UNQUOTED(FAILLOG_FILE, "$shadow_cv_logdir/faillog",
[Path for faillog file.])
AC_CACHE_CHECK([location of the passwd program], shadow_cv_passwd_dir,
[if test -f /usr/bin/passwd; then
shadow_cv_passwd_dir=/usr/bin
else
shadow_cv_passwd_dir=/bin
fi])
AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$shadow_cv_passwd_dir/passwd",
[Path to passwd program.])
dnl XXX - quick hack, should disappear before anyone notices :).
AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().])
if test "$ac_cv_func_ruserok" = "yes"; then
AC_DEFINE(RLOGIN, 1, [Define if login should support the -r flag for rlogind.])
AC_DEFINE(RUSEROK, 0, [Define to the ruserok() "success" return value (0 or 1).])
fi
AC_ARG_ENABLE(shadowgrp,
[AC_HELP_STRING([--enable-shadowgrp], [enable shadow group support @<:@default=yes@:>@])],
[case "${enableval}" in
yes) enable_shadowgrp="yes" ;;
no) enable_shadowgrp="no" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-shadowgrp) ;;
esac],
[enable_shadowgrp="yes"]
)
AC_ARG_ENABLE(man,
[AC_HELP_STRING([--enable-man],
[regenerate roff man pages from Docbook @<:@default=no@:>@])],
[enable_man="${enableval}"],
[enable_man="no"]
)
AC_ARG_ENABLE(account-tools-setuid,
[AC_HELP_STRING([--enable-account-tools-setuid],
[Install the user and group management tools setuid and authenticate the callers. This requires --with-pam.])],
[case "${enableval}" in
yes) enable_acct_tools_setuid="yes" ;;
no) enable_acct_tools_setuid="no" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-account-tools-setuid)
;;
esac],
[enable_acct_tools_setuid="maybe"]
)
AC_ARG_ENABLE(utmpx,
[AC_HELP_STRING([--enable-utmpx],
[enable loggin in utmpx / wtmpx @<:@default=no@:>@])],
[case "${enableval}" in
yes) enable_utmpx="yes" ;;
no) enable_utmpx="no" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-utmpx) ;;
esac],
[enable_utmpx="no"]
)
AC_ARG_ENABLE(subordinate-ids,
[AC_HELP_STRING([--enable-subordinate-ids],
[support subordinate ids @<:@default=yes@:>@])],
[enable_subids="${enableval}"],
[enable_subids="maybe"]
)
AC_ARG_WITH(audit,
[AC_HELP_STRING([--with-audit], [use auditing support @<:@default=yes if found@:>@])],
[with_audit=$withval], [with_audit=maybe])
AC_ARG_WITH(libpam,
[AC_HELP_STRING([--with-libpam], [use libpam for PAM support @<:@default=yes if found@:>@])],
[with_libpam=$withval], [with_libpam=maybe])
AC_ARG_WITH(selinux,
[AC_HELP_STRING([--with-selinux], [use SELinux support @<:@default=yes if found@:>@])],
[with_selinux=$withval], [with_selinux=maybe])
AC_ARG_WITH(acl,
[AC_HELP_STRING([--with-acl], [use ACL support @<:@default=yes if found@:>@])],
[with_acl=$withval], [with_acl=maybe])
AC_ARG_WITH(attr,
[AC_HELP_STRING([--with-attr], [use Extended Attribute support @<:@default=yes if found@:>@])],
[with_attr=$withval], [with_attr=maybe])
AC_ARG_WITH(skey,
[AC_HELP_STRING([--with-skey], [use S/Key support @<:@default=no@:>@])],
[with_skey=$withval], [with_skey=no])
AC_ARG_WITH(tcb,
[AC_HELP_STRING([--with-tcb], [use tcb support (incomplete) @<:@default=yes if found@:>@])],
[with_tcb=$withval], [with_tcb=maybe])
AC_ARG_WITH(libcrack,
[AC_HELP_STRING([--with-libcrack], [use libcrack @<:@default=no@:>@])],
[with_libcrack=$withval], [with_libcrack=no])
AC_ARG_WITH(sha-crypt,
[AC_HELP_STRING([--with-sha-crypt], [allow the SHA256 and SHA512 password encryption algorithms @<:@default=yes@:>@])],
[with_sha_crypt=$withval], [with_sha_crypt=yes])
AC_ARG_WITH(nscd,
[AC_HELP_STRING([--with-nscd], [enable support for nscd @<:@default=yes@:>@])],
[with_nscd=$withval], [with_nscd=yes])
AC_ARG_WITH(group-name-max-length,
[AC_HELP_STRING([--with-group-name-max-length], [set max group name length @<:@default=16@:>@])],
[with_group_name_max_length=$withval], [with_group_name_max_length=yes])
if test "$with_group_name_max_length" = "no" ; then
with_group_name_max_length=0
elif test "$with_group_name_max_length" = "yes" ; then
with_group_name_max_length=16
fi
AC_DEFINE_UNQUOTED(GROUP_NAME_MAX_LENGTH, $with_group_name_max_length, [max group name length])
AC_SUBST(GROUP_NAME_MAX_LENGTH)
GROUP_NAME_MAX_LENGTH="$with_group_name_max_length"
AM_CONDITIONAL(USE_SHA_CRYPT, test "x$with_sha_crypt" = "xyes")
if test "$with_sha_crypt" = "yes"; then
AC_DEFINE(USE_SHA_CRYPT, 1, [Define to allow the SHA256 and SHA512 password encryption algorithms])
fi
if test "$with_nscd" = "yes"; then
AC_CHECK_FUNC(posix_spawn,
[AC_DEFINE(USE_NSCD, 1, [Define to support flushing of nscd caches])],
[AC_MSG_ERROR([posix_spawn is needed for nscd support])])
fi
dnl Check for some functions in libc first, only if not found check for
dnl other libraries. This should prevent linking libnsl if not really
dnl needed (Linux glibc, Irix), but still link it if needed (Solaris).
AC_SEARCH_LIBS(inet_ntoa, inet)
AC_SEARCH_LIBS(socket, socket)
AC_SEARCH_LIBS(gethostbyname, nsl)
if test "$enable_shadowgrp" = "yes"; then
AC_DEFINE(SHADOWGRP, 1, [Define to support the shadow group file.])
fi
AM_CONDITIONAL(SHADOWGRP, test "x$enable_shadowgrp" = "xyes")
if test "$enable_man" = "yes"; then
dnl
dnl Check for xsltproc
dnl
AC_PATH_PROG([XSLTPROC], [xsltproc])
if test -z "$XSLTPROC"; then
enable_man=no
fi
dnl check for DocBook DTD and stylesheets in the local catalog.
JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
[DocBook XML DTD V4.1.2], [], enable_man=no)
JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
[DocBook XSL Stylesheets >= 1.70.1], [], enable_man=no)
fi
AM_CONDITIONAL(ENABLE_REGENERATE_MAN, test "x$enable_man" != "xno")
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"])
if test "x$id32bit" = "xyes"; then
AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.])
enable_subids="yes"
else
if test "x$enable_subids" = "xyes"; then
AC_MSG_ERROR([Cannot enable support the subordinate IDs on systems where gid_t or uid_t has less than 32 bits])
fi
enable_subids="no"
fi
fi
AM_CONDITIONAL(ENABLE_SUBIDS, test "x$enable_subids" != "xno")
AC_SUBST(LIBCRYPT)
AC_CHECK_LIB(crypt, crypt, [LIBCRYPT=-lcrypt],
[AC_MSG_ERROR([crypt() not found])])
AC_SUBST(LIBACL)
if test "$with_acl" != "no"; then
AC_CHECK_HEADERS(acl/libacl.h attr/error_context.h, [acl_header="yes"], [acl_header="no"])
if test "$acl_header$with_acl" = "noyes" ; then
AC_MSG_ERROR([acl/libacl.h or attr/error_context.h is missing])
elif test "$acl_header" = "yes" ; then
AC_CHECK_LIB(acl, perm_copy_file,
[AC_CHECK_LIB(acl, perm_copy_fd,
[acl_lib="yes"],
[acl_lib="no"])],
[acl_lib="no"])
if test "$acl_lib$with_acl" = "noyes" ; then
AC_MSG_ERROR([libacl not found])
elif test "$acl_lib" = "no" ; then
with_acl="no"
else
AC_DEFINE(WITH_ACL, 1,
[Build shadow with ACL support])
LIBACL="-lacl"
with_acl="yes"
fi
else
with_acl="no"
fi
fi
AC_SUBST(LIBATTR)
if test "$with_attr" != "no"; then
AC_CHECK_HEADERS(attr/libattr.h attr/error_context.h, [attr_header="yes"], [attr_header="no"])
if test "$attr_header$with_attr" = "noyes" ; then
AC_MSG_ERROR([attr/libattr.h or attr/error_context.h is missing])
elif test "$attr_header" = "yes" ; then
AC_CHECK_LIB(attr, attr_copy_file,
[AC_CHECK_LIB(attr, attr_copy_fd,
[attr_lib="yes"],
[attr_lib="no"])],
[attr_lib="no"])
if test "$attr_lib$with_attr" = "noyes" ; then
AC_MSG_ERROR([libattr not found])
elif test "$attr_lib" = "no" ; then
with_attr="no"
else
AC_DEFINE(WITH_ATTR, 1,
[Build shadow with Extended Attributes support])
LIBATTR="-lattr"
with_attr="yes"
fi
else
with_attr="no"
fi
fi
AC_SUBST(LIBAUDIT)
if test "$with_audit" != "no"; then
AC_CHECK_HEADER(libaudit.h, [audit_header="yes"], [audit_header="no"])
if test "$audit_header$with_audit" = "noyes" ; then
AC_MSG_ERROR([libaudit.h is missing])
elif test "$audit_header" = "yes"; then
AC_CHECK_DECL(AUDIT_ADD_USER,,[audit_header="no"],[#include <libaudit.h>])
AC_CHECK_DECL(AUDIT_DEL_USER,,[audit_header="no"],[#include <libaudit.h>])
AC_CHECK_DECL(AUDIT_ADD_GROUP,,[audit_header="no"],[#include <libaudit.h>])
AC_CHECK_DECL(AUDIT_DEL_GROUP,,[audit_header="no"],[#include <libaudit.h>])
if test "$audit_header$with_audit" = "noyes" ; then
AC_MSG_ERROR([AUDIT_ADD_USER AUDIT_DEL_USER AUDIT_ADD_GROUP or AUDIT_DEL_GROUP missing from libaudit.h])
fi
fi
if test "$audit_header" = "yes"; then
AC_CHECK_LIB(audit, audit_log_acct_message,
[audit_lib="yes"], [audit_lib="no"])
if test "$audit_lib$with_audit" = "noyes" ; then
AC_MSG_ERROR([libaudit not found])
elif test "$audit_lib" = "no" ; then
with_audit="no"
else
AC_DEFINE(WITH_AUDIT, 1,
[Define if you want to enable Audit messages])
LIBAUDIT="-laudit"
with_audit="yes"
fi
else
with_audit="no"
fi
fi
AC_SUBST(LIBCRACK)
if test "$with_libcrack" = "yes"; then
echo "checking cracklib flavour, don't be surprised by the results"
AC_CHECK_LIB(crack, FascistCheck,
[LIBCRACK=-lcrack AC_DEFINE(HAVE_LIBCRACK, 1, [Defined if you have libcrack.])])
AC_CHECK_LIB(crack, FascistHistory,
AC_DEFINE(HAVE_LIBCRACK_HIST, 1, [Defined if you have the ts&szs cracklib.]))
AC_CHECK_LIB(crack, FascistHistoryPw,
AC_DEFINE(HAVE_LIBCRACK_PW, 1, [Defined if it includes *Pw functions.]))
fi
AC_SUBST(LIBSELINUX)
AC_SUBST(LIBSEMANAGE)
if test "$with_selinux" != "no"; then
AC_CHECK_HEADERS(selinux/selinux.h, [selinux_header="yes"], [selinux_header="no"])
if test "$selinux_header$with_selinux" = "noyes" ; then
AC_MSG_ERROR([selinux/selinux.h is missing])
fi
AC_CHECK_HEADERS(semanage/semanage.h, [semanage_header="yes"], [semanage_header="no"])
if test "$semanage_header$with_selinux" = "noyes" ; then
AC_MSG_ERROR([semanage/semanage.h is missing])
fi
if test "$selinux_header$semanage_header" = "yesyes" ; then
AC_CHECK_LIB(selinux, is_selinux_enabled, [selinux_lib="yes"], [selinux_lib="no"])
if test "$selinux_lib$with_selinux" = "noyes" ; then
AC_MSG_ERROR([libselinux not found])
fi
AC_CHECK_LIB(semanage, semanage_connect, [semanage_lib="yes"], [semanage_lib="no"])
if test "$semanage_lib$with_selinux" = "noyes" ; then
AC_MSG_ERROR([libsemanage not found])
fi
if test "$selinux_lib$semanage_lib" == "yesyes" ; then
AC_DEFINE(WITH_SELINUX, 1,
[Build shadow with SELinux support])
LIBSELINUX="-lselinux"
LIBSEMANAGE="-lsemanage"
with_selinux="yes"
else
with_selinux="no"
fi
else
with_selinux="no"
fi
fi
AC_SUBST(LIBTCB)
if test "$with_tcb" != "no"; then
AC_CHECK_HEADERS(tcb.h, [tcb_header="yes"], [tcb_header="no"])
if test "$tcb_header$with_tcb" = "noyes" ; then
AC_MSG_ERROR([tcb.h is missing])
elif test "$tcb_header" = "yes" ; then
AC_CHECK_LIB(tcb, tcb_is_suspect, [tcb_lib="yes"], [tcb_lib="no"])
if test "$tcb_lib$with_tcb" = "noyes" ; then
AC_MSG_ERROR([libtcb not found])
elif test "$tcb_lib" = "no" ; then
with_tcb="no"
else
AC_DEFINE(WITH_TCB, 1, [Build shadow with tcb support (incomplete)])
LIBTCB="-ltcb"
with_tcb="yes"
fi
else
with_tcb="no"
fi
fi
AM_CONDITIONAL(WITH_TCB, test x$with_tcb = xyes)
AC_SUBST(LIBPAM)
if test "$with_libpam" != "no"; then
AC_CHECK_LIB(pam, pam_start,
[pam_lib="yes"], [pam_lib="no"])
if test "$pam_lib$with_libpam" = "noyes" ; then
AC_MSG_ERROR(libpam not found)
fi
LIBPAM="-lpam"
pam_conv_function="no"
AC_CHECK_LIB(pam, openpam_ttyconv,
[pam_conv_function="openpam_ttyconv"],
AC_CHECK_LIB(pam_misc, misc_conv,
[pam_conv_function="misc_conv"; LIBPAM="$LIBPAM -lpam_misc"])
)
if test "$pam_conv_function$with_libpam" = "noyes" ; then
AC_MSG_ERROR(PAM conversation function not found)
fi
pam_headers_found=no
AC_CHECK_HEADERS( [security/openpam.h security/pam_misc.h],
[ pam_headers_found=yes ; break ], [],
[ #include <security/pam_appl.h> ] )
if test "$pam_headers_found$with_libpam" = "noyes" ; then
AC_MSG_ERROR(PAM headers not found)
fi
if test "$pam_lib$pam_headers_found" = "yesyes" -a "$pam_conv_function" != "no" ; then
with_libpam="yes"
else
with_libpam="no"
unset LIBPAM
fi
fi
dnl Now with_libpam is either yes or no
if test "$with_libpam" = "yes"; then
AC_CHECK_DECLS([PAM_ESTABLISH_CRED,
PAM_DELETE_CRED,
PAM_NEW_AUTHTOK_REQD,
PAM_DATA_SILENT],
[], [], [#include <security/pam_appl.h>])
save_libs=$LIBS
LIBS="$LIBS $LIBPAM"
# We do not use AC_CHECK_FUNCS to avoid duplicated definition with
# Linux PAM.
AC_CHECK_FUNC(pam_fail_delay, [AC_DEFINE(HAS_PAM_FAIL_DELAY, 1, [Define to 1 if you have the declaration of 'pam_fail_delay'])])
LIBS=$save_libs
AC_DEFINE(USE_PAM, 1, [Define to support Pluggable Authentication Modules])
AC_DEFINE_UNQUOTED(SHADOW_PAM_CONVERSATION, [$pam_conv_function],[PAM converstation to use])
AM_CONDITIONAL(USE_PAM, [true])
AC_MSG_CHECKING(use login and su access checking if PAM not used)
AC_MSG_RESULT(no)
else
AC_DEFINE(SU_ACCESS, 1, [Define to support /etc/suauth su access control.])
AM_CONDITIONAL(USE_PAM, [false])
AC_MSG_CHECKING(use login and su access checking if PAM not used)
AC_MSG_RESULT(yes)
fi
if test "$enable_acct_tools_setuid" != "no"; then
if test "$with_libpam" != "yes"; then
if test "$enable_acct_tools_setuid" = "yes"; then
AC_MSG_ERROR(PAM support is required for --enable-account-tools-setuid)
else
enable_acct_tools_setuid="no"
fi
else
enable_acct_tools_setuid="yes"
fi
if test "$enable_acct_tools_setuid" = "yes"; then
AC_DEFINE(ACCT_TOOLS_SETUID,
1,
[Define if account management tools should be installed setuid and authenticate the callers])
fi
fi
AM_CONDITIONAL(ACCT_TOOLS_SETUID, test "x$enable_acct_tools_setuid" = "xyes")
AC_SUBST(LIBSKEY)
AC_SUBST(LIBMD)
if test "$with_skey" = "yes"; then
AC_CHECK_LIB(md, MD5Init, [LIBMD=-lmd])
AC_CHECK_LIB(skey, skeychallenge, [LIBSKEY=-lskey],
[AC_MSG_ERROR([liskey missing. You can download S/Key source code from http://rsync1.it.gentoo.org/gentoo/distfiles/skey-1.1.5.tar.bz2])])
AC_DEFINE(SKEY, 1, [Define to support S/Key logins.])
AC_TRY_COMPILE([
#include <stdio.h>
#include <skey.h>
],[
skeychallenge((void*)0, (void*)0, (void*)0, 0);
],[AC_DEFINE(SKEY_BSD_STYLE, 1, [Define to support newer BSD S/Key API])])
fi
if test "$enable_utmpx" = "yes"; then
if test "$ac_cv_header_utmpx_h" != "yes"; then
AC_MSG_ERROR([The utmpx.h header file is required for utmpx support.])
fi
AC_DEFINE(USE_UTMPX,
1,
[Define if utmpx should be used])
fi
AC_DEFINE_UNQUOTED(SHELL, ["$SHELL"], [The default shell.])
AM_GNU_GETTEXT_VERSION(0.16)
AM_GNU_GETTEXT([external], [need-ngettext])
AM_CONDITIONAL(USE_NLS, test "x$USE_NLS" = "xyes")
AC_CONFIG_FILES([
Makefile
po/Makefile.in
doc/Makefile
man/Makefile
man/config.xml
man/po/Makefile
man/cs/Makefile
man/da/Makefile
man/de/Makefile
man/es/Makefile
man/fi/Makefile
man/fr/Makefile
man/hu/Makefile
man/id/Makefile
man/it/Makefile
man/ja/Makefile
man/ko/Makefile
man/pl/Makefile
man/pt_BR/Makefile
man/ru/Makefile
man/sv/Makefile
man/tr/Makefile
man/zh_CN/Makefile
man/zh_TW/Makefile
libmisc/Makefile
lib/Makefile
src/Makefile
contrib/Makefile
etc/Makefile
etc/pam.d/Makefile
shadow.spec
])
AC_OUTPUT
echo
echo "shadow will be compiled with the following features:"
echo
echo " auditing support: $with_audit"
echo " CrackLib support: $with_libcrack"
echo " PAM support: $with_libpam"
if test "$with_libpam" = "yes"; then
echo " suid account management tools: $enable_acct_tools_setuid"
fi
echo " SELinux support: $with_selinux"
echo " ACL support: $with_acl"
echo " Extended Attributes support: $with_attr"
echo " tcb support (incomplete): $with_tcb"
echo " shadow group support: $enable_shadowgrp"
echo " S/Key support: $with_skey"
echo " SHA passwords encryption: $with_sha_crypt"
echo " nscd support: $with_nscd"
echo " subordinate IDs support: $enable_subids"
echo

View File

@@ -1,4 +1,6 @@
# This is a dummy Makefile.am to get automake work flawlessly,
# and also cooperate to make a distribution for `make dist'
EXTRA_DIST = README adduser.c adduser.sh adduser2.sh
EXTRA_DIST = README adduser.c adduser-old.c adduser.sh adduser2.sh \
atudel groupmems.shar pwdauth.c shadow-anonftp.patch \
udbachk.tgz

View File

@@ -1,507 +0,0 @@
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# This is a dummy Makefile.am to get automake work flawlessly,
# and also cooperate to make a distribution for `make dist'
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = contrib
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CMOCKA_CFLAGS = @CMOCKA_CFLAGS@
CMOCKA_LIBS = @CMOCKA_LIBS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
ECONF_CPPFLAGS = @ECONF_CPPFLAGS@
EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GREP = @GREP@
GROUP_NAME_MAX_LENGTH = @GROUP_NAME_MAX_LENGTH@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBACL = @LIBACL@
LIBADD_DL = @LIBADD_DL@
LIBADD_DLD_LINK = @LIBADD_DLD_LINK@
LIBADD_DLOPEN = @LIBADD_DLOPEN@
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
LIBATTR = @LIBATTR@
LIBAUDIT = @LIBAUDIT@
LIBBSD = @LIBBSD@
LIBBSD_CFLAGS = @LIBBSD_CFLAGS@
LIBBSD_LIBS = @LIBBSD_LIBS@
LIBCRYPT = @LIBCRYPT@
LIBECONF = @LIBECONF@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBMD = @LIBMD@
LIBOBJS = @LIBOBJS@
LIBPAM = @LIBPAM@
LIBS = @LIBS@
LIBSELINUX = @LIBSELINUX@
LIBSEMANAGE = @LIBSEMANAGE@
LIBSKEY = @LIBSKEY@
LIBSUBID_ABI = @LIBSUBID_ABI@
LIBSUBID_ABI_MAJOR = @LIBSUBID_ABI_MAJOR@
LIBSUBID_ABI_MICRO = @LIBSUBID_ABI_MICRO@
LIBSUBID_ABI_MINOR = @LIBSUBID_ABI_MINOR@
LIBSYSTEMD = @LIBSYSTEMD@
LIBTCB = @LIBTCB@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LIYESCRYPT = @LIYESCRYPT@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
LT_DLLOADERS = @LT_DLLOADERS@
LT_DLPREOPEN = @LT_DLPREOPEN@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POSUB = @POSUB@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VENDORDIR = @VENDORDIR@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
XMLCATALOG = @XMLCATALOG@
XML_CATALOG_FILE = @XML_CATALOG_FILE@
XSLTPROC = @XSLTPROC@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
capcmd = @capcmd@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = README adduser.c adduser.sh adduser2.sh
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
tags TAGS:
ctags CTAGS:
cscope cscopelist:
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
cscopelist-am ctags-am distclean distclean-generic \
distclean-libtool distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags-am uninstall uninstall-am
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@@ -2,6 +2,9 @@ People keep sending various adduser programs and scripts... They are
all in this directory. I haven't tested them, use at your own risk.
Anyway, the best one I've seen so far is adduser-3.x from Debian.
atudel is a perl script to remove at jobs owned by the specified user
(atrm in at-2.9 for Linux can't do that).
udbachk.tgz is a passwd/group/shadow file integrity checker.
--marekm

300
contrib/adduser-old.c Normal file
View File

@@ -0,0 +1,300 @@
/****
** 03/17/96
** hacked a bit more, removed unused code, cleaned up for gcc -Wall.
** --marekm
**
** 02/26/96
** modified to call shadow utils (useradd,chage,passwd) on shadowed
** systems - Cristian Gafton, gafton@sorosis.ro
**
** 6/27/95
** shadow-adduser 1.4:
**
** now it copies the /etc/skel dir into the person's dir,
** makes the mail folders, changed some defaults and made a 'make
** install' just for the hell of it.
**
** Greg Gallagher
** CIN.Net
**
** 1/28/95
** shadow-adduser 1.3:
**
** Basically a bug-fix on my additions in 1.2. Thanx to Terry Stewart
** (stew@texas.net) for pointing out one of the many idiotic bugs I introduced.
** It was such a stupid bug that I would have never seen it myself.
**
** Brandon
*****
** 01/27/95
**
** shadow-adduser 1.2:
** I took the C source from adduser-shadow (credits are below) and made
** it a little more worthwhile. Many small changes... Here's
** the ones I can remember:
**
** Removed support for non-shadowed systems (if you don't have shadow,
** use the original adduser, don't get this shadow version!)
** Added support for the correct /etc/shadow fields (Min days before
** password change, max days before password change, Warning days,
** and how many days from expiry date does the account go invalid)
** The previous version just left all of those fields blank.
** There is still one field left (expiry date for the account, period)
** which I have left blank because I do not use it and didn't want to
** spend any more time on this. I'm sure someone will put it in and
** tack another plethora of credits on here. :)
** Added in the password date field, which should always reflect the last
** date the password was changed, for expiry purposes. "passwd" always
** updates this field, so the adduser program should set it up right
** initially (or a user could keep thier initial password forever ;)
** The number is in days since Jan 1st, 1970.
**
** Have fun with it, and someone please make
** a real version(this is still just a hack)
** for us all to use (and Email it to me???)
**
** Brandon
** photon@usis.com
**
*****
** adduser 1.0: add a new user account (For systems not using shadow)
** With a nice little interface and a will to do all the work for you.
**
** Craig Hagan
** hagan@opine.cs.umass.edu
**
** Modified to really work, look clean, and find unused uid by Chris Cappuccio
** chris@slinky.cs.umass.edu
**
*****
**
** 01/19/95
**
** FURTHER modifications to enable shadow passwd support (kludged, but
** no more so than the original) by Dan Crowson - dcrowson@mo.net
**
** Search on DAN for all changes...
**
*****
**
** cc -O -o adduser adduser.c
** Use gcc if you have it... (political reasons beyond my control) (chris)
**
** I've gotten this program to work with success under Linux (without
** shadow) and SunOS 4.1.3. I would assume it should work pretty well
** on any system that uses no shadow. (chris)
**
** If you have no crypt() then try
** cc -DNO_CRYPT -O -o adduser adduser.c xfdes.c
** I'm not sure how login operates with no crypt()... I guess
** the same way we're doing it here.
*/
#include <pwd.h>
#include <grp.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include <sys/types.h>
#include <sys/timeb.h>
#include <sys/time.h>
#include <sys/stat.h>
#define DEFAULT_SHELL "/bin/bash" /* because BASH is your friend */
#define DEFAULT_HOME "/home"
#define USERADD_PATH "/usr/sbin/useradd"
#define CHAGE_PATH "/usr/sbin/chage"
#define PASSWD_PATH "/usr/bin/passwd"
#define DEFAULT_GROUP 100
#define DEFAULT_MAX_PASS 60
#define DEFAULT_WARN_PASS 10
/* if you use this feature, you will get a lot of complaints from users
who rarely use their accounts :) (something like 3 months would be
more reasonable) --marekm */
#define DEFAULT_USER_DIE /* 10 */ 0
void main()
{
char foo[32];
char uname[9],person[32],dir[32],shell[32];
unsigned int group,min_pass,max_pass,warn_pass,user_die;
/* the group and uid of the new user */
int bad=0,done=0,correct=0,gets_warning=0;
char cmd[255];
struct group *grp;
/* flags, in order:
* bad to see if the username is in /etc/passwd, or if strange stuff has
* been typed if the user might be put in group 0
* done allows the program to exit when a user has been added
* correct loops until a password is found that isn't in /etc/passwd
* gets_warning allows the fflush to be skipped for the first gets
* so that output is still legible
*/
/* The real program starts HERE! */
if(geteuid()!=0)
{
printf("It seems you don't have access to add a new user. Try\n");
printf("logging in as root or su root to gain super-user access.\n");
exit(1);
}
/* Sanity checks
*/
if (!(grp=getgrgid(DEFAULT_GROUP))){
printf("Error: the default group %d does not exist on this system!\n",
DEFAULT_GROUP);
printf("adduser must be recompiled.\n");
exit(1);
};
while(!correct) { /* loop until a "good" uname is chosen */
while(!done) {
printf("\nLogin to add (^C to quit): ");
if(gets_warning) /* if the warning was already shown */
fflush(stdout); /* fflush stdout, otherwise set the flag */
else
gets_warning=1;
gets(uname);
if(!strlen(uname)) {
printf("Empty input.\n");
done=0;
continue;
};
/* what I saw here before made me think maybe I was running DOS */
/* might this be a solution? (chris) */
if (getpwnam(uname) != NULL) {
printf("That name is in use, choose another.\n");
done=0;
} else
done=1;
}; /* done, we have a valid new user name */
/* all set, get the rest of the stuff */
printf("\nEditing information for new user [%s]\n",uname);
printf("\nFull Name [%s]: ",uname);
gets(person);
if (!strlen(person)) {
bzero(person,sizeof(person));
strcpy(person,uname);
};
do {
bad=0;
printf("GID [%d]: ",DEFAULT_GROUP);
gets(foo);
if (!strlen(foo))
group=DEFAULT_GROUP;
else
if (isdigit (*foo)) {
group = atoi(foo);
if (! (grp = getgrgid (group))) {
printf("unknown gid %s\n",foo);
group=DEFAULT_GROUP;
bad=1;
};
} else
if ((grp = getgrnam (foo)))
group = grp->gr_gid;
else {
printf("unknown group %s\n",foo);
group=DEFAULT_GROUP;
bad=1;
}
if (group==0){ /* You're not allowed to make root group users! */
printf("Creation of root group users not allowed (must be done by hand)\n");
group=DEFAULT_GROUP;
bad=1;
};
} while(bad);
fflush(stdin);
printf("\nIf home dir ends with a / then [%s] will be appended to it\n",uname);
printf("Home Directory [%s/%s]: ",DEFAULT_HOME,uname);
fflush(stdout);
gets(dir);
if (!strlen(dir)) { /* hit return */
sprintf(dir,"%s/%s",DEFAULT_HOME,uname);
fflush(stdin);
} else
if (dir[strlen(dir)-1]=='/')
sprintf(dir+strlen(dir),"%s",uname);
printf("\nShell [%s]: ",DEFAULT_SHELL);
fflush(stdout);
gets(shell);
if (!strlen(shell))
sprintf(shell,"%s",DEFAULT_SHELL);
printf("\nMin. Password Change Days [0]: ");
gets(foo);
min_pass=atoi(foo);
printf("Max. Password Change Days [%d]: ",DEFAULT_MAX_PASS);
gets(foo);
if (strlen(foo) > 1)
max_pass = atoi(foo);
else
max_pass = DEFAULT_MAX_PASS;
printf("Password Warning Days [%d]: ",DEFAULT_WARN_PASS);
gets(foo);
warn_pass = atoi(foo);
if (warn_pass==0)
warn_pass = DEFAULT_WARN_PASS;
printf("Days after Password Expiry for Account Locking [%d]: ",DEFAULT_USER_DIE);
gets(foo);
user_die = atoi(foo);
if (user_die == 0)
user_die = DEFAULT_USER_DIE;
printf("\nInformation for new user [%s] [%s]:\n",uname,person);
printf("Home directory: [%s] Shell: [%s]\n",dir,shell);
printf("GID: [%d]\n",group);
printf("MinPass: [%d] MaxPass: [%d] WarnPass: [%d] UserExpire: [%d]\n",
min_pass,max_pass,warn_pass,user_die);
printf("\nIs this correct? [y/N]: ");
fflush(stdout);
gets(foo);
done=bad=correct=(foo[0]=='y'||foo[0]=='Y');
if(bad!=1)
printf("\nUser [%s] not added\n",uname);
}
bzero(cmd,sizeof(cmd));
sprintf(cmd,"%s -g %d -d %s -s %s -c \"%s\" -m -k /etc/skel %s",
USERADD_PATH,group,dir,shell,person,uname);
printf("Calling useradd to add new user:\n%s\n",cmd);
if(system(cmd)){
printf("User add failed!\n");
exit(errno);
};
bzero(cmd,sizeof(cmd));
sprintf(cmd,"%s -m %d -M %d -W %d -I %d %s", CHAGE_PATH,
min_pass,max_pass,warn_pass,user_die,uname);
printf("%s\n",cmd);
if(system(cmd)){
printf("There was an error setting password expire values\n");
exit(errno);
};
bzero(cmd,sizeof(cmd));
sprintf(cmd,"%s %s",PASSWD_PATH,uname);
system(cmd);
printf("\nDone.\n");
}

View File

@@ -34,7 +34,7 @@
** 1/28/95
** shadow-adduser 1.3:
**
** Basically a bug-fix on my additions in 1.2. Thanks to Terry Stewart
** Basically a bug-fix on my additions in 1.2. Thanx to Terry Stewart
** (stew@texas.net) for pointing out one of the many idiotic bugs I introduced.
** It was such a stupid bug that I would have never seen it myself.
**
@@ -60,7 +60,7 @@
** Added in the password date field, which should always reflect the last
** date the password was changed, for expiry purposes. "passwd" always
** updates this field, so the adduser program should set it up right
** initially (or a user could keep their initial password forever ;)
** initially (or a user could keep thier initial password forever ;)
** The number is in days since Jan 1st, 1970.
**
** Have fun with it, and someone please make
@@ -118,9 +118,6 @@
#include <sys/stat.h>
#include <syslog.h>
#include "string/strcmp/streq.h"
#define IMMEDIATE_CHANGE /* Expire newly created password, must be changed
* immediately upon next login */
#define HAVE_QUOTAS /* Obvious */
@@ -294,10 +291,12 @@ main (void)
printf ("Home Directory [%s/%s]: ", DEFAULT_HOME, usrname);
fflush (stdout);
safeget (dir, sizeof (dir));
if (!strlen(dir)) /* hit return */
sprintf(dir, "%s/%s", DEFAULT_HOME, usrname);
if (!strlen (dir))
{ /* hit return */
sprintf (dir, "%s/%s", DEFAULT_HOME, usrname);
}
else if (dir[strlen (dir) - 1] == '/')
strcat(dir, usrname);
sprintf (dir+strlen(dir), "%s", usrname);
}
else
{
@@ -309,7 +308,7 @@ main (void)
fflush (stdout);
safeget (shell, sizeof (shell));
if (!strlen (shell))
strcpy(shell, DEFAULT_SHELL);
sprintf (shell, "%s", DEFAULT_SHELL);
else
{
char *sh;
@@ -317,7 +316,7 @@ main (void)
#ifdef HAVE_GETUSERSHELL
setusershell ();
while ((sh = getusershell ()) != NULL)
if (streq(shell, sh))
if (!strcmp (shell, sh))
ok = 1;
endusershell ();
#endif
@@ -328,7 +327,7 @@ main (void)
else
{
printf ("Shell NOT in /etc/shells, DEFAULT used\n");
strcpy(shell, DEFAULT_SHELL);
sprintf (shell, "%s", DEFAULT_SHELL);
}
}
}
@@ -490,14 +489,14 @@ safeget (char *buf, int maxlen)
while ((c = getc (stdin)) != EOF && (c != '\n') && (++i < maxlen))
{
bad = (!isalnum (c) && (c != '_') && (c != ' '));
*(buf++) = c;
*(buf++) = (char) c;
}
stpcpy(buf, "");
*buf = '\0';
if (bad)
{
printf ("\nString contained banned character. Please stick to alphanumerics.\n");
stpcpy(bstart, "");
*bstart = '\0';
}
}

View File

@@ -32,7 +32,7 @@ def_home_dir=/home/users
# default shell
def_shell=/bin/tcsh
# Default expiration date (mm/dd/yy)
# Defaul expiration date (mm/dd/yy)
def_expire=""
# default dates

85
contrib/atudel Executable file
View File

@@ -0,0 +1,85 @@
#!/usr/bin/perl
#
# Copyright (c) 1996 Brian R. Gaeke
# 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. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by Brian R. Gaeke.
# 4. The name of the author, Brian R. Gaeke, may not be used to endorse
# or promote products derived from this software without specific
# prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY BRIAN R. GAEKE ``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 BRIAN R. GAEKE 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.
#
# Additionally:
#
# This software is provided without support and without any obligation
# on the part of Brian R. Gaeke to assist in its use, correction,
# modification or enhancement.
#
#######################################################################
#
# this is atudel, version 2, by Brian R. Gaeke <brg@dgate.org>
#
require "getopts.pl";
&Getopts('v');
$username = shift(@ARGV);
&usage unless $username;
sub usage
{
print STDERR "atudel - remove all at jobs owned by a user\n";
print STDERR "usage: $0 [-v] username\n";
exit(1);
}
# odd. unless getpwnam($uname) doesn't seem to work for $uname eq "root" on
# my linux system. but this does.
die "user $username does not exist; stopping"
unless defined(getpwnam($username));
print "searching for at jobs owned by user $username ..." if $opt_v;
chdir "/var/spool/atjobs" ||
die "can't chdir to /var/spool/atjobs: $!\nstopping";
opendir(DIR,".") || die "can't opendir(/var/spool/atjobs): $!\nstopping";
@files = grep(!/^\./,grep(-f,readdir(DIR)));
closedir DIR;
foreach $x (@files)
{
$owner = (getpwuid((stat($x))[4]))[0];
push(@nuke_bait,$x) if $owner eq $username;
}
if (@nuke_bait)
{
print "removed jobIDs: @{nuke_bait}.\n" if $opt_v;
unlink @nuke_bait;
}
elsif ($opt_v)
{
print "\n";
}
exit 0;

546
contrib/groupmems.shar Normal file
View File

@@ -0,0 +1,546 @@
#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.2.1).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 2000-05-25 14:41 CDT by <gk4@gnu.austin.ibm.com>.
# Source directory was `/home/gk4/src/groupmem'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode name
# ------ ---------- ------------------------------------------
# 1960 -rw-r--r-- Makefile
# 6348 -rw-r--r-- groupmems.c
# 3372 -rw------- groupmems.8
#
save_IFS="${IFS}"
IFS="${IFS}:"
gettext_dir=FAILED
locale_dir=FAILED
first_param="$1"
for dir in $PATH
do
if test "$gettext_dir" = FAILED && test -f $dir/gettext \
&& ($dir/gettext --version >/dev/null 2>&1)
then
set `$dir/gettext --version 2>&1`
if test "$3" = GNU
then
gettext_dir=$dir
fi
fi
if test "$locale_dir" = FAILED && test -f $dir/shar \
&& ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
then
locale_dir=`$dir/shar --print-text-domain-dir`
fi
done
IFS="$save_IFS"
if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED
then
echo=echo
else
TEXTDOMAINDIR=$locale_dir
export TEXTDOMAINDIR
TEXTDOMAIN=sharutils
export TEXTDOMAIN
echo="$gettext_dir/gettext -s"
fi
if touch -am -t 200112312359.59 $$.touch >/dev/null 2>&1 && test ! -f 200112312359.59 -a -f $$.touch; then
shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"'
elif touch -am 123123592001.59 $$.touch >/dev/null 2>&1 && test ! -f 123123592001.59 -a ! -f 123123592001.5 -a -f $$.touch; then
shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"'
elif touch -am 1231235901 $$.touch >/dev/null 2>&1 && test ! -f 1231235901 -a -f $$.touch; then
shar_touch='touch -am $3$4$5$6$2 "$8"'
else
shar_touch=:
echo
$echo 'WARNING: not restoring timestamps. Consider getting and'
$echo "installing GNU \`touch', distributed in GNU File Utilities..."
echo
fi
rm -f 200112312359.59 123123592001.59 123123592001.5 1231235901 $$.touch
#
if mkdir _sh10937; then
$echo 'x -' 'creating lock directory'
else
$echo 'failed to create lock directory'
exit 1
fi
# ============= Makefile ==============
if test -f 'Makefile' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'Makefile' '(file already exists)'
else
$echo 'x -' extracting 'Makefile' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'Makefile' &&
/*
# Copyright 2000, International Business Machines, Inc.
# All rights reserved.
#
# original author: George Kraft IV, gk4@us.ibm.com
#
# 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 International Business Machines, Inc., 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 INTERNATIONAL BUSINESS MACHINES, INC. 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
# INTERNATIONAL BUSINESS MACHINES, INC. 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.
#
X
all: groupmems
X
groupmems: groupmems.c
X cc -g -o groupmems groupmems.c -L. -lshadow
X
install: groupmems
X -/usr/sbin/groupadd groups
X install -o root -g groups -m 4770 groupmems /usr/bin
X
install.man: groupmems.8
X install -o root -g root -m 644 groupmems.8 /usr/man/man8
X
SHAR_EOF
(set 20 00 05 25 14 40 28 'Makefile'; eval "$shar_touch") &&
chmod 0644 'Makefile' ||
$echo 'restore of' 'Makefile' 'failed'
if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
&& ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
md5sum -c << SHAR_EOF >/dev/null 2>&1 \
|| $echo 'Makefile:' 'MD5 check failed'
b46cf7ef8d59149093c011ced3f3103c Makefile
SHAR_EOF
else
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'Makefile'`"
test 1960 -eq "$shar_count" ||
$echo 'Makefile:' 'original size' '1960,' 'current size' "$shar_count!"
fi
fi
# ============= groupmems.c ==============
if test -f 'groupmems.c' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'groupmems.c' '(file already exists)'
else
$echo 'x -' extracting 'groupmems.c' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'groupmems.c' &&
/*
X * Copyright 2000, International Business Machines, Inc.
X * All rights reserved.
X *
X * original author: George Kraft IV, gk4@us.ibm.com
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X *
X * 1. Redistributions of source code must retain the above copyright
X * notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X * notice, this list of conditions and the following disclaimer in the
X * documentation and/or other materials provided with the distribution.
X * 3. Neither the name of International Business Machines, Inc., nor the
X * names of its contributors may be used to endorse or promote products
X * derived from this software without specific prior written permission.
X *
X * THIS SOFTWARE IS PROVIDED BY INTERNATIONAL BUSINESS MACHINES, INC. AND
X * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
X * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
X * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
X * INTERNATIONAL BUSINESS MACHINES, INC. OR CONTRIBUTORS BE LIABLE
X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X * SUCH DAMAGE.
X */
/*
**
** Utility "groupmem" adds and deletes members from a user's group.
**
** Setup (as "root"):
**
** groupadd -r groups
** chmod 2770 groupmems
** chown root.groups groupmems
** groupmems -g groups -a gk4
**
** Usage (as "gk4"):
**
** groupmems -a olive
** groupmems -a jordan
** groupmems -a meghan
** groupmems -a morgan
** groupmems -a jake
** groupmems -l
** groupmems -d jake
** groupmems -l
*/
X
#include <stdio.h>
#include <pwd.h>
#include <grp.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "defines.h"
#include "groupio.h"
X
/* Exit Status Values */
X
#define EXIT_SUCCESS 0 /* success */
#define EXIT_USAGE 1 /* invalid command syntax */
#define EXIT_GROUP_FILE 2 /* group file access problems */
#define EXIT_NOT_ROOT 3 /* not superuser */
#define EXIT_NOT_EROOT 4 /* not effective superuser */
#define EXIT_NOT_PRIMARY 5 /* not primary owner of group */
#define EXIT_NOT_MEMBER 6 /* member of group does not exist */
#define EXIT_MEMBER_EXISTS 7 /* member of group already exists */
X
#define TRUE 1
#define FALSE 0
X
/* Globals */
X
extern int optind;
extern char *optarg;
static char *adduser = NULL;
static char *deluser = NULL;
static char *thisgroup = NULL;
static int purge = FALSE;
static int list = FALSE;
static int exclusive = 0;
X
static int isroot(void) {
X return getuid() ? FALSE : TRUE;
}
X
static int isgroup(void) {
X gid_t g = getgid();
X struct group *grp = getgrgid(g);
X
X return TRUE;
}
X
static char *whoami(void) {
X struct group *grp = getgrgid(getgid());
X struct passwd *usr = getpwuid(getuid());
X
X if (0 == strcmp(usr->pw_name, grp->gr_name)) {
X return (char *)strdup(usr->pw_name);
X } else {
X return NULL;
X }
}
X
static void
addtogroup(char *user, char **members) {
X int i;
X char **pmembers;
X
X for (i = 0; NULL != members[i]; i++ ) {
X if (0 == strcmp(user, members[i])) {
X fprintf(stderr, "Member already exists\n");
X exit(EXIT_MEMBER_EXISTS);
X }
X }
X
X if (0 == i) {
X pmembers = (char **)calloc(2, sizeof(char *));
X } else {
X pmembers = (char **)realloc(members, sizeof(char *)*(i+1));
X }
X
X *members = *pmembers;
X members[i] = user;
X members[i+1] = NULL;
}
X
static void
rmfromgroup(char *user, char **members) {
X int i;
X int found = FALSE;
X
X i = 0;
X while (!found && NULL != members[i]) {
X if (0 == strcmp(user, members[i])) {
X found = TRUE;
X } else {
X i++;
X }
X }
X
X while (found && NULL != members[i]) {
X members[i] = members[++i];
X }
X
X if (!found) {
X fprintf(stderr, "Member to remove could not be found\n");
X exit(EXIT_NOT_MEMBER);
X }
}
X
static void
nomembers(char **members) {
X int i;
X
X for (i = 0; NULL != members[i]; i++ ) {
X members[i] = NULL;
X }
}
X
static void
members(char **members) {
X int i;
X
X for (i = 0; NULL != members[i]; i++ ) {
X printf("%s ", members[i]);
X
X if (NULL == members[i+1]) {
X printf("\n");
X } else {
X printf(" ");
X }
X }
}
X
static void usage(void) {
X fprintf(stderr, "usage: groupmems -a username | -d username | -D | -l [-g groupname]\n");
X exit(EXIT_USAGE);
}
X
main(int argc, char **argv) {
X int arg, i;
X char *name;
X struct group *grp;
X
X while ((arg = getopt(argc, argv, "a:d:g:Dl")) != EOF) {
X switch (arg) {
X case 'a':
X adduser = strdup(optarg);
X ++exclusive;
X break;
X case 'd':
X deluser = strdup(optarg);
X ++exclusive;
X break;
X case 'g':
X thisgroup = strdup(optarg);
X break;
X case 'D':
X purge = TRUE;
X ++exclusive;
X break;
X case 'l':
X list = TRUE;
X ++exclusive;
X break;
X default:
X usage();
X }
X }
X
X if (exclusive > 1 || optind < argc) {
X usage();
X }
X
X if (!isroot() && NULL != thisgroup) {
X fprintf(stderr, "Only root can add members to different groups\n");
X exit(EXIT_NOT_ROOT);
X } else if (isroot() && NULL != thisgroup) {
X name = thisgroup;
X } else if (!isgroup()) {
X fprintf(stderr, "Group access is required\n");
X exit(EXIT_NOT_EROOT);
X } else if (NULL == (name = whoami())) {
X fprintf(stderr, "Not primary owner of current group\n");
X exit(EXIT_NOT_PRIMARY);
X }
X
X if (!gr_lock()) {
X fprintf(stderr, "Unable to lock group file\n");
X exit(EXIT_GROUP_FILE);
X }
X
X if (!gr_open(O_RDWR)) {
X fprintf(stderr, "Unable to open group file\n");
X exit(EXIT_GROUP_FILE);
X }
X
X grp = (struct group *)gr_locate(name);
X
X if (NULL != adduser) {
X addtogroup(adduser, grp->gr_mem);
X gr_update(grp);
X } else if (NULL != deluser) {
X rmfromgroup(deluser, grp->gr_mem);
X gr_update(grp);
X } else if (purge) {
X nomembers(grp->gr_mem);
X gr_update(grp);
X } else if (list) {
X members(grp->gr_mem);
X }
X
X if (!gr_close()) {
X fprintf(stderr, "Cannot close group file\n");
X exit(EXIT_GROUP_FILE);
X }
X
X gr_unlock();
X
X exit(EXIT_SUCCESS);
}
X
/* EOF */
SHAR_EOF
(set 20 00 05 25 14 36 38 'groupmems.c'; eval "$shar_touch") &&
chmod 0644 'groupmems.c' ||
$echo 'restore of' 'groupmems.c' 'failed'
if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
&& ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
md5sum -c << SHAR_EOF >/dev/null 2>&1 \
|| $echo 'groupmems.c:' 'MD5 check failed'
f0dd68f8d762d89d24d3ce1f4141f981 groupmems.c
SHAR_EOF
else
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'groupmems.c'`"
test 6348 -eq "$shar_count" ||
$echo 'groupmems.c:' 'original size' '6348,' 'current size' "$shar_count!"
fi
fi
# ============= groupmems.8 ==============
if test -f 'groupmems.8' && test "$first_param" != -c; then
$echo 'x -' SKIPPING 'groupmems.8' '(file already exists)'
else
$echo 'x -' extracting 'groupmems.8' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'groupmems.8' &&
X.\"
X.\" Copyright 2000, International Business Machines, Inc.
X.\" All rights reserved.
X.\"
X.\" original author: George Kraft IV, gk4@us.ibm.com
X.\"
X.\" Redistribution and use in source and binary forms, with or without
X.\" modification, are permitted provided that the following conditions
X.\" are met:
X.\"
X.\" 1. Redistributions of source code must retain the above copyright
X.\" notice, this list of conditions and the following disclaimer.
X.\" 2. Redistributions in binary form must reproduce the above copyright
X.\" notice, this list of conditions and the following disclaimer in the
X.\" documentation and/or other materials provided with the distribution.
X.\" 3. Neither the name of International Business Machines, Inc., nor the
X.\" names of its contributors may be used to endorse or promote products
X.\" derived from this software without specific prior written permission.
X.\"
X.\" THIS SOFTWARE IS PROVIDED BY INTERNATIONAL BUSINESS MACHINES, INC. AND
X.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
X.\" BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
X.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
X.\" INTERNATIONAL BUSINESS MACHINES, INC. OR CONTRIBUTORS BE LIABLE
X.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X.\" SUCH DAMAGE.
X.\"
X.\" $Id$
X.\"
X.TH GROUPMEMS 8
X.SH NAME
groupmems \- Administer members of a user's primary group
X.SH SYNOPSIS
X.B groupmems
\fB-a\fI user_name \fR |
\fB-d\fI user_name \fR |
\fB-l\fR |
\fB-D\fR |
[\fB-g\fI group_name \fR]
X.SH DESCRIPTION
The \fBgroupmems\fR utility allows a user to administer his/her own
group membership list without the requirement of superuser privileges.
The \fBgroupmems\fR utility is for systems that configure its users to
be in their own name sake primary group (i.e., guest / guest).
X.P
Only the superuser, as administrator, can use \fBgroupmems\fR to alter
the memberships of other groups.
X.IP "\fB-a \fIuser_name\fR"
Add a new user to the group membership list.
X.IP "\fB-d \fIuser_name\fR"
Delete a user from the group membership list.
X.IP "\fB-l\fR"
List the group membership list.
X.IP "\fB-D\fR"
Delete all users from the group membership list.
X.IP "\fB-g \fIgroup_name\fR"
The superuser can specify which group membership list to modify.
X.SH SETUP
The \fBgroupmems\fR executable should be in mode \fB2770\fR as user \fBroot\fR
and in group \fBgroups\fR. The system administrator can add users to
group groups to allow or disallow them using the \fBgroupmems\fR utility
to manager their own group membership list.
X.P
X $ groupadd -r groups
X.br
X $ chmod 2770 groupmems
X.br
X $ chown root.groups groupmems
X.br
X $ groupmems -g groups -a gk4
X.SH FILES
/etc/group
X.br
/etc/gshadow
X.SH SEE ALSO
X.BR chfn (1),
X.BR chsh (1),
X.BR useradd (8),
X.BR userdel (8),
X.BR usermod (8),
X.BR passwd (1),
X.BR groupadd (8),
X.BR groupdel (8)
X.SH AUTHOR
George Kraft IV (gk4@us.ibm.com)
X.\" EOF
SHAR_EOF
(set 20 00 05 25 14 38 23 'groupmems.8'; eval "$shar_touch") &&
chmod 0600 'groupmems.8' ||
$echo 'restore of' 'groupmems.8' 'failed'
if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
&& ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
md5sum -c << SHAR_EOF >/dev/null 2>&1 \
|| $echo 'groupmems.8:' 'MD5 check failed'
181e6cd3a3c9d3df320197fa2cde2b4a groupmems.8
SHAR_EOF
else
shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'groupmems.8'`"
test 3372 -eq "$shar_count" ||
$echo 'groupmems.8:' 'original size' '3372,' 'current size' "$shar_count!"
fi
fi
rm -fr _sh10937
exit 0

308
contrib/pwdauth.c Normal file
View File

@@ -0,0 +1,308 @@
/*
* pwdauth.c - program to verify a given username/password pair.
*
* Run it with username in argv[1] (may be omitted - default is the
* current user), and send it the password over a pipe on stdin.
* Exit status: 0 - correct password, 1 - wrong password, >1 - other
* errors. For use with shadow passwords, this program should be
* installed setuid root.
*
* This can be used, for example, by xlock - you don't have to install
* this large and complex (== possibly insecure) program setuid root,
* just modify it to run this simple program to do the authentication.
*
* Recent versions (xlockmore-3.9) are cleaner, and drop privileges as
* soon as possible after getting the user's encrypted password.
* Using this program probably doesn't make it more secure, and has one
* disadvantage: since we don't get the encrypted user's password at
* startup (but at the time the user is authenticated), it is not clear
* how we should handle errors (like getpwnam() returning NULL).
* - fail the authentication? Problem: no way to unlock (other than kill
* the process from somewhere else) if the NIS server stops responding.
* - succeed and unlock? Problem: it's too easy to unlock by unplugging
* the box from the network and waiting until NIS times out...
*
* This program is Copyright (C) 1996 Marek Michalkiewicz
* <marekm@i17linuxb.ists.pwr.wroc.pl>.
*
* It may be used and distributed freely for any purposes. There is no
* warranty - use at your own risk. I am not liable for any damages etc.
* If you improve it, please send me your changes.
*/
static char rcsid[] = "$Id$";
/*
* Define USE_SYSLOG to use syslog() to log successful and failed
* authentication. This should be safe even if your system has
* the infamous syslog buffer overrun security problem...
*/
#define USE_SYSLOG
/*
* Define HAVE_GETSPNAM to get shadow passwords using getspnam().
* Some systems don't have getspnam(), but getpwnam() returns
* encrypted passwords only if running as root.
*
* According to the xlock source (not tested, except Linux) -
* define: Linux, Solaris 2.x, SVR4, ...
* undef: HP-UX with Secured Passwords, FreeBSD, NetBSD, QNX.
* Known not supported (yet): Ultrix, OSF/1, SCO.
*/
#define HAVE_GETSPNAM
/*
* Define HAVE_PW_ENCRYPT to use pw_encrypt() instead of crypt().
* pw_encrypt() is like the standard crypt(), except that it may
* support better password hashing algorithms.
*
* Define if linking with libshadow.a from the shadow password
* suite (Linux, SunOS 4.x?).
*/
#undef HAVE_PW_ENCRYPT
/*
* Define HAVE_AUTH_METHODS to support the shadow suite specific
* extension: the encrypted password field contains a list of
* administrator defined authentication methods, separated by
* semicolons. This program only supports the standard password
* authentication method (a string that doesn't start with '@').
*/
#undef HAVE_AUTH_METHODS
/*
* FAIL_DELAY - number of seconds to sleep before exiting if the
* password was wrong, to slow down password guessing attempts.
*/
#define FAIL_DELAY 2
/* No user-serviceable parts below :-). */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <pwd.h>
#ifdef USE_SYSLOG
#include <syslog.h>
#ifndef LOG_AUTHPRIV
#define LOG_AUTHPRIV LOG_AUTH
#endif
#endif
#ifdef HAVE_GETSPNAM
#include <shadow.h>
#endif
#ifdef HAVE_PW_ENCRYPT
extern char *pw_encrypt();
#define crypt pw_encrypt
#endif
/*
* Read the password (one line) from fp. We don't turn off echo
* because we expect input from a pipe.
*/
static char *
get_line(fp)
FILE *fp;
{
static char buf[128];
char *cp;
int ch;
cp = buf;
while ((ch = getc(fp)) != EOF && ch != '\0' && ch != '\n') {
if (cp >= buf + sizeof buf - 1)
break;
*cp++ = ch;
}
*cp = '\0';
return buf;
}
/*
* Get the password file entry for the current user. If the name
* returned by getlogin() is correct (matches the current real uid),
* return the entry for that user. Otherwise, return the entry (if
* any) matching the current real uid. Return NULL on failure.
*/
static struct passwd *
get_my_pwent()
{
uid_t uid = getuid();
char *name = getlogin();
if (name && *name) {
struct passwd *pw = getpwnam(name);
if (pw && pw->pw_uid == uid)
return pw;
}
return getpwuid(uid);
}
/*
* Verify the password. The system-dependent shadow support is here.
*/
static int
password_auth_ok(pw, pass)
const struct passwd *pw;
const char *pass;
{
int result;
char *cp;
#ifdef HAVE_AUTH_METHODS
char *buf;
#endif
#ifdef HAVE_GETSPNAM
struct spwd *sp;
#endif
if (pw) {
#ifdef HAVE_GETSPNAM
sp = getspnam(pw->pw_name);
if (sp)
cp = sp->sp_pwdp;
else
#endif
cp = pw->pw_passwd;
} else
cp = "xx";
#ifdef HAVE_AUTH_METHODS
buf = strdup(cp); /* will be modified by strtok() */
if (!buf) {
fprintf(stderr, "Out of memory.\n");
exit(13);
}
cp = strtok(buf, ";");
while (cp && *cp == '@')
cp = strtok(NULL, ";");
/* fail if no password authentication for this user */
if (!cp)
cp = "xx";
#endif
if (*pass || *cp)
result = (strcmp(crypt(pass, cp), cp) == 0);
else
result = 1; /* user with no password */
#ifdef HAVE_AUTH_METHODS
free(buf);
#endif
return result;
}
/*
* Main program.
*/
int
main(argc, argv)
int argc;
char **argv;
{
struct passwd *pw;
char *pass, *name;
char myname[32];
#ifdef USE_SYSLOG
openlog("pwdauth", LOG_PID | LOG_CONS, LOG_AUTHPRIV);
#endif
pw = get_my_pwent();
if (!pw) {
#ifdef USE_SYSLOG
syslog(LOG_ERR, "can't get login name for uid %d.\n",
(int) getuid());
#endif
fprintf(stderr, "Who are you?\n");
exit(2);
}
strncpy(myname, pw->pw_name, sizeof myname - 1);
myname[sizeof myname - 1] = '\0';
name = myname;
if (argc > 1) {
name = argv[1];
pw = getpwnam(name);
}
pass = get_line(stdin);
if (password_auth_ok(pw, pass)) {
#ifdef USE_SYSLOG
syslog(pw->pw_uid ? LOG_INFO : LOG_NOTICE,
"user `%s' entered correct password for `%.32s'.\n",
myname, name);
#endif
exit(0);
}
#ifdef USE_SYSLOG
/* be careful not to overrun the syslog buffer */
syslog((!pw || pw->pw_uid) ? LOG_NOTICE : LOG_WARNING,
"user `%s' entered incorrect password for `%.32s'.\n",
myname, name);
#endif
#ifdef FAIL_DELAY
sleep(FAIL_DELAY);
#endif
fprintf(stderr, "Wrong password.\n");
exit(1);
}
#if 0
/*
* You can use code similar to the following to run this program.
* Return values: >=0 - program exit status (use the <sys/wait.h>
* macros to get the exit code, it is shifted left by 8 bits),
* -1 - check errno.
*/
int
verify_password(const char *username, const char *password)
{
int pipe_fd[2];
int pid, wpid, status;
if (pipe(pipe_fd))
return -1;
if ((pid = fork()) == 0) {
char *arg[3];
char *env[1];
/* child */
close(pipe_fd[1]);
if (pipe_fd[0] != 0) {
if (dup2(pipe_fd[0], 0) != 0)
_exit(127);
close(pipe_fd[0]);
}
arg[0] = "/usr/bin/pwdauth";
arg[1] = username;
arg[2] = NULL;
env[0] = NULL;
execve(arg[0], arg, env);
_exit(127);
} else if (pid == -1) {
/* error */
close(pipe_fd[0]);
close(pipe_fd[1]);
return -1;
}
/* parent */
close(pipe_fd[0]);
write(pipe_fd[1], password, strlen(password));
write(pipe_fd[1], "\n", 1);
close(pipe_fd[1]);
while ((wpid = wait(&status)) != pid) {
if (wpid == -1)
return -1;
}
return status;
}
#endif

View File

@@ -0,0 +1,147 @@
Hello Marek,
I have created a diffile against the 980403 release that adds
functionality to newusers for automatic handling of users with only
anonomous ftp login (using the guestgroup feature in ftpaccess, which
means that the users home directory looks like '/home/user/./'). It also
adds a commandline argument to specify an initial directory structure
for such users, with a tarball normally containing the bin,lib,etc
directories used in the chrooted environment.
I am using it to automatically create chunks of users with only ftp
access for a webserver.
I have tried to follow your coding standards and I believe it is bug
free but.. well, who knows. :) It's not much code however.
I hope you find it useful. Do what you like with it, feel free to ask if
anything is unclear.
Best rgds,
Calle Karlsson
ckn@kash.se
diff -uNr shadow-980403.orig/src/newusers.c shadow-980403/src/newusers.c
--- shadow-980403.orig/src/newusers.c Fri Jan 30 00:22:43 1998
+++ shadow-980403/src/newusers.c Fri Apr 17 16:55:33 1998
@@ -76,11 +76,35 @@
static void
usage(void)
{
- fprintf(stderr, "Usage: %s [ input ]\n", Prog);
+ fprintf (stderr, "Usage: %s [-p prototype tarfile] [ input ]\n", Prog);
+ fprintf (stderr, "The prototype tarfile is only used for users\n");
+ fprintf (stderr, "marked as anonymous ftp users. It must be a full pathname.\n");
exit(1);
}
/*
+ * createuserdir - create a directory and chmod it
+ */
+
+static int
+createuserdir (char * dir, int uid, int gid, int line)
+{
+ if (mkdir (dir, 0777 & ~getdef_num("UMASK", 077))) {
+ fprintf (stderr, "%s: line %d: mkdir %s failed\n",
+ Prog, line, dir);
+ return -1;
+ }
+
+ if (chown (dir, uid, gid)) {
+ fprintf (stderr, "%s: line %d: chown %s failed\n",
+ Prog, line, dir);
+ return -1;
+ }
+
+ return 0;
+}
+
+/*
* add_group - create a new group or add a user to an existing group
*/
@@ -328,6 +352,8 @@
main(int argc, char **argv)
{
char buf[BUFSIZ];
+ char anonproto[BUFSIZ];
+ int flag;
char *fields[8];
int nfields;
char *cp;
@@ -340,12 +366,23 @@
Prog = Basename(argv[0]);
- if (argc > 1 && argv[1][0] == '-')
- usage ();
+ * anonproto = '\0';
+
+ while ((flag = getopt (argc, argv, "p:h")) != EOF) {
+ switch (flag) {
+ case 'p':
+ STRFCPY(anonproto, optarg);
+ break;
+ case 'h':
+ default:
+ usage ();
+ break;
+ }
+ }
- if (argc == 2) {
- if (! freopen (argv[1], "r", stdin)) {
- snprintf(buf, sizeof buf, "%s: %s", Prog, argv[1]);
+ if (optind < argc) {
+ if (! freopen (argv[optind], "r", stdin)) {
+ snprintf(buf, sizeof buf, "%s: %s", Prog, argv[optind]);
perror (buf);
exit (1);
}
@@ -499,15 +536,36 @@
if (fields[6][0])
newpw.pw_shell = fields[6];
- if (newpw.pw_dir[0] && access(newpw.pw_dir, F_OK)) {
- if (mkdir (newpw.pw_dir,
- 0777 & ~getdef_num("UMASK", 077)))
- fprintf (stderr, "%s: line %d: mkdir failed\n",
- Prog, line);
- else if (chown (newpw.pw_dir,
- newpw.pw_uid, newpw.pw_gid))
- fprintf (stderr, "%s: line %d: chown failed\n",
- Prog, line);
+ if (newpw.pw_dir[0]) {
+ char * userdir = strdup (newpw.pw_dir);
+ char * anonpart;
+ int rc;
+
+ if ((anonpart = strstr (userdir, "/./"))) {
+ * anonpart = '\0';
+ anonpart += 2;
+ }
+
+ if (access(userdir, F_OK))
+ rc = createuserdir (userdir, newpw.pw_uid, newpw.pw_gid, line);
+ else
+ rc = 0;
+
+ if (rc == 0 && anonpart) {
+ if (* anonproto) {
+ char cmdbuf [BUFSIZ];
+ snprintf(cmdbuf, sizeof cmdbuf,
+ "cd %s; tar xf %s",
+ userdir, anonproto);
+ system (cmdbuf);
+ }
+ if (strlen (anonpart) > 1) {
+ strcat (userdir, anonpart);
+ if (access (userdir, F_OK))
+ createuserdir (userdir, newpw.pw_uid, newpw.pw_gid, line);
+ }
+ }
+ free (userdir);
}
/*

BIN
contrib/udbachk.tgz Normal file

Binary file not shown.

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.

17
debian/README.source vendored Normal file
View File

@@ -0,0 +1,17 @@
This package uses quilt to patch the upstream source.
You can find some info on how to generate the patched source, add a new
modification, and remove an existing modification on:
/usr/share/doc/quilt/README.source
================================================================================
To package a new upstream release, you can use the Makefile:
svn://svn.debian.org/svn/pkg-shadow/debian/trunk/Makefile
================================================================================
A testsuite is also available. Instruction on how to run this testsuite
are available on:
svn://svn.debian.org/svn/pkg-shadow/debian/trunk/tests/README

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)

3667
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 @@
6

43
debian/control vendored Normal file
View File

@@ -0,0 +1,43 @@
Source: shadow
Section: admin
Priority: required
Maintainer: Shadow package maintainers <pkg-shadow-devel@lists.alioth.debian.org>
Standards-Version: 3.9.5
Uploaders: Christian Perrier <bubulle@debian.org>, Nicolas FRANCOIS (Nekral) <nicolas.francois@centraliens.net>
Build-Depends: dh-autoreconf, gettext, libpam0g-dev, debhelper (>= 6.0.7~), quilt, dpkg-dev (>= 1.13.5), xsltproc, docbook-xsl, docbook-xml, libxml2-utils, cdbs, libselinux1-dev [linux-any], libsemanage1-dev [linux-any], gnome-doc-utils (>= 0.4.3), bison, libaudit-dev [linux-any]
Vcs-Git: git://anonscm.debian.org/git/pkg-shadow/shadow.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-shadow/shadow.git;a=summary
Homepage: http://pkg-shadow.alioth.debian.org/
Package: passwd
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libpam-modules, debianutils (>= 2.15.2)
Replaces: manpages-tr (<<1.0.5), manpages-zh (<<1.5.1-1)
Multi-Arch: foreign
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
Pre-Depends: ${shlibs:Depends}, ${misc:Depends}, libpam-runtime, libpam-modules (>= 1.1.8-1)
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)
Breaks: coreutils (<< 8.21~) [hurd-any], passwd (<< 1:4.1.5.1-2~) [hurd-any], hurd (<< 20140206~) [hurd-any]
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]
Essential: yes
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
Priority: optional
Depends: ${shlibs:Depends}, ${misc:Depends}
Architecture: any
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

25
debian/login.install vendored Normal file
View File

@@ -0,0 +1,25 @@
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/*/man1/su.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/man1/su.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
bin/su

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

111
debian/login.pam vendored Normal file
View File

@@ -0,0 +1,111 @@
#
# 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 out 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
# 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 restrainst 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 succesful login
# (Replaces the `LASTLOG_ENAB' option from login.defs)
session optional pam_lastlog.so
# Prints the message of the day upon succesful login.
# (Replaces the `MOTD_FILE' option in login.defs)
session optional pam_exec.so type=open_session stdout /bin/uname -snrvm
session optional pam_motd.so
# Prints the status of the user's mailbox upon succesful 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
# Sets the loginuid process attribute
session required pam_loginuid.so
# Standard Un*x account and session
@include common-account
@include common-session
@include common-password
# 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.)

44
debian/login.postinst vendored Normal file
View File

@@ -0,0 +1,44 @@
#!/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" ] && [ "$2" = "" ]
then
# Install faillog during initial installs only
if [ ! -f /var/log/faillog ] ; then
touch /var/log/faillog
chown root:root /var/log/faillog
chmod 644 /var/log/faillog
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

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

78
debian/passwd.install vendored Normal file
View File

@@ -0,0 +1,78 @@
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/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/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.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,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: git/src/login.c
===================================================================
--- git.orig/src/login.c
+++ git/src/login.c
@@ -831,6 +831,24 @@
(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: git/lib/getdef.c
===================================================================
--- git.orig/lib/getdef.c
+++ git/lib/getdef.c
@@ -62,6 +62,7 @@
{"ERASECHAR", NULL},
{"FAIL_DELAY", NULL},
{"FAKE_SHELL", NULL},
+ {"FTMP_FILE", NULL},
{"GID_MAX", NULL},
{"GID_MIN", NULL},
{"HUSHLOGIN_FILE", NULL},
@@ -109,7 +110,6 @@
{"ENVIRON_FILE", NULL},
{"ENV_TZ", NULL},
{"FAILLOG_ENAB", NULL},
- {"FTMP_FILE", NULL},
{"ISSUE_FILE", NULL},
{"LASTLOG_ENAB", NULL},
{"LOGIN_STRING", NULL},

93
debian/patches/1000_configure_userns vendored Normal file
View File

@@ -0,0 +1,93 @@
=== modified file 'etc/login.defs'
Index: git/etc/login.defs
===================================================================
--- git.orig/etc/login.defs
+++ git/etc/login.defs
@@ -229,7 +229,7 @@
# 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 @@
# 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
Index: git/src/newusers.c
===================================================================
--- git.orig/src/newusers.c
+++ git/src/newusers.c
@@ -988,8 +988,8 @@
is_shadow_grp = sgr_file_present ();
#endif
#ifdef ENABLE_SUBIDS
- is_sub_uid = sub_uid_file_present ();
- is_sub_gid = sub_gid_file_present ();
+ is_sub_uid = sub_uid_file_present () && !rflg;
+ is_sub_gid = sub_gid_file_present () && !rflg;
#endif /* ENABLE_SUBIDS */
open_files ();
Index: git/src/useradd.c
===================================================================
--- git.orig/src/useradd.c
+++ git/src/useradd.c
@@ -1994,6 +1994,10 @@
#endif /* USE_PAM */
#endif /* ACCT_TOOLS_SETUID */
+ /* Needed for userns check */
+ uid_t uid_min = (uid_t) getdef_ulong ("UID_MIN", 1000UL);
+ uid_t uid_max = (uid_t) getdef_ulong ("UID_MAX", 60000UL);
+
/*
* Get my name so that I can use it to report errors.
*/
@@ -2023,8 +2027,10 @@
is_shadow_grp = sgr_file_present ();
#endif
#ifdef ENABLE_SUBIDS
- is_sub_uid = sub_uid_file_present ();
- is_sub_gid = sub_gid_file_present ();
+ is_sub_uid = sub_uid_file_present () && !rflg &&
+ (!user_id || (user_id <= uid_max && user_id >= uid_min));
+ is_sub_gid = sub_gid_file_present () && !rflg &&
+ (!user_id || (user_id <= uid_max && user_id >= uid_min));
#endif /* ENABLE_SUBIDS */
get_defaults ();
Index: git/libmisc/find_new_sub_uids.c
===================================================================
--- git.orig/libmisc/find_new_sub_uids.c
+++ git/libmisc/find_new_sub_uids.c
@@ -58,7 +58,7 @@
min = getdef_ulong ("SUB_UID_MIN", 100000UL);
max = getdef_ulong ("SUB_UID_MAX", 600100000UL);
- count = getdef_ulong ("SUB_UID_COUNT", 10000);
+ count = getdef_ulong ("SUB_UID_COUNT", 65536);
if (min > max || count >= max || (min + count - 1) > max) {
(void) fprintf (stderr,
Index: git/libmisc/find_new_sub_gids.c
===================================================================
--- git.orig/libmisc/find_new_sub_gids.c
+++ git/libmisc/find_new_sub_gids.c
@@ -58,7 +58,7 @@
min = getdef_ulong ("SUB_GID_MIN", 100000UL);
max = getdef_ulong ("SUB_GID_MAX", 600100000UL);
- count = getdef_ulong ("SUB_GID_COUNT", 10000);
+ count = getdef_ulong ("SUB_GID_COUNT", 65536);
if (min > max || count >= max || (min + count - 1) > max) {
(void) fprintf (stderr,

2687
debian/patches/1010_vietnamese_translation vendored Normal file

File diff suppressed because it is too large Load Diff

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

@@ -0,0 +1,282 @@
#! /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@
Index: git/src/cppw.c
===================================================================
--- /dev/null
+++ git/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;
+}
+
Index: git/src/Makefile.am
===================================================================
--- git.orig/src/Makefile.am
+++ git/src/Makefile.am
@@ -29,6 +29,7 @@
ubin_PROGRAMS += newgidmap newuidmap
endif
usbin_PROGRAMS = \
+ cppw \
chgpasswd \
chpasswd \
groupadd \
@@ -87,6 +88,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)
Index: git/po/POTFILES.in
===================================================================
--- git.orig/po/POTFILES.in
+++ git/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) ();
}

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

@@ -0,0 +1,96 @@
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: git/src/login.c
===================================================================
--- git.orig/src/login.c
+++ git/src/login.c
@@ -131,9 +131,9 @@
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
@@ -791,6 +791,9 @@
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);
@@ -808,6 +811,14 @@
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;
@@ -831,6 +842,10 @@
(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 =
@@ -1285,6 +1300,7 @@
*/
#ifndef USE_PAM
motd (); /* print the message of the day */
+#endif
if ( getdef_bool ("FAILLOG_ENAB")
&& (0 != faillog.fail_cnt)) {
failprint (&faillog);
@@ -1297,6 +1313,7 @@
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: git/lib/getdef.c
===================================================================
--- git.orig/lib/getdef.c
+++ git/lib/getdef.c
@@ -61,6 +61,7 @@
{"ENV_SUPATH", NULL},
{"ERASECHAR", NULL},
{"FAIL_DELAY", NULL},
+ {"FAILLOG_ENAB", NULL},
{"FAKE_SHELL", NULL},
{"FTMP_FILE", NULL},
{"GID_MAX", NULL},
@@ -109,7 +110,6 @@
{"ENV_HZ", NULL},
{"ENVIRON_FILE", NULL},
{"ENV_TZ", NULL},
- {"FAILLOG_ENAB", NULL},
{"ISSUE_FILE", NULL},
{"LASTLOG_ENAB", NULL},
{"LOGIN_STRING", NULL},

View File

@@ -0,0 +1,109 @@
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: git/src/login.c
===================================================================
--- git.orig/src/login.c
+++ git/src/login.c
@@ -525,7 +525,6 @@
#if defined(HAVE_STRFTIME) && !defined(USE_PAM)
char ptime[80];
#endif
- unsigned int delay;
unsigned int retries;
bool subroot = false;
#ifndef USE_PAM
@@ -545,6 +544,7 @@
pid_t child;
char *pam_user = NULL;
#else
+ unsigned int delay;
struct spwd *spwd = NULL;
#endif
/*
@@ -705,7 +705,6 @@
}
environ = newenvp; /* make new environment active */
- delay = getdef_unum ("FAIL_DELAY", 1);
retries = getdef_unum ("LOGIN_RETRIES", RETRIES);
#ifdef USE_PAM
@@ -721,8 +720,7 @@
/*
* 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)
@@ -731,10 +729,6 @@
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;
@@ -775,12 +769,6 @@
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);
@@ -1103,14 +1091,17 @@
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: git/lib/getdef.c
===================================================================
--- git.orig/lib/getdef.c
+++ git/lib/getdef.c
@@ -60,7 +60,6 @@
{"ENV_PATH", NULL},
{"ENV_SUPATH", NULL},
{"ERASECHAR", NULL},
- {"FAIL_DELAY", NULL},
{"FAILLOG_ENAB", NULL},
{"FAKE_SHELL", NULL},
{"FTMP_FILE", NULL},
@@ -110,6 +109,7 @@
{"ENV_HZ", NULL},
{"ENVIRON_FILE", NULL},
{"ENV_TZ", NULL},
+ {"FAIL_DELAY", NULL},
{"ISSUE_FILE", NULL},
{"LASTLOG_ENAB", NULL},
{"LOGIN_STRING", NULL},

View File

@@ -0,0 +1,39 @@
Goal: save the [g]shadow files with the 'shadow' group and mode 0440
Fixes: #166793
Index: git/lib/commonio.c
===================================================================
--- git.orig/lib/commonio.c
+++ git/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>
@@ -966,13 +967,20 @@
goto fail;
}
} else {
+ struct group *grp;
/*
* Default permissions for new [g]shadow files.
* (passwd and group always exist...)
*/
- sb.st_mode = 0400;
+ sb.st_mode = 0440;
sb.st_uid = 0;
- sb.st_gid = 0;
+ /*
+ * Try to retrieve the shadow's GID, and fall back to 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);

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>

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

@@ -0,0 +1,20 @@
Index: git/src/Makefile.am
===================================================================
--- git.orig/src/Makefile.am
+++ git/src/Makefile.am
@@ -23,7 +23,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
@@ -41,6 +40,7 @@
grpunconv \
logoutd \
newusers \
+ nologin \
pwck \
pwconv \
pwunconv \

View File

@@ -0,0 +1,50 @@
Goal: Concatenate the non-su arguments and provide them to the shell with
the -c option
Fixes: #317264
see also #276419
Status wrt upstream: This is a Debian specific patch.
Note: the fix of the man page is still missing.
(to be taken from the trunk)
Index: git/src/su.c
===================================================================
--- git.orig/src/su.c
+++ git/src/su.c
@@ -1152,6 +1152,35 @@
argv[0] = "-c";
argv[1] = command;
}
+ /* On Debian, the arguments are concatenated and the
+ * resulting string is always given to the shell with its
+ * -c option.
+ */
+ {
+ char **parg;
+ unsigned int cmd_len = 0;
+ char *cmd = NULL;
+ if (strcmp(argv[0], "-c") != 0) {
+ argv--;
+ argv[0] = "-c";
+ }
+ /* Now argv[0] is always -c, and other arguments
+ * can be concatenated
+ */
+ cmd_len = 1; /* finale '\0' */
+ for (parg = &argv[1]; *parg; parg++) {
+ cmd_len += strlen (*parg) + 1;
+ }
+ cmd = (char *) xmalloc (sizeof (char) * cmd_len);
+ cmd[0] = '\0';
+ for (parg = &argv[1]; *parg; parg++) {
+ strcat (cmd, " ");
+ strcat (cmd, *parg);
+ }
+ cmd[cmd_len - 1] = '\0';
+ argv[1] = &cmd[1]; /* do not take first space */
+ argv[2] = NULL;
+ }
/*
* Use the shell and create an argv
* with the rest of the command line included.

View File

@@ -0,0 +1,52 @@
Goal: Do not concatenate the additional arguments, and support an
environment variable to revert to the old Debian's su behavior.
This patch needs the su_arguments_are_concatenated patch.
This patch, and su_arguments_are_concatenated should be dropped after
Etch.
Status wrt upstream: This patch is Debian specific.
Index: git/src/su.c
===================================================================
--- git.orig/src/su.c
+++ git/src/su.c
@@ -104,6 +104,19 @@
/* If nonzero, change some environment vars to indicate the user su'd to. */
static bool change_environment = true;
+/*
+ * If nonzero, keep the old Debian behavior:
+ * * concatenate all the arguments and provide them to the -c option of
+ * the shell
+ * * If there are some additional arguments, but no -c, add a -c
+ * argument anyway
+ * Drawbacks:
+ * * you can't provide options to the shell (other than -c)
+ * * you can't rely on the argument count
+ * See http://bugs.debian.org/276419
+ */
+static int old_debian_behavior;
+
#ifdef USE_PAM
static pam_handle_t *pamh = NULL;
static int caught = 0;
@@ -949,6 +962,8 @@
int ret;
#endif /* USE_PAM */
+ old_debian_behavior = (getenv("SU_NO_SHELL_ARGS") != NULL);
+
(void) setlocale (LC_ALL, "");
(void) bindtextdomain (PACKAGE, LOCALEDIR);
(void) textdomain (PACKAGE);
@@ -1156,7 +1171,7 @@
* resulting string is always given to the shell with its
* -c option.
*/
- {
+ if (old_debian_behavior) {
char **parg;
unsigned int cmd_len = 0;
char *cmd = NULL;

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

@@ -0,0 +1,47 @@
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
Index: git/man/useradd.8.xml
===================================================================
--- git.orig/man/useradd.8.xml
+++ git/man/useradd.8.xml
@@ -329,6 +329,11 @@
databases are resetted 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>
Index: git/src/useradd.c
===================================================================
--- git.orig/src/useradd.c
+++ git/src/useradd.c
@@ -1056,9 +1056,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) {
@@ -1181,6 +1181,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 */

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

@@ -0,0 +1,71 @@
Small intro to the system for numbering the patches here...
-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 1xx series are l10n patches to upstream 4.0.18.1. As upstream has
adopted Debian translations, it is very likely that these patches
will become useless when we will have synced with upstream
-The 2xx series are patches for manual pages translations to upstream
4.0.18.1.
-The 3xx series are patches which have been temporarily applied to
Debian's shadow while we *know* they have been applied upstream as well
These patches should NOT be kept when we will sync with upstream
-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).
Short HOWTO for quilt
=====================
The quilt system can be assimilated to a Pile Of Patches management system.
Patches live in debian/patches, the working directory is "."
The basic commands are (abbreviation accepted):
quilt push (asks to apply the next patch in the pile)
quilt pop (removes the current patch and go up in the pile)
quilt refresh (take the current changes in tree onto the patch)
When a file is changed by a patch, quilt saves it somewhere under .pc on
application. This is how it can refresh it afterward (comparing the version
in .pc and the one you currently have in your working dir).
There are three common pitfalls with quilt:
- doing "quilt pop" without doing "quilt refresh". The version of current
dir is replaced with the version of the .pc dir. Your changes are lost.
Quilt wont let you do so, but you can force it with '-f' if you're fool.
- editing a file with is not in the patch yet. Quilt didn't do any previous
backup.
Use "quilt add" to add files to patches.
Set $EDITOR and use "quilt edit" to edit a file, and add it onto the
patch if needed.
- If you update your working directory, patches may not revert cleanly.
It is thus recommended to use "quilt pop -a" before updating with
"svn up".
If you forget (and run into trouble), you may want to remove the whole
shadow-?.?.? directory. If you use the makefile which is in the upper
directory (trunk/), shadow-?.?.?/debian/patches is a link to
debian/patches, so this dirctory does not contain any valuable info.
The documentation is quite well done, I think. "quilt -h" will list you the
commands. "quilt <cmd> -h" will give you some hints about it. "man quilt" is
a reference documentation. /usr/share/doc/quilt/quilt.pdf.gz is a complete
manual, with tutorial.

36
debian/patches/series vendored Normal file
View File

@@ -0,0 +1,36 @@
# 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
501_commonio_group_shadow
463_login_delay_obeys_to_PAM
523_su_arguments_are_concatenated
523_su_arguments_are_no_more_concatenated_by_default
508_nologin_in_usr_sbin
505_useradd_recommend_adduser
#userns/01_userns_doc
#userns/02_userns_doc_login.defs
#userns/03_userns_implement_commonio_append
#userns/04_userns_add_backend_support
#userns/05_userns_implemend_find_new_sub_xids
#userns/06_userns_userdel
#userns/07_userns_useradd
#userns/08_userns_detect_busy_subids
#userns/09_userns_usermod
#userns/10_userns_newusers
#userns/11_userns_newxidmap
#userns/12_userns_selinuxlibs
#userns/13_subordinate_parse_static_buf
#userns/14_fix_getopt
#userns/manpagetypo
#userns/16_add-argument-sanity-checking.patch
1000_configure_userns
1010_vietnamese_translation

334
debian/patches/userns/01_userns_doc vendored Normal file
View File

@@ -0,0 +1,334 @@
From ebiederm@xmission.com Tue Jan 22 09:14:18 2013
Return-Path: <ebiederm@xmission.com>
X-Original-To: serge@hallyn.com
Delivered-To: serge@hallyn.com
Received: by mail.hallyn.com (Postfix, from userid 5001)
id DAC33C80F4; Tue, 22 Jan 2013 09:14:18 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail
X-Spam-Level:
X-Spam-Status: No, score=0.1 required=8.0 tests=BAD_ENC_HEADER,BAYES_00
autolearn=no version=3.3.1
Received: from out02.mta.xmission.com (out02.mta.xmission.com [166.70.13.232])
(using TLSv1 with cipher AES256-SHA (256/256 bits))
(No client certificate requested)
by mail.hallyn.com (Postfix) with ESMTPS id 274ACC80D1
for <serge@hallyn.com>; Tue, 22 Jan 2013 09:14:14 +0000 (UTC)
Received: from out01.mta.xmission.com ([166.70.13.231])
by out02.mta.xmission.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.76)
(envelope-from <ebiederm@xmission.com>)
id 1TxZuB-0006Xm-N5; Tue, 22 Jan 2013 02:12:31 -0700
Received: from in02.mta.xmission.com ([166.70.13.52])
by out01.mta.xmission.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.76)
(envelope-from <ebiederm@xmission.com>)
id 1TxZuA-0005NR-BQ; Tue, 22 Jan 2013 02:12:30 -0700
Received: from c-98-207-153-68.hsd1.ca.comcast.net ([98.207.153.68] helo=eric-ThinkPad-X220.xmission.com)
by in02.mta.xmission.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
(Exim 4.76)
(envelope-from <ebiederm@xmission.com>)
id 1TxZu7-0004Pj-Ec; Tue, 22 Jan 2013 02:12:30 -0700
From: ebiederm@xmission.com (Eric W. Biederman)
To: Nicolas =?utf-8?Q?Fran=C3=A7ois?= <nicolas.francois@centraliens.net>
Cc: <Pkg-shadow-devel@lists.alioth.debian.org>, Linux Containers <containers@lists.linux-foundation.org>, "Michael Kerrisk \(man-pages\)" <mtk.manpages@gmail.com>, "Serge E. Hallyn" <serge@hallyn.com>
References: <87d2wxshu0.fsf@xmission.com>
Date: Tue, 22 Jan 2013 01:12:23 -0800
In-Reply-To: <87d2wxshu0.fsf@xmission.com> (Eric W. Biederman's message of
"Tue, 22 Jan 2013 01:11:19 -0800")
Message-ID: <877gn5shs8.fsf@xmission.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-XM-AID: U2FsdGVkX18YouPWtKNAX3LovSW2+p/ONbuCHMFEQpM=
X-SA-Exim-Connect-IP: 98.207.153.68
X-SA-Exim-Mail-From: ebiederm@xmission.com
Subject: [PATCH 01/11] Documentation for /etc/subuid and /etc/subgid
X-SA-Exim-Version: 4.2.1 (built Wed, 14 Nov 2012 14:26:46 -0700)
X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com)
X-UID: 2071
Status: RO
Content-Length: 9835
Lines: 286
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---
man/Makefile.am | 4 ++
man/subgid.5.xml | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
man/subuid.5.xml | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 244 insertions(+), 0 deletions(-)
create mode 100644 man/subgid.5.xml
create mode 100644 man/subuid.5.xml
Index: shadow/man/Makefile.am
===================================================================
--- shadow.orig/man/Makefile.am 2013-02-01 15:26:14.428082026 -0600
+++ shadow/man/Makefile.am 2013-02-01 15:27:37.000000000 -0600
@@ -43,6 +43,8 @@
man5/shadow.5 \
man1/su.1 \
man5/suauth.5 \
+ man5/subgid.5 \
+ man5/subuid.5 \
man8/useradd.8 \
man8/userdel.8 \
man8/usermod.8 \
@@ -94,6 +96,8 @@
sg.1.xml \
su.1.xml \
suauth.5.xml \
+ subgid.5.xml \
+ subuid.5.xml \
useradd.8.xml \
userdel.8.xml \
usermod.8.xml \
Index: shadow/man/subgid.5.xml
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ shadow/man/subgid.5.xml 2013-02-01 15:26:14.424082026 -0600
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2013 Eric W. Biederman
+ 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.
+-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!-- SHADOW-CONFIG-HERE -->
+]>
+<refentry id='subgid.5'>
+ <refmeta>
+ <refentrytitle>subgid</refentrytitle>
+ <manvolnum>5</manvolnum>
+ <refmiscinfo class="sectdesc">File Formats and Conversions</refmiscinfo>
+ <refmiscinfo class="source">shadow-utils</refmiscinfo>
+ <refmiscinfo class="version">&SHADOW_UTILS_VERSION;</refmiscinfo>
+ </refmeta>
+ <refnamediv id='name'>
+ <refname>subgid</refname>
+ <refpurpose>the subordinate gid file</refpurpose>
+ </refnamediv>
+
+ <refsect1 id='description'>
+ <title>DESCRIPTION</title>
+ <para>
+ Each line in <filename>/etc/subgid</filename> contains
+ a user id and a range of suboridinate user ids that user
+ is allowed to use.
+
+ This is specified with three fields delimited by colons
+ (<quote>:</quote>).
+ These fields are:
+ </para>
+ <itemizedlist mark='bullet'>
+ <listitem>
+ <para>login name</para>
+ </listitem>
+ <listitem>
+ <para>numerical subordinate user ID</para>
+ </listitem>
+ <listitem>
+ <para>numerical subordinate user ID count</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ This file specifies the group IDs to be that each user may use
+ with the <command>newgidmap</command> command that ordinary users can use to
+ configure gid mapping in a user namespace.
+ </para>
+
+ <para>
+ Multiple ranges may be specified per user ID.
+ </para>
+
+ </refsect1>
+
+ <refsect1 id='files'>
+ <title>FILES</title>
+ <variablelist>
+ <varlistentry>
+ <term><filename>/etc/subgid</filename></term>
+ <listitem>
+ <para>Per user subordinate group IDs.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>/etc/subgid-</filename></term>
+ <listitem>
+ <para>Backup file for /etc/subgid.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1 id='see_also'>
+ <title>SEE ALSO</title>
+ <para>
+ <citerefentry>
+ <refentrytitle>subuid</refentrytitle><manvolnum>5</manvolnum>
+ </citerefentry>,
+ <citerefentry>
+ <refentrytitle>logindefs</refentrytitle><manvolnum>5</manvolnum>
+ </citerefentry>,
+ <citerefentry>
+ <refentrytitle>newuidmap</refentrytitle><manvolnum>1</manvolnum>
+ </citerefentry>,
+ <citerefentry>
+ <refentrytitle>newgidmap</refentrytitle><manvolnum>1</manvolnum>
+ </citerefentry>,
+ <citerefentry>
+ <refentrytitle>usermod</refentrytitle><manvolnum>8</manvolnum>
+ </citerefentry>,
+ </para>
+ </refsect1>
+</refentry>
Index: shadow/man/subuid.5.xml
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ shadow/man/subuid.5.xml 2013-02-01 15:26:14.424082026 -0600
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2013 Eric W. Biederman
+ 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.
+-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!-- SHADOW-CONFIG-HERE -->
+]>
+<refentry id='subuid.5'>
+ <refmeta>
+ <refentrytitle>subuid</refentrytitle>
+ <manvolnum>5</manvolnum>
+ <refmiscinfo class="sectdesc">File Formats and Conversions</refmiscinfo>
+ <refmiscinfo class="source">shadow-utils</refmiscinfo>
+ <refmiscinfo class="version">&SHADOW_UTILS_VERSION;</refmiscinfo>
+ </refmeta>
+ <refnamediv id='name'>
+ <refname>subuid</refname>
+ <refpurpose>the subordinate uid file</refpurpose>
+ </refnamediv>
+
+ <refsect1 id='description'>
+ <title>DESCRIPTION</title>
+ <para>
+ Each line in <filename>/etc/subuid</filename> contains
+ a user id and a range of suboridinate user ids that user
+ is allowed to use.
+
+ This is specified with three fields delimited by colons
+ (<quote>:</quote>).
+ These fields are:
+ </para>
+ <itemizedlist mark='bullet'>
+ <listitem>
+ <para>login name</para>
+ </listitem>
+ <listitem>
+ <para>numerical subordinate user ID</para>
+ </listitem>
+ <listitem>
+ <para>numerical subordinate user ID count</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ This file specifies the user IDs to be that each user may use
+ with the <command>newuidmap</command> command that ordinary users can use to
+ configure uid mapping in a user namespace.
+ </para>
+
+ <para>
+ Multiple ranges may be specified per user ID.
+ </para>
+
+ </refsect1>
+
+ <refsect1 id='files'>
+ <title>FILES</title>
+ <variablelist>
+ <varlistentry>
+ <term><filename>/etc/subuid</filename></term>
+ <listitem>
+ <para>Per user subordinate user IDs.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>/etc/subuid-</filename></term>
+ <listitem>
+ <para>Backup file for /etc/subuid.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1 id='see_also'>
+ <title>SEE ALSO</title>
+ <para>
+ <citerefentry>
+ <refentrytitle>subgid</refentrytitle><manvolnum>5</manvolnum>
+ </citerefentry>,
+ <citerefentry>
+ <refentrytitle>logindefs</refentrytitle><manvolnum>5</manvolnum>
+ </citerefentry>,
+ <citerefentry>
+ <refentrytitle>newuidmap</refentrytitle><manvolnum>1</manvolnum>
+ </citerefentry>,
+ <citerefentry>
+ <refentrytitle>newgidmap</refentrytitle><manvolnum>1</manvolnum>
+ </citerefentry>,
+ <citerefentry>
+ <refentrytitle>usermod</refentrytitle><manvolnum>8</manvolnum>
+ </citerefentry>,
+ </para>
+ </refsect1>
+</refentry>

View File

@@ -0,0 +1,218 @@
From ebiederm@xmission.com Tue Jan 22 09:14:55 2013
Return-Path: <ebiederm@xmission.com>
X-Original-To: serge@hallyn.com
Delivered-To: serge@hallyn.com
Received: by mail.hallyn.com (Postfix, from userid 5001)
id 140DBC80F4; Tue, 22 Jan 2013 09:14:55 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail
X-Spam-Level:
X-Spam-Status: No, score=0.1 required=8.0 tests=BAD_ENC_HEADER,BAYES_00
autolearn=no version=3.3.1
Received: from out02.mta.xmission.com (out02.mta.xmission.com [166.70.13.232])
(using TLSv1 with cipher AES256-SHA (256/256 bits))
(No client certificate requested)
by mail.hallyn.com (Postfix) with ESMTPS id 5D815C80D1
for <serge@hallyn.com>; Tue, 22 Jan 2013 09:14:50 +0000 (UTC)
Received: from out03.mta.xmission.com ([166.70.13.233])
by out02.mta.xmission.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.76)
(envelope-from <ebiederm@xmission.com>)
id 1TxZum-0006il-0f; Tue, 22 Jan 2013 02:13:08 -0700
Received: from in02.mta.xmission.com ([166.70.13.52])
by out03.mta.xmission.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.76)
(envelope-from <ebiederm@xmission.com>)
id 1TxZul-0004GF-Id; Tue, 22 Jan 2013 02:13:07 -0700
Received: from c-98-207-153-68.hsd1.ca.comcast.net ([98.207.153.68] helo=eric-ThinkPad-X220.xmission.com)
by in02.mta.xmission.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
(Exim 4.76)
(envelope-from <ebiederm@xmission.com>)
id 1TxZuf-0004T0-MS; Tue, 22 Jan 2013 02:13:07 -0700
From: ebiederm@xmission.com (Eric W. Biederman)
To: Nicolas =?utf-8?Q?Fran=C3=A7ois?= <nicolas.francois@centraliens.net>
Cc: <Pkg-shadow-devel@lists.alioth.debian.org>, Linux Containers <containers@lists.linux-foundation.org>, "Michael Kerrisk \(man-pages\)" <mtk.manpages@gmail.com>, "Serge E. Hallyn" <serge@hallyn.com>
References: <87d2wxshu0.fsf@xmission.com>
Date: Tue, 22 Jan 2013 01:12:58 -0800
In-Reply-To: <87d2wxshu0.fsf@xmission.com> (Eric W. Biederman's message of
"Tue, 22 Jan 2013 01:11:19 -0800")
Message-ID: <871uddshr9.fsf@xmission.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-XM-AID: U2FsdGVkX19iYyOCEx6dl2v1Ya/KIGpixG5+3MVA1bY=
X-SA-Exim-Connect-IP: 98.207.153.68
X-SA-Exim-Mail-From: ebiederm@xmission.com
Subject: [PATCH 02/11] login.defs.5: Document the new variables in login.defs
X-SA-Exim-Version: 4.2.1 (built Wed, 14 Nov 2012 14:26:46 -0700)
X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com)
X-UID: 2072
Status: RO
Content-Length: 7615
Lines: 170
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---
man/Makefile.am | 2 +
man/login.defs.5.xml | 8 ++++++
man/login.defs.d/SUB_GID_COUNT.xml | 46 ++++++++++++++++++++++++++++++++++++
man/login.defs.d/SUB_UID_COUNT.xml | 46 ++++++++++++++++++++++++++++++++++++
4 files changed, 102 insertions(+), 0 deletions(-)
create mode 100644 man/login.defs.d/SUB_GID_COUNT.xml
create mode 100644 man/login.defs.d/SUB_UID_COUNT.xml
Index: shadow/man/Makefile.am
===================================================================
--- shadow.orig/man/Makefile.am 2013-02-01 15:27:51.048080390 -0600
+++ shadow/man/Makefile.am 2013-02-01 15:27:51.040080390 -0600
@@ -163,6 +163,8 @@
USERDEL_CMD.xml \
USERGROUPS_ENAB.xml \
USE_TCB.xml \
+ SUB_GID_COUNT.xml \
+ SUB_UID_COUNT.xml \
SYS_GID_MAX.xml \
SYS_UID_MAX.xml
Index: shadow/man/login.defs.5.xml
===================================================================
--- shadow.orig/man/login.defs.5.xml 2013-02-01 15:27:51.048080390 -0600
+++ shadow/man/login.defs.5.xml 2013-02-01 15:27:51.044080390 -0600
@@ -78,6 +78,8 @@
<!ENTITY SULOG_FILE SYSTEM "login.defs.d/SULOG_FILE.xml">
<!ENTITY SU_NAME SYSTEM "login.defs.d/SU_NAME.xml">
<!ENTITY SU_WHEEL_ONLY SYSTEM "login.defs.d/SU_WHEEL_ONLY.xml">
+<!ENTITY SUB_GID_COUNT SYSTEM "login.defs.d/SUB_GID_COUNT.xml">
+<!ENTITY SUB_UID_COUNT SYSTEM "login.defs.d/SUB_UID_COUNT.xml">
<!ENTITY SYS_GID_MAX SYSTEM "login.defs.d/SYS_GID_MAX.xml">
<!ENTITY SYSLOG_SG_ENAB SYSTEM "login.defs.d/SYSLOG_SG_ENAB.xml">
<!ENTITY SYSLOG_SU_ENAB SYSTEM "login.defs.d/SYSLOG_SU_ENAB.xml">
@@ -216,6 +218,8 @@
&SULOG_FILE;
&SU_NAME;
&SU_WHEEL_ONLY;
+ &SUB_GID_COUNT; <!-- documents also SUB_GID_MIN SUB_GID_MAX -->
+ &SUB_UID_COUNT; <!-- documents also SUB_UID_MIN SUB_UID_MAX -->
&SYS_GID_MAX; <!-- documents also SYS_GID_MIN -->
&SYS_UID_MAX; <!-- documents also SYS_UID_MIN -->
&SYSLOG_SG_ENAB;
@@ -393,6 +397,8 @@
PASS_MAX_DAYS PASS_MIN_DAYS PASS_WARN_AGE
<phrase condition="sha_crypt">SHA_CRYPT_MAX_ROUNDS
SHA_CRYPT_MIN_ROUNDS</phrase>
+ SUB_GID_COUNT SUB_GID_MAX SUB_GID_MIN
+ SUB_UID_COUNT SUB_UID_MAX SUB_UID_MIN
SYS_GID_MAX SYS_GID_MIN SYS_UID_MAX SYS_UID_MIN UID_MAX UID_MIN
UMASK
</para>
@@ -470,6 +476,8 @@
GID_MAX GID_MIN
MAIL_DIR MAX_MEMBERS_PER_GROUP
PASS_MAX_DAYS PASS_MIN_DAYS PASS_WARN_AGE
+ SUB_GID_COUNT SUB_GID_MAX SUB_GID_MIN
+ SUB_UID_COUNT SUB_UID_MAX SUB_UID_MIN
SYS_GID_MAX SYS_GID_MIN SYS_UID_MAX SYS_UID_MIN UID_MAX UID_MIN
UMASK
<phrase condition="tcb">TCB_AUTH_GROUP TCB_SYMLINK USE_TCB</phrase>
Index: shadow/man/login.defs.d/SUB_GID_COUNT.xml
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ shadow/man/login.defs.d/SUB_GID_COUNT.xml 2013-02-01 15:27:51.044080390 -0600
@@ -0,0 +1,46 @@
+<!--
+ Copyright (c) 2013, Eric W. Biederman
+ 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.
+-->
+<varlistentry>
+ <term><option>SUB_GID_MIN</option> (number)</term>
+ <term><option>SUB_GID_MAX</option> (number)</term>
+ <term><option>SUB_GID_COUNT</option> (number)</term>
+ <listitem>
+ <para>
+ The commands <command>useradd</command> and <command>newusers</command>
+ allocate <option>SUB_GID_COUNT</option> unused group IDs from the range
+ <option>SUB_GID_MIN</option> to <option>SUB_GID_MAX</option> for each
+ new user.
+ </para>
+ <para>
+ The default values for <option>SUB_GID_MAN</option>,
+ <option>SUB_GID_MIN</option>, <option>SUB_GID_COUNT</option>
+ are respectively 100000, 600100000 and 10000.
+ </para>
+ </listitem>
+</varlistentry>
Index: shadow/man/login.defs.d/SUB_UID_COUNT.xml
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ shadow/man/login.defs.d/SUB_UID_COUNT.xml 2013-02-01 15:27:51.044080390 -0600
@@ -0,0 +1,46 @@
+<!--
+ Copyright (c) 2013, Eric W. Biederman
+ 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.
+-->
+<varlistentry>
+ <term><option>SUB_UID_MIN</option> (number)</term>
+ <term><option>SUB_UID_MAX</option> (number)</term>
+ <term><option>SUB_UID_COUNT</option> (number)</term>
+ <listitem>
+ <para>
+ The commands <command>useradd</command> and <command>newusers</command>
+ allocate <option>SUB_UID_COUNT</option> unused user IDs from the range
+ <option>SUB_UID_MIN</option> to <option>SUB_UID_MAX</option> for each
+ new user.
+ </para>
+ <para>
+ The default values for <option>SUB_GID_MAN</option>,
+ <option>SUB_GID_MIN</option>, <option>SUB_GID_COUNT</option>
+ are respectively 100000, 600100000 and 10000.
+ </para>
+ </listitem>
+</varlistentry>

View File

@@ -0,0 +1,110 @@
From ebiederm@xmission.com Tue Jan 22 09:15:19 2013
Return-Path: <ebiederm@xmission.com>
X-Original-To: serge@hallyn.com
Delivered-To: serge@hallyn.com
Received: by mail.hallyn.com (Postfix, from userid 5001)
id CAFA8C80F6; Tue, 22 Jan 2013 09:15:19 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail
X-Spam-Level:
X-Spam-Status: No, score=0.1 required=8.0 tests=BAD_ENC_HEADER,BAYES_00
autolearn=no version=3.3.1
Received: from out02.mta.xmission.com (out02.mta.xmission.com [166.70.13.232])
(using TLSv1 with cipher AES256-SHA (256/256 bits))
(No client certificate requested)
by mail.hallyn.com (Postfix) with ESMTPS id 43FAEC80D1
for <serge@hallyn.com>; Tue, 22 Jan 2013 09:15:15 +0000 (UTC)
Received: from in02.mta.xmission.com ([166.70.13.52])
by out02.mta.xmission.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.76)
(envelope-from <ebiederm@xmission.com>)
id 1TxZvA-0006sA-Pq; Tue, 22 Jan 2013 02:13:32 -0700
Received: from c-98-207-153-68.hsd1.ca.comcast.net ([98.207.153.68] helo=eric-ThinkPad-X220.xmission.com)
by in02.mta.xmission.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
(Exim 4.76)
(envelope-from <ebiederm@xmission.com>)
id 1TxZv8-0004VI-Fi; Tue, 22 Jan 2013 02:13:32 -0700
From: ebiederm@xmission.com (Eric W. Biederman)
To: Nicolas =?utf-8?Q?Fran=C3=A7ois?= <nicolas.francois@centraliens.net>
Cc: <Pkg-shadow-devel@lists.alioth.debian.org>, Linux Containers <containers@lists.linux-foundation.org>, "Michael Kerrisk \(man-pages\)" <mtk.manpages@gmail.com>, "Serge E. Hallyn" <serge@hallyn.com>
References: <87d2wxshu0.fsf@xmission.com>
Date: Tue, 22 Jan 2013 01:13:26 -0800
In-Reply-To: <87d2wxshu0.fsf@xmission.com> (Eric W. Biederman's message of
"Tue, 22 Jan 2013 01:11:19 -0800")
Message-ID: <87vcapr361.fsf@xmission.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-XM-AID: U2FsdGVkX1++0A/mQBimfZkeNedO095IfnCYGQfIolI=
X-SA-Exim-Connect-IP: 98.207.153.68
X-SA-Exim-Mail-From: ebiederm@xmission.com
Subject: [PATCH 03/11] Implement commonio_append.
X-SA-Exim-Version: 4.2.1 (built Wed, 14 Nov 2012 14:26:46 -0700)
X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com)
X-UID: 2073
Status: RO
Content-Length: 1874
Lines: 65
To support files that do not have a simple unique key implement
commonio_append to allow new entries to be added.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---
lib/commonio.c | 30 ++++++++++++++++++++++++++++++
lib/commonio.h | 1 +
2 files changed, 31 insertions(+), 0 deletions(-)
Index: shadow/lib/commonio.c
===================================================================
--- shadow.orig/lib/commonio.c 2013-02-01 15:27:51.376080384 -0600
+++ shadow/lib/commonio.c 2013-02-01 15:27:51.368080384 -0600
@@ -1121,6 +1121,36 @@
return 1;
}
+int commonio_append (struct commonio_db *db, const void *eptr)
+{
+ struct commonio_entry *p;
+ void *nentry;
+
+ if (!db->isopen || db->readonly) {
+ errno = EINVAL;
+ return 0;
+ }
+ nentry = db->ops->dup (eptr);
+ if (NULL == nentry) {
+ errno = ENOMEM;
+ return 0;
+ }
+ /* new entry */
+ p = (struct commonio_entry *) malloc (sizeof *p);
+ if (NULL == p) {
+ db->ops->free (nentry);
+ errno = ENOMEM;
+ return 0;
+ }
+
+ p->eptr = nentry;
+ p->line = NULL;
+ p->changed = true;
+ add_one_entry (db, p);
+
+ db->changed = true;
+ return 1;
+}
void commonio_del_entry (struct commonio_db *db, const struct commonio_entry *p)
{
Index: shadow/lib/commonio.h
===================================================================
--- shadow.orig/lib/commonio.h 2013-02-01 15:27:51.376080384 -0600
+++ shadow/lib/commonio.h 2013-02-01 15:27:51.368080384 -0600
@@ -146,6 +146,7 @@
extern int commonio_open (struct commonio_db *, int);
extern /*@observer@*/ /*@null@*/const void *commonio_locate (struct commonio_db *, const char *);
extern int commonio_update (struct commonio_db *, const void *);
+extern int commonio_append (struct commonio_db *, const void *);
extern int commonio_remove (struct commonio_db *, const char *);
extern int commonio_rewind (struct commonio_db *);
extern /*@observer@*/ /*@null@*/const void *commonio_next (struct commonio_db *);

View File

@@ -0,0 +1,685 @@
From ebiederm@xmission.com Tue Jan 22 09:16:29 2013
Return-Path: <ebiederm@xmission.com>
X-Original-To: serge@hallyn.com
Delivered-To: serge@hallyn.com
Received: by mail.hallyn.com (Postfix, from userid 5001)
id AF9A9C80F4; Tue, 22 Jan 2013 09:16:29 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail
X-Spam-Level:
X-Spam-Status: No, score=0.1 required=8.0 tests=BAD_ENC_HEADER,BAYES_00
autolearn=no version=3.3.1
Received: from out02.mta.xmission.com (out02.mta.xmission.com [166.70.13.232])
(using TLSv1 with cipher AES256-SHA (256/256 bits))
(No client certificate requested)
by mail.hallyn.com (Postfix) with ESMTPS id EDF70C80D1
for <serge@hallyn.com>; Tue, 22 Jan 2013 09:16:24 +0000 (UTC)
Received: from out01.mta.xmission.com ([166.70.13.231])
by out02.mta.xmission.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.76)
(envelope-from <ebiederm@xmission.com>)
id 1TxZwI-0007HS-Mn; Tue, 22 Jan 2013 02:14:42 -0700
Received: from in02.mta.xmission.com ([166.70.13.52])
by out01.mta.xmission.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.76)
(envelope-from <ebiederm@xmission.com>)
id 1TxZwI-0005wP-8E; Tue, 22 Jan 2013 02:14:42 -0700
Received: from c-98-207-153-68.hsd1.ca.comcast.net ([98.207.153.68] helo=eric-ThinkPad-X220.xmission.com)
by in02.mta.xmission.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
(Exim 4.76)
(envelope-from <ebiederm@xmission.com>)
id 1TxZwE-0004bA-Mv; Tue, 22 Jan 2013 02:14:42 -0700
From: ebiederm@xmission.com (Eric W. Biederman)
To: Nicolas =?utf-8?Q?Fran=C3=A7ois?= <nicolas.francois@centraliens.net>
Cc: <Pkg-shadow-devel@lists.alioth.debian.org>, Linux Containers <containers@lists.linux-foundation.org>, "Michael Kerrisk \(man-pages\)" <mtk.manpages@gmail.com>, "Serge E. Hallyn" <serge@hallyn.com>
References: <87d2wxshu0.fsf@xmission.com>
Date: Tue, 22 Jan 2013 01:14:35 -0800
In-Reply-To: <87d2wxshu0.fsf@xmission.com> (Eric W. Biederman's message of
"Tue, 22 Jan 2013 01:11:19 -0800")
Message-ID: <87liblr344.fsf@xmission.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-XM-AID: U2FsdGVkX1/3QOlmT6VsAuzQbs/RJ/nb1IrpO++QYVA=
X-SA-Exim-Connect-IP: 98.207.153.68
X-SA-Exim-Mail-From: ebiederm@xmission.com
Subject: [PATCH 04/11] Add backend support for suboridnate uids and gids
X-SA-Exim-Version: 4.2.1 (built Wed, 14 Nov 2012 14:26:46 -0700)
X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com)
X-UID: 2074
Status: RO
X-Status: A
Content-Length: 15967
Lines: 636
These files list the set of subordinate uids and gids that users are allowed
to use. The expect use case is with the user namespace but other uses are
allowed.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---
etc/login.defs | 8 +
lib/Makefile.am | 2 +
lib/getdef.c | 6 +
lib/subordinateio.c | 512 +++++++++++++++++++++++++++++++++++++++++++++++++++
lib/subordinateio.h | 38 ++++
5 files changed, 566 insertions(+), 0 deletions(-)
create mode 100644 lib/subordinateio.c
create mode 100644 lib/subordinateio.h
Index: shadow/etc/login.defs
===================================================================
--- shadow.orig/etc/login.defs 2013-02-01 15:27:51.684080379 -0600
+++ shadow/etc/login.defs 2013-02-01 15:27:51.676080379 -0600
@@ -226,6 +226,10 @@
# System accounts
SYS_UID_MIN 101
SYS_UID_MAX 999
+# Extra per user uids
+SUB_UID_MIN 100000
+SUB_UID_MAX 600100000
+SUB_UID_COUNT 10000
#
# Min/max values for automatic gid selection in groupadd
@@ -235,6 +239,10 @@
# System accounts
SYS_GID_MIN 101
SYS_GID_MAX 999
+# Extra per user group ids
+SUB_GID_MIN 100000
+SUB_GID_MAX 600100000
+SUB_GID_COUNT 10000
#
# Max number of login retries if password is bad
Index: shadow/lib/Makefile.am
===================================================================
--- shadow.orig/lib/Makefile.am 2013-02-01 15:27:51.684080379 -0600
+++ shadow/lib/Makefile.am 2013-02-01 15:27:51.676080379 -0600
@@ -39,6 +39,8 @@
pwio.c \
pwio.h \
pwmem.c \
+ subordinateio.h \
+ subordinateio.c \
selinux.c \
semanage.c \
sgetgrent.c \
Index: shadow/lib/getdef.c
===================================================================
--- shadow.orig/lib/getdef.c 2013-02-01 15:27:51.684080379 -0600
+++ shadow/lib/getdef.c 2013-02-01 15:27:51.680080379 -0600
@@ -82,6 +82,12 @@
{"SHA_CRYPT_MAX_ROUNDS", NULL},
{"SHA_CRYPT_MIN_ROUNDS", NULL},
#endif
+ {"SUB_GID_COUNT", NULL},
+ {"SUB_GID_MAX", NULL},
+ {"SUB_GID_MIN", NULL},
+ {"SUB_UID_COUNT", NULL},
+ {"SUB_UID_MAX", NULL},
+ {"SUB_UID_MIN", NULL},
{"SULOG_FILE", NULL},
{"SU_NAME", NULL},
{"SYS_GID_MAX", NULL},
Index: shadow/lib/subordinateio.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ shadow/lib/subordinateio.c 2013-02-01 15:27:51.680080379 -0600
@@ -0,0 +1,512 @@
+/*
+ * Copyright (c) 2012 - Eric Biederman
+ */
+
+#include <config.h>
+#include "prototypes.h"
+#include "defines.h"
+#include <stdio.h>
+#include "commonio.h"
+#include "subordinateio.h"
+
+struct subordinate_range {
+ const char *owner;
+ unsigned long start;
+ unsigned long count;
+};
+
+#define NFIELDS 3
+
+static /*@null@*/ /*@only@*/void *subordinate_dup (const void *ent)
+{
+ const struct subordinate_range *rangeent = ent;
+ struct subordinate_range *range;
+
+ range = (struct subordinate_range *) malloc (sizeof *range);
+ if (NULL == range) {
+ return NULL;
+ }
+ range->owner = strdup (rangeent->owner);
+ if (NULL == range->owner) {
+ free(range);
+ return NULL;
+ }
+ range->start = rangeent->start;
+ range->count = rangeent->count;
+
+ return range;
+}
+
+static void subordinate_free (/*@out@*/ /*@only@*/void *ent)
+{
+ struct subordinate_range *rangeent = ent;
+
+ free ((void *)(rangeent->owner));
+ free (rangeent);
+}
+
+static void *subordinate_parse (const char *line)
+{
+ static struct subordinate_range range;
+ char rangebuf[1024];
+ int i;
+ char *cp;
+ char *fields[NFIELDS];
+
+ /*
+ * Copy the string to a temporary buffer so the substrings can
+ * be modified to be NULL terminated.
+ */
+ if (strlen (line) >= sizeof rangebuf)
+ return NULL; /* fail if too long */
+ strcpy (rangebuf, line);
+
+ /*
+ * Save a pointer to the start of each colon separated
+ * field. The fields are converted into NUL terminated strings.
+ */
+
+ for (cp = rangebuf, i = 0; (i < NFIELDS) && (NULL != cp); i++) {
+ fields[i] = cp;
+ while (('\0' != *cp) && (':' != *cp)) {
+ cp++;
+ }
+
+ if ('\0' != *cp) {
+ *cp = '\0';
+ cp++;
+ } else {
+ cp = NULL;
+ }
+ }
+
+ /*
+ * There must be exactly NFIELDS colon separated fields or
+ * the entry is invalid. Also, fields must be non-blank.
+ */
+ if (i != NFIELDS || *fields[0] == '\0' || *fields[1] == '\0' || *fields[2] == '\0')
+ return NULL;
+ range.owner = fields[0];
+ if (getulong (fields[1], &range.start) == 0)
+ return NULL;
+ if (getulong (fields[2], &range.count) == 0)
+ return NULL;
+
+ return &range;
+}
+
+static int subordinate_put (const void *ent, FILE * file)
+{
+ const struct subordinate_range *range = ent;
+
+ return fprintf(file, "%s:%lu:%lu\n",
+ range->owner,
+ range->start,
+ range->count) < 0 ? -1 : 0;
+}
+
+static struct commonio_ops subordinate_ops = {
+ subordinate_dup, /* dup */
+ subordinate_free, /* free */
+ NULL, /* getname */
+ subordinate_parse, /* parse */
+ subordinate_put, /* put */
+ fgets, /* fgets */
+ fputs, /* fputs */
+ NULL, /* open_hook */
+ NULL, /* close_hook */
+};
+
+static /*@observer@*/ /*@null*/const struct subordinate_range *subordinate_next(struct commonio_db *db)
+{
+ commonio_next (db);
+}
+
+static bool is_range_free(struct commonio_db *db, unsigned long start,
+ unsigned long count)
+{
+ const struct subordinate_range *range;
+ unsigned long end = start + count - 1;
+
+ commonio_rewind(db);
+ while ((range = commonio_next(db)) != NULL) {
+ unsigned long first = range->start;
+ unsigned long last = first + range->count - 1;
+
+ if ((end >= first) && (start <= last))
+ return false;
+ }
+ return true;
+}
+
+static const bool range_exists(struct commonio_db *db, const char *owner)
+{
+ const struct subordinate_range *range;
+ commonio_rewind(db);
+ while ((range = commonio_next(db)) != NULL) {
+ unsigned long first = range->start;
+ unsigned long last = first + range->count - 1;
+
+ if (0 == strcmp(range->owner, owner))
+ return true;
+ }
+ return false;
+}
+
+static const struct subordinate_range *find_range(struct commonio_db *db,
+ const char *owner, unsigned long val)
+{
+ const struct subordinate_range *range;
+ commonio_rewind(db);
+ while ((range = commonio_next(db)) != NULL) {
+ unsigned long first = range->start;
+ unsigned long last = first + range->count - 1;
+
+ if (0 != strcmp(range->owner, owner))
+ continue;
+
+ if ((val >= first) && (val <= last))
+ return range;
+ }
+ return NULL;
+}
+
+static bool have_range(struct commonio_db *db,
+ const char *owner, unsigned long start, unsigned long count)
+{
+ const struct subordinate_range *range;
+ unsigned long end;
+
+ if (count == 0)
+ return false;
+
+ end = start + count - 1;
+ range = find_range (db, owner, start);
+ while (range) {
+ unsigned long last;
+
+ last = range->start + range->count - 1;
+ if (last >= (start + count - 1))
+ return true;
+
+ count = end - last;
+ start = last + 1;
+ range = find_range(db, owner, start);
+ }
+ return false;
+}
+
+static int subordinate_range_cmp (const void *p1, const void *p2)
+{
+ struct subordinate_range *range1, *range2;
+
+ if ((*(struct commonio_entry **) p1)->eptr == NULL)
+ return 1;
+ if ((*(struct commonio_entry **) p2)->eptr == NULL)
+ return -1;
+
+ range1 = ((struct subordinate_range *) (*(struct commonio_entry **) p1)->eptr);
+ range2 = ((struct subordinate_range *) (*(struct commonio_entry **) p2)->eptr);
+
+ if (range1->start < range2->start)
+ return -1;
+ else if (range1->start > range2->start)
+ return 1;
+ else if (range1->count < range2->count)
+ return -1;
+ else if (range1->count > range2->count)
+ return 1;
+ else
+ return strcmp(range1->owner, range2->owner);
+}
+
+static unsigned long find_free_range(struct commonio_db *db,
+ unsigned long min, unsigned long max,
+ unsigned long count)
+{
+ const struct subordinate_range *range;
+ unsigned long low, high;
+
+ /* When given invalid parameters fail */
+ if ((count == 0) || (max <= min))
+ goto fail;
+
+ /* Sort by range than by owner */
+ commonio_sort (db, subordinate_range_cmp);
+ commonio_rewind(db);
+
+ low = min;
+ while ((range = commonio_next(db)) != NULL) {
+ unsigned long first = range->start;
+ unsigned long last = first + range->count - 1;
+
+ /* Find the top end of the hole before this range */
+ high = first;
+ if (high > max)
+ high = max;
+
+ /* Is the hole before this range large enough? */
+ if ((high > low) && (((high - low) + 1) >= count))
+ return low;
+
+ /* Compute the low end of the next hole */
+ if (low < (last + 1))
+ low = last + 1;
+ if (low > max)
+ goto fail;
+ }
+
+ /* Is the remaining unclaimed area large enough? */
+ if (((max - low) + 1) >= count)
+ return low;
+fail:
+ return ULONG_MAX;
+}
+
+static int add_range(struct commonio_db *db,
+ const char *owner, unsigned long start, unsigned long count)
+{
+ struct subordinate_range range;
+ range.owner = owner;
+ range.start = start;
+ range.count = count;
+
+ /* See if the range is already present */
+ if (have_range(db, owner, start, count))
+ return 1;
+
+ /* Oterwise append the range */
+ return commonio_append(db, &range);
+}
+
+static int remove_range(struct commonio_db *db,
+ const char *owner, unsigned long start, unsigned long count)
+{
+ struct commonio_entry *ent;
+ unsigned long end;
+
+ if (count == 0)
+ return 1;
+
+ end = start + count - 1;
+ for (ent = db->head; ent; ent = ent->next) {
+ struct subordinate_range *range = ent->eptr;
+ unsigned long first;
+ unsigned long last;
+
+ /* Skip unparsed entries */
+ if (!range)
+ continue;
+
+ first = range->start;
+ last = first + range->count - 1;
+
+ /* Skip entries with a different owner */
+ if (0 != strcmp(range->owner, owner))
+ continue;
+
+ /* Skip entries outside of the range to remove */
+ if ((end < first) || (start > last))
+ continue;
+
+ /* Is entry completely contained in the range to remove? */
+ if ((start <= first) && (end >= last)) {
+ commonio_del_entry (db, ent);
+ }
+ /* Is just the start of the entry removed? */
+ else if ((start <= first) && (end < last)) {
+ range->start = end + 1;
+ range->count = (last - range->start) + 1;
+
+ ent->changed = true;
+ }
+ /* Is just the end of the entry removed? */
+ else if ((start > first) && (end >= last)) {
+ range->count = (start - range->start) + 1;
+
+ ent->changed = true;
+ }
+ /* The middle of the range is removed */
+ else {
+ struct subordinate_range tail;
+ tail.owner = range->owner;
+ tail.start = end + 1;
+ tail.count = (last - tail.start) + 1;
+
+ if (!commonio_append(db, &tail))
+ return 0;
+
+ range->count = (start - range->start) + 1;
+
+ ent->changed = true;
+ }
+ }
+
+ return 1;
+}
+
+static struct commonio_db subordinate_uid_db = {
+ "/etc/subuid", /* filename */
+ &subordinate_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 sub_uid_setdbname (const char *filename)
+{
+ return commonio_setname (&subordinate_uid_db, filename);
+}
+
+/*@observer@*/const char *sub_uid_dbname (void)
+{
+ return subordinate_uid_db.filename;
+}
+
+bool sub_uid_file_present (void)
+{
+ return commonio_present (&subordinate_uid_db);
+}
+
+int sub_uid_lock (void)
+{
+ return commonio_lock (&subordinate_uid_db);
+}
+
+int sub_uid_open (int mode)
+{
+ return commonio_open (&subordinate_uid_db, mode);
+}
+
+bool is_sub_uid_range_free(uid_t start, unsigned long count)
+{
+ return is_range_free (&subordinate_uid_db, start, count);
+}
+
+bool sub_uid_assigned(const char *owner)
+{
+ return range_exists (&subordinate_uid_db, owner);
+}
+
+bool have_sub_uids(const char *owner, uid_t start, unsigned long count)
+{
+ return have_range (&subordinate_uid_db, owner, start, count);
+}
+
+int sub_uid_add (const char *owner, uid_t start, unsigned long count)
+{
+ return add_range (&subordinate_uid_db, owner, start, count);
+}
+
+int sub_uid_remove (const char *owner, uid_t start, unsigned long count)
+{
+ return remove_range (&subordinate_uid_db, owner, start, count);
+}
+
+int sub_uid_close (void)
+{
+ return commonio_close (&subordinate_uid_db);
+}
+
+int sub_uid_unlock (void)
+{
+ return commonio_unlock (&subordinate_uid_db);
+}
+
+uid_t sub_uid_find_free_range(uid_t min, uid_t max, unsigned long count)
+{
+ unsigned long start;
+ start = find_free_range (&subordinate_uid_db, min, max, count);
+ return start == ULONG_MAX ? (uid_t) -1 : start;
+}
+
+static struct commonio_db subordinate_gid_db = {
+ "/etc/subgid", /* filename */
+ &subordinate_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 sub_gid_setdbname (const char *filename)
+{
+ return commonio_setname (&subordinate_gid_db, filename);
+}
+
+/*@observer@*/const char *sub_gid_dbname (void)
+{
+ return subordinate_gid_db.filename;
+}
+
+bool sub_gid_file_present (void)
+{
+ return commonio_present (&subordinate_gid_db);
+}
+
+int sub_gid_lock (void)
+{
+ return commonio_lock (&subordinate_gid_db);
+}
+
+int sub_gid_open (int mode)
+{
+ return commonio_open (&subordinate_gid_db, mode);
+}
+
+bool is_sub_gid_range_free(gid_t start, unsigned long count)
+{
+ return is_range_free (&subordinate_gid_db, start, count);
+}
+
+bool have_sub_gids(const char *owner, gid_t start, unsigned long count)
+{
+ return have_range(&subordinate_gid_db, owner, start, count);
+}
+
+bool sub_gid_assigned(const char *owner)
+{
+ return range_exists (&subordinate_gid_db, owner);
+}
+
+int sub_gid_add (const char *owner, gid_t start, unsigned long count)
+{
+ return add_range (&subordinate_gid_db, owner, start, count);
+}
+
+int sub_gid_remove (const char *owner, gid_t start, unsigned long count)
+{
+ return remove_range (&subordinate_gid_db, owner, start, count);
+}
+
+int sub_gid_close (void)
+{
+ return commonio_close (&subordinate_gid_db);
+}
+
+int sub_gid_unlock (void)
+{
+ return commonio_unlock (&subordinate_gid_db);
+}
+
+gid_t sub_gid_find_free_range(gid_t min, gid_t max, unsigned long count)
+{
+ unsigned long start;
+ start = find_free_range (&subordinate_gid_db, min, max, count);
+ return start == ULONG_MAX ? (gid_t) -1 : start;
+}
Index: shadow/lib/subordinateio.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ shadow/lib/subordinateio.h 2013-02-01 15:27:51.680080379 -0600
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2012- Eric W. Biederman
+ */
+
+#ifndef _SUBORDINATEIO_H
+#define _SUBORDINATEIO_H
+
+#include <sys/types.h>
+
+extern int sub_uid_close(void);
+extern bool is_sub_uid_range_free(uid_t start, unsigned long count);
+extern bool have_sub_uids(const char *owner, uid_t start, unsigned long count);
+extern bool sub_uid_file_present (void);
+extern bool sub_uid_assigned(const char *owner);
+extern int sub_uid_lock (void);
+extern int sub_uid_setdbname (const char *filename);
+extern /*@observer@*/const char *sub_uid_dbname (void);
+extern int sub_uid_open (int mode);
+extern int sub_uid_unlock (void);
+extern int sub_uid_add (const char *owner, uid_t start, unsigned long count);
+extern int sub_uid_remove (const char *owner, uid_t start, unsigned long count);
+extern uid_t sub_uid_find_free_range(uid_t min, uid_t max, unsigned long count);
+
+extern int sub_gid_close(void);
+extern bool is_sub_gid_range_free(gid_t start, unsigned long count);
+extern bool have_sub_gids(const char *owner, gid_t start, unsigned long count);
+extern bool sub_gid_file_present (void);
+extern bool sub_gid_assigned(const char *owner);
+extern int sub_gid_lock (void);
+extern int sub_gid_setdbname (const char *filename);
+extern /*@observer@*/const char *sub_gid_dbname (void);
+extern int sub_gid_open (int mode);
+extern int sub_gid_unlock (void);
+extern int sub_gid_add (const char *owner, gid_t start, unsigned long count);
+extern int sub_gid_remove (const char *owner, gid_t start, unsigned long count);
+extern uid_t sub_gid_find_free_range(gid_t min, gid_t max, unsigned long count);
+
+#endif

View File

@@ -0,0 +1,283 @@
From ebiederm@xmission.com Tue Jan 22 09:17:02 2013
Return-Path: <ebiederm@xmission.com>
X-Original-To: serge@hallyn.com
Delivered-To: serge@hallyn.com
Received: by mail.hallyn.com (Postfix, from userid 5001)
id 480ABC80F4; Tue, 22 Jan 2013 09:17:02 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail
X-Spam-Level:
X-Spam-Status: No, score=0.1 required=8.0 tests=BAD_ENC_HEADER,BAYES_00
autolearn=no version=3.3.1
Received: from out02.mta.xmission.com (out02.mta.xmission.com [166.70.13.232])
(using TLSv1 with cipher AES256-SHA (256/256 bits))
(No client certificate requested)
by mail.hallyn.com (Postfix) with ESMTPS id 90ACFC80D1
for <serge@hallyn.com>; Tue, 22 Jan 2013 09:16:57 +0000 (UTC)
Received: from out01.mta.xmission.com ([166.70.13.231])
by out02.mta.xmission.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.76)
(envelope-from <ebiederm@xmission.com>)
id 1TxZwp-0007cg-9X; Tue, 22 Jan 2013 02:15:15 -0700
Received: from in02.mta.xmission.com ([166.70.13.52])
by out01.mta.xmission.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.76)
(envelope-from <ebiederm@xmission.com>)
id 1TxZwo-0006DN-OT; Tue, 22 Jan 2013 02:15:14 -0700
Received: from c-98-207-153-68.hsd1.ca.comcast.net ([98.207.153.68] helo=eric-ThinkPad-X220.xmission.com)
by in02.mta.xmission.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
(Exim 4.76)
(envelope-from <ebiederm@xmission.com>)
id 1TxZwj-0004g0-9e; Tue, 22 Jan 2013 02:15:14 -0700
From: ebiederm@xmission.com (Eric W. Biederman)
To: Nicolas =?utf-8?Q?Fran=C3=A7ois?= <nicolas.francois@centraliens.net>
Cc: <Pkg-shadow-devel@lists.alioth.debian.org>, Linux Containers <containers@lists.linux-foundation.org>, "Michael Kerrisk \(man-pages\)" <mtk.manpages@gmail.com>, "Serge E. Hallyn" <serge@hallyn.com>
References: <87d2wxshu0.fsf@xmission.com>
Date: Tue, 22 Jan 2013 01:15:05 -0800
In-Reply-To: <87d2wxshu0.fsf@xmission.com> (Eric W. Biederman's message of
"Tue, 22 Jan 2013 01:11:19 -0800")
Message-ID: <87fw1tr33a.fsf@xmission.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-XM-AID: U2FsdGVkX19KHX5xUOkaLY5iIEqDVLxZKDTByyA0Xk8=
X-SA-Exim-Connect-IP: 98.207.153.68
X-SA-Exim-Mail-From: ebiederm@xmission.com
Subject: [PATCH 05/11] Implement find_new_sub_uids find_new_sub_gids
X-SA-Exim-Version: 4.2.1 (built Wed, 14 Nov 2012 14:26:46 -0700)
X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com)
X-UID: 2075
Status: RO
Content-Length: 8108
Lines: 235
Functions for finding new subordinate uid and gids ranges for use
with useradd.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---
lib/prototypes.h | 9 ++++
libmisc/Makefile.am | 2 +
libmisc/find_new_sub_gids.c | 87 +++++++++++++++++++++++++++++++++++++++++++
libmisc/find_new_sub_uids.c | 87 +++++++++++++++++++++++++++++++++++++++++++
4 files changed, 185 insertions(+), 0 deletions(-)
create mode 100644 libmisc/find_new_sub_gids.c
create mode 100644 libmisc/find_new_sub_uids.c
Index: shadow/lib/prototypes.h
===================================================================
--- shadow.orig/lib/prototypes.h 2013-02-01 15:27:52.044080373 -0600
+++ shadow/lib/prototypes.h 2013-02-01 15:27:52.040080373 -0600
@@ -149,6 +149,15 @@
uid_t *uid,
/*@null@*/uid_t const *preferred_uid);
+/* find_new_sub_gids.c */
+extern int find_new_sub_gids (const char *owner,
+ gid_t *range_start, unsigned long *range_count);
+
+/* find_new_sub_uids.c */
+extern int find_new_sub_uids (const char *owner,
+ uid_t *range_start, unsigned long *range_count);
+
+
/* get_gid.c */
extern int get_gid (const char *gidstr, gid_t *gid);
Index: shadow/libmisc/Makefile.am
===================================================================
--- shadow.orig/libmisc/Makefile.am 2013-02-01 15:27:52.044080373 -0600
+++ shadow/libmisc/Makefile.am 2013-02-01 15:27:52.040080373 -0600
@@ -25,6 +25,8 @@
failure.h \
find_new_gid.c \
find_new_uid.c \
+ find_new_sub_gids.c \
+ find_new_sub_uids.c \
getdate.h \
getdate.y \
getgr_nam_gid.c \
Index: shadow/libmisc/find_new_sub_gids.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ shadow/libmisc/find_new_sub_gids.c 2013-02-01 15:27:52.040080373 -0600
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2012 Eric Biederman
+ *
+ * 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>
+
+#include <assert.h>
+#include <stdio.h>
+#include <errno.h>
+
+#include "prototypes.h"
+#include "subordinateio.h"
+#include "getdef.h"
+
+/*
+ * find_new_sub_gids - Find a new unused range of GIDs.
+ *
+ * If successful, find_new_sub_gids provides a range of unused
+ * user IDs in the [SUB_GID_MIN:SUB_GID_MAX] range.
+ *
+ * Return 0 on success, -1 if no unused GIDs are available.
+ */
+int find_new_sub_gids (const char *owner,
+ gid_t *range_start, unsigned long *range_count)
+{
+ unsigned long min, max;
+ unsigned long count;
+ gid_t start;
+
+ assert (range_start != NULL);
+ assert (range_count != NULL);
+
+ min = getdef_ulong ("SUB_GID_MIN", 100000UL);
+ max = getdef_ulong ("SUB_GID_MAX", 600100000UL);
+ count = getdef_ulong ("SUB_GID_COUNT", 10000);
+
+ /* Is there a preferred range that works? */
+ if ((*range_count != 0) &&
+ (*range_start >= min) &&
+ (((*range_start) + (*range_count) - 1) <= max) &&
+ is_sub_gid_range_free(*range_start, *range_count)) {
+ return 0;
+ }
+
+ if (max < (min + count)) {
+ (void) fprintf (stderr,
+ _("%s: Invalid configuration: SUB_GID_MIN (%lu), SUB_GID_MAX (%lu)\n"),
+ Prog, min, max);
+ return -1;
+ }
+ start = sub_gid_find_free_range(min, max, count);
+ if (start == (gid_t)-1) {
+ fprintf (stderr,
+ _("%s: Can't get unique secondary GID range\n"),
+ Prog);
+ SYSLOG ((LOG_WARN, "no more available secondary GIDs on the system"));
+ return -1;
+ }
+ *range_start = start;
+ *range_count = count;
+ return 0;
+}
+
Index: shadow/libmisc/find_new_sub_uids.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ shadow/libmisc/find_new_sub_uids.c 2013-02-01 15:27:52.040080373 -0600
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2012 Eric Biederman
+ *
+ * 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>
+
+#include <assert.h>
+#include <stdio.h>
+#include <errno.h>
+
+#include "prototypes.h"
+#include "subordinateio.h"
+#include "getdef.h"
+
+/*
+ * find_new_sub_uids - Find a new unused range of UIDs.
+ *
+ * If successful, find_new_sub_uids provides a range of unused
+ * user IDs in the [SUB_UID_MIN:SUB_UID_MAX] range.
+ *
+ * Return 0 on success, -1 if no unused UIDs are available.
+ */
+int find_new_sub_uids (const char *owner,
+ uid_t *range_start, unsigned long *range_count)
+{
+ unsigned long min, max;
+ unsigned long count;
+ uid_t start;
+
+ assert (range_start != NULL);
+ assert (range_count != NULL);
+
+ min = getdef_ulong ("SUB_UID_MIN", 100000UL);
+ max = getdef_ulong ("SUB_UID_MAX", 600100000UL);
+ count = getdef_ulong ("SUB_UID_COUNT", 10000);
+
+ /* Is there a preferred range that works? */
+ if ((*range_count != 0) &&
+ (*range_start >= min) &&
+ (((*range_start) + (*range_count) - 1) <= max) &&
+ is_sub_uid_range_free(*range_start, *range_count)) {
+ return 0;
+ }
+
+ if (max < (min + count)) {
+ (void) fprintf (stderr,
+ _("%s: Invalid configuration: SUB_UID_MIN (%lu), SUB_UID_MAX (%lu)\n"),
+ Prog, min, max);
+ return -1;
+ }
+ start = sub_uid_find_free_range(min, max, count);
+ if (start == (uid_t)-1) {
+ fprintf (stderr,
+ _("%s: Can't get unique secondary UID range\n"),
+ Prog);
+ SYSLOG ((LOG_WARN, "no more available secondary UIDs on the system"));
+ return -1;
+ }
+ *range_start = start;
+ *range_count = count;
+ return 0;
+}
+

236
debian/patches/userns/06_userns_userdel vendored Normal file
View File

@@ -0,0 +1,236 @@
From ebiederm@xmission.com Tue Jan 22 09:18:47 2013
Return-Path: <ebiederm@xmission.com>
X-Original-To: serge@hallyn.com
Delivered-To: serge@hallyn.com
Received: by mail.hallyn.com (Postfix, from userid 5001)
id F2E6AC80F6; Tue, 22 Jan 2013 09:18:46 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail
X-Spam-Level:
X-Spam-Status: No, score=0.1 required=8.0 tests=BAD_ENC_HEADER,BAYES_00
autolearn=no version=3.3.1
Received: from out02.mta.xmission.com (out02.mta.xmission.com [166.70.13.232])
(using TLSv1 with cipher AES256-SHA (256/256 bits))
(No client certificate requested)
by mail.hallyn.com (Postfix) with ESMTPS id 996B1C80D1
for <serge@hallyn.com>; Tue, 22 Jan 2013 09:18:42 +0000 (UTC)
Received: from out03.mta.xmission.com ([166.70.13.233])
by out02.mta.xmission.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.76)
(envelope-from <ebiederm@xmission.com>)
id 1TxZyW-0008Bi-3X; Tue, 22 Jan 2013 02:17:00 -0700
Received: from in02.mta.xmission.com ([166.70.13.52])
by out03.mta.xmission.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
(Exim 4.76)
(envelope-from <ebiederm@xmission.com>)
id 1TxZyU-0005NA-Qm; Tue, 22 Jan 2013 02:16:59 -0700
Received: from c-98-207-153-68.hsd1.ca.comcast.net ([98.207.153.68] helo=eric-ThinkPad-X220.xmission.com)
by in02.mta.xmission.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
(Exim 4.76)
(envelope-from <ebiederm@xmission.com>)
id 1TxZyQ-0004qs-T1; Tue, 22 Jan 2013 02:16:58 -0700
From: ebiederm@xmission.com (Eric W. Biederman)
To: Nicolas =?utf-8?Q?Fran=C3=A7ois?= <nicolas.francois@centraliens.net>
Cc: <Pkg-shadow-devel@lists.alioth.debian.org>, Linux Containers <containers@lists.linux-foundation.org>, "Michael Kerrisk \(man-pages\)" <mtk.manpages@gmail.com>, "Serge E. Hallyn" <serge@hallyn.com>
References: <87d2wxshu0.fsf@xmission.com>
Date: Tue, 22 Jan 2013 01:16:51 -0800
In-Reply-To: <87d2wxshu0.fsf@xmission.com> (Eric W. Biederman's message of
"Tue, 22 Jan 2013 01:11:19 -0800")
Message-ID: <878v7lr30c.fsf@xmission.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-XM-AID: U2FsdGVkX1/1l7dElNy9uNLAXx8eC28OMs/pxPM8NEo=
X-SA-Exim-Connect-IP: 98.207.153.68
X-SA-Exim-Mail-From: ebiederm@xmission.com
Subject: [PATCH 06/11] userdel: Add support for removing subordinate user and group ids.
X-SA-Exim-Version: 4.2.1 (built Wed, 14 Nov 2012 14:26:46 -0700)
X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com)
X-UID: 2076
Status: O
Content-Length: 5573
Lines: 186
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---
src/userdel.c | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 115 insertions(+), 0 deletions(-)
Index: shadow/src/userdel.c
===================================================================
--- shadow.orig/src/userdel.c 2013-02-01 15:27:52.380080367 -0600
+++ shadow/src/userdel.c 2013-02-01 15:27:52.372080367 -0600
@@ -65,6 +65,7 @@
#endif /* WITH_TCB */
/*@-exitarg@*/
#include "exitcodes.h"
+#include "subordinateio.h"
/*
* exit status values
@@ -75,6 +76,8 @@
#define E_GRP_UPDATE 10 /* can't update group file */
#define E_HOMEDIR 12 /* can't remove home directory */
#define E_SE_UPDATE 14 /* can't update SELinux user mapping */
+#define E_SUB_UID_UPDATE 16 /* can't update the subordinate uid file */
+#define E_SUB_GID_UPDATE 18 /* can't update the subordinate gid file */
/*
* Global variables
@@ -96,9 +99,13 @@
static bool is_shadow_grp;
static bool sgr_locked = false;
#endif /* SHADOWGRP */
+static bool is_sub_uid;
+static bool is_sub_gid;
static bool pw_locked = false;
static bool gr_locked = false;
static bool spw_locked = false;
+static bool sub_uid_locked = false;
+static bool sub_gid_locked = false;
/* local function prototypes */
static void usage (int status);
@@ -437,6 +444,34 @@
sgr_locked = false;
}
#endif /* SHADOWGRP */
+
+ if (is_sub_uid) {
+ if (sub_uid_close () == 0) {
+ fprintf (stderr, _("%s: failure while writing changes to %s\n"), Prog, sub_uid_dbname ());
+ SYSLOG ((LOG_ERR, "failure while writing changes to %s", sub_uid_dbname ()));
+ fail_exit (E_SUB_UID_UPDATE);
+ }
+ if (sub_uid_unlock () == 0) {
+ fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, sub_uid_dbname ());
+ SYSLOG ((LOG_ERR, "failed to unlock %s", sub_uid_dbname ()));
+ /* continue */
+ }
+ sub_uid_locked = false;
+ }
+
+ if (is_sub_gid) {
+ if (sub_gid_close () == 0) {
+ fprintf (stderr, _("%s: failure while writing changes to %s\n"), Prog, sub_gid_dbname ());
+ SYSLOG ((LOG_ERR, "failure while writing changes to %s", sub_gid_dbname ()));
+ fail_exit (E_SUB_GID_UPDATE);
+ }
+ if (sub_gid_unlock () == 0) {
+ fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, sub_gid_dbname ());
+ SYSLOG ((LOG_ERR, "failed to unlock %s", sub_gid_dbname ()));
+ /* continue */
+ }
+ sub_gid_locked = false;
+ }
}
/*
@@ -474,6 +509,20 @@
}
}
#endif /* SHADOWGRP */
+ if (sub_uid_locked) {
+ if (sub_uid_unlock () == 0) {
+ fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, sub_uid_dbname ());
+ SYSLOG ((LOG_ERR, "failed to unlock %s", sub_uid_dbname ()));
+ /* continue */
+ }
+ }
+ if (sub_gid_locked) {
+ if (sub_gid_unlock () == 0) {
+ fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, sub_gid_dbname ());
+ SYSLOG ((LOG_ERR, "failed to unlock %s", sub_gid_dbname ()));
+ /* continue */
+ }
+ }
#ifdef WITH_AUDIT
audit_logger (AUDIT_DEL_USER, Prog,
@@ -595,6 +644,58 @@
}
}
#endif /* SHADOWGRP */
+ if (is_sub_uid) {
+ if (sub_uid_lock () == 0) {
+ fprintf (stderr,
+ _("%s: cannot lock %s; try again later.\n"),
+ Prog, sub_uid_dbname ());
+#ifdef WITH_AUDIT
+ audit_logger (AUDIT_DEL_USER, Prog,
+ "locking subordinate user file",
+ user_name, (unsigned int) user_id,
+ SHADOW_AUDIT_FAILURE);
+#endif /* WITH_AUDIT */
+ fail_exit (E_SUB_UID_UPDATE);
+ }
+ sub_uid_locked = true;
+ if (sub_uid_open (O_RDWR) == 0) {
+ fprintf (stderr,
+ _("%s: cannot open %s\n"), Prog, sub_uid_dbname ());
+#ifdef WITH_AUDIT
+ audit_logger (AUDIT_DEL_USER, Prog,
+ "opening subordinate user file",
+ user_name, (unsigned int) user_id,
+ SHADOW_AUDIT_FAILURE);
+#endif /* WITH_AUDIT */
+ fail_exit (E_SUB_UID_UPDATE);
+ }
+ }
+ if (is_sub_gid) {
+ if (sub_gid_lock () == 0) {
+ fprintf (stderr,
+ _("%s: cannot lock %s; try again later.\n"),
+ Prog, sub_gid_dbname ());
+#ifdef WITH_AUDIT
+ audit_logger (AUDIT_DEL_USER, Prog,
+ "locking subordinate group file",
+ user_name, (unsigned int) user_id,
+ SHADOW_AUDIT_FAILURE);
+#endif /* WITH_AUDIT */
+ fail_exit (E_SUB_GID_UPDATE);
+ }
+ sub_gid_locked = true;
+ if (sub_gid_open (O_RDWR) == 0) {
+ fprintf (stderr,
+ _("%s: cannot open %s\n"), Prog, sub_gid_dbname ());
+#ifdef WITH_AUDIT
+ audit_logger (AUDIT_DEL_USER, Prog,
+ "opening subordinate group file",
+ user_name, (unsigned int) user_id,
+ SHADOW_AUDIT_FAILURE);
+#endif /* WITH_AUDIT */
+ fail_exit (E_SUB_GID_UPDATE);
+ }
+ }
}
/*
@@ -619,6 +720,18 @@
Prog, user_name, spw_dbname ());
fail_exit (E_PW_UPDATE);
}
+ if (is_sub_uid && sub_uid_remove(user_name, 0, ULONG_MAX) == 0) {
+ fprintf (stderr,
+ _("%s: cannot remove entry %lu from %s\n"),
+ Prog, (unsigned long)user_id, sub_uid_dbname ());
+ fail_exit (E_SUB_UID_UPDATE);
+ }
+ if (is_sub_gid && sub_gid_remove(user_name, 0, ULONG_MAX) == 0) {
+ fprintf (stderr,
+ _("%s: cannot remove entry %lu from %s\n"),
+ Prog, (unsigned long)user_id, sub_gid_dbname ());
+ fail_exit (E_SUB_GID_UPDATE);
+ }
#ifdef WITH_AUDIT
audit_logger (AUDIT_DEL_USER, Prog,
"deleting user entries",
@@ -966,6 +1079,8 @@
#ifdef SHADOWGRP
is_shadow_grp = sgr_file_present ();
#endif /* SHADOWGRP */
+ is_sub_uid = sub_uid_file_present ();
+ is_sub_gid = sub_gid_file_present ();
/*
* Start with a quick check to see if the user exists.

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