[debian-edu-commits] debian-edu/ 01/01: gosa-sync: Fix escaping double quotes and semicolons. (Closes: #794000).
Mike Gabriel
sunweaver at debian.org
Wed Oct 14 09:33:11 UTC 2015
This is an automated email from the git hooks/post-receive script.
sunweaver pushed a commit to branch jessie
in repository debian-edu-config.
commit 807ad1374d133b6ca0251b31dd25dda39815d7a4
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 0db4356..10c869f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,7 @@ debian-edu-config (1.818+deb8u1) 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