This file is indexed.

/usr/sbin/start-ds-admin is in 389-admin 1.1.35-2.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#!/bin/sh
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2001 Sun Microsystems, Inc.  Used by permission.
# Copyright (C) 2005 Red Hat, Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2
# of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
#

# END COPYRIGHT BLOCK

# This script sets up the environment for the httpd server and starts it.
# for httpd, on RHEL, this will typically be something like /usr/sbin/httpd.worker
# On HP-UX, this may be /opt/hpws/apache/bin/httpd.

unset PASSWORD_PIPE

ldlibpath_add() {
    [ -z "$1" ] && return
    LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1
}

shlibpath_add() {
    [ -z "$1" ] && return
    SHLIB_PATH=${SHLIB_PATH:+$SHLIB_PATH:}$1
}

libpath_add() {
    [ -z "$1" ] && return
    LIBPATH=${LIBPATH:+$LIBPATH:}$1
}

OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
OLD_SHLIB_PATH=${SHLIB_PATH}
OLD_LIBPATH=${LIBPATH}
LD_LIBRARY_PATH=
SHLIB_PATH=
LIBPATH=

ldlibpath_add "/usr/lib/x86_64-linux-gnu"
ldlibpath_add "${OLD_LD_LIBRARY_PATH}"
export LD_LIBRARY_PATH

shlibpath_add "/usr/lib/x86_64-linux-gnu"
shlibpath_add "${OLD_SHLIB_PATH}"
export SHLIB_PATH

libpath_add "/usr/lib/x86_64-linux-gnu"
libpath_add "${OLD_LIBPATH}"
libpath_add "/usr/threads/lib"
libpath_add "/usr/ibmcxx/lib"
libpath_add "/usr/lib"
libpath_add "/lib"
export LIBPATH

HTTPD=/usr/sbin/apache2
OS=`uname -s`

# see if httpd is linked with the openldap libraries - we need to override them if
# using mozldap
if [ -z "1" ] ; then
    if [ $OS = "Linux" ]; then
        hasol=0

        /usr/bin/ldd $HTTPD 2>&1 | grep libldap > /dev/null 2>&1 && hasol=1

        if [ $hasol -eq 1 ] ; then
            LD_PRELOAD=" /libldap60.so"
            ssl_lib="/usr/lib/x86_64-linux-gnu/libssl3.so"
            if [ -f "$ssl_lib" ] ; then
                LD_PRELOAD="$ssl_lib $LD_PRELOAD"
            fi
            export LD_PRELOAD
        fi
    fi
fi

# mod_deflate is not supported on HP-UX using the /opt/hpws apache
if [ $OS = "HP-UX" ] ; then
    OMIT_DEFLATE="-DOmitDeflate"
fi

# source env. for admin server
[ -f /etc/default/dirsrv-admin ] && . /etc/default/dirsrv-admin

if [ -z "" ] ; then
    if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
        SELINUX_CMD="runcon -t unconfined_t --"
    fi
fi

$SELINUX_CMD $HTTPD $OMIT_DEFLATE -k start -f /etc/dirsrv/admin-serv/httpd.conf "$@"

PIDFILE=/var/run/dirsrv/admin-serv.pid

loop_counter=1
# wait for 10 seconds for the pid file to appear
max_count=10
while test $loop_counter -le $max_count; do
    loop_counter=`expr $loop_counter + 1`
    if test ! -f $PIDFILE ; then
        sleep 1;
    else
        PID=`cat $PIDFILE`
    fi
done
if test ! -f $PIDFILE ; then
    echo Server failed to start !!! Please check errors log for problems
    exit 1
fi