summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-04-11 22:38:33 +0200
committerVolker Lendecke <vl@samba.org>2010-04-11 22:59:47 +0200
commit2b1a50c2e537f690acd8eff1d0cf3102104144d3 (patch)
tree4810dd9d8c44ce32ad5ca47ec62da1bdb28c59f2 /source3/lib
parent80708b75f815d455c7cc00fc4cccfb6af91e9d85 (diff)
downloadsamba-2b1a50c2e537f690acd8eff1d0cf3102104144d3.tar.gz
samba-2b1a50c2e537f690acd8eff1d0cf3102104144d3.tar.bz2
samba-2b1a50c2e537f690acd8eff1d0cf3102104144d3.zip
s3: Move sanitize_username to lib/util_str.c
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_str.c8
1 files changed, 8 insertions, 0 deletions
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);
+}