[debian-edu-commits] debian-edu/ 02/02: gosa-sync: Fix escaping double quotes and semicolons. (Closes: #794000).
Mike Gabriel
sunweaver at debian.org
Wed Oct 14 09:30:16 UTC 2015
This is an automated email from the git hooks/post-receive script.
sunweaver pushed a commit to branch master
in repository debian-edu-config.
commit 6863f10ce86888499703e1c8d2383be310f446fb
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Wed Oct 14 11:28:07 2015 +0200
gosa-sync: Fix escaping double quotes and semicolons. (Closes: #794000).
---
debian/changelog | 1 +
share/debian-edu-config/tools/gosa-sync | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 736c883..9362e07 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -32,6 +32,7 @@ debian-edu-config (1.819) UNRELEASED; urgency=low
* gosa-sync: Test if a given user account actually is a Kerberos account. If
not, don't try to set the Kerberos password for this account. (Closes:
#798435).
+ * gosa-sync: Fix escaping double quotes and semicolons. (Closes: #794000).
-- Petter Reinholdtsen <pere at debian.org> Sat, 16 May 2015 23:12:06 +0200
diff --git a/share/debian-edu-config/tools/gosa-sync b/share/debian-edu-config/tools/gosa-sync
index 223abbf..4f6f2b2 100755
--- a/share/debian-edu-config/tools/gosa-sync
+++ b/share/debian-edu-config/tools/gosa-sync
@@ -36,10 +36,14 @@ cat <<EOF | tr -d "\n" > "$TMPFILE"
$USERPASSWORD
EOF
+# remove escapes from the password added by GOsa²...
+sed -i $TMPFILE -e 's/\\//g'
+
+# check the password in $TMPfile against LDAP...
IAM=`ldapwhoami -x -Z -y "$TMPFILE" -D "$USERDN" 2>/dev/null || true`
# Escapes " because kadmin needs to use double quotes:
-EUSERPASSWORD="$(cat $TMPFILE | sed -e 's/\"/\"\"/g')"
+EUSERPASSWORD="$(cat $TMPFILE | sed -e 's/\"/\\\"/g')"
if [ "$IAM" = "dn:$USERDN" ] ; then
cat > "$TMPFILE" <<EOF
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git
More information about the debian-edu-commits
mailing list