summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-03-14 09:10:39 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-04-02 17:01:08 +0200
commit9acfb09f7969a69f58bd45c856b01700541853ca (patch)
tree51b08598dde631e49910dc3c5865460208a6a9f5 /src/tests
parent53b58615fbc13eddcd6e2f28066b67cb5f16b6d3 (diff)
downloadsssd-9acfb09f7969a69f58bd45c856b01700541853ca.tar.gz
sssd-9acfb09f7969a69f58bd45c856b01700541853ca.tar.xz
sssd-9acfb09f7969a69f58bd45c856b01700541853ca.zip
Making the authtok structure really opaque.
Definition of structure sss_auth_token was removed from header file authtok.h and there left only declaration of this structure. Therefore only way how to use this structure is to use accessory function from same header file. To creating new empty authotok can only be used newly created function sss_authtok_new(). TALLOC context was removed from copy and setter functions, because pointer to stuct sss_auth_token is used as a memory context. All declaration of struct sss_auth_token variables was replaced with pointer to this structure and related changes was made in source code. Function copy_pam_data can copy from argument src which was dynamically allocated with function create_pam_data() or zero initialized struct pam_data allocated on stack. https://fedorahosted.org/sssd/ticket/1830
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/krb5_child-test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/krb5_child-test.c b/src/tests/krb5_child-test.c
index 302cf3c8e..423f8bb84 100644
--- a/src/tests/krb5_child-test.c
+++ b/src/tests/krb5_child-test.c
@@ -176,10 +176,10 @@ create_dummy_pam_data(TALLOC_CTX *mem_ctx, const char *user,
pd->user = talloc_strdup(pd, user);
if (!pd->user) goto fail;
- ret = sss_authtok_set_password(pd, &pd->authtok, password, 0);
+ ret = sss_authtok_set_password(pd->authtok, password, 0);
if (ret) goto fail;
- (void)sss_authtok_get_password(&pd->authtok, &authtok, &authtok_len);
+ (void)sss_authtok_get_password(pd->authtok, &authtok, &authtok_len);
DEBUG(SSSDBG_FUNC_DATA, ("Authtok [%s] len [%d]\n",
authtok, (int)authtok_len));