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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
$NetBSD: patch-ab,v 1.1 2011/01/03 02:39:33 obache Exp $
* DragonFly have same signature as Linux and NetBSD.
--- pam_tacplus.c.orig 2009-03-30 19:48:29.000000000 +0000
+++ pam_tacplus.c
@@ -127,7 +127,7 @@ int _pam_account(pam_handle_t *pamh, int
{
int retval;
static int ctrl;
-#if (defined(__linux__) || defined(__NetBSD__))
+#if (defined(__linux__) || defined(__NetBSD__) || defined(__DragonFly__))
char *user = NULL;
#else
const char *user = NULL;
@@ -152,7 +152,7 @@ int _pam_account(pam_handle_t *pamh, int
if (ctrl & PAM_TAC_DEBUG)
syslog(LOG_DEBUG, "%s: tac_srv_no=%d", __FUNCTION__, tac_srv_no);
-#if (defined(__linux__) || defined(__NetBSD__))
+#if (defined(__linux__) || defined(__NetBSD__) || defined(__DragonFly__))
retval = pam_get_item(pamh, PAM_USER, (const void **) (const void*) &user);
#else
retval = pam_get_item(pamh, PAM_USER, (void **) (void*) &user);
@@ -290,7 +290,7 @@ int pam_sm_authenticate (pam_handle_t *
int argc, const char **argv)
{
int ctrl, retval;
-#if (defined(__linux__) || defined(__NetBSD__))
+#if (defined(__linux__) || defined(__NetBSD__) || defined(__DragonFly__))
const char *user;
#else
char *user;
@@ -425,7 +425,7 @@ int pam_sm_acct_mgmt (pam_handle_t * pam
int argc, const char **argv)
{
int retval, ctrl, status=PAM_AUTH_ERR;
-#if (defined(__linux__) || defined(__NetBSD__))
+#if (defined(__linux__) || defined(__NetBSD__) || defined(__DragonFly__))
const char *user;
#else
char *user;
@@ -457,7 +457,7 @@ int pam_sm_acct_mgmt (pam_handle_t * pam
inet_ntoa(addr));
}
-#if (defined(__linux__) || defined(__NetBSD__))
+#if (defined(__linux__) || defined(__NetBSD__) || defined(__DragonFly__))
retval = pam_get_item(pamh, PAM_USER, (const void **) (const void*) &user);
#else
retval = pam_get_item(pamh, PAM_USER, (void **) (void*) &user);
|