From 2b1a50c2e537f690acd8eff1d0cf3102104144d3 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 11 Apr 2010 22:38:33 +0200 Subject: s3: Move sanitize_username to lib/util_str.c --- source3/lib/util_str.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3/lib') 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); +} -- cgit