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 1300663 - Improve sudo protocol to support configurations with default_domain_suffix
Summary: Improve sudo protocol to support configurations with default_domain_suffix
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sssd
Version: 7.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Březina
QA Contact: Steeve Goveas
Aneta Šteflová Petrová
URL:
Whiteboard:
: 1331174 (view as bug list)
Depends On:
Blocks: 1382285
TreeView+ depends on / blocked
 
Reported: 2016-01-21 11:41 UTC by Pavel Březina
Modified: 2021-06-10 11:07 UTC (History)
17 users (show)

Fixed In Version: sssd-1.14.0-1.el7
Doc Type: Bug Fix
Doc Text:
*sudo* rules now work correctly when `default_domain_suffix` is set or when including a fully-qualified name Previously, the *sudo* utility did not correctly evaluate a *sudo* rule in these situations: * When the `default_domain_suffix` option was used in the `/etc/sssd/sssd.conf` file * When the *sudo* rule used a fully-qualified user name As a consequence, the *sudo* rule did not work. With this update, the System Security Services Daemon (SSSD) modifies *sudo* rules so that *sudo* evaluates them correctly in the described situation.
Clone Of:
: 1382285 (view as bug list)
Environment:
Last Closed: 2016-11-04 07:15:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 3960 0 None closed Improve sudo protocol 2020-05-02 18:17:03 UTC
Red Hat Product Errata RHEA-2016:2476 0 normal SHIPPED_LIVE sssd bug fix and enhancement update 2016-11-03 14:08:11 UTC

Description Pavel Březina 2016-01-21 11:41:00 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/sssd/ticket/2919

One BZ showed that current sudo protocol we use does not provide enough information to sudo to process rules that does not contain fully qualified names when the login does. We should improve the protocol and logic so it is more clear what does sssd and what does sudo.

Comment 6 Jakub Hrozek 2016-05-11 09:17:02 UTC
*** Bug 1331174 has been marked as a duplicate of this bug. ***

Comment 7 Jakub Hrozek 2016-07-07 10:47:50 UTC
* master: 61913b8f0d1ba54d82640500d7486fac5f72b030

Comment 10 Alex Glotov 2016-08-10 14:11:31 UTC
Jakub, ack, clear. Resetting it here, and yes, it is indeed for 01599086.

Comment 11 Xiyang Dong 2016-09-21 13:04:29 UTC
Could you please provide steps to verify?

Comment 12 Pavel Březina 2016-09-22 07:15:45 UTC
Create user, say user-1, in domain LDAP.
Create rule with sudoUser: user-1.

su user-1
sudo -l -- works

Set default_domain_suffix = LDAP
su user-1
sudo -l -- won't work without this fix

Comment 13 Xiyang Dong 2016-09-22 14:19:35 UTC
Verified on sssd-1.14.0-43.el7:
[root@vm-idm-002 ~]# su tuser
sh-4.2$ sudo -l
[sudo] password for tuser: 
Sorry, user tuser may not run sudo on vm-idm-002.
[root@vm-idm-002 ~]# ipa sudorule-add trule --usercat=all --hostcat=all --cmdcat=all
-----------------------
Added Sudo Rule "trule"
-----------------------
  Rule name: trule
  Enabled: TRUE
  User category: all
  Host category: all
  Command category: all
[root@vm-idm-002 ~]# service sssd restart
Redirecting to /bin/systemctl restart  sssd.service
[root@vm-idm-002 ~]# su tuser
sh-4.2$ sudo -l
Matching Defaults entries for tuser on this host:
    !visiblepw, always_set_home, env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE KDEDIR LS_COLORS", env_keep+="MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS
    LC_CTYPE", env_keep+="LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES", env_keep+="LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE", env_keep+="LC_TIME
    LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY", secure_path=/sbin\:/bin\:/usr/sbin\:/usr/bin

User tu[root@vm-idm-002 ~]# cat /etc/sssd/sssd.conf | grep "default_domain_suffix"
default_domain_suffix = testrelm.test
[root@vm-idm-002 ~]# service sssd restart
Redirecting to /bin/systemctl restart  sssd.service
[root@vm-idm-002 ~]# su tuser
sh-4.2$ sudo -l
Matching Defaults entries for tuser on this host:
    !visiblepw, always_set_home, env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE KDEDIR LS_COLORS", env_keep+="MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS
    LC_CTYPE", env_keep+="LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES", env_keep+="LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE", env_keep+="LC_TIME
    LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY", secure_path=/sbin\:/bin\:/usr/sbin\:/usr/bin

User tuser may run the following commands on this host:
    (root) ALL

Comment 16 Pavel Březina 2016-10-12 12:50:39 UTC
Looks good to me.

Comment 22 errata-xmlrpc 2016-11-04 07:15:11 UTC
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/RHEA-2016-2476.html


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