[sssd PR#61][opened] BUILD: Fix build without samba
by fidencio
URL: https://github.com/SSSD/sssd/pull/61
Author: lslebodn
Title: #61: BUILD: Fix build without samba
Action: opened
PR body:
"""
The test test_ad_subdom shoudl bw compiled only if samba build is enabled.
In file included from src/tests/cmocka/test_ad_subdomains.c:39:0:
./src/providers/ad/ad_subdomains.c:35:17: fatal error: ndr.h: No such file or directory
#include <ndr.h>
^
compilation terminated.
"""
To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/61/head:pr61
git checkout pr61
6 years, 7 months
WIP: sssd still showing ipa user after removed from last group
by Petr Cech
Hello list,
I have worked on ticket #3222 [1]. The reproducer mentioned on this
ticket doesn't work for 100%. After some investigation and discussion
with SSSD team I recognized that the issue is caused by memory cache
(fast cache).
This memcache saves users and groups. Default timeout is 300 seconds.
I prepare simple patch which shows important debug msg. for
investigation of mem cache (in this case). And two reproducers, one with
memcache and without one.
If we compiled SSSD with 'debug' patch and we run
'group_member_with_memcache.sh' we could see i.e.:
[root@mirach sssd]# group_member_with_memcache.sh && grep '>>>' *.log
---------------------
Added user "testuser"
---------------------
[...]
-----------------------
Added group "testgroup"
-----------------------
Group name: testgroup
GID: 1703800630
Mon Oct 24 15:20:05 CEST 2016
>>> [A] record not found
>>> [B] record not found
testgroup:*:1703800630:
Group name: testgroup
GID: 1703800630
Member users: testuser
-------------------------
Number of members added 1
-------------------------
ldb: unable to dlopen /usr/lib64/ldb/modules/ldb/memberof.la :
/usr/lib64/ldb/modules/ldb/memberof.la: invalid ELF header
Mon Oct 24 15:20:09 CEST 2016
>>> [A] record not found
>>> [B] record not found
testgroup:*:1703800630:testuser
Group name: testgroup
GID: 1703800630
---------------------------
Number of members removed 1
---------------------------
ldb: unable to dlopen /usr/lib64/ldb/modules/ldb/memberof.la :
/usr/lib64/ldb/modules/ldb/memberof.la: invalid ELF header
Mon Oct 24 15:20:13 CEST 2016
>>> mc record expires at [1477315509] | now [1477315213]
>>> [A] MC used
testgroup:*:1703800630:testuser
-------------------------
Deleted group "testgroup"
-------------------------
-----------------------
Deleted user "testuser"
-----------------------
sssd_nss.log:(Mon Oct 24 15:20:05 2016) [sssd[nss]]
[sss_mmap_set_rec_header] (0x0010): >>> MC STORE expiration [1477315505]
| now [1477315205]
sssd_nss.log:(Mon Oct 24 15:20:05 2016) [sssd[nss]]
[sss_mmap_cache_gr_store] (0x0010): >>> MC STORE [testgroup] [300]
members [0]
sssd_nss.log:(Mon Oct 24 15:20:09 2016) [sssd[nss]]
[sss_mmap_set_rec_header] (0x0010): >>> MC STORE expiration [1477315509]
| now [1477315209]
sssd_nss.log:(Mon Oct 24 15:20:09 2016) [sssd[nss]]
[sss_mmap_cache_gr_store] (0x0010): >>> MC STORE [testgroup] [300]
members [1]
How we can see the wrong result is just taken from memory cache. If you
run 'group_member_without_memcache' it works right. So I suppose that
the solution for ticket is simple just adjusting memcache_timeout option
on problematic deployments.
If everybody agree I will close ticket as not a bug and write comment
about memcache_timeout option.
Regards
[1] https://fedorahosted.org/sssd/ticket/3222
--
Petr^4 Čech
6 years, 7 months
[sssd PR#34][opened] cache_req: move from switch to plugins
by fidencio
URL: https://github.com/SSSD/sssd/pull/34
Author: pbrezina
Title: #34: cache_req: move from switch to plugins
Action: opened
PR body:
"""
cache_req grown quite big from the original code and it turned out
that using switch statements to branch code for different cases
makes the code quite hard to read and further extend and any
modification to the logic itself is difficult.
This patch changes the switch statements to plugins with small
functions and separates logic into multiple modules. This gives
us better control over the code and improves readability and
maintainability while keeping code duplication to minimum.
At the moment only cache req user by name, id and upn is
implemented as a proof of concept. If you like it, I will
finish the rest, it won't take much time.
"""
To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/34/head:pr34
git checkout pr34
6 years, 7 months
[sssd PR#13] MEMBEROF: Don't resolve members if they are removed (opened)
by fidencio
celestian's pull request #13: "MEMBEROF: Don't resolve members if they are removed" was opened
PR body:
"""
## TOPIC
If we need remove ghost (SYSDB_GHOST, DB_GHOST) attribute
from group we use empty structure.
This doesn't mean that there is pointer to NULL but
it means that there is zero elements.
Ghost attribute is array not string.
Resolves:
https://fedorahosted.org/sssd/ticket/2940
## REPRODUCER
preparing:
```
ipa user-add --first=Adam --last=Adam --email=adam(a)persei.cz adam
ipa group-add group_1
ipa group-add-member --users=adam group_1
ipa group-add group_2
```
reproducer (possible repeat):
```
systemctl daemon-reload
sudo su -c "truncate -s0 /var/log/sssd/*.log"
sudo su -c "rm -f /var/lib/sss/db/*"
sudo su -c "rm -f /var/lib/sss/mc/*"
sudo systemctl restart sssd.service
ipa group-add-member --groups=group_1 group_2
sss_cache -UG
sudo su -c "truncate -s0 /var/log/sssd/*.log"
getent group group_2
ipa group-remove-member --groups=group_1 group_2
sss_cache -UG
sudo su -c "truncate -s0 /var/log/sssd/*.log"
getent group group_2
```
"""
See the full pull-request at https://github.com/SSSD/sssd/pull/13
... or pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/13/head:pr13
git checkout pr13
6 years, 7 months