Penguin

Differences between current version and previous revision of capset(2).

Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History

Newer page: version 2 Last edited on Tuesday, October 29, 2002 11:39:54 pm by PerryLorier
Older page: version 1 Last edited on Tuesday, June 4, 2002 12:23:39 am by perry Revert
@@ -1,81 +1,32 @@
 CAPGET 
 !!!CAPGET 
-NAME  
-SYNOPSIS  
-DESCRIPTION  
-RETURN VALUE  
-ERRORS  
-FURTHER INFORMATION  
 ---- 
 !!NAME 
  
  
-capget, capset - set/get process capabilities 
+capset - set/get process capabilities 
 !!SYNOPSIS 
  
  
-__#undef _POSIX_SOURCE  
-#include 
+ __#undef _POSIX_SOURCE__  
+ #include <sys/capability.h>  
  
-  
-__int capget(cap_user_header_t__ ''header''__,  
-cap_user_data_t__ ''data''__);__  
-  
-  
- __int capset(cap_user_header_t__ ''header''__, const  
- cap_user_data_t__ ''data''__);__ 
+ __int capset(cap_user_header_t__ ''header''__, const cap_user_data_t__ ''data''__);__ 
 !!DESCRIPTION 
  
+As of Linux 2.2, the power of the superuser (root) has been partitioned into a set of discrete capabilities. Every process has a set of effective capabilities identifying which capabilities (if any) it may currently exercise. Every process also has a set of inheritable capabilities that may be passed through an execve(2) and a set of permitted capabilites that it can make effective or inheritable.  
  
-As of Linux 2.2 , the power of the superuser (root) has been  
-partitioned into a set of discrete capabilities. Every  
-process has a set of effective capabilities identifying  
-which capabilities (if any ) it may currently exercise. Every  
-process also has a set of inheritable capabilities that may  
-be passed through an execve(2) and a set of permitted  
-capabilites that it can make effective or  
-inheritable
+These two functions are the raw kernel interface for getting and setting capabilities. Not only are these system calls specific to Linux, but the kernel API is likely to change and use of these functions (in particular the format of the __cap_user_*_t__ types ) is subject to change with each kernel revision
  
-  
-These two functions are the raw kernel interface for getting  
-and setting capabilities. Not only are these system calls  
-specific to Linux, but the kernel API is likely to change  
-and use of these functions (in particular the format of the  
-__cap_user_*_t__ types) is subject to change with each  
-kernel revision.  
-  
-  
- The portable interfaces are ''cap_set_proc''(3) and  
- ''cap_get_proc''(3); if possible you should use those  
- interfaces in applications. If you wish to use the Linux  
- extensions in applications, you should use the easier-to-use  
- interfaces capsetp(3) and  
- capgetp(3). 
+The portable interfaces are ''cap_set_proc''(3) and ''cap_get_proc''(3); if possible you should use those interfaces in applications. If you wish to use the Linux extensions in applications, you should use the easier-to-use interfaces capsetp(3) and capgetp(3). 
 !!RETURN VALUE 
+On success, zero is returned. On error, -1 is returned, and ''errno'' is set appropriately.  
  
-  
-On success, zero is returned. On error, -1 is returned, and  
-''errno'' is set appropriately.  
 !!ERRORS 
  
+;[EINVAL]: One of the arguments was invalid.  
+;[EPERM]: An attempt was made to add a capability to the Permitted set, or to set a capability in the Effective or Inheritable sets that is not in the Permitted set.  
  
-__EINVAL__  
-  
-  
-One of the arguments was invalid.  
-  
-  
-__EPERM__  
-  
-  
-An attempt was made to add a capability to the Permitted  
-set, or to set a capability in the Effective or Inheritable  
-sets that is not in the Permitted set.  
 !!FURTHER INFORMATION 
  
-  
- The portable interface to the capability querying and  
- setting functions is provided by the __libcap__ library  
- and is available from here:__  
- ftp://linux.kernel.org/pub/linux/libs/security/linux-privs__  
-----  
+The portable interface to the capability querying and setting functions is provided by the __libcap__ library and is available from here: ftp://linux.kernel.org/pub/linux/libs/security/linux-privs 
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.