Whamcloud - gitweb
Mass conversion of all copyright messages to Oracle.
[fs/lustre-release.git] / libcfs / libcfs / darwin / darwin-curproc.c
index 7c70abb..7262534 100644 (file)
@@ -16,8 +16,8 @@
  * in the LICENSE file that accompanied this code).
  *
  * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see [sun.com URL with a
- * copy of GPLv2].
+ * version 2 along with this program; If not, see
+ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
  *
  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  * CA 95054 USA or visit www.sun.com if you need additional information or
@@ -26,7 +26,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  */
 /*
@@ -163,16 +163,25 @@ char  *cfs_curproc_comm(void)
 #endif
 }
 
-cfs_kernel_cap_t cfs_curproc_cap_get(void)
+void cfs_cap_raise(cfs_cap_t cap) {}
+void cfs_cap_lower(cfs_cap_t cap) {}
+
+int cfs_cap_raised(cfs_cap_t cap)
 {
+        return 1;
+}
+
+cfs_cap_t cfs_curproc_cap_pack(void) {
         return -1;
 }
 
-void cfs_curproc_cap_set(cfs_kernel_cap_t cap)
-{
-        return;
+void cfs_curproc_cap_unpack(cfs_cap_t cap) {
 }
 
+int cfs_capable(cfs_cap_t cap)
+{
+        return cap == CFS_CAP_SYS_BOOT ? is_suser(): is_suser1();
+}
 
 /*
  * Local variables: