Masato Taruishi
taru****@users*****
2004年 9月 23日 (木) 15:21:18 JST
=================================================================== RCS file: plugin/sasl/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- plugin/sasl/Makefile.am 2004/09/22 14:05:53 1.2 +++ plugin/sasl/Makefile.am 2004/09/23 06:21:18 1.3 @@ -5,6 +5,8 @@ module_DATA = 11sasl update_SCRIPTS = update-sasl +modulesysconf_DATA = sasl.cf + templatedir = $(sysconfdir)/ultrapossum/in.d template_DATA = sasl-md5.in @@ -15,5 +17,5 @@ sasl-md5.in \ 11sasl \ sasl-account \ - sasl-authcid + sasl.cf =================================================================== RCS file: plugin/sasl/sasl-account,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- plugin/sasl/sasl-account 2004/06/19 15:30:31 1.2 +++ plugin/sasl/sasl-account 2004/09/23 06:21:18 1.3 @@ -8,16 +8,22 @@ echo -n "Creating account..." 1>&2 $MODULEDIR/server/apps list | while read cf do - . $APPSDIR/$cf - for app in $apps - do - pass=$(eval "echo \$${app}Password") - if test "x$pass" = "x"; then - pass=$ROOTPW - fi - echo -n " $app" 1>&2 - echo "$pass" | saslpasswd2 -p -u $PACKAGE $app - done + + if test "x$CREDENTIALS" != "x"; then + authcid="`echo $UPDATEDN | cut -d, -f1 | cut -d= -f2`" + echo -n " $authcid" 1>&2 + echo "$CREDENTIALS" | saslpasswd2 -p -u $PACKAGE $authcid + fi + . $APPSDIR/$cf + for app in $apps + do + pass=$(eval "echo \$${app}Password") + if test "x$pass" = "x"; then + pass=$ROOTPW + fi + echo -n " $app" 1>&2 + echo "$pass" | saslpasswd2 -p -u $PACKAGE $app + done done echo "" 1>&2 =================================================================== RCS file: plugin/sasl/sasl-md5.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- plugin/sasl/sasl-md5.in 2004/05/14 16:11:00 1.1 +++ plugin/sasl/sasl-md5.in 2004/09/23 06:21:18 1.2 @@ -5,8 +5,8 @@ # To use DN's userPassword by LDAP Password Modify Extended Operations password-hash {CLEARTEXT} -# User SASL/Digest-MD5 to real DN map +# Application SASL/Digest-MD5 to real DN map sasl-regexp - uid=([^@]+),cn=digest-md5,cn=auth - ldap:///#SUFFIX#??sub?(uid=$1) + uid=([^@]+)@#PACKAGE#,cn=digest-md5,cn=auth + ldap:///#APPLICATION#??sub?(cn=$1) =================================================================== RCS file: plugin/sasl/update-sasl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- plugin/sasl/update-sasl 2004/05/14 11:25:13 1.1 +++ plugin/sasl/update-sasl 2004/09/23 06:21:18 1.2 @@ -27,7 +27,12 @@ echo -n "Configuring SASL/Digest-MD5... " 1>&2 id="SASL" add_startmark "##" $id > $tmp - sed -e "s/#SUFFIX#/$SUFFIX/" < $SASL_MD5_IN >> $tmp + SYNCRDN="`echo $SYNCDN | cut -d, -f1 | cut -d= -f2`" + sed -e "s/#SUFFIX#/$SUFFIX/" \ + -e "s/#APPLICATION#/$APPLICATION/" \ + -e "s/#PACKAGE#/$PACKAGE/" \ + -e "s/#SYNCDN#/$SYNCDN/" -e "s/#SYNCRDN#/$SYNCRDN/" \ + < $SASL_MD5_IN >> $tmp add_endmark "##" $id >> $tmp add_vaconf $SLAPDCONF $tmp $id echo "done" 1>&2