commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r812212 - /commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/SharedMemory.java
Date Mon, 07 Sep 2009 15:59:09 GMT
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);
+    }
+
 }
 



Mime
View raw message