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

Fabio Pistolesi
28.01.2015 8b6a544a11dee1f1b77151fb532fb1f06a7bbea6
opendj-server-legacy/src/main/java/org/opends/server/backends/TrustStoreBackend.java
@@ -1478,18 +1478,16 @@
    out.flush();
    out.close();
    if(FilePermission.canSetPermissions()) {
      try {
        if (!FilePermission.setPermissions(new File(path),
                                           new FilePermission(0600)))
        {
          // Log a warning that the permissions were not set.
          logger.warn(WARN_TRUSTSTORE_SET_PERMISSIONS_FAILED, path);
        }
      } catch(DirectoryException e) {
    try {
      if (!FilePermission.setPermissions(new File(path),
          new FilePermission(0600)))
      {
        // Log a warning that the permissions were not set.
        logger.warn(WARN_TRUSTSTORE_SET_PERMISSIONS_FAILED, path);
      }
    } catch(DirectoryException e) {
      // Log a warning that the permissions were not set.
      logger.warn(WARN_TRUSTSTORE_SET_PERMISSIONS_FAILED, path);
    }
  }