winbindd: move set_auth_errors to util functions.
authorGünther Deschner <gd@samba.org>
Mon, 25 Aug 2008 11:15:41 +0000 (13:15 +0200)
committerGünther Deschner <gd@samba.org>
Mon, 25 Aug 2008 11:18:01 +0000 (13:18 +0200)
Guenther
(This used to be commit ae3fa60c4546c7420722d8f422c22bbfd623ff5b)

source3/winbindd/winbindd_pam.c
source3/winbindd/winbindd_proto.h
source3/winbindd/winbindd_util.c

index 4beef852e961ae873fa61ea27e89ef55285ee28e..a7911f60aa712ba8c73c60940c81455e69901ca6 100644 (file)
@@ -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)
 {
index 0e0db3e859c330920fb5189f3216327231fe2a11..c5b7b079316e8d15e6fa3b4ca00d92c8906fb8de 100644 (file)
@@ -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  */
 
index 4668d3725dc11b0ec4014681f58a310a288b84d1..83c5053f78140a3f51e4dfd50ae3d46035abf872 100644 (file)
@@ -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);
+}