diff --git a/debian/changelog b/debian/changelog index ceb8cddb..b0d31733 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +shadow (1:4.16.0-1) experimental; urgency=medium + + * New upstream version 4.16.0 + * Rebase patches + * Split /etc/login.defs into its own binary package (Closes: #1074394) + * Rename libsubid4 to libsubid5 (soname bump) + * d/watch: add versionmangle for -rc + + -- Chris Hofstaedtler Fri, 02 Aug 2024 17:35:29 +0200 + shadow (1:4.15.3-3) unstable; urgency=medium * Forbid backslashes in user/group-names. diff --git a/debian/control b/debian/control index 78a8863b..bf2f46a3 100644 --- a/debian/control +++ b/debian/control @@ -41,7 +41,7 @@ Multi-Arch: foreign Depends: base-passwd (>= 3.6.4), libpam-modules, - login + login.defs Recommends: sensible-utils Description: change and administer password and group data @@ -63,12 +63,23 @@ Conflicts: python-4suite (<< 0.99cvs20060405-1) Replaces: hurd (<< 20140206~) [hurd-any] +Pre-Depends: + login.defs (>= 1:4.16.0-1~) Description: system login tools This package provides support for console-based logins and for changing effective user or group IDs, including: * login, the program that invokes a user shell on a virtual terminal; * nologin, a dummy shell for disabled user accounts; +Package: login.defs +Architecture: all +Multi-Arch: foreign +Replaces: + login (<< 1:4.16.0-1~) +Description: system user management configuration + This package provides the login.defs configuration file, + used by otherwise unrelated tools managing system users. + Package: uidmap Architecture: any Multi-Arch: foreign @@ -77,7 +88,7 @@ Description: programs to help use subuids These programs help unprivileged users to create uid and gid mappings in user namespaces. -Package: libsubid4 +Package: libsubid5 Section: libs Priority: optional Architecture: any @@ -92,10 +103,10 @@ Priority: optional Architecture: any Multi-Arch: same Depends: - libsubid4 (= ${binary:Version}) + libsubid5 (= ${binary:Version}) Description: subordinate id handling library -- shared library The library provides an interface for querying, granding and ungranting subordinate user and group ids. . This package contains the C header files that are - needed for applications to use the libsubid4 library. + needed for applications to use the libsubid library. diff --git a/debian/libsubid4.symbols b/debian/libsubid4.symbols deleted file mode 100644 index 3357b3a8..00000000 --- a/debian/libsubid4.symbols +++ /dev/null @@ -1,10 +0,0 @@ -libsubid.so.4 libsubid4 #MINVER# - subid_get_gid_owners@Base 1:4.11.1 - subid_get_gid_ranges@Base 1:4.11.1 - subid_get_uid_owners@Base 1:4.11.1 - subid_get_uid_ranges@Base 1:4.11.1 - subid_grant_gid_range@Base 1:4.11.1 - subid_grant_uid_range@Base 1:4.11.1 - subid_init@Base 1:4.11.1 - subid_ungrant_gid_range@Base 1:4.11.1 - subid_ungrant_uid_range@Base 1:4.11.1 diff --git a/debian/libsubid4.install b/debian/libsubid5.install similarity index 100% rename from debian/libsubid4.install rename to debian/libsubid5.install diff --git a/debian/libsubid5.symbols b/debian/libsubid5.symbols new file mode 100644 index 00000000..ecd02314 --- /dev/null +++ b/debian/libsubid5.symbols @@ -0,0 +1,11 @@ +libsubid.so.5 libsubid5 #MINVER# + subid_free@Base 1:4.16.0 + subid_get_gid_owners@Base 1:4.16.0 + subid_get_gid_ranges@Base 1:4.16.0 + subid_get_uid_owners@Base 1:4.16.0 + subid_get_uid_ranges@Base 1:4.16.0 + subid_grant_gid_range@Base 1:4.16.0 + subid_grant_uid_range@Base 1:4.16.0 + subid_init@Base 1:4.16.0 + subid_ungrant_gid_range@Base 1:4.16.0 + subid_ungrant_uid_range@Base 1:4.16.0 diff --git a/debian/login.defs.install b/debian/login.defs.install new file mode 100644 index 00000000..2e1f202f --- /dev/null +++ b/debian/login.defs.install @@ -0,0 +1 @@ +etc/login.defs etc diff --git a/debian/login.defs.postinst b/debian/login.defs.postinst new file mode 100644 index 00000000..8cc3a13e --- /dev/null +++ b/debian/login.defs.postinst @@ -0,0 +1,26 @@ +#!/bin/sh + +set -e + +_adopt_conffile() { + conffile=$1 + pkg=$2 + + [ -f ${conffile}.dpkg-bak ] || return 0 + + md5sum="$(md5sum ${conffile} | sed -e 's/ .*//')" + old_md5sum="$(dpkg-query -W -f='${Conffiles}' $pkg | \ + sed -n -e "\' ${conffile} ' { s/ obsolete$//; s/.* //; p }")" + # On new installs, if the conffile was preserved on upgrade by + # dpkg-maintscript helper, copy it back if the new file has not been + # modified yet + if [ "$md5sum" = "$old_md5sum" ]; then + mv ${conffile}.dpkg-bak ${conffile} + fi +} + +if [ "$1" = configure ] && [ -z "$2" ]; then + _adopt_conffile /etc/login.defs login.defs +fi + +#DEBHELPER# diff --git a/debian/login.install b/debian/login.install index 0625ff34..925fe2cd 100644 --- a/debian/login.install +++ b/debian/login.install @@ -1,5 +1,4 @@ bin/login usr/bin -etc/login.defs etc sbin/nologin usr/sbin usr/bin/newgrp usr/share/locale/*/LC_MESSAGES/shadow.mo diff --git a/debian/login.maintscript b/debian/login.maintscript index cec6da2f..2791fb79 100644 --- a/debian/login.maintscript +++ b/debian/login.maintscript @@ -1 +1,2 @@ rm_conffile /etc/securetty 1:4.7-1~ +rm_conffile /etc/login.defs 1:4.16.0-1~ diff --git a/debian/patches/debian/Let-pam_unix-handle-login-failure-delays.patch b/debian/patches/debian/Let-pam_unix-handle-login-failure-delays.patch index c3572d52..212f363f 100644 --- a/debian/patches/debian/Let-pam_unix-handle-login-failure-delays.patch +++ b/debian/patches/debian/Let-pam_unix-handle-login-failure-delays.patch @@ -25,10 +25,10 @@ index 30f54ba..21307bb 100644 {"GID_MAX", NULL}, {"GID_MIN", NULL}, diff --git a/src/login.c b/src/login.c -index 9fed7b3..a5512d1 100644 +index 3a30298..4428907 100644 --- a/src/login.c +++ b/src/login.c -@@ -490,7 +490,6 @@ int main (int argc, char **argv) +@@ -458,7 +458,6 @@ int main (int argc, char **argv) const char *tmptty; const char *cp; const char *tmp; @@ -36,7 +36,7 @@ index 9fed7b3..a5512d1 100644 unsigned int retries; unsigned int timeout; struct passwd *pwd = NULL; -@@ -500,6 +499,7 @@ int main (int argc, char **argv) +@@ -468,6 +467,7 @@ int main (int argc, char **argv) char *pam_user = NULL; pid_t child; #else @@ -44,7 +44,7 @@ index 9fed7b3..a5512d1 100644 bool is_console; struct spwd *spwd = NULL; # if defined(ENABLE_LASTLOG) -@@ -669,7 +669,6 @@ int main (int argc, char **argv) +@@ -610,7 +610,6 @@ int main (int argc, char **argv) } environ = newenvp; /* make new environment active */ @@ -52,7 +52,7 @@ index 9fed7b3..a5512d1 100644 retries = getdef_unum ("LOGIN_RETRIES", RETRIES); #ifdef USE_PAM -@@ -685,8 +684,7 @@ int main (int argc, char **argv) +@@ -626,8 +625,7 @@ int main (int argc, char **argv) /* * hostname & tty are either set to NULL or their correct values, @@ -62,7 +62,7 @@ index 9fed7b3..a5512d1 100644 * * PAM_RHOST and PAM_TTY are used for authentication, only use * information coming from login or from the caller (e.g. no utmp) -@@ -695,10 +693,6 @@ int main (int argc, char **argv) +@@ -636,10 +634,6 @@ int main (int argc, char **argv) PAM_FAIL_CHECK; retcode = pam_set_item (pamh, PAM_TTY, tty); PAM_FAIL_CHECK; @@ -73,7 +73,7 @@ index 9fed7b3..a5512d1 100644 /* if fflg, then the user has already been authenticated */ if (!fflg) { char hostn[256]; -@@ -736,12 +730,6 @@ int main (int argc, char **argv) +@@ -677,12 +671,6 @@ int main (int argc, char **argv) bool failed = false; failcount++; @@ -86,7 +86,7 @@ index 9fed7b3..a5512d1 100644 retcode = pam_authenticate (pamh, 0); -@@ -1032,14 +1020,17 @@ int main (int argc, char **argv) +@@ -973,14 +961,17 @@ int main (int argc, char **argv) free (username); username = NULL; diff --git a/debian/patches/debian/cppw-Add-tool.patch b/debian/patches/debian/cppw-Add-tool.patch index 59a67a7b..485e3f07 100644 --- a/debian/patches/debian/cppw-Add-tool.patch +++ b/debian/patches/debian/cppw-Add-tool.patch @@ -10,10 +10,10 @@ Subject: cppw: Add tool create mode 100644 src/cppw.c diff --git a/po/POTFILES.in b/po/POTFILES.in -index 9ff6100..a60c93e 100644 +index 6d2c052..1c7ffe3 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in -@@ -86,6 +86,7 @@ src/chfn.c +@@ -85,6 +85,7 @@ src/chfn.c src/chgpasswd.c src/chpasswd.c src/chsh.c diff --git a/debian/shlibs.local b/debian/shlibs.local index 29d7bc69..51e3b99a 100644 --- a/debian/shlibs.local +++ b/debian/shlibs.local @@ -1 +1 @@ -deb: libsubid 4 libsubid4 (= ${binary:Version}) +deb: libsubid 5 libsubid5 (= ${binary:Version})