Masato Taruishi
taru****@users*****
2004年 9月 20日 (月) 12:01:37 JST
=================================================================== RCS file: ultrapossum/debian/ultrapossum-common.config,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ultrapossum/debian/ultrapossum-common.config 2004/09/16 16:05:52 1.9 +++ ultrapossum/debian/ultrapossum-common.config 2004/09/20 03:01:36 1.10 @@ -31,11 +31,14 @@ # initial preconfiguration should come here ORGANIZATION="`hostname`" ULTRAPOSSUM_CONFIG_BACKEND_LDAP_URI="ldap://$ORGANIZATION/" + if test -f "/etc/ultrapossum/config.cf"; then + . /etc/ultrapossum/config.cf + fi if test -f "/etc/ultrapossum/ultrapossum.cf"; then . /etc/ultrapossum/ultrapossum.cf fi - if test -f "/etc/ultrapossum/config.cf"; then - . /etc/ultrapossum/config.cf + if test -f "/etc/ultrapossum/secret.cf"; then + . /etc/ultrapossum/secret.cf fi fi @@ -55,6 +58,8 @@ set ultrapossum-common/suffix "$SUFFIX" set ultrapossum-common/organization "$ORGANIZATION" +set ultrapossum-common/rootpw "$ROOTPW" +set ultrapossum-common/rootpw2 "$ROOTPW" set ultrapossum-common/config_backend_ldap_uri "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_URI" set ultrapossum-common/config_backend_ldap_basedn "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BASEDN" set ultrapossum-common/config_backend_ldap_binddn "$ULTRAPOSSUM_CONFIG_BACKEND_LDAP_BINDDN" @@ -92,12 +97,28 @@ *) db_input medium ultrapossum-common/organization || true db_input low ultrapossum-common/suffix || true - if ! db_go; then - STATE=backend - else - STATE=end - fi + STATE=rootpw esac + ;; + rootpw) + db_input high ultrapossum-common/rootpw || true + db_input high ultrapossum-common/rootpw2 || true + if ! db_go; then + STATE=backend + else + db_get ultrapossum-common/rootpw + rootpw="$RET" + db_get ultrapossum-common/rootpw2 + if test "$rootpw" != "$RET"; then + db_fset ultrapossum-common/missmatch unseen true || true + db_input medium ultrapossum-common/missmatch || true + db_go || true + db_fset ultrapossum-common/rootpw seen false + db_fset ultrapossum-common/rootpw2 seen false + else + STATE=end + fi + fi ;; ldapstart) db_input low ultrapossum-common/config_backend_ldap_uri || true =================================================================== RCS file: ultrapossum/debian/ultrapossum-common.postinst,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ultrapossum/debian/ultrapossum-common.postinst 2004/09/16 18:30:12 1.8 +++ ultrapossum/debian/ultrapossum-common.postinst 2004/09/20 03:01:36 1.9 @@ -41,6 +41,14 @@ fi } +# setsecretconfig <template_base> <var> +setsecretconfig() { + db_get ultrapossum-common/$1 + if test "x$RET" != "x${!2}"; then + ultrapossum-config set secret $2="$RET" + fi +} + case "$1" in configure) ultrapossum-config remove . SUFFIX @@ -69,6 +77,14 @@ setconfig suffix SUFFIX setconfig organization ORGANIZATION + + db_get ultrapossum-common/rootpw + if test "x$RET" = "x"; then + echo -n "Creating password for admin... " 1>&2 + db_set ultrapossum-common/rootpw "`makepasswd`" + echo "done" 1>&2 + fi + setsecretconfig rootpw ROOTPW db_get ultrapossum-common/config_backend case "$RET" in =================================================================== RCS file: ultrapossum/debian/ultrapossum-common.templates,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ultrapossum/debian/ultrapossum-common.templates 2004/09/16 16:05:52 1.6 +++ ultrapossum/debian/ultrapossum-common.templates 2004/09/20 03:01:36 1.7 @@ -10,6 +10,22 @@ may want to select ldap backend. This backend holds them in LDAP directory. +Template: ultrapossum-common/rootpw +Type: password +_Description: Password of the root DN + Specify the password of the root DN. + +Template: ultrapossum-common/rootpw2 +Type: password +_Description: Retype password of the root DN + In order to check whether your password is correct, retype + the same password again. + +Template: ultrapossum-common/missmatch +Type: note +_Description: password miss match + Your password is different. Retype the password again. + Template: ultrapossum-common/config_backend_ldap_uri Type: string _Description: LDAP URI where you connect =================================================================== RCS file: ultrapossum/debian/ultrapossum-server.config,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- ultrapossum/debian/ultrapossum-server.config 2004/09/16 15:43:39 1.22 +++ ultrapossum/debian/ultrapossum-server.config 2004/09/20 03:01:36 1.23 @@ -53,8 +53,8 @@ set ultrapossum-server/master "$MASTER" set ultrapossum-server/slaves "$SLURPDSLAVES" -set ultrapossum-server/rootpw "$ROOTPW" -set ultrapossum-server/rootpw2 "$ROOTPW" +set ultrapossum-common/rootpw "$ROOTPW" +set ultrapossum-common/rootpw2 "$ROOTPW" if test "x$MASTER" = "x" || test "x$MASTER" = "x`hostname`"; then if test "x$SLURPDSLAVES" = "x"; then @@ -87,7 +87,7 @@ echo "SUFFIX=$RET" > $t db_get ultrapossum-server/rootrdn echo "ROOTDN=$RET" >> $t - db_get ultrapossum-server/rootpw + db_get ultrapossum-common/rootpw echo "ROOTPW=$RET" >> $t db_get ultrapossum-server/directory echo "DBDIRECTORY=$RET" >> $t @@ -139,19 +139,19 @@ ;; ROOTPW) - db_input medium ultrapossum-server/rootpw || true - db_input medium ultrapossum-server/rootpw2 || true + db_input medium ultrapossum-common/rootpw || true + db_input medium ultrapossum-common/rootpw2 || true if db_go; then - db_get ultrapossum-server/rootpw + db_get ultrapossum-common/rootpw rootpw=$RET - db_get ultrapossum-server/rootpw2 + db_get ultrapossum-common/rootpw2 rootpw2=$RET if [ "$rootpw" != "$rootpw2" ]; then - db_fset ultrapossum-server/missmatch unseen true || true - db_input medium ultrapossum-server/missmatch || true + db_fset ultrapossum-common/missmatch unseen true || true + db_input medium ultrapossum-common/missmatch || true db_go || true - db_set ultrapossum-server/rootpw $ROOTPW - db_set ultrapossum-server/rootpw2 $ROOTPW + db_set ultrapossum-common/rootpw $ROOTPW + db_set ultrapossum-common/rootpw2 $ROOTPW else if sanity; then db_get ultrapossum-server/type @@ -219,8 +219,8 @@ db_get ultrapossum-server/credentials2 rootpw2=$RET if [ "$rootpw" != "$rootpw2" ]; then - db_fset ultrapossum-server/missmatch unseen true || true - db_input medium ultrapossum-server/missmatch || true + db_fset ultrapossum-common/missmatch unseen true || true + db_input medium ultrapossum-common/missmatch || true db_go || true db_set ultrapossum-server/credentials $CREDENTIALS db_set ultrapossum-server/credentials2 $CREDENTIALS =================================================================== RCS file: ultrapossum/debian/ultrapossum-server.postinst,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- ultrapossum/debian/ultrapossum-server.postinst 2004/09/16 18:30:12 1.27 +++ ultrapossum/debian/ultrapossum-server.postinst 2004/09/20 03:01:36 1.28 @@ -43,7 +43,7 @@ # setsecretconfig <template_base> <var> setsecretconfig() { - db_get ultrapossum-server/$1 + db_get $1 if test "x$RET" != "x${!2}"; then ultrapossum-config set secret $2="$RET" fi @@ -98,13 +98,13 @@ setserverconfig rootrdn ROOTRDN setserverconfig slaves SLURPDSLAVES - db_get ultrapossum-server/rootpw + db_get ultrapossum-common/rootpw if test "x$RET" = "x"; then echo -n "Creating password for admin... " 1>&2 - db_set ultrapossum-server/rootpw "`makepasswd`" + db_set ultrapossum-common/rootpw "`makepasswd`" echo "done" 1>&2 fi - setsecretconfig rootpw ROOTPW + setsecretconfig ultrapossum-common/rootpw ROOTPW db_get ultrapossum-server/slaves if test "x$RET" != "x"; then @@ -115,7 +115,7 @@ echo "done" 1>&2 fi fi - setsecretconfig credentials CREDENTIALS + setsecretconfig ultrapossum-server/credentials CREDENTIALS db_stop =================================================================== RCS file: ultrapossum/debian/ultrapossum-server.templates,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ultrapossum/debian/ultrapossum-server.templates 2004/04/02 09:34:54 1.8 +++ ultrapossum/debian/ultrapossum-server.templates 2004/09/20 03:01:36 1.9 @@ -6,22 +6,6 @@ UltraPossum directory. For example, no access control nor search limit are performed at all. -Template: ultrapossum-server/rootpw -Type: password -_Description: Password of the root DN - Specify the password of the root DN. - -Template: ultrapossum-server/rootpw2 -Type: password -_Description: Retype password of the root DN - In order to check whether your password is correct, retype - the same password again. - -Template: ultrapossum-server/missmatch -Type: note -_Description: password miss match - Your password is different. Retype the password again. - Template: ultrapossum-server/directory Type: string _Default: /var/lib/ultrapossum/db