Bug 1199143 - With empty ipaselinuxusermapdefault security context on client is staff_u
Summary: With empty ipaselinuxusermapdefault security context on client is staff_u
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sssd
Version: 7.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: SSSD Maintainers
QA Contact: Kaushik Banerjee
URL:
Whiteboard:
Depends On: 1192314
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-05 14:09 UTC by Jan Kurik
Modified: 2020-05-04 10:46 UTC (History)
17 users (show)

Fixed In Version: sssd-1.12.2-58.el7_1.4
Doc Type: Bug Fix
Doc Text:
When the SELinux user content on an IdM server was set to an empty string, the SSSD SELinux evaluation utility previously returned an error. With this update, when an empty string is set, the SSSD correctly uses the default SELinux context value stored in the policy on the client, which prevents the described error from occurring.
Clone Of: 1192314
Environment:
Last Closed: 2015-03-26 13:58:52 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 3628 0 None None None 2020-05-04 10:45:59 UTC
Red Hat Product Errata RHBA-2015:0736 0 normal SHIPPED_LIVE sssd bug fix update 2015-03-26 17:57:15 UTC

Description Jan Kurik 2015-03-05 14:09:07 UTC
This bug has been copied from bug #1192314 and has been proposed
to be backported to 7.1 z-stream (EUS).

Comment 6 Jakub Hrozek 2015-03-12 14:58:27 UTC
Steeve, as you found out this bug is not fixed correctly. Please flip it back to ASSIGNED. Thank you, I'll come up with additional fix.

The cause you found out to be broken is when the SELinux context is set to an empty string and at the same time there are no SELinux user maps on the server side.

Comment 7 Steeve Goveas 2015-03-13 07:48:45 UTC
Thanks Jakub, for confirming. Moving it back to assigned.

Comment 8 Jakub Hrozek 2015-03-13 07:56:36 UTC
The patch is on sssd-devel, pending review.

Comment 10 Steeve Goveas 2015-03-19 14:13:18 UTC
Verified in version
sssd-1.12.2-58.el7_1.5

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa_trust_func_selinuxusermap_master_008_setup: AD user associated with empty selinuxusermap on Master
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [  BEGIN   ] :: Running 'kdestroy -A'
:: [   PASS   ] :: Command 'kdestroy -A' (Expected 0, got 0)
:: [  BEGIN   ] :: Running 'echo Secret123 | kinit admin'
Password for admin@SLNX2K12R2.TEST: 
:: [   PASS   ] :: Command 'echo Secret123 | kinit admin' (Expected 0, got 0)
:: [  BEGIN   ] :: Running 'ipa config-mod --ipaselinuxusermapdefault='
  Maximum username length: 32
  Home directory base: /home
  Default shell: /bin/sh
  Default users group: ipausers
  Default e-mail domain: slnx2k12r2.test
  Search time limit: 2
  Search size limit: 100
  User search fields: uid,givenname,sn,telephonenumber,ou,title
  Group search fields: cn,description
  Enable migration mode: FALSE
  Certificate Subject base: O=SLNX2K12R2.TEST
  Password Expiration Notification (days): 4
  Password plugin features: AllowNThash
  SELinux user map order: guest_u:s0$xguest_u:s0$user_u:s0$staff_u:s0-s0:c0.c1023$unconfined_u:s0-s0:c0.c1023
  Default PAC types: nfs:NONE, MS-PAC
:: [   PASS   ] :: Command 'ipa config-mod --ipaselinuxusermapdefault=' (Expected 0, got 0)
:: [  BEGIN   ] :: Running 'ipa config-show > /tmp/tmpout.txt 2>&1'
:: [   PASS   ] :: Command 'ipa config-show > /tmp/tmpout.txt 2>&1' (Expected 0, got 0)
:: [   PASS   ] :: File '/tmp/tmpout.txt' should not contain 'Default SELinux user' 
:: [  BEGIN   ] :: Running 'ssh -o StrictHostKeyChecking=no root@cloud-qe-7.slnx2k12r2.test         'service sssd stop; rm -rf /var/lib/sssd/{db,mc}/*; service sssd start''
Redirecting to /bin/systemctl stop  sssd.service
Redirecting to /bin/systemctl start  sssd.service
:: [   PASS   ] :: Command 'ssh -o StrictHostKeyChecking=no root@cloud-qe-7.slnx2k12r2.test         'service sssd stop; rm -rf /var/lib/sssd/{db,mc}/*; service sssd start'' (Expected 0, got 0)
:: [  BEGIN   ] :: Running 'ssh -o StrictHostKeyChecking=no root@ipaqavmd.slnx2k12r2.test         'service sssd stop; rm -rf /var/lib/sssd/{db,mc}/*; service sssd start''
Redirecting to /bin/systemctl stop  sssd.service
Redirecting to /bin/systemctl start  sssd.service
:: [   PASS   ] :: Command 'ssh -o StrictHostKeyChecking=no root@ipaqavmd.slnx2k12r2.test         'service sssd stop; rm -rf /var/lib/sssd/{db,mc}/*; service sssd start'' (Expected 0, got 0)
:: [  BEGIN   ] :: Running 'ssh -o StrictHostKeyChecking=no root@cloud-qe-9.slnx2k12r2.test         'service sssd stop; rm -rf /var/lib/sssd/{db,mc}/*; service sssd start''
Redirecting to /bin/systemctl stop  sssd.service
Redirecting to /bin/systemctl start  sssd.service
:: [   PASS   ] :: Command 'ssh -o StrictHostKeyChecking=no root@cloud-qe-9.slnx2k12r2.test         'service sssd stop; rm -rf /var/lib/sssd/{db,mc}/*; service sssd start'' (Expected 0, got 0)
:: [  BEGIN   ] :: Running 'sleep 10'
:: [   PASS   ] :: Command 'sleep 10' (Expected 0, got 0)
:: [ 07:53:06 ] :: Running remotehost-sync-set -s '75.' -m cloud-qe-7.idmqe.lab.eng.bos.redhat.com
:: [  BEGIN   ] :: Running 'remotehost-sync-set -s '75.' -m cloud-qe-7.idmqe.lab.eng.bos.redhat.com'
remotehost-sync-set -s 75. -m cloud-qe-7.idmqe.lab.eng.bos.redhat.com
root     22181 13414  0 06:36 ?        00:00:00 python -m SimpleHTTPServer 8907
:: [   PASS   ] :: Command 'remotehost-sync-set -s '75.' -m cloud-qe-7.idmqe.lab.eng.bos.redhat.com' (Expected 0, got 0)
'0851a009-eb70-4a1d-8181-d9787255e4ef'
ipa-trust-func-selinuxusermap-master-008-setup-AD-user-associated-with-empty-selinuxusermap-on-Master result: PASS
   metric: 0
   Log: /var/tmp/beakerlib-29042845/journal.txt
    Info: Searching AVC errors produced since 1426765967.4 (Thu Mar 19 07:52:47 2015)
     Searching logs...
     Info: No AVC messages found.
 Writing to /mnt/testarea/tmp.273JcO
:
   AvcLog: /mnt/testarea/tmp.273JcO

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa_trust_func_selinuxusermap_master_008: AD user associated with empty selinuxusermap on Master
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [  BEGIN   ] :: Running 'kdestroy -A'
:: [   PASS   ] :: Command 'kdestroy -A' (Expected 0, got 0)
:: [  BEGIN   ] :: Running 'echo Secret123 | kinit au103190701@IPAAD2012R2.TEST'
Password for au103190701@IPAAD2012R2.TEST: 
:: [   PASS   ] :: Command 'echo Secret123 | kinit au103190701@IPAAD2012R2.TEST' (Expected 0, got 0)
:: [  BEGIN   ] :: Running 'verify_ssh_selinuxuser_success_with_krbcred au103190701@ipaad2012r2.test ipaqavmd.slnx2k12r2.test unconfined_u:.*s0-s0:c0.c1023'
:: [  BEGIN   ] :: Running 'ssh -l 'au103190701@ipaad2012r2.test' ipaqavmd.slnx2k12r2.test 'id -Z' > /tmp/show_selinuxpolicy.out'
:: [   PASS   ] :: Command 'ssh -l 'au103190701@ipaad2012r2.test' ipaqavmd.slnx2k12r2.test 'id -Z' > /tmp/show_selinuxpolicy.out' (Expected 0, got 0)
:: [   PASS   ] :: File '/tmp/show_selinuxpolicy.out' should contain 'unconfined_u:.*s0-s0:c0.c1023' 
:: [   PASS   ] :: Authentication successful for au103190701@ipaad2012r2.test, to ipaqavmd.slnx2k12r2.test, with selinuxuser unconfined_u:.*s0-s0:c0.c1023 as expected 
:: [   PASS   ] :: Command 'verify_ssh_selinuxuser_success_with_krbcred au103190701@ipaad2012r2.test ipaqavmd.slnx2k12r2.test unconfined_u:.*s0-s0:c0.c1023' (Expected 0, got 0)
:: [  BEGIN   ] :: Running 'verify_ssh_selinuxuser_success_with_krbcred au103190701@ipaad2012r2.test cloud-qe-9.slnx2k12r2.test unconfined_u:.*s0-s0:c0.c1023'
:: [  BEGIN   ] :: Running 'ssh -l 'au103190701@ipaad2012r2.test' cloud-qe-9.slnx2k12r2.test 'id -Z' > /tmp/show_selinuxpolicy.out'
:: [   PASS   ] :: Command 'ssh -l 'au103190701@ipaad2012r2.test' cloud-qe-9.slnx2k12r2.test 'id -Z' > /tmp/show_selinuxpolicy.out' (Expected 0, got 0)
:: [   PASS   ] :: File '/tmp/show_selinuxpolicy.out' should contain 'unconfined_u:.*s0-s0:c0.c1023' 
:: [   PASS   ] :: Authentication successful for au103190701@ipaad2012r2.test, to cloud-qe-9.slnx2k12r2.test, with selinuxuser unconfined_u:.*s0-s0:c0.c1023 as expected 
:: [   PASS   ] :: Command 'verify_ssh_selinuxuser_success_with_krbcred au103190701@ipaad2012r2.test cloud-qe-9.slnx2k12r2.test unconfined_u:.*s0-s0:c0.c1023' (Expected 0, got 0)
:: [  BEGIN   ] :: Running 'kdestroy -A'
:: [   PASS   ] :: Command 'kdestroy -A' (Expected 0, got 0)
:: [  BEGIN   ] :: Running 'echo Secret123 | kinit au203190701@IPAAD2012R2.TEST'
Password for au203190701@IPAAD2012R2.TEST: 
:: [   PASS   ] :: Command 'echo Secret123 | kinit au203190701@IPAAD2012R2.TEST' (Expected 0, got 0)
:: [  BEGIN   ] :: Running 'verify_ssh_selinuxuser_success_with_krbcred au203190701@ipaad2012r2.test ipaqavmd.slnx2k12r2.test unconfined_u:.*s0-s0:c0.c1023'
:: [  BEGIN   ] :: Running 'ssh -l 'au203190701@ipaad2012r2.test' ipaqavmd.slnx2k12r2.test 'id -Z' > /tmp/show_selinuxpolicy.out'
:: [   PASS   ] :: Command 'ssh -l 'au203190701@ipaad2012r2.test' ipaqavmd.slnx2k12r2.test 'id -Z' > /tmp/show_selinuxpolicy.out' (Expected 0, got 0)
:: [   PASS   ] :: File '/tmp/show_selinuxpolicy.out' should contain 'unconfined_u:.*s0-s0:c0.c1023' 
:: [   PASS   ] :: Authentication successful for au203190701@ipaad2012r2.test, to ipaqavmd.slnx2k12r2.test, with selinuxuser unconfined_u:.*s0-s0:c0.c1023 as expected 
:: [   PASS   ] :: Command 'verify_ssh_selinuxuser_success_with_krbcred au203190701@ipaad2012r2.test ipaqavmd.slnx2k12r2.test unconfined_u:.*s0-s0:c0.c1023' (Expected 0, got 0)
:: [  BEGIN   ] :: Running 'verify_ssh_selinuxuser_success_with_krbcred au203190701@ipaad2012r2.test cloud-qe-9.slnx2k12r2.test unconfined_u:.*s0-s0:c0.c1023'
:: [  BEGIN   ] :: Running 'ssh -l 'au203190701@ipaad2012r2.test' cloud-qe-9.slnx2k12r2.test 'id -Z' > /tmp/show_selinuxpolicy.out'
:: [   PASS   ] :: Command 'ssh -l 'au203190701@ipaad2012r2.test' cloud-qe-9.slnx2k12r2.test 'id -Z' > /tmp/show_selinuxpolicy.out' (Expected 0, got 0)
:: [   PASS   ] :: File '/tmp/show_selinuxpolicy.out' should contain 'unconfined_u:.*s0-s0:c0.c1023' 
:: [   PASS   ] :: Authentication successful for au203190701@ipaad2012r2.test, to cloud-qe-9.slnx2k12r2.test, with selinuxuser unconfined_u:.*s0-s0:c0.c1023 as expected 
:: [   PASS   ] :: Command 'verify_ssh_selinuxuser_success_with_krbcred au203190701@ipaad2012r2.test cloud-qe-9.slnx2k12r2.test unconfined_u:.*s0-s0:c0.c1023' (Expected 0, got 0)
:: [ 07:53:29 ] :: Running remotehost-sync-set -s '76.' -m cloud-qe-7.idmqe.lab.eng.bos.redhat.com
:: [  BEGIN   ] :: Running 'remotehost-sync-set -s '76.' -m cloud-qe-7.idmqe.lab.eng.bos.redhat.com'
remotehost-sync-set -s 76. -m cloud-qe-7.idmqe.lab.eng.bos.redhat.com
root     22181 13414  0 06:36 ?        00:00:00 python -m SimpleHTTPServer 8907
:: [   PASS   ] :: Command 'remotehost-sync-set -s '76.' -m cloud-qe-7.idmqe.lab.eng.bos.redhat.com' (Expected 0, got 0)
'132f8f3a-56c6-4ddb-a4e6-058634211037'
ipa-trust-func-selinuxusermap-master-008-AD-user-associated-with-empty-selinuxusermap-on-Master result: PASS

Comment 12 errata-xmlrpc 2015-03-26 13:58:52 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/RHBA-2015-0736.html


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