RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1652543 - cvtsudoers filters out some user defaults when filtering by a group
Summary: cvtsudoers filters out some user defaults when filtering by a group
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sudo
Version: 7.6
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Radovan Sroka
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 1683581
TreeView+ depends on / blocked
 
Reported: 2018-11-22 10:44 UTC by Dalibor Pospíšil
Modified: 2019-02-27 09:27 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1652541
: 1683581 (view as bug list)
Environment:
Last Closed: 2019-02-27 09:27:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dalibor Pospíšil 2018-11-22 10:44:46 UTC
+++ This bug was initially created as a clone of Bug #1652541 +++

Description of problem:
When filtering the output by a group, some user bound defaults are removed too even cvtsudoers cannot know in advance that the user used in those default rules is or in not a member of that group. The actual presence of that user in the specified group does not make any change.
Cvtsudoers should preserve all the user bound defaults when filering by a group the same as if fintering by a host.

Version-Release number of selected component (if applicable):
sudo-1.8.23-3.el7

How reproducible:
100%

Steps to Reproduce:
1. cvtsudoers -f sudoers -m group=wheel << 'EOF'
Defaults syslog=auth
Defaults>root !set_logname
Defaults:FULLTIMERS !lecture
Defaults:millert !authenticate
Defaults@SERVERS log_year, logfile=/var/log/sudo.log

Host_Alias CDROM = orion, perseus, hercules
Host_Alias SERVERS = master, mail, www, ns

%wheel ALL = (ALL) ALL
ALL CDROM = NOPASSWD: /sbin/umount /CDROM, /sbin/mount -o nosuid\,nodev /dev/cdrom /CDROM
EOF

Actual results:
Defaults syslog=auth
Defaults>root !set_logname
Defaults@SERVERS log_year, logfile=/var/log/sudo.log

Host_Alias CDROM = orion, perseus, hercules
Host_Alias SERVERS = master, mail, www, ns

%wheel ALL = (ALL) ALL

ALL CDROM = NOPASSWD: /sbin/umount /CDROM, /sbin/mount -o nosuid\,nodev\
    /dev/cdrom /CDROM


Expected results:
Defaults syslog=auth
Defaults>root !set_logname
Defaults:FULLTIMERS !lecture
Defaults:millert !authenticate
Defaults@SERVERS log_year, logfile=/var/log/sudo.log

Host_Alias CDROM = orion, perseus, hercules
Host_Alias SERVERS = master, mail, www, ns

%wheel ALL = (ALL) ALL
ALL CDROM = NOPASSWD: /sbin/umount /CDROM, /sbin/mount -o nosuid\,nodev /dev/cdrom /CDROM

Comment 1 Daniel Kopeček 2019-02-27 09:27:04 UTC
This Bugzilla has been reviewed by Red Hat and is not planned on being addressed in Red Hat Enterprise Linux 7 and therefore will be closed. If this bug is critical to production systems, please contact your Red Hat support representative and provide sufficient business justification.


Note You need to log in before you can comment on or make changes to this bug.