diff options
author | Pavel Březina <pbrezina@redhat.com> | 2013-01-02 11:09:32 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-01-02 17:39:44 +0100 |
commit | fc647b8eb5bca901658dedf3dbda2f35c63a86f2 (patch) | |
tree | d27114c431c13a4766373f43fdb6104cb5a4a31d /src/providers/ldap/sdap_async_sudo.c | |
parent | 0e6c9d03cacf24de4265ee0f902c216ba5a131c9 (diff) | |
download | sssd-fc647b8eb5bca901658dedf3dbda2f35c63a86f2.tar.gz sssd-fc647b8eb5bca901658dedf3dbda2f35c63a86f2.tar.bz2 sssd-fc647b8eb5bca901658dedf3dbda2f35c63a86f2.zip |
set ret to EOK after for loop in sdap_sudo_purge_sudoers
If we are unable to delete some rule from cache we print a debug
message and ignore the error. Thus we should set ret to EOK after
the for loop otherwise we return whether the last rule was deleted
successfully or not.
This also removes compilation warning that ret may be used
uninitialized (when we don't go inside the loop at all).
Diffstat (limited to 'src/providers/ldap/sdap_async_sudo.c')
-rw-r--r-- | src/providers/ldap/sdap_async_sudo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap_async_sudo.c b/src/providers/ldap/sdap_async_sudo.c index 86edcc34..71bf875d 100644 --- a/src/providers/ldap/sdap_async_sudo.c +++ b/src/providers/ldap/sdap_async_sudo.c @@ -566,6 +566,8 @@ static int sdap_sudo_purge_sudoers(struct sysdb_ctx *sysdb_ctx, continue; } } + + ret = EOK; } else { /* purge cache by provided filter */ ret = sysdb_sudo_purge_byfilter(sysdb_ctx, filter); |