s3: Move sanitize_username to lib/util_str.c
authorVolker Lendecke <vl@samba.org>
Sun, 11 Apr 2010 20:38:33 +0000 (22:38 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 11 Apr 2010 20:59:47 +0000 (22:59 +0200)
source3/auth/auth_util.c
source3/include/proto.h
source3/lib/util_str.c

index f71ed90687a5cd72810cea59a43f0992c3dbbe0c..2cb02f403353978640387f6ccaec2b42cc03dc91 100644 (file)
@@ -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.
index f6061602a03f7132c8c933812c4bf8efd094e370..eefde96911a76ba99bea71b446bb5b514918eb13 100644 (file)
@@ -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  */
 
index 32476829070c29252a9ab1b9f1cd700defa3556b..f93832e7527135b9e00a635d2508e707add61f1b 100644 (file)
@@ -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);
+}