[Pkg-shadow-devel] Ubuntu shadow 1:4.8.1-1ubuntu5
Ubuntu Merge-o-Matic
mom at ubuntu.com
Fri Apr 17 05:41:05 BST 2020
This e-mail has been sent due to an upload to Ubuntu that contains Ubuntu
changes. It contains the difference between the new version and the
previous version of the same source package in Ubuntu.
-------------- next part --------------
Format: 1.8
Date: Thu, 16 Apr 2020 14:36:45 +0200
Source: shadow
Binary: passwd login uidmap
Architecture: source
Version: 1:4.8.1-1ubuntu5
Distribution: focal
Urgency: medium
Maintainer: Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>
Changed-By: Didier Roche <didrocks at ubuntu.com>
Description:
login - system login tools
passwd - change and administer password and group data
uidmap - programs to help use subuids
Launchpad-Bugs-Fixed: 1873263
Changes:
shadow (1:4.8.1-1ubuntu5) focal; urgency=medium
.
* debian/patches/1015_add_zsys_support.patch:
Fix regression on zfs system when the user dataset wasn���t created
(LP: #1873263)
- wrong variable was used when merged with debian
- reset the correct order to ensure owner and mod are correct.
Checksums-Sha1:
b2b8cdf0096f8fa9393215d7a8c2557b9a697432 1705 shadow_4.8.1-1ubuntu5.dsc
91399fba6f7220e88db061ef471503cce106c034 85340 shadow_4.8.1-1ubuntu5.debian.tar.xz
Checksums-Sha256:
dd5011afc1a0ad50c4a1aa1472e19f463c65b5c4a9c86993b024d6af78256c33 1705 shadow_4.8.1-1ubuntu5.dsc
14eca75b8a22fb11763c6478b57082c2dc2b504e11dcbce5e9e65d32414369ec 85340 shadow_4.8.1-1ubuntu5.debian.tar.xz
Files:
a3e7db2da3e8005874619333847ea42a 1705 admin required shadow_4.8.1-1ubuntu5.dsc
f08cf3ea6bf7b353583eed8ba3a547e1 85340 admin required shadow_4.8.1-1ubuntu5.debian.tar.xz
Original-Maintainer: Shadow package maintainers <pkg-shadow-devel at lists.alioth.debian.org>
-------------- next part --------------
diff -pruN 1:4.8.1-1ubuntu4/debian/changelog 1:4.8.1-1ubuntu5/debian/changelog
--- 1:4.8.1-1ubuntu4/debian/changelog 2020-04-06 07:51:10.000000000 +0000
+++ 1:4.8.1-1ubuntu5/debian/changelog 2020-04-16 12:36:45.000000000 +0000
@@ -1,3 +1,13 @@
+shadow (1:4.8.1-1ubuntu5) focal; urgency=medium
+
+ * debian/patches/1015_add_zsys_support.patch:
+ Fix regression on zfs system when the user dataset wasn���t created
+ (LP: #1873263)
+ - wrong variable was used when merged with debian
+ - reset the correct order to ensure owner and mod are correct.
+
+ -- Didier Roche <didrocks at ubuntu.com> Thu, 16 Apr 2020 14:36:45 +0200
+
shadow (1:4.8.1-1ubuntu4) focal; urgency=medium
* debian/patches/1015_add_zsys_support.patch:
diff -pruN 1:4.8.1-1ubuntu4/debian/patches/1015_add_zsys_support.patch 1:4.8.1-1ubuntu5/debian/patches/1015_add_zsys_support.patch
--- 1:4.8.1-1ubuntu4/debian/patches/1015_add_zsys_support.patch 2020-04-06 07:50:26.000000000 +0000
+++ 1:4.8.1-1ubuntu5/debian/patches/1015_add_zsys_support.patch 2020-04-16 12:36:45.000000000 +0000
@@ -17,9 +17,11 @@ Origin: ubuntu
src/usermod.c | 36 +++++++++++++++++++++++++++++++++++-
2 files changed, 77 insertions(+), 2 deletions(-)
---- a/src/useradd.c
-+++ b/src/useradd.c
-@@ -2084,6 +2084,13 @@
+Index: shadow-4.8.1/src/useradd.c
+===================================================================
+--- shadow-4.8.1.orig/src/useradd.c
++++ shadow-4.8.1/src/useradd.c
+@@ -2084,6 +2084,13 @@ static void usr_update (void)
*/
static void create_home (void)
{
@@ -33,52 +35,63 @@ Origin: ubuntu
if (access (prefix_user_home, F_OK) != 0) {
char path[strlen (prefix_user_home) + 2];
char *bhome, *cp;
-@@ -2147,7 +2154,41 @@
- }
- else
+@@ -2159,6 +2166,7 @@ static void create_home (void)
#endif
-- if (mkdir (path, 0) != 0) {
-+ // We don't create zsys user dataset for system users
-+ if (user_id < 1000) {
-+ zsys_failed = 1;
-+ } else {
-+ zsys_failed = 0;
-+ switch (childpid = fork())
-+ {
-+ case -1: /* error */
-+ zsys_failed = 1;
-+ break;
-+ case 0: /* child */
-+ devnull_fd = open("/dev/null", O_WRONLY);
-+ if (devnull_fd == -1) {
-+ perror("can't open /dev/null");
-+ exit(3);
-+ }
-+ // don't print zsys stdout and stderr
-+ if (dup2(devnull_fd, 1) == -1 || (dup2(devnull_fd, 2) == -1)) {
-+ exit(3);
-+ }
-+ execl(zsys, pname, "userdata", "create", user_name, prefix_user_home, NULL);
-+ /* If we come here, something has gone terribly wrong */
-+ perror(zsys);
-+ exit(42); /* don't continue, we now have 2 processes running! */
-+ /* NOTREACHED */
-+ break;
-+ default: /* parent */
-+ if (waitpid(childpid, &zsys_status, 0) == -1 || !WIFEXITED(zsys_status) || WEXITSTATUS(zsys_status) != 0)
+ fail_exit (E_HOMEDIR);
+ }
++
+ if (chown (path, 0, 0) < 0) {
+ fprintf (stderr,
+ _("%s: warning: chown on `%s' failed: %m\n"),
+@@ -2169,6 +2177,43 @@ static void create_home (void)
+ _("%s: warning: chmod on `%s' failed: %m\n"),
+ Prog, path);
+ }
++
++ // We don't create zsys user dataset for system users
++ zsys_failed = 0;
++ if (user_id < 1000) {
+ zsys_failed = 1;
-+ break;
-+ }
-+ }
++ } else {
++ zsys_failed = 0;
++ // Do a first chown before we prepare the mountpoint
++ (void) chown (prefix_user_home, user_id, user_gid);
++ switch (childpid = fork())
++ {
++ case -1: /* error */
++ zsys_failed = 1;
++ break;
++ case 0: /* child */
++ devnull_fd = open("/dev/null", O_WRONLY);
++ if (devnull_fd == -1) {
++ perror("can't open /dev/null");
++ exit(3);
++ }
++ // don't print zsys stdout and stderr
++ if (dup2(devnull_fd, 1) == -1 || (dup2(devnull_fd, 2) == -1)) {
++ exit(3);
++ }
++ execl(zsys, pname, "userdata", "create", user_name, path, NULL);
++ /* If we come here, something has gone terribly wrong */
++ perror(zsys);
++ exit(42); /* don't continue, we now have 2 processes running! */
++ /* NOTREACHED */
++ break;
++ default: /* parent */
++ if (waitpid(childpid, &zsys_status, 0) == -1 || !WIFEXITED(zsys_status) || WEXITSTATUS(zsys_status) != 0)
++ zsys_failed = 1;
++ break;
++ }
++ }
+
-+ /* XXX - create missing parent directories. --marekm */
-+ if (zsys_failed != 0 && mkdir (prefix_user_home, 0) != 0) {
- fprintf (stderr,
- _("%s: cannot create directory %s\n"),
- Prog, path);
---- a/src/usermod.c
-+++ b/src/usermod.c
-@@ -1819,6 +1819,12 @@
+ }
+ cp = strtok (NULL, "/");
+ }
+Index: shadow-4.8.1/src/usermod.c
+===================================================================
+--- shadow-4.8.1.orig/src/usermod.c
++++ shadow-4.8.1/src/usermod.c
+@@ -1819,6 +1819,12 @@ static void usr_update (void)
static void move_home (void)
{
struct stat sb;
@@ -91,12 +104,12 @@ Origin: ubuntu
if (access (prefix_user_newhome, F_OK) == 0) {
/*
-@@ -1853,7 +1859,35 @@
+@@ -1853,7 +1859,35 @@ static void move_home (void)
}
#endif
- if (rename (prefix_user_home, prefix_user_newhome) == 0) {
-+ zsys_failed = 0;
++ zsys_failed = 0;
+ switch (childpid = fork())
+ {
+ case -1: /* error */
@@ -112,7 +125,7 @@ Origin: ubuntu
+ if (dup2(devnull_fd, 1) == -1 || (dup2(devnull_fd, 2) == -1)) {
+ exit(3);
+ }
-+ execl(zsys, pname, "userdata", "set-home", prefix_user_home, user_newhome, NULL);
++ execl(zsys, pname, "userdata", "set-home", prefix_user_home, prefix_user_newhome, NULL);
+ /* If we come here, something has gone terribly wrong */
+ perror(zsys);
+ exit(42); /* don't continue, we now have 2 processes running! */
More information about the Pkg-shadow-devel
mailing list