~vorlon/openldap/debian-cnconfig

« back to all changes in this revision

Viewing changes to debian/slapd.config

  • Committer: Mathias Gug
  • Date: 2008-07-24 22:57:21 UTC
  • Revision ID: mathias.gug@canonical.com-20080724225721-7a4glig27e7p77dy
Ask for cn=config password on upgrades.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
  while true; do
82
82
    db_input medium slapd/domain || true
83
83
    db_input medium shared/organization || true
84
 
    db_input high slapd/password1 || true
85
 
    db_input high slapd/password2 || true
86
84
    db_input low slapd/backend || true
87
85
    db_input low slapd/purge_database || true
88
86
    # XXX - should be done more general, but for now this should do
92
90
    fi
93
91
    db_go || true
94
92
 
 
93
 
 
94
    get_admin_password
 
95
 
95
96
    if validate_initial_config; then
96
97
      break
97
98
    fi
98
99
  done
99
100
}
100
101
 
 
102
# Get the admin password
 
103
get_admin_password() {
 
104
  while true; do
 
105
    db_input high slapd/password1 || true
 
106
    db_input high slapd/password2 || true
 
107
    db_go || true
 
108
 
 
109
    # Make sure the passwords match
 
110
    local pass1 pass2
 
111
    db_get slapd/password1
 
112
    pass1="$RET"
 
113
    db_get slapd/password2
 
114
    pass2="$RET"
 
115
 
 
116
    if [ "$pass1" = "$pass2" ]; then
 
117
      break;
 
118
    fi
 
119
    db_fset slapd/password1 seen false
 
120
    db_fset slapd/password2 seen false
 
121
    db_input critical slapd/password_mismatch
 
122
    wipe_admin_pass
 
123
    db_go
 
124
  done
 
125
}
 
126
 
 
127
 
101
128
configure_allow_v2_binds() {                        # {{{
102
129
# Ask if the user would like their package to support LDAPv2..
103
130
# This was the default in older versions but we want to ask
160
187
if [ "$1" = configure ] && [ -n "$2" ]; then
161
188
        configure_dumping
162
189
        configure_allow_v2_binds
 
190
        # Ask the admin password when migrating to a cn=config environment.
 
191
        if previous_version_older 2.4.10-3 && [ -f "${SLAPD_CONF}" ]; then
 
192
                get_admin_password
 
193
        fi
163
194
fi
164
195
   
165
196
db_go || true