diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2015-05-25 10:20:39 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-06-02 21:22:03 +0200 |
commit | 10d66d2ec03d0864cb7a006ef589a4bbbc1f48dc (patch) | |
tree | 53daf0ddc5eacb3a82b93c7d455443721675ae50 | |
parent | 0db04d011a58ad1c32826dba8535498b5730b6da (diff) | |
download | sssd-10d66d2ec03d0864cb7a006ef589a4bbbc1f48dc.tar.gz sssd-10d66d2ec03d0864cb7a006ef589a4bbbc1f48dc.tar.xz sssd-10d66d2ec03d0864cb7a006ef589a4bbbc1f48dc.zip |
DP: Set extra_value to NULL for enum requests
Some providers, notably IPA, rely on extra_value to be either a useful
value or NULL. In enumeration, however, extra_value was random. Set
the extra_value pointer explicitly to NULL to make it clear that it's
not used for enumeration and also use talloc_zero as future-proof.
Resolves:
https://fedorahosted.org/sssd/ticket/2659
Reviewed-by: Sumit Bose <sbose@redhat.com>
(cherry picked from commit d9296ba018228ac6a19f710b8bb9044c4ea9ab5b)
-rw-r--r-- | src/providers/data_provider_be.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c index 9a752e31e..805f3ee81 100644 --- a/src/providers/data_provider_be.c +++ b/src/providers/data_provider_be.c @@ -1154,7 +1154,7 @@ static int be_get_account_info(struct sbus_request *dbus_req, void *user_data) goto done; } - req = talloc(be_req, struct be_acct_req); + req = talloc_zero(be_req, struct be_acct_req); if (!req) { err_maj = DP_ERR_FATAL; err_min = ENOMEM; @@ -1201,6 +1201,7 @@ static int be_get_account_info(struct sbus_request *dbus_req, void *user_data) } else if (strcmp(filter, ENUM_INDICATOR) == 0) { req->filter_type = BE_FILTER_ENUM; req->filter_value = NULL; + req->extra_value = NULL; } else { err_maj = DP_ERR_FATAL; err_min = EINVAL; |