ports/138618: [net/openldap24-server] slapd startup script creates wrong files due to missing "/" after %%PREFIX%%

Alexander Wittig alexander at wittig.name
Mon Sep 7 19:20:05 UTC 2009


>Number:         138618
>Category:       ports
>Synopsis:       [net/openldap24-server] slapd startup script creates wrong files due to missing "/" after %%PREFIX%%
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 07 19:20:04 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Wittig
>Release:        7.2 Stable
>Organization:
>Environment:
FreeBSD hotzenplotz.wittig.name 7.2-STABLE FreeBSD 7.2-STABLE #0: Tue Jun 16 00:32:35 CEST 2009     root at hotzenplotz.wittig.name:/usr/obj/usr/src/sys/ALEX  amd64

>Description:
With slapd_cn_config off (the default), the slapd rc.d script tries to detect the database directories from the configuration file. Unfortunately, there is a "/" missing after %%PREFIX%% in this line:

DATABASEDIR=`awk '$1 == "directory" { print $2 }' "%%PREFIX%%etc/openldap/slapd.conf" 2>&1 /dev/null`

This causes awk to fail and output an error message which in turn causes every word in that error message to be treated as a database directory (i.e. being created).
>How-To-Repeat:
Run "/usr/local/etc/rc.d/slapd start" on a system without slapd_cn_config set (or set to off).
>Fix:
change the above line in files/slapd.sh.in to 

DATABASEDIR=`awk '$1 == "directory" { print $2 }' "%%PREFIX%%/etc/openldap/slapd.conf" 2>&1 /dev/null`

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list