diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2013-03-14 09:44:41 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-04-02 17:01:08 +0200 |
commit | 53b58615fbc13eddcd6e2f28066b67cb5f16b6d3 (patch) | |
tree | e5ca489842778a4e6adba28e085bb75701db89de /src/tests | |
parent | 755aee449c6311518200c2f11c1aae329a19b038 (diff) | |
download | sssd-53b58615fbc13eddcd6e2f28066b67cb5f16b6d3.tar.gz sssd-53b58615fbc13eddcd6e2f28066b67cb5f16b6d3.tar.xz sssd-53b58615fbc13eddcd6e2f28066b67cb5f16b6d3.zip |
Reusing create_pam_data() on the other places.
Function create_pam_data() should be only one way how to create new
struct pam_data, because it also initialize destructor to created
object.
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/krb5_child-test.c | 2 | ||||
-rw-r--r-- | src/tests/krb5_utils-tests.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/krb5_child-test.c b/src/tests/krb5_child-test.c index f6ddcaad2..302cf3c8e 100644 --- a/src/tests/krb5_child-test.c +++ b/src/tests/krb5_child-test.c @@ -169,7 +169,7 @@ create_dummy_pam_data(TALLOC_CTX *mem_ctx, const char *user, size_t authtok_len; errno_t ret; - pd = talloc_zero(mem_ctx, struct pam_data); + pd = create_pam_data(mem_ctx); if (!pd) goto fail; pd->cmd = SSS_PAM_AUTHENTICATE; diff --git a/src/tests/krb5_utils-tests.c b/src/tests/krb5_utils-tests.c index aa2f4ed4b..fdfe00ac2 100644 --- a/src/tests/krb5_utils-tests.c +++ b/src/tests/krb5_utils-tests.c @@ -425,7 +425,7 @@ void setup_talloc_context(void) kr = talloc_zero(tmp_ctx, struct krb5child_req); fail_unless(kr != NULL, "Cannot create krb5child_req structure."); - pd = talloc_zero(tmp_ctx, struct pam_data); + pd = create_pam_data(tmp_ctx); fail_unless(pd != NULL, "Cannot create pam_data structure."); krb5_ctx = talloc_zero(tmp_ctx, struct krb5_ctx); |