diff options
author | Sumit Bose <sbose@redhat.com> | 2013-04-11 18:23:27 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-05-02 19:33:56 +0200 |
commit | 206329d3901738036352f2ac1e8d7804f728861d (patch) | |
tree | 199e9c2e2675e69fa9b10af9de9ae05f56a62a5d /src/responder | |
parent | 1ae6d34788fd6ac2278be52b60d77c77073d98f3 (diff) | |
download | sssd-206329d3901738036352f2ac1e8d7804f728861d.tar.gz sssd-206329d3901738036352f2ac1e8d7804f728861d.tar.xz sssd-206329d3901738036352f2ac1e8d7804f728861d.zip |
Add secid filter to responder-dp protocol
This patch add a new filter type to the data-provider interface which
can be used for SID-based lookups.
Diffstat (limited to 'src/responder')
-rw-r--r-- | src/responder/common/responder_dp.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/responder/common/responder_dp.c b/src/responder/common/responder_dp.c index d23075d6..53826b0f 100644 --- a/src/responder/common/responder_dp.c +++ b/src/responder/common/responder_dp.c @@ -548,11 +548,21 @@ sss_dp_get_account_msg(void *pvt) } if (info->opt_name) { - if (info->extra) { - filter = talloc_asprintf(info, "name=%s:%s", - info->opt_name, info->extra); + if (info->type == SSS_DP_SECID) { + if (info->extra) { + filter = talloc_asprintf(info, "%s=%s:%s", DP_SEC_ID, + info->opt_name, info->extra); + } else { + filter = talloc_asprintf(info, "%s=%s", DP_SEC_ID, + info->opt_name); + } } else { - filter = talloc_asprintf(info, "name=%s", info->opt_name); + if (info->extra) { + filter = talloc_asprintf(info, "name=%s:%s", + info->opt_name, info->extra); + } else { + filter = talloc_asprintf(info, "name=%s", info->opt_name); + } } } else if (info->opt_id) { if (info->extra) { |