Changeset View
Changeset View
Standalone View
Standalone View
pam_kwallet.c
Show All 25 Lines | |||||
26 | 26 | | |||
27 | #define PAM_SM_PASSWORD | 27 | #define PAM_SM_PASSWORD | ||
28 | #define PAM_SM_SESSION | 28 | #define PAM_SM_SESSION | ||
29 | #define PAM_SM_AUTH | 29 | #define PAM_SM_AUTH | ||
30 | #include <pwd.h> | 30 | #include <pwd.h> | ||
31 | #include <sys/stat.h> | 31 | #include <sys/stat.h> | ||
32 | #include <sys/syslog.h> | 32 | #include <sys/syslog.h> | ||
33 | #include <sys/wait.h> | 33 | #include <sys/wait.h> | ||
34 | #include <sys/types.h> | ||||
35 | #include <sys/socket.h> | ||||
36 | #include <sys/un.h> | ||||
37 | | ||||
38 | /* PAM headers. | ||||
39 | * | ||||
40 | * There are three styles in play: | ||||
41 | * - Apple, which has no pam_ext.h, does have pam_appl.h, does have pam_syslog | ||||
42 | * - Linux, which has pam_ext.h, does have pam_appl.h, does have pam_syslog | ||||
43 | * - BSD, which has no pam_ext.h, does have pam_appl.h, but no pam_syslog | ||||
44 | * In the latter case, #define pam_syslog away. | ||||
45 | */ | ||||
34 | #ifdef __APPLE__ | 46 | #ifdef __APPLE__ | ||
35 | #include "pam_darwin.h" | 47 | #include "pam_darwin.h" | ||
36 | #include <security/pam_appl.h> | 48 | #include <security/pam_appl.h> | ||
37 | #else | 49 | #else | ||
38 | #include <security/pam_modules.h> | 50 | #include <security/pam_modules.h> | ||
51 | #ifdef HAVE_PAM_EXT | ||||
52 | /* "Linux style" */ | ||||
39 | #include <security/pam_ext.h> | 53 | #include <security/pam_ext.h> | ||
40 | #include <security/_pam_types.h> | 54 | #include <security/_pam_types.h> | ||
41 | #endif | 55 | #endif | ||
42 | #include <sys/types.h> | 56 | #ifdef HAVE_PAM_APPL | ||
43 | #include <sys/socket.h> | 57 | /* "BSD style" .. see also __APPLE__, above */ | ||
44 | #include <sys/un.h> | 58 | #include <security/pam_appl.h> | ||
59 | #ifndef HAVE_PAM_EXT | ||||
60 | /* FreeBSD has no pam_syslog(), va-macro it away */ | ||||
61 | #define pam_syslog(...) | ||||
62 | #endif | ||||
63 | #endif | ||||
64 | #endif | ||||
45 | 65 | | |||
46 | #define KWALLET_PAM_KEYSIZE 56 | 66 | #define KWALLET_PAM_KEYSIZE 56 | ||
47 | #define KWALLET_PAM_SALTSIZE 56 | 67 | #define KWALLET_PAM_SALTSIZE 56 | ||
48 | #define KWALLET_PAM_ITERATIONS 50000 | 68 | #define KWALLET_PAM_ITERATIONS 50000 | ||
49 | 69 | | |||
50 | const static char *kdehome = NULL; | 70 | const static char *kdehome = NULL; | ||
51 | const static char *kwalletd = NULL; | 71 | const static char *kwalletd = NULL; | ||
52 | const static char *socketPath = NULL; | 72 | const static char *socketPath = NULL; | ||
▲ Show 20 Lines • Show All 623 Lines • Show Last 20 Lines |