Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1138581 - sudo with sssd doesn't work correctly with sudoOrder option
sudo with sssd doesn't work correctly with sudoOrder option
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sudo (Show other bugs)
6.6
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Daniel Kopeček
Dalibor Pospíšil
:
Depends On: 1138576 1232950 1247997
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-05 04:55 EDT by David Spurek
Modified: 2015-07-29 08:18 EDT (History)
6 users (show)

See Also:
Fixed In Version: sudo-1.8.6p3-16.el6
Doc Type: Bug Fix
Doc Text:
Cause: The implementation of SSSD support in sudo wasn't sorting the rules according to the sudoOrder attribute value Consequence: Rules processed in undefined order even if the sudoOrder attribute was present. Fix: Implemented sorting by the sudoOrder attribute value. Result: Rules are sorted in a defined order (as described in the documentation)
Story Points: ---
Clone Of: 1138576
Environment:
Last Closed: 2015-07-22 03:36:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
proposed patch (5.08 KB, patch)
2015-03-02 04:33 EST, Daniel Kopeček
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1409 normal SHIPPED_LIVE Moderate: sudo security, bug fix, and enhancement update 2015-07-20 14:06:58 EDT

  None (edit)
Description David Spurek 2014-09-05 04:55:06 EDT
The same problem in rhel6, tested with sudo-1.8.6p3-15.el6 and sssd-1.11.6-28.el6
+++ This bug was initially created as a clone of Bug #1138576 +++

Description of problem:
sudo with sssd doesn't  work correctly with sudoOrder option. rule with the highest value in sudoOrder parameter should be used.

dn: cn=rule_allow,ou=Sudoers,dc=my-domain,dc=com
objectClass: top
objectClass: sudoRole
cn: rule_allow
sudoHost: ALL
sudoUser: userallowed
sudoCommand: /usr/bin/true
sudoOrder: 2

dn: cn=rule_deny,ou=Sudoers,dc=my-domain,dc=com
objectClass: top
objectClass: sudoRole
cn: rule_deny
sudoHost: ALL
sudoUser: userallowed
sudoCommand: !/usr/bin/true
sudoCommand: ALL
sudoOrder: 1

[test]su - userallowed -c 'sudo true'su: warning: cannot change directory to /home/userallowed: No such file or directory
Sorry, user userallowed is not allowed to execute '/bin/true' as root on rhel7.example.com. 


Version-Release number of selected component (if applicable):
sudo-1.8.6p7-11.el7
sssd-1.11.2-65.el7

How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 2 Daniel Kopeček 2015-02-24 08:52:31 EST
Ok, this one looks like a real bug from the logs. Easily fixable.
Comment 4 Daniel Kopeček 2015-03-02 04:33:30 EST
Created attachment 997008 [details]
proposed patch
Comment 7 errata-xmlrpc 2015-07-22 03:36:04 EDT
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.

https://rhn.redhat.com/errata/RHSA-2015-1409.html

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