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:18:46 +0200 |
commit | d9296ba018228ac6a19f710b8bb9044c4ea9ab5b (patch) | |
tree | 3fd1bbbcc3fed727ddd634fae467d7074a1794d1 /src/providers/data_provider_be.c | |
parent | df233bce93c6e6752cf22cd4244c85c94d68b17b (diff) | |
download | sssd-d9296ba018228ac6a19f710b8bb9044c4ea9ab5b.tar.gz sssd-d9296ba018228ac6a19f710b8bb9044c4ea9ab5b.tar.xz sssd-d9296ba018228ac6a19f710b8bb9044c4ea9ab5b.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>
Diffstat (limited to 'src/providers/data_provider_be.c')
-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 a37fbbc8d..34c7b2c76 100644 --- a/src/providers/data_provider_be.c +++ b/src/providers/data_provider_be.c @@ -1155,7 +1155,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; @@ -1202,6 +1202,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; |