[debian-lan-devel] [debian-lan] 01/01: Remove non-alphabetic characters from generated usernames.
Andreas B. Mundt
andi at moszumanska.debian.org
Mon Dec 2 18:12:35 UTC 2013
This is an automated email from the git hooks/post-receive script.
andi pushed a commit to branch wheezy
in repository debian-lan.
commit 9469823e8d6c7761cd634c867c0f1c754178ecec
Author: Andreas B. Mundt <andi at debian.org>
Date: Mon Dec 2 18:55:12 2013 +0100
Remove non-alphabetic characters from generated usernames.
(cherry picked from commit ea54f2c38f8ab69cdb9ce4074b7c44c2bc956135)
---
fai/config/files/usr/local/sbin/add2gosa/GOSA | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fai/config/files/usr/local/sbin/add2gosa/GOSA b/fai/config/files/usr/local/sbin/add2gosa/GOSA
index dab66f2..dd7eebd 100755
--- a/fai/config/files/usr/local/sbin/add2gosa/GOSA
+++ b/fai/config/files/usr/local/sbin/add2gosa/GOSA
@@ -16,10 +16,10 @@ sync_nscd(){
}
mk_uname() {
- # Convert to ASCII:
- local FNAME=$(echo $1 | iconv -f UTF-8 -t ASCII//TRANSLIT)
- local GNAME=$(echo $2 | iconv -f UTF-8 -t ASCII//TRANSLIT)
- # lower case:
+ # Convert to ASCII and remove non-alphabetic characters:
+ local FNAME=$(echo $1 | iconv -f UTF-8 -t ASCII//TRANSLIT | sed "s/[^A-Za-z]//g")
+ local GNAME=$(echo $2 | iconv -f UTF-8 -t ASCII//TRANSLIT | sed "s/[^A-Za-z]//g")
+ # Lower case:
FNAME=${FNAME,,}
GNAME=${GNAME,,}
# Check if username is not yet in use:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/debian-lan.git
More information about the debian-lan-devel
mailing list