This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 627543 - The Runas_Spec are ignored in sudoers file
The Runas_Spec are ignored in sudoers file
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sudo (Show other bugs)
All Linux
medium Severity medium
: rc
: ---
Assigned To: Daniel Kopeček
Aleš Mareček
Depends On:
Blocks: 810147
  Show dependency treegraph
Reported: 2010-08-26 07:07 EDT by Vishal Gaikwad
Modified: 2012-04-05 05:35 EDT (History)
3 users (show)

See Also:
Fixed In Version: sudo-1.7.2p1-11.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 810147 (view as bug list)
Last Closed: 2012-02-20 22:21:31 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
proposed patch (2.03 KB, patch)
2011-10-25 08:13 EDT, Daniel Kopeček
no flags Details | Diff
proposed patch (542 bytes, patch)
2011-10-26 05:00 EDT, Daniel Kopeček
no flags Details | Diff

  None (edit)
Description Vishal Gaikwad 2010-08-26 07:07:20 EDT
Description of problem:
Using the Runas_Alias rule vis visudo seems to ne ignored.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1) Create three user/group "a", "b", "c"

2) Run visudo command to add following lines:

User_Alias OK_GROUP = %a
Runas_Alias OK_RUNAS_GROUP = %b, %c

3) Run as user "a"
Actual results:
# sudo -g b ls /etc
Sorry, user a is not allowed to execute '/bin/ls /etc' as a:b on localhost.

Expected results:
$ sudo -g b ls /etc/
a2ps.cfg               conman.conf       firmware              init.d          ltrace.conf     ntp             rc0.d                    screenrc           tftpd.rules

Additional info:

A workaround is to use the following rule in visudo:

%a ALL = (:b, c) ALL
Comment 2 RHEL Product and Program Management 2011-05-31 11:31:25 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 3 Daniel Kopeček 2011-10-25 08:13:31 EDT
Created attachment 530072 [details]
proposed patch

The attached patch adds interpretation of USERGROUP entries in the _runaslist_matches(user_list, group_list) function. To fix the second issue, it changes the handling of a resolved alias in the group check loop (passes it as a group list, not as an user list).
Comment 4 Daniel Kopeček 2011-10-26 05:00:30 EDT
Created attachment 530259 [details]
proposed patch

Stripped down patch. The case with %group syntax is not a bug (
Comment 5 Daniel Kopeček 2011-10-26 07:28:35 EDT
Upstream fix:
Comment 8 errata-xmlrpc 2012-02-20 22:21:31 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

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