You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/09/07 17:59:09 UTC
svn commit: r812212 -
/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/SharedMemory.java
Author: mturk
Date: Mon Sep 7 15:59:08 2009
New Revision: 812212
URL: http://svn.apache.org/viewvc?rev=812212&view=rev
Log:
Implement second setProtection API
Modified:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/SharedMemory.java
Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/SharedMemory.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/SharedMemory.java?rev=812212&r1=812211&r2=812212&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/SharedMemory.java (original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/SharedMemory.java Mon Sep 7 15:59:08 2009
@@ -312,5 +312,20 @@
return chown0(shm, FileProtection.bitmapOf(prot), null, null);
}
+ /**
+ * Set protection for the {@code this} SharedMemory object.
+ * <p>
+ * </p>
+ * @param prot The {@code EnumSet} determining the access permissions.
+ * @param user Change object owner user to {@code User}.
+ * @param group Change object owner group to {@code Group}.
+ */
+ public boolean setProtection(User user, Group group, EnumSet<FileProtection> prot)
+ throws IOException, SecurityException
+ {
+ return chown0(shm, FileProtection.bitmapOf(prot),
+ user.Id, group.Id);
+ }
+
}