From da7c2116996d26d22b3eca9f20cb497791dbb857 Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Fri, 15 Sep 2006 16:54:57 +0000
Subject: [PATCH] This uses the new FilePermission framework to set permissions on the directory holding the database files. The new config attribute ds-cfg-backend-mode is optional and by default has a value of 700. The permissions are set on backend initialization as well as on the fly via LDAP. The server will make sure the file permissions will allow owner access before setting. Any exceptions encountered while setting the attribute will result in non fatal errors which are logged. However, any configuration exceptions will keep the backend from starting.

---
 opends/src/server/org/opends/server/messages/JebMessages.java |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/messages/JebMessages.java b/opends/src/server/org/opends/server/messages/JebMessages.java
index 802971e..da326f4 100644
--- a/opends/src/server/org/opends/server/messages/JebMessages.java
+++ b/opends/src/server/org/opends/server/messages/JebMessages.java
@@ -1241,6 +1241,12 @@
 
 
 
+  /**
+   * The message ID of an error indicating that the file permissions for the
+   * database directory was not set.
+   */
+  public static final int MSGID_JEB_SET_PERMISSIONS_FAILED =
+      CATEGORY_MASK_JEB | SEVERITY_MASK_SEVERE_WARNING | 128;
 
   /**
    * Associates a set of generic messages with the message IDs defined in this
@@ -1734,5 +1740,8 @@
     registerMessage(MSGID_JEB_LOOKTHROUGH_LIMIT_EXCEEDED,
                     "This search operation has checked the maximum of %d " +
                     "entries for matches.");
+    registerMessage(MSGID_JEB_SET_PERMISSIONS_FAILED,
+                    "Unable to set file permissions for the backend database " +
+                    "directory %s.");
   }
 }

--
Gitblit v1.10.0