Subject: bug#41875: closed (Re: [bug#41875] [PATCH] system: Add 'sg' and 'newgrp' to %SETUID-PROGRAMS.)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 21 Jun 2020 03:38:02 +0000

Your bug report

#41875: [PATCH] system: Add 'sg' and 'newgrp' to %SETUID-PROGRAMS.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
41875: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41875
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#41875] [PATCH] system: Add 'sg' and 'newgrp' to %SETUID-PROGRAMS.
From: [email-masked] (宋文武)
To: Brice Waegeneire <[email-masked]>
Cc: [email-masked]
Date: Sun, 21 Jun 2020 11:36:58 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Brice Waegeneire <[email-masked]> writes:

> * gnu/system.scm (%setuid-programs): Add 'sg' and 'newgrp'.

Pushed, thank you!

Subject: [PATCH] system: Add 'sg' and 'newgrp' to %SETUID-PROGRAMS.
From: Brice Waegeneire <[email-masked]>
To: [email-masked]
Date: Mon, 15 Jun 2020 18:23:28 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/system.scm (%setuid-programs): Add 'sg' and 'newgrp'.
---

Without it 'newgrp' is unusable:

--8<---------------cut here---------------start------------->8---
$ whoami
bricewge
$ cat /etc/group | grep wireshark
wireshark:x:970:bricewge
$ groups
users libvirt adbusers plugdev kvm lp netdev audio video input dialout wheel
$ newgrp wireshark
setgroups: Operation not permitted
setgid: Operation not permitted
--8<---------------cut here---------------end--------------->8---

I also added 'sg' since, in the shadow package, it's a symlink to 'newgrp'.

 gnu/system.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/system.scm b/gnu/system.scm
index 06bbc9e9c8..3e3d1927c2 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -932,7 +932,9 @@ use 'plain-file' instead~%")
   ;; Default set of setuid-root programs.
   (let ((shadow (@ (gnu packages admin) shadow)))
     (list (file-append shadow "/bin/passwd")
+          (file-append shadow "/bin/sg")
           (file-append shadow "/bin/su")
+          (file-append shadow "/bin/newgrp")
           (file-append shadow "/bin/newuidmap")
           (file-append shadow "/bin/newgidmap")
           (file-append inetutils "/bin/ping")
-- 
2.26.2