summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-08-25 13:15:41 +0200
committerKarolin Seeger <kseeger@samba.org>2008-08-25 15:01:01 +0200
commitf6b5a6e819e8f2b21aebe1eedddfac8b03a5ee4a (patch)
tree5aff45a10e3d435bfa9bf9b89f043e01501c960e
parent457afede50b4a039e1afcfeffbebca20a0f4f4d5 (diff)
downloadsamba-f6b5a6e819e8f2b21aebe1eedddfac8b03a5ee4a.tar.gz
samba-f6b5a6e819e8f2b21aebe1eedddfac8b03a5ee4a.tar.xz
samba-f6b5a6e819e8f2b21aebe1eedddfac8b03a5ee4a.zip
winbindd: move set_auth_errors to util functions.
Guenther (cherry picked from commit ae3fa60c4546c7420722d8f422c22bbfd623ff5b) (cherry picked from commit 84215f1c0ebfc1e613f4255ce9bdf941ae688adb)
-rw-r--r--source/winbindd/winbindd_pam.c12
-rw-r--r--source/winbindd/winbindd_proto.h1
-rw-r--r--source/winbindd/winbindd_util.c12
3 files changed, 13 insertions, 12 deletions
diff --git a/source/winbindd/winbindd_pam.c b/source/winbindd/winbindd_pam.c
index 4beef852e96..a7911f60aa7 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 0e0db3e859c..c5b7b079316 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 4668d3725dc..83c5053f781 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);
+}