*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Linux man pages -> capget (2)              



NAME    [Toc]    [Back]

       capget, capset - set/get process capabilities

SYNOPSIS    [Toc]    [Back]

       #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);

DESCRIPTION    [Toc]    [Back]

       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.

       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 easierto-use
 interfaces capsetp(3) and capgetp(3).

RETURN VALUE    [Toc]    [Back]

       On  success,  zero is returned.	On error, -1 is returned, and errno is
       set appropriately.

ERRORS    [Toc]    [Back]

       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.


       The portable interface to the capability querying and setting functions
       is provided by the libcap library and is available from here:

Linux 2.2			  1999-09-09			     CAPGET(2)
[ Back ]
 Similar pages
Name OS Title
cap_get_proc IRIX get or set process capabilities
cap_from_text IRIX convert a POSIX capabilities string to internal form, convert capabilities to a POSIX capabilities string, or
cap_acquire IRIX make permitted set capabilities effective or remove effective capabilities
term HP-UX terminal capabilities
term_c HP-UX terminal capabilities
term.h HP-UX terminal capabilities
TERM HP-UX terminal capabilities
cap_get_file IRIX get or set the capabilities for a pathname
cap_get_fd IRIX get or set the capabilities for an open file
glcenable IRIX enable or disable GLC capabilities
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service