aboutsummaryrefslogtreecommitdiff
path: root/tests/mock_pam.h
blob: 01bea3f3cf73e1b2d30fbf0dde9808a6aa40a91f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * Copyright © 2012-2013 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>.
 * Copyright © 2012 Canonical Ltd. All rights reserved.
 *
 * Author(s): Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
 *            David Barth <david.barth@canonical.com>
 *
 */

#ifndef __MOCK_PAM_H__
#define __MOCK_PAM_H__

#define LIBPAM_COMPILE
#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_NONNULL((1))
pam_get_item (const pam_handle_t *pamh, int type, const void **value);
int PAM_NONNULL((1))
pam_set_item (pam_handle_t *pamh, int type, const void *value);

#endif