mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Ludovic Poitou
16.26.2011 b2ac5a8556b6ea187592b01b918d742b2c592a7c
Fix for OPENDJ-148 : pfexec /usr/opendj/configure does not execute (permission denied).
pfexec checks file permissions before the profile and exec attributes on OpenIndiana (and OpenSolaris).
So now configure and unconfigure are executable by all, but check for root id, allowing use with pfexec.
3 files modified
20 ■■■■■ changed files
opends/resource/configure 8 ●●●●● patch | view | raw | blame | history
opends/resource/unconfigure 8 ●●●●● patch | view | raw | blame | history
opends/src/svr4/OpenDJ/layout.xml 4 ●●●● patch | view | raw | blame | history
opends/resource/configure
@@ -41,6 +41,14 @@
SCRIPT_NAME=configure
export SCRIPT_NAME
# Check if running as root. This is required to be able to copy files and
# enable SMF
if [[ `id -u` -ne 0 ]]
then
  echo "This script must be run as root" 1>&2
  exit 1
fi
cd "${WORKING_DIR}"
# Set environment variables
opends/resource/unconfigure
@@ -41,6 +41,14 @@
SCRIPT_NAME=unconfigure
export SCRIPT_NAME
# Check if running as root. This is required to be able to copy files and
# enable SMF
if [[ `id -u` -ne 0 ]]
then
  echo "This script must be run as root" 1>&2
  exit 1
fi
cd "${WORKING_DIR}"
# Set environment variables
opends/src/svr4/OpenDJ/layout.xml
@@ -123,11 +123,11 @@
    <!-- Add configure script -->
    <copy file="${resource.dir}/configure"
        tofile="${svr4.layout.pkg.dir}/configure" />
    <chmod file="${svr4.layout.pkg.dir}/configure" perm="744" />
    <chmod file="${svr4.layout.pkg.dir}/configure" perm="755" />
        <!-- Add unconfigure script -->
        <copy file="${resource.dir}/unconfigure"
          tofile="${svr4.layout.pkg.dir}/unconfigure" />
        <chmod file="${svr4.layout.pkg.dir}/unconfigure" perm="744" />
        <chmod file="${svr4.layout.pkg.dir}/unconfigure" perm="755" />
        <!-- Add man pages -->
        <copy todir="${svr4.layout.pkg.dir}/man">
          <fileset dir="${resource.dir}/man"/>