tags 529897 +patch
thanks

Here is a patch that fixes this.
diff --recursive -u shadow-4.1.3.1/debian/changelog shadow-4.1.3.1.lio/debian/changelog
--- shadow-4.1.3.1/debian/changelog	2009-05-22 09:59:53.000000000 +0200
+++ shadow-4.1.3.1.lio/debian/changelog	2009-05-22 09:48:51.498030386 +0200
@@ -1,3 +1,9 @@
+shadow (1:4.1.3.1-2) unstable; urgency=low
+
+  * ensure newgrp/sg return exit status of their child (Closes: #529897).
+
+ -- Lionel Elie Mamane <[email protected]>  Fri, 22 May 2009 09:48:09 +0200
+
 shadow (1:4.1.3.1-1) unstable; urgency=low
 
   * The "Le Puant Macéré" release.
diff --recursive -u shadow-4.1.3.1/src/newgrp.c shadow-4.1.3.1.lio/src/newgrp.c
--- shadow-4.1.3.1/src/newgrp.c	2008-09-06 14:51:54.000000000 +0200
+++ shadow-4.1.3.1.lio/src/newgrp.c	2009-05-22 09:45:26.045031501 +0200
@@ -344,7 +344,7 @@
 				         (unsigned long) gid, name));
 			}
 			closelog ();
-			exit (0);
+			exit (WEXITSTATUS(cst));
 		}
 
 		/* child - restore signals to their default state */

Reply via email to