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.
Format: 1.8
Date: Thu, 28 May 2020 08:37:47 +0200
Source: shadow
Binary: passwd login uidmap
Architecture: source
Version: 1:4.8.1-1ubuntu6
Distribution: groovy
Urgency: medium
Maintainer: Ubuntu Developers <[email protected]>
Changed-By: Didier Roche <[email protected]>
Description: 
 login      - system login tools
 passwd     - change and administer password and group data
 uidmap     - programs to help use subuids
Launchpad-Bugs-Fixed: 1881540
Changes: 
 shadow (1:4.8.1-1ubuntu6) groovy; urgency=medium
 .
   * debian/patches/1015_add_zsys_support.patch:
     - Add support for ZSys user deletion (LP: #1881540)
     - Fix a build warning
Checksums-Sha1: 
 ae98d6f71d1982f036047d8d80121f848de4ef1b 1705 shadow_4.8.1-1ubuntu6.dsc
 cd9766f66e91591f33bd362526480a2c8252cc69 85620 
shadow_4.8.1-1ubuntu6.debian.tar.xz
Checksums-Sha256: 
 f74fd356e3d237624704a1698da160f28f87d780f1d989ad3f494a924242e7c6 1705 
shadow_4.8.1-1ubuntu6.dsc
 d45a2d33774f455295be012e9828d99dc6cb7cf1bc76ba12e0cfc55296740b20 85620 
shadow_4.8.1-1ubuntu6.debian.tar.xz
Files: 
 f80f13032f7715544b1d9971071a0398 1705 admin required shadow_4.8.1-1ubuntu6.dsc
 6eb4df52e8361be33cc2ec2cdc00c435 85620 admin required 
shadow_4.8.1-1ubuntu6.debian.tar.xz
Original-Maintainer: Shadow package maintainers 
<[email protected]>
diff -pruN 1:4.8.1-1ubuntu5/debian/changelog 1:4.8.1-1ubuntu6/debian/changelog
--- 1:4.8.1-1ubuntu5/debian/changelog   2020-04-16 12:36:45.000000000 +0000
+++ 1:4.8.1-1ubuntu6/debian/changelog   2020-05-28 06:37:47.000000000 +0000
@@ -1,3 +1,11 @@
+shadow (1:4.8.1-1ubuntu6) groovy; urgency=medium
+
+  * debian/patches/1015_add_zsys_support.patch:
+    - Add support for ZSys user deletion (LP: #1881540)
+    - Fix a build warning
+
+ -- Didier Roche <[email protected]>  Thu, 28 May 2020 08:37:47 +0200
+
 shadow (1:4.8.1-1ubuntu5) focal; urgency=medium
 
   * debian/patches/1015_add_zsys_support.patch:
diff -pruN 1:4.8.1-1ubuntu5/debian/patches/1015_add_zsys_support.patch 
1:4.8.1-1ubuntu6/debian/patches/1015_add_zsys_support.patch
--- 1:4.8.1-1ubuntu5/debian/patches/1015_add_zsys_support.patch 2020-04-16 
12:36:45.000000000 +0000
+++ 1:4.8.1-1ubuntu6/debian/patches/1015_add_zsys_support.patch 2020-05-28 
06:37:47.000000000 +0000
@@ -43,7 +43,7 @@ Index: shadow-4.8.1/src/useradd.c
                                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)
+@@ -2169,6 +2177,47 @@ static void create_home (void)
                                                                        _("%s: 
warning: chmod on `%s' failed: %m\n"),
                                                                        Prog, 
path);
                                }
@@ -55,7 +55,11 @@ Index: shadow-4.8.1/src/useradd.c
 +                              } else {
 +                                      zsys_failed = 0;
 +                                      // Do a first chown before we prepare 
the mountpoint
-+                                      (void) chown (prefix_user_home, 
user_id, user_gid);
++                                      if (chown (prefix_user_home, user_id, 
user_gid) < 0) {
++                                              fprintf (stderr,
++                                                                              
_("%s: warning: chown on `%s' failed: %m\n"),
++                                                                              
Prog, prefix_user_home);
++                                      }
 +                                      switch (childpid = fork())
 +                                      {
 +                                      case -1: /* error */
@@ -141,3 +145,50 @@ Index: shadow-4.8.1/src/usermod.c
                        /* FIXME: rename above may have broken symlinks
                         *        pointing to the user's home directory
                         *        with an absolute path. */
+Index: shadow-4.8.1/src/userdel.c
+===================================================================
+--- shadow-4.8.1.orig/src/userdel.c
++++ shadow-4.8.1/src/userdel.c
+@@ -1296,6 +1296,42 @@ int main (int argc, char **argv)
+       }
+ #endif                                /* EXTRA_CHECK_HOME_DIR */
+ 
++      /* ZSys support: always dissociate dataset, even if we don’t delete 
the content */
++      if (user_id >= 1000) {
++              const char zsys[] = "/sbin/zsysctl";
++              const char *pname = "zsysctl";
++              pid_t childpid;
++              int devnull_fd;
++              int zsys_status;
++              switch (childpid = fork())
++              {
++              case -1: /* error */
++                      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);
++                      }
++                      if (rflg)
++                              execl(zsys, pname, "userdata", "dissociate", 
"--remove", user_name, NULL);
++                      else
++                              execl(zsys, pname, "userdata", "dissociate", 
user_name, 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 */
++                      waitpid(childpid, &zsys_status, 0);
++                      break;
++              }
++      }
++
+       if (rflg) {
+ #ifdef WITH_BTRFS
+               int is_subvolume = btrfs_is_subvolume (user_home);
_______________________________________________
Pkg-shadow-devel mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-shadow-devel

Reply via email to