Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 864889 - Configure winbind_krb5_locator.so via alternatives to allow IPA AD trusts use
Configure winbind_krb5_locator.so via alternatives to allow IPA AD trusts use
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: samba4 (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Andreas Schneider
Namita Soman
:
Depends On:
Blocks: 864950
  Show dependency treegraph
 
Reported: 2012-10-10 06:50 EDT by Alexander Bokovoy
Modified: 2013-02-21 03:36 EST (History)
3 users (show)

See Also:
Fixed In Version: samba4-4.0.0-52.el6.rc4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 864950 (view as bug list)
Environment:
Last Closed: 2013-02-21 03:36:35 EST
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)
patch to introduce alternatives for winbind_krb5_locator.so (2.94 KB, patch)
2012-10-10 06:54 EDT, Alexander Bokovoy
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0506 normal SHIPPED_LIVE Moderate: samba4 security, bug fix and enhancement update 2013-02-20 16:30:25 EST

  None (edit)
Description Alexander Bokovoy 2012-10-10 06:50:48 EDT
Description of problem:
On IPA server when AD trusts feature is enabled, winbind_krb5_locator.so plugin should not be available to libkrb5. This could be achieved by requiring that samba{,4}-winbind-krb5-locator package is never installed when ipa-server-trust-ad package is installed but much easier to automatically configure through alternatives.

Without this fix winbind_krb5_locator.so plugin to libkrb5 will interfere with winbindd configuration for IPA AD trusts, rendering them unusable.
Comment 2 Alexander Bokovoy 2012-10-10 06:54:22 EDT
Created attachment 624780 [details]
patch to introduce alternatives for winbind_krb5_locator.so

This is spec change that is needed to allow disabling winbind_krb5_locator.so plugin when trusts are in use on the server. Since libkrb5 reads any file in its plugins directory, keeping disabled plugin there is not an option, so I moved it back to %_libdir and used alternatives instead.

When trusts package (ipa-server-trust-ad) is installed, it will alternate to /dev/null for this plugin (link in plugins dir will point to /etc/alternatives/winbind_krb5_locator.so which will point to /dev/null). This will make libkrb5 to effectively ignore the plugin.

When trusts package is uninstalled, samba4 package will automatically be selected as a provider for the winbind_krb5_locator.so and will redirect the link to %_libdir/winbind_krb5_locator.so which is happily used by libkrb5
Comment 4 Andreas Schneider 2012-12-06 11:49:55 EST
There is a typo in post uninstall script.
Comment 5 Andreas Schneider 2012-12-10 13:08:07 EST
Fixed postun script.
Comment 7 Andreas Schneider 2012-12-17 06:21:28 EST
Fixed another typo in postun script.
Comment 8 Namita Soman 2013-01-28 11:17:55 EST
Installed ipa-server-trust-ad, and verified the 
# yum install ipa-server-trust-ad

# find / -name winbind_krb5_locator.so -print 
/var/lib/alternatives/winbind_krb5_locator.so
/usr/lib64/krb5/plugins/libkrb5/winbind_krb5_locator.so
/etc/alternatives/winbind_krb5_locator.so

# ls -l /usr/lib64/krb5/plugins/libkrb5/winbind_krb5_locator.so
lrwxrwxrwx. 1 root root 41 Jan 28 11:08 /usr/lib64/krb5/plugins/libkrb5/winbind_krb5_locator.so -> /etc/alternatives/winbind_krb5_locator.so


Next uninstalled ipa-server-ad....
# yum remove ipa-server-trust-ad

# find / -name winbind_krb5_locator.so -print 
<Nothing listed>


Ques: Does this verify the bz? Not sure how to verify the part "When trusts package is uninstalled, samba4 package will automatically be selected as a provider for the winbind_krb5_locator.so and will redirect the link to %_libdir/winbind_krb5_locator.so which is happily used by libkrb5"
Comment 9 Andreas Schneider 2013-01-28 12:14:49 EST
There is also a samba4-winbind-krb5-locator plugin. If you install samba4-winbind-krb5-locator and ipa-server-trust-ad then the locator plugin should be the one from IPA.


If both are installed and you uninstall ipa-server-trust-ad the samba4-winbind-krb5-locator plugin should be linked again.
Comment 10 Namita Soman 2013-01-28 13:29:44 EST
# rpm -qa | grep samba
samba4-common-4.0.0-55.el6.rc4.x86_64
samba4-python-4.0.0-55.el6.rc4.x86_64
samba4-libs-4.0.0-55.el6.rc4.x86_64
samba4-winbind-4.0.0-55.el6.rc4.x86_64
samba4-4.0.0-55.el6.rc4.x86_64
samba4-winbind-krb5-locator-4.0.0-55.el6.rc4.x86_64


After uninstalling ipa-server-trust-ad:
# ls -l /usr/lib64/krb5/plugins/libkrb5/winbind_krb5_locator.so
lrwxrwxrwx. 1 root root 41 Jan 28 13:26 /usr/lib64/krb5/plugins/libkrb5/winbind_krb5_locator.so -> /etc/alternatives/winbind_krb5_locator.so
Comment 11 Namita Soman 2013-01-28 13:34:38 EST
With ipa-server-trust-ad and samba4-winbind-krb5-locator installed, then uninstalled ipa-server-trust-ad....

# find / -name winbind_krb5_locator.so -print 
/var/lib/alternatives/winbind_krb5_locator.so
/usr/lib64/krb5/plugins/libkrb5/winbind_krb5_locator.so
/usr/lib64/winbind_krb5_locator.so
/etc/alternatives/winbind_krb5_locator.so

# ls -l /usr/lib64/winbind_krb5_locator.so
-rwxr-xr-x. 1 root root 6000 Jan 23 05:55 /usr/lib64/winbind_krb5_locator.so

# ls -l /usr/lib64/krb5/plugins/libkrb5/winbind_krb5_locator.so
lrwxrwxrwx. 1 root root 41 Jan 28 13:26 /usr/lib64/krb5/plugins/libkrb5/winbind_krb5_locator.so -> /etc/alternatives/winbind_krb5_locator.so
Comment 12 errata-xmlrpc 2013-02-21 03:36:35 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.

http://rhn.redhat.com/errata/RHSA-2013-0506.html

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