[SCM] Samba Shared Repository - branch v3-devel updated - release-3-2-0pre2-3820-gbb9c59e

Günther Deschner gd at samba.org
Mon Aug 25 11:18:52 GMT 2008


The branch, v3-devel has been updated
       via  bb9c59e892cc9d3047bde89a15cc341e2bd21bc5 (commit)
       via  ae3fa60c4546c7420722d8f422c22bbfd623ff5b (commit)
      from  543dfdc1cf6baf60bffc23c6aebc542fd58d2d2e (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-devel


- Log -----------------------------------------------------------------
commit bb9c59e892cc9d3047bde89a15cc341e2bd21bc5
Author: Günther Deschner <gd at samba.org>
Date:   Mon Aug 25 13:03:15 2008 +0200

    winbindd: use set_auth_errors() in winbindd_dual_check_machine_acct as well.
    
    Guenther

commit ae3fa60c4546c7420722d8f422c22bbfd623ff5b
Author: Günther Deschner <gd at samba.org>
Date:   Mon Aug 25 13:15:41 2008 +0200

    winbindd: move set_auth_errors to util functions.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source/winbindd/winbindd_misc.c  |    5 +----
 source/winbindd/winbindd_pam.c   |   12 ------------
 source/winbindd/winbindd_proto.h |    1 +
 source/winbindd/winbindd_util.c  |   12 ++++++++++++
 4 files changed, 14 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/winbindd/winbindd_misc.c b/source/winbindd/winbindd_misc.c
index 01a4054..50936c0 100644
--- a/source/winbindd/winbindd_misc.c
+++ b/source/winbindd/winbindd_misc.c
@@ -86,10 +86,7 @@ enum winbindd_result winbindd_dual_check_machine_acct(struct winbindd_domain *do
                   "good" : "bad"));
 
  done:
-	state->response.data.auth.nt_status = NT_STATUS_V(result);
-	fstrcpy(state->response.data.auth.nt_status_string, nt_errstr(result));
-	fstrcpy(state->response.data.auth.error_string, nt_errstr(result));
-	state->response.data.auth.pam_error = nt_status_to_pam(result);
+	set_auth_errors(&state->response, result);
 
 	DEBUG(NT_STATUS_IS_OK(result) ? 5 : 2, ("Checking the trust account password returned %s\n", 
 						state->response.data.auth.nt_status_string));
diff --git a/source/winbindd/winbindd_pam.c b/source/winbindd/winbindd_pam.c
index 4beef85..a7911f6 100644
--- a/source/winbindd/winbindd_pam.c
+++ b/source/winbindd/winbindd_pam.c
@@ -381,18 +381,6 @@ struct winbindd_domain *find_auth_domain(struct winbindd_cli_state *state,
 	return find_our_domain();
 }
 
-static void set_auth_errors(struct winbindd_response *resp, NTSTATUS result)
-{
-	resp->data.auth.nt_status = NT_STATUS_V(result);
-	fstrcpy(resp->data.auth.nt_status_string, nt_errstr(result));
-
-	/* we might have given a more useful error above */
-	if (*resp->data.auth.error_string == '\0')
-		fstrcpy(resp->data.auth.error_string,
-			get_friendly_nt_error_msg(result));
-	resp->data.auth.pam_error = nt_status_to_pam(result);
-}
-
 static void fill_in_password_policy(struct winbindd_response *r,
 				    const struct samr_DomInfo1 *p)
 {
diff --git a/source/winbindd/winbindd_proto.h b/source/winbindd/winbindd_proto.h
index 0e0db3e..c5b7b07 100644
--- a/source/winbindd/winbindd_proto.h
+++ b/source/winbindd/winbindd_proto.h
@@ -590,6 +590,7 @@ void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
+void set_auth_errors(struct winbindd_response *resp, NTSTATUS result);
 
 /* The following definitions come from winbindd/winbindd_wins.c  */
 
diff --git a/source/winbindd/winbindd_util.c b/source/winbindd/winbindd_util.c
index 4668d37..83c5053 100644
--- a/source/winbindd/winbindd_util.c
+++ b/source/winbindd/winbindd_util.c
@@ -1544,3 +1544,15 @@ void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain)
 }
 
 #endif /* HAVE_KRB5_LOCATE_PLUGIN_H */
+
+void set_auth_errors(struct winbindd_response *resp, NTSTATUS result)
+{
+	resp->data.auth.nt_status = NT_STATUS_V(result);
+	fstrcpy(resp->data.auth.nt_status_string, nt_errstr(result));
+
+	/* we might have given a more useful error above */
+	if (*resp->data.auth.error_string == '\0')
+		fstrcpy(resp->data.auth.error_string,
+			get_friendly_nt_error_msg(result));
+	resp->data.auth.pam_error = nt_status_to_pam(result);
+}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list