summaryrefslogtreecommitdiffstats
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-03-23 08:28:19 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-03-23 08:28:19 +0000
commit657a24f476c90e0ffa8171f78b35a449171f54e1 (patch)
tree35da20fdef21bef1d7c1c7087846db078e088d31 /source3/nsswitch
parent26588248cda26c6c8216a9b49008cb6d0e7f3bce (diff)
downloadsamba-657a24f476c90e0ffa8171f78b35a449171f54e1.tar.gz
samba-657a24f476c90e0ffa8171f78b35a449171f54e1.tar.xz
samba-657a24f476c90e0ffa8171f78b35a449171f54e1.zip
Various winbind updates:
- pam_winbind updates from vance, fixing a typo and making some the options work properly. - Extra parinoia in the winbind connection loop - Allow pam_winbind to compile on HP-UX (Don Mcall, more work to do). - Fix up configure.in to use the same method for building the test .so as the Makefile uses. Andrew Bartlett (This used to be commit 8e705dd9215b1cb3f44d6348094679d7dc6a7fbd)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/pam_winbind.c6
-rw-r--r--source3/nsswitch/pam_winbind.h2
-rw-r--r--source3/nsswitch/winbindd_cm.c3
-rw-r--r--source3/nsswitch/winbindd_pam.c2
4 files changed, 7 insertions, 6 deletions
diff --git a/source3/nsswitch/pam_winbind.c b/source3/nsswitch/pam_winbind.c
index 42cc29f3207..cad75f7907b 100644
--- a/source3/nsswitch/pam_winbind.c
+++ b/source3/nsswitch/pam_winbind.c
@@ -45,9 +45,9 @@ static int _pam_parse(int argc, const char **argv)
else if (!strcasecmp(*argv, "use_authtok"))
ctrl |= WINBIND_USE_AUTHTOK_ARG;
else if (!strcasecmp(*argv, "use_first_pass"))
- ctrl |= WINBIND_TRY_FIRST_PASS_ARG;
- else if (!strcasecmp(*argv, "try_first_pass"))
ctrl |= WINBIND_USE_FIRST_PASS_ARG;
+ else if (!strcasecmp(*argv, "try_first_pass"))
+ ctrl |= WINBIND_TRY_FIRST_PASS_ARG;
else if (!strcasecmp(*argv, "unknown_ok"))
ctrl |= WINBIND_UNKNOWN_OK_ARG;
else {
@@ -405,7 +405,7 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
&password);
if (retval != PAM_SUCCESS) {
- _pam_log(LOG_ERR, "Could not retrive user's password");
+ _pam_log(LOG_ERR, "Could not retrieve user's password");
return PAM_AUTHTOK_ERR;
}
diff --git a/source3/nsswitch/pam_winbind.h b/source3/nsswitch/pam_winbind.h
index 93d9ec9e735..9897249e164 100644
--- a/source3/nsswitch/pam_winbind.h
+++ b/source3/nsswitch/pam_winbind.h
@@ -25,7 +25,7 @@
#define PAM_SM_ACCOUNT
#define PAM_SM_PASSWORD
-#if defined(SUNOS5) || defined(SUNOS4)
+#if defined(SUNOS5) || defined(SUNOS4) || defined(HPUX)
/* Solaris always uses dynamic pam modules */
#define PAM_EXTERN extern
diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c
index 03a8e3cdd1e..f4abf86c47d 100644
--- a/source3/nsswitch/winbindd_cm.c
+++ b/source3/nsswitch/winbindd_cm.c
@@ -415,6 +415,7 @@ static NTSTATUS get_connection_from_cache(const char *domain, const char *pipe_n
if (conn->cli) {
cli_shutdown(conn->cli);
}
+ ZERO_STRUCT(conn_temp);
conn_temp.next = conn->next;
DLIST_REMOVE(cm_conns, conn);
SAFE_FREE(conn);
@@ -426,7 +427,7 @@ static NTSTATUS get_connection_from_cache(const char *domain, const char *pipe_n
}
if (!conn) {
- if (!(conn = (struct winbindd_cm_conn *) malloc(sizeof(struct winbindd_cm_conn))))
+ if (!(conn = malloc(sizeof(*conn))))
return NT_STATUS_NO_MEMORY;
ZERO_STRUCTP(conn);
diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c
index 6a7afd2b3b0..2fa346151ee 100644
--- a/source3/nsswitch/winbindd_pam.c
+++ b/source3/nsswitch/winbindd_pam.c
@@ -189,7 +189,7 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state)
result = cm_get_netlogon_cli(lp_workgroup(), trust_passwd, &cli);
if (!NT_STATUS_IS_OK(result)) {
- DEBUG(3, ("could not open handle to NETLOGON pipe\n"));
+ DEBUG(3, ("could not open handle to NETLOGON pipe (error: %s)\n", nt_errstr(result)));
goto done;
}