diff options
author | Sumit Bose <sbose@redhat.com> | 2011-05-25 10:54:17 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-05-25 10:49:53 -0400 |
commit | 18cf2b915dffbbd3d316ae160ac5f83f78e31f22 (patch) | |
tree | a4878688653978e74873b9d390ce4eee972f2c26 /src/providers | |
parent | b44917cc78e3cedfefc7e4dbe9f4c4e4ec8c8ac6 (diff) | |
download | sssd_unused-18cf2b915dffbbd3d316ae160ac5f83f78e31f22.tar.gz sssd_unused-18cf2b915dffbbd3d316ae160ac5f83f78e31f22.tar.xz sssd_unused-18cf2b915dffbbd3d316ae160ac5f83f78e31f22.zip |
Sanitize username during initgroups callsssd-1.5.1-37.el6
Diffstat (limited to 'src/providers')
-rw-r--r-- | src/providers/ldap/sdap_async_accounts.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap_async_accounts.c b/src/providers/ldap/sdap_async_accounts.c index f42fff29..4c909408 100644 --- a/src/providers/ldap/sdap_async_accounts.c +++ b/src/providers/ldap/sdap_async_accounts.c @@ -2870,6 +2870,7 @@ struct tevent_req *sdap_get_initgr_send(TALLOC_CTX *memctx, const char *base_dn; char *filter; int ret; + char *clean_name; DEBUG(9, ("Retrieving info for initgroups call\n")); @@ -2886,9 +2887,14 @@ struct tevent_req *sdap_get_initgr_send(TALLOC_CTX *memctx, state->grp_attrs = grp_attrs; state->orig_user = NULL; + ret = sss_filter_sanitize(state, name, &clean_name); + if (ret != EOK) { + return NULL; + } + filter = talloc_asprintf(state, "(&(%s=%s)(objectclass=%s))", state->opts->user_map[SDAP_AT_USER_NAME].name, - state->name, + clean_name, state->opts->user_map[SDAP_OC_USER].name); if (!filter) { talloc_zfree(req); |