diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2015-05-25 10:20:39 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-06-01 15:21:45 +0200 |
commit | 2dfb4ed5a36a7be6bcde60e042811b81e83c4850 (patch) | |
tree | a246f56d162577a4b94201f49939e4d2c11768b2 | |
parent | 45429eb9c7afbaad01b242b0ed8b9fbd7398d4a7 (diff) | |
download | sssd-2dfb4ed5a36a7be6bcde60e042811b81e83c4850.tar.gz sssd-2dfb4ed5a36a7be6bcde60e042811b81e83c4850.tar.xz sssd-2dfb4ed5a36a7be6bcde60e042811b81e83c4850.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; |