From b1dcddff57a0b88631361531943b212371318b92 Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Tue, 22 May 2007 16:02:03 +0000
Subject: [PATCH] Fixed issue where the server issued warnings about setting file permissions on startup on Windows platforms. This applies for the DB  directory and log file permissions. With Java 6, it is impossible to set a read and execute permission to false on Windows. The file  permissions class now takes this into account and does not consider a false result from setting read and execute permissions to false  on Windows a failure.

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

diff --git a/opends/src/server/org/opends/server/messages/JebMessages.java b/opends/src/server/org/opends/server/messages/JebMessages.java
index ca73563..30fd871 100644
--- a/opends/src/server/org/opends/server/messages/JebMessages.java
+++ b/opends/src/server/org/opends/server/messages/JebMessages.java
@@ -1151,6 +1151,13 @@
       CATEGORY_MASK_JEB | SEVERITY_MASK_MILD_ERROR | 145;
 
   /**
+   * The message ID of an error indicating that setting file permissions
+   * for the database directory is not supported.
+   */
+  public static final int MSGID_JEB_UNABLE_SET_PERMISSIONS =
+      CATEGORY_MASK_JEB | SEVERITY_MASK_SEVERE_WARNING | 146;
+
+  /**
    * Associates a set of generic messages with the message IDs defined in this
    * class.
    */
@@ -1433,8 +1440,8 @@
                     "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");
+                    "An error occured while setting file permissions for " +
+                    "the backend database directory %s: %s");
     registerMessage(MSGID_JEB_GET_ENTRY_COUNT_FAILED,
                     "Unable to determine the total number of entries in the " +
                     "container: %s");
@@ -1479,5 +1486,8 @@
     registerMessage(MSGID_JEB_SEARCH_UNINDEXED_INSUFFICIENT_PRIVILEGES,
                     "You do not have sufficient privileges to perform an " +
                     "unindexed search");
+    registerMessage(MSGID_JEB_UNABLE_SET_PERMISSIONS,
+                    "This platform does not support setting file " +
+                    "permissions %s to the database directory %s");
   }
 }

--
Gitblit v1.10.0