diff options
author | Simo Sorce <simo@redhat.com> | 2012-12-05 17:40:43 +0000 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2012-12-05 23:01:37 +0100 |
commit | ebba1aa6b9783daa0d530e9f5e307f7be17d3cd3 (patch) | |
tree | 2fafadfee6c92db06905a7053a6a0c8503b049ee /src/responder/nss/nsssrv.c | |
parent | 8088274b2389b76f4be581736e55f26a8322fad1 (diff) | |
download | sssd-ebba1aa6b9783daa0d530e9f5e307f7be17d3cd3.tar.gz sssd-ebba1aa6b9783daa0d530e9f5e307f7be17d3cd3.tar.xz sssd-ebba1aa6b9783daa0d530e9f5e307f7be17d3cd3.zip |
Hook to perform a mmap cache update from sssd_nss
This set of functions enumerate each user/group from all domains
and invalidate any mmap cache record that matches.
Diffstat (limited to 'src/responder/nss/nsssrv.c')
-rw-r--r-- | src/responder/nss/nsssrv.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/responder/nss/nsssrv.c b/src/responder/nss/nsssrv.c index e01bd1a4d..8694edaf6 100644 --- a/src/responder/nss/nsssrv.c +++ b/src/responder/nss/nsssrv.c @@ -33,6 +33,7 @@ #include "popt.h" #include "util/util.h" #include "responder/nss/nsssrv.h" +#include "responder/nss/nsssrv_private.h" #include "responder/nss/nsssrv_mmap_cache.h" #include "responder/common/negcache.h" #include "db/sysdb.h" @@ -280,7 +281,21 @@ done: return ret; } +static int nss_update_memcache(DBusMessage *message, + struct sbus_connection *conn) +{ + struct resp_ctx *rctx = talloc_get_type(sbus_conn_get_private_data(conn), + struct resp_ctx); + struct nss_ctx *nctx = talloc_get_type(rctx->pvt_ctx, struct nss_ctx); + + nss_update_pw_memcache(nctx); + nss_update_gr_memcache(nctx); + + return EOK; +} + static struct sbus_method nss_dp_methods[] = { + { DP_REV_METHOD_UPDATE_CACHE, nss_update_memcache }, { NULL, NULL } }; |