diff options
author | Ted Gould <ted@gould.cx> | 2012-09-20 08:39:53 +0000 |
---|---|---|
committer | Tarmac <> | 2012-09-20 08:39:53 +0000 |
commit | 6af8fab5b1df788bc57e5d174fc090824c9c0065 (patch) | |
tree | 877c48d3bef1123accafba2caa953d73bc2002c5 /tests/mock_pam.h | |
parent | 84fb97ec2326559940bafd6f7a7b1370fb679d86 (diff) | |
parent | 74540195ac67a579ba0f8a2479cfcadb6bee6cc8 (diff) | |
download | libpam-x2go-6af8fab5b1df788bc57e5d174fc090824c9c0065.tar.gz libpam-x2go-6af8fab5b1df788bc57e5d174fc090824c9c0065.tar.bz2 libpam-x2go-6af8fab5b1df788bc57e5d174fc090824c9c0065.zip |
Adding a testing framework. Approved by Albert Astals Cid, jenkins.
Diffstat (limited to 'tests/mock_pam.h')
-rw-r--r-- | tests/mock_pam.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/mock_pam.h b/tests/mock_pam.h new file mode 100644 index 0000000..eb88a2e --- /dev/null +++ b/tests/mock_pam.h @@ -0,0 +1,23 @@ +/* + * Copyright © 2012 Canonical Ltd. All rights reserved. + * + * Author(s): David Barth <david.barth@canonical.com> + * + */ + +#ifndef __MOCK_PAM_H__ +#define __MOCK_PAM_H__ + +#include <security/pam_modules.h> +#include <security/pam_modutil.h> +#include <security/pam_appl.h> + +#define PAM_NUM_ITEMS PAM_AUTHTOK_TYPE + +typedef struct pam_handle pam_handle_t; + +pam_handle_t *pam_handle_new (void); +int pam_get_item (const pam_handle_t *pamh, int type, const void **value); +int pam_set_item (pam_handle_t *pamh, int type, const void *value); + +#endif |