[SSSD] [PATCH] PROXY: fix groups caching

Ondrej Kos okos at redhat.com
Mon Dec 17 07:39:08 UTC 2012


On 14/12/12 17:32, Jakub Hrozek wrote:
> On Fri, Dec 14, 2012 at 11:36:27AM +0100, Ondrej Kos wrote:
>> Propperly react on deleting group which was not found in sysdb.
>       ^^
> Typo, it should be spelled out "Properly".
>
>> ---
>>   src/providers/proxy/proxy_id.c | 8 +++++++-
>>   1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/providers/proxy/proxy_id.c b/src/providers/proxy/proxy_id.c
>> index 060c4723bdb4c2ad6e671957b90b3e3af0551878..69b8d4b007b56d12e310355f3d16b7bc036dde5a 100644
>> --- a/src/providers/proxy/proxy_id.c
>> +++ b/src/providers/proxy/proxy_id.c
>> @@ -866,7 +866,10 @@ static int get_gr_name(TALLOC_CTX *mem_ctx,
>>                 ("Group %s does not exist (or is invalid) on remote server,"
>>                  " deleting!\n", name));
>>
>> -        ret = sysdb_delete_group(sysdb, NULL, gid);
>> +        ret = sysdb_delete_group(sysdb, name, NULL);
>
> nack, please keep using gid here. Because of aliases, there's no
> guarantee that name is the real user name or an alias. We canonicalize
> the name a couple of lines above, but I think it's just simpler to keep
> using gid.
>
>> +        if (ret == ENOENT) {
>> +            ret = EOK;
>> +        }
>>           goto done;
>>       }
>>
>> @@ -936,6 +939,9 @@ static int get_gr_gid(TALLOC_CTX *mem_ctx,
>>                  " deleting!\n", gid));
>>
>>           ret = sysdb_delete_group(sysdb, NULL, gid);
>> +        if (ret == ENOENT) {
>> +            ret = EOK;
>> +        }
>>           goto done;
>>       }
>>
>> --
>> 1.7.11.7
>>

New patch attached

O.


-- 
Ondrej Kos
Associate Software Engineer
Identity Management
Red Hat Czech

phone: +420-532-294-558
cell:  +420-736-417-909
ext:   82-62558
loc:   1013 Brno 1 office
irc:   okos @ #brno
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-PROXY-fix-groups-caching.patch
Type: text/x-patch
Size: 1139 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20121217/aaafc149/attachment.bin>


More information about the sssd-devel mailing list