View | Details | Raw Unified | Return to bug 31996
Collapse All | Expand All

(-)management/univention-join/joinscripthelper.lib (-8 lines)
 Lines 325-338   joinscript_remove_credentialfiles () { Link Here 
325
	test -e /var/run/univention-join/binddn && rm /var/run/univention-join/binddn
325
	test -e /var/run/univention-join/binddn && rm /var/run/univention-join/binddn
326
}
326
}
327
327
328
# join script can be called with --bindpwdfile
329
joinscript_check_api_bindpwdfile () {
330
	if grep -q '^## joinscript api: bindpwdfile$' "$1"; then
331
		return 0
332
	fi
333
	return 1
334
}
335
336
# join script does not require domain credentials to be passed
328
# join script does not require domain credentials to be passed
337
joinscript_check_api_nocredentials () {
329
joinscript_check_api_nocredentials () {
338
	if grep -q '^## joinscript api: nocredentials$' "$1"; then
330
	if grep -q '^## joinscript api: nocredentials$' "$1"; then
(-)management/univention-join/univention-join (-4 / +2 lines)
 Lines 205-216   run_join_scripts () { Link Here 
205
			fi
205
			fi
206
206
207
			local args=()
207
			local args=()
208
			if joinscript_check_api_bindpwdfile "$i"; then
208
			if joinscript_check_api_nocredentials "$i"; then
209
				args=(--binddn "$binddn" --bindpwdfile "$DCPWD")
210
			elif joinscript_check_api_nocredentials "$i"; then
211
				args=()
209
				args=()
212
			else
210
			else
213
				args=(--binddn "$binddn" --bindpwd "$(<"$DCPWD")")
211
				args=(--binddn "$binddn" --bindpwdfile "$DCPWD")
214
			fi
212
			fi
215
			$bashVerbose "$i" "${args[@]}" >>/var/log/univention/join.log 2>&1
213
			$bashVerbose "$i" "${args[@]}" >>/var/log/univention/join.log 2>&1
216
214
(-)management/univention-join/univention-run-join-scripts (-4 / +2 lines)
 Lines 272-283   then Link Here 
272
272
273
		if [ ! "$server_role" = "domaincontroller_master" ] || [ -n "$ASK_PASS" ] ; then
273
		if [ ! "$server_role" = "domaincontroller_master" ] || [ -n "$ASK_PASS" ] ; then
274
			args=()
274
			args=()
275
			if joinscript_check_api_bindpwdfile "$i"; then
275
			if joinscript_check_api_nocredentials "$i"; then
276
				args=(--binddn "$binddn" --bindpwdfile "$DCPWD")
277
			elif joinscript_check_api_nocredentials "$i"; then
278
				args=()
276
				args=()
279
			else
277
			else
280
				args=(--binddn "$binddn" --bindpwd "$(<"$DCPWD")")
278
				args=(--binddn "$binddn" --bindpwdfile "$DCPWD")
281
			fi
279
			fi
282
			"$i" "${args[@]}" 3>&-
280
			"$i" "${args[@]}" 3>&-
283
		else
281
		else

Return to bug 31996