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

Ludovic Poitou
16.26.2011 becab4a7f62980abcf124ffc43f39fd4024dfa29
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
opendj-sdk/opends/resource/configure 8 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/resource/unconfigure 8 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/svr4/OpenDJ/layout.xml 4 ●●●● patch | view | raw | blame | history
opendj-sdk/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
opendj-sdk/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
opendj-sdk/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"/>