Skip to content

Commit 90a34bc

Browse files
committed
Release 2.6-7.7.7 - See CHANGELOG.md
1 parent 5124dd7 commit 90a34bc

File tree

5 files changed

+60
-1
lines changed

5 files changed

+60
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 2.6-7.7.7 2025-09-01 <dave at tiredofit dot ca>
2+
3+
### Changed
4+
- Fix issue with TLS scripting on initial boot (@credit devicarus)
5+
6+
17
## 2.6-7.7.6 2025-08-13 <dave at tiredofit dot ca>
28

39
### Changed

install/assets/functions/10-openldap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,8 @@ EOF
537537
TLS_DH_PARAM_PATH \
538538
TLS_DH_PARAM_FILENAME \
539539
TLS_CIPHER_SUITE \
540-
TLS_VERIFY_CLIENT \
540+
TLS_VERIFY_CLIENT
541+
update_template_newline /assets/slapd/config/tls/tls-enable.ldif \
541542
TLS_DH_PARAM_LDIF_ENABLE
542543
silent ldapmodify -Y EXTERNAL -Q -H ldapi:/// -f /assets/slapd/config/tls/tls-enable.ldif
543544

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
dn: cn=config
2+
changetype: modify
3+
delete: olcLogFile
4+
-
5+
delete: olcLogFileFormat
6+
-
7+
delete: olcLogFileOnly
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
dn: cn=config
2+
changetype: modify
3+
replace: olcLogFile
4+
olcLogFile: {{slapd_log_file}}
5+
-
6+
replace: olcLogFileFormat
7+
olcLogFileFormat: {{slapd_log_prefix}}
8+
-
9+
replace: olcLogFileOnly
10+
olcLogFileOnly: {{slapd_log_type}}

install/etc/cont-init.d/10-openldap

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,42 @@ source /assets/functions/00-container
44
prepare_service 10-openldap
55
PROCESS_NAME="openldap"
66

7+
## TODO - This is temporary due top upstream base issues - Check TLS Configuration
8+
update_template_newline() {
9+
## Replace placeholders with values
10+
## Usage: 'update_template <filename> <varname>
11+
## Can have multiple varnames - Don't prefix the varname with $
12+
## You can use wildcards if you Quote the first argument eg "*.template"
13+
template_files=${1}
14+
templates=$(echo "${template_files}" | tr " " "\n")
15+
shift
16+
for template_file in $templates; do
17+
18+
[[ ! -f "${template_file}" ]] && return 1
19+
20+
template_variables=($@)
21+
template_user=$(stat -c %U "${template_file}")
22+
template_tmp_file=$(mktemp)
23+
cp -a "${template_file}" "${template_tmp_file}"
24+
25+
for template_variable in ${template_variables[@]}; do
26+
# Keep the compatibilty: {{VAR}} => ${VAR}
27+
sed -ri "s/[{]{2}$template_variable[}]{2}/\${$template_variable}/g" "${template_tmp_file}"
28+
print_debug "[update_template] Template: '${template_file}' updating field '${template_variable}'"
29+
done
30+
31+
# Replace placeholders
32+
(
33+
export ${template_variables[@]}
34+
local IFS=":"; sudo -HEu ${template_user} envsubst "${template_variables[*]/#/$}" < "${template_tmp_file}" > "${template_file}"
35+
)
36+
sed -i 's/\\n/\n/g' "${template_file}"
37+
rm -f "${template_tmp_file}"
38+
done
39+
}
40+
741
create_data_directories
42+
843
configure_ldap_server
944
configure_ldap_client
1045
configure_backup

0 commit comments

Comments
 (0)