ehlo,
attcheck patch is a python wrapper for netgroup lookups in sssd.
LS
On 08/09/2016 07:09 PM, Lukas Slebodnik wrote:
ehlo,
attcheck patch is a python wrapper for netgroup lookups in sssd.
LS
Hello Lukas,
thank you for this patch. You helped me.
CI passed: http://sssd-ci.duckdns.org/logs/job/51/24/summary.html
I found one nitpick, comment is in code bellow.
0001-intg-Make-location-of-sssd-nss-module-configurable.patch
From 2b0578efa3ebc2b6710aa420b0647e7208f0e0ea Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik lslebodn@redhat.com Date: Tue, 9 Aug 2016 13:50:24 +0200 Subject: [PATCH 1/2] intg: Make location of sssd nss module configurable
The path to sssd nss module (libsss_nss.so) was relative to prefix and expected subdirectory "lib". 32bit and 64bit platforms and different distributions use different paths. This patch allows to use python module sssd_id even with real module and not just integration tests. It is just required to prepare "config.py" with right path.
e.g. cd ~/sssd/src/tests/intg [~/sssd/src/tests/intg]$ echo "NSS_MODULE_DIR = '/usr/lib64'" > config.py [~/sssd/src/tests/intg]$ python Python 2.7.12 (default, Jul 18 2016, 09:57:01) [GCC 6.1.1 20160621 (Red Hat 6.1.1-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import sssd_id sssd_id.get_user_gids('user')
(1, 0, [5977, 1070, 5845, 1076, 1074, 10327, 5975, 5766])
(ack)
0002-intg-Allow-to-test-netgroups.patch
From 7675d041262bb65672877e62e0e438d28dc7dc87 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik lslebodn@redhat.com Date: Tue, 9 Aug 2016 15:15:12 +0200 Subject: [PATCH 2/2] intg: Allow to test netgroups
sh-4.2# getent netgroup -s sss QAUsers QAUsers ( ,qa1,example.com) ( ,qa2,example.com) ( ,qa3,example.com) sh-4.2# getent netgroup -s sss QASystems QASystems (qahost1.example.com,,) (qahost2.lab.eng.pnq.redhat.com,,) sh-4.2# getent netgroup -s sss test sh-4.2# echo $? 2
sh-4.2# python Python 2.7.5 (default, Aug 2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import sssd_netgroup sssd_netgroup.get_sssd_netgroups('QAUsers')
(1, 0, [(None, 'qa1', 'example.com'), (None, 'qa2', 'example.com'), (None, 'qa3', 'example.com')])
sssd_netgroup.get_sssd_netgroups('QASystems')
(1, 0, [('qahost1.example.com', None, None), ('qahost2.lab.eng.pnq.redhat.com', None, None)])
sssd_netgroup.get_sssd_netgroups('test')
(0, 0, [])
(ack)
+def get_sssd_netgroups(name):
- """
- Function will return netgroup triplets for given user. It will gather
- netgroups only provided by sssd.
- The equivalent of "getent netgroup -s sss user"
there should be only one white space :-) ^^^^^
- @param string name name of netgroup
- @return (int, int, List[(string, string, string]) (err, errno, netgroups)
if err is NssReturnCode.SUCCESS netgroups will contain list of touples.
Each touple will consist of 3 elemets either string or None
(host, user, domain).
- """
=> ACK
Regards
On (10/08/16 09:24), Petr Cech wrote:
On 08/09/2016 07:09 PM, Lukas Slebodnik wrote:
ehlo,
attcheck patch is a python wrapper for netgroup lookups in sssd.
LS
Hello Lukas,
thank you for this patch. You helped me.
CI passed: http://sssd-ci.duckdns.org/logs/job/51/24/summary.html
I found one nitpick, comment is in code bellow.
fixed before push thank you for a review.
master: * b4633e73067d7bf3b0dbaf212569c123de88f306 * 70d47ad4c89152f1e2ac4599f75f9374b631b953
LS
sssd-devel@lists.fedorahosted.org