Skip to contentSkip to conversation

package/sudo: fix SUDO_ENABLE_SUDO_GROUP_RULE following version bump

Buildroot Yann E. MORIN 3 participants 3 messages Jul 18, 2022 – Feb 27, 2023

lore
Share & tools
lore
#0 lore raw

commit: https://git.buildroot.net/buildroot/commit/?id=079fccdee5a2a10fc8275094512b8423548ea147
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Since the version bump of sudo to v1.9.11p2 in commit 9b7f8da96b, the sed magic in SUDO_ENABLE_SUDO_GROUP_RULE no longer does its job, due to a slight change in the example sudoers file provided by upstream sudo.

This commit fixes the regexp to match the new sudoers file.

Fixes bug #14891 (https://bugs.busybox.net/show_bug.cgi?id=14891)

---
 package/sudo/sudo.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/sudo/sudo.mk +1 -1
index 2b9ba76a51..4f9fdb4b2c 100644
@@ -80,7 +80,7 @@ define SUDO_USERS
 endef
 
 define SUDO_ENABLE_SUDO_GROUP_RULE
-	$(SED) '/^# \%sudo\tALL=(ALL) ALL/s/^# //' $(TARGET_DIR)/etc/sudoers
+	$(SED) '/^# \%sudo\tALL=(ALL:ALL) ALL/s/^# //' $(TARGET_DIR)/etc/sudoers
 endef
 SUDO_POST_INSTALL_TARGET_HOOKS += SUDO_ENABLE_SUDO_GROUP_RULE
 

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#1 lore raw

Hi Peter,
the needs to be backported to 2022.11.x and 2022.02.x

Best,
Marcus

Quoted 32 lines · Yann E.MORIN

commit: https://git.buildroot.net/buildroot/commit/?id=079fccdee5a2a10fc8275094512b8423548ea147
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Since the version bump of sudo to v1.9.11p2 in commit 9b7f8da96b, the sed magic in SUDO_ENABLE_SUDO_GROUP_RULE no longer does its job, due to a slight change in the example sudoers file provided by upstream sudo.

This commit fixes the regexp to match the new sudoers file.

Fixes bug #14891 (https://bugs.busybox.net/show_bug.cgi?id=14891)

---
  package/sudo/sudo.mk | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
package/sudo/sudo.mk +1 -1
index 2b9ba76a51..4f9fdb4b2c 100644
@@ -80,7 +80,7 @@ define SUDO_USERS
  endef
 
  define SUDO_ENABLE_SUDO_GROUP_RULE
-     $(SED) '/^# \%sudo\tALL=(ALL) ALL/s/^# //' $(TARGET_DIR)/etc/sudoers
+     $(SED) '/^# \%sudo\tALL=(ALL:ALL) ALL/s/^# //' $(TARGET_DIR)/etc/sudoers
  endef
  SUDO_POST_INSTALL_TARGET_HOOKS += SUDO_ENABLE_SUDO_GROUP_RULE
 
Quoted 4 lines

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

________________________________

othermo GmbH | Sitz der Gesellschaft: Alzenau | Amtsgericht Aschaffenburg: HRB 14783 | USt-IdNr.: DE319977978 | Geschäftsführung: Dr. Dennis Metz.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Marcus" == Marcus Hoffmann <[email protected]> writes:

Hi Peter,
the needs to be backported to 2022.11.x and 2022.02.x

This is a commit from July 2022, so it is already in 2022.11.x (and 2022.08.x):

git branch --contains 079fccdee5a2a10fc8275094512b8423548ea147|grep '2022\.'
2022.08.x
2022.11.x

But it was indeed missed from 2022.02.x:

git shortlog 2022.02..2022.02.x -- package/sudo
Fabrice Fontaine (2):
package/sudo: fix CVE-2022-43995
package/sudo: bump to version 1.9.11p2

Francois Perrad (1):
package/sudo: bump to version 1.9.12p1

Nuno Gonçalves (2):
packages/sudo: explicitly set with-tzdir packages/sudo: explicitly set enable-tmpfiles.d

Yair Ben-Avraham (1):
package/sudo: security bump to version 1.9.12p2

So I have cherry-picked it now, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot