summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_util.c8
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/lib/util_str.c8
3 files changed, 9 insertions, 8 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index f71ed90687..2cb02f4033 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -493,14 +493,6 @@ bool make_user_info_guest(struct auth_usersupplied_info **user_info)
return NT_STATUS_IS_OK(nt_status) ? True : False;
}
-static char *sanitize_username(TALLOC_CTX *mem_ctx, const char *username)
-{
- fstring tmp;
-
- alpha_strcpy(tmp, username, ". _-$", sizeof(tmp));
- return talloc_strdup(mem_ctx, tmp);
-}
-
/***************************************************************************
Is the incoming username our own machine account ?
If so, the connection is almost certainly from winbindd.
diff --git a/source3/include/proto.h b/source3/include/proto.h
index f6061602a0..eefde96911 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1586,6 +1586,7 @@ bool validate_net_name( const char *name,
int max_len);
char *escape_shell_string(const char *src);
char **str_list_make_v3(TALLOC_CTX *mem_ctx, const char *string, const char *sep);
+char *sanitize_username(TALLOC_CTX *mem_ctx, const char *username);
/* The following definitions come from lib/util_unistr.c */
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index 3247682907..f93832e752 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -2493,3 +2493,11 @@ char **str_list_make_v3(TALLOC_CTX *mem_ctx, const char *string,
TALLOC_FREE(s);
return list;
}
+
+char *sanitize_username(TALLOC_CTX *mem_ctx, const char *username)
+{
+ fstring tmp;
+
+ alpha_strcpy(tmp, username, ". _-$", sizeof(tmp));
+ return talloc_strdup(mem_ctx, tmp);
+}