cap_get_file man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



CAP_GET_FILE(3C)					      CAP_GET_FILE(3C)

NAME
     cap_get_file, cap_set_file - get or set the capabilities for a pathname

SYNOPSIS
     #include <sys/capability.h>

     cap_t cap_get_file(const char *path);
     int cap_set_file(const char *path, cap_t cap);

DESCRIPTION
     cap_get_file returns a pointer to an allocated cap_t associated with the
     pathname pointed to by path. If there is no capability set associated
     with the file, cap_get_file returns a NULL pointer and sets errno to
     ENOATTR.  If _POSIX_MAC is in effect, then the process must have MAC read
     access to the object.

     cap_set_file sets the capabilities of the specified pathname.  For this
     function to succeed, the process must have the CAP_SETFCAP capability
     enabled and either the effective user ID of the process must match the
     file owner or the calling process must have the effective flag of the
     CAP_FOWNER capability set. In addition, if _POSIX_MAC is defined, then
     the process must have MAC write access to the file.

RETURN VALUES
     cap_get_file a pointer to an allocated cap_t if successful, NULL
     otherwise.	 The storage should be freed with a call to cap_free with the
     returned pointer as an argument when it is no longer needed.

     cap_set_file returns 0 if successful, -1 otherwise.

ERRORS
     cap_get_file:

     ENOATTR	     There is no capability set associated with the file.

     EACCESS	     Search permission is denied for a component of the path
		     prefix or the object exists and the process does not have
		     appropriate access rights.

     ENAMETOLONG     The pathname or one of its components is too long.

     ENOENT	     The named object does not exist or path points to an
		     empty string.

     ENOMEM	     allocation of the cap failed.

     ENOSYS	     Capability support is not available (not installed).

     ENOTDIR	     A component of the path prefix is not a directory.

									Page 1

CAP_GET_FILE(3C)					      CAP_GET_FILE(3C)

     cap_set_file:

     EACCESS	     Search permission is denied for a component of the path
		     prefix or the object exists and the process does not have
		     appropriate access rights.

     ENAMETOLONG     The pathname or one of its components is too long.

     ENOENT	     The named object does not exist or path points to an
		     empty string.

     ENOSYS	     Capability support is not available (not installed).

     ENOTDIR	     A component of the path prefix is not a directory.

     EPERM	     The process does not have appropriate privilege to
		     perform the operation to set the capabilities.

     EROFS	     This function requires modification of a file system
		     which is currently read-only.

SEE ALSO
     capabilities(4)

									Page 2

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net