Purpose
Updates the
project attributes in the project database.
Library
The libaacct.a library.
Syntax
<sys/aacct.h>
chprojattrdb(void *handle, struct project *project, int cmd)
Description
The
chprojattrdb subroutine
alters the attributes of the named project in the specified project
database, which is controlled through the
handle parameter.
The following commands are permitted:
- PROJ_ENABLE_AGGR — Enables aggregation for the specified
project
- PROJ_DISABLE_AGGR — Disables aggregation for the specified
project
The project database must be initialized before calling
this subroutine. The
projdballoc subroutine is provided for
this purpose. The
chprojattrdb subroutine must be called after
the
getprojdb subroutine, which sets the record pointer to
point to the project that needs to be modified.
Note: The chprojattrdb subroutine
must be called after the getprojdb subroutine, which makes
the named project the current project.
Parameters
Item |
Description |
handle |
Pointer to the handle allocated for the project
database. |
project |
Pointer containing the project definition. |
cmd |
An integer command indicating whether to perform
a set or clear operation. |
Security
Only for
privileged users. Privilege can be extended to nonroot users by granting
the CAP_AACCT capability to a user.
Return Values
Item |
Description |
0 |
Success |
-1 |
Failure |
Error Codes
Item |
Description |
EINVAL |
Invalid arguments passed. The passed command
flag is invalid or the passed pointer is NULL. |
ENONENT |
Project not found. |