Removes the specified project definition from the specified project database.
The libaacct.a library.
The rmprojdb subroutine removes the project definition stored in the struct project variable from the project named by the handle parameter. The project database must be initialized before calling this subroutine. The projdballoc and projdbfinit subroutines are provided for this purpose. If the supplied project definition does not exist in the named project database, the rmprojdb subroutine returns -1 and sets errno to ENOENT.
There is an internal state (that is, the current project) associated with the project database. When the project database is initialized, the current project is the first project in the database. The rmprojdb subroutine removes the named project and repositions the internal current project to the first project definition.
Item | Description |
---|---|
handle | Pointer to project database handle. |
project | Pointer to a project structure that holds the definition of the project to be added. |
flag | Integer flag to indicated whether the name or number of the project is supplied. |
Only for privileged users. Privilege can be extended to nonroot users by granting the CAP_AACCT capability to a user.
Item | Description |
---|---|
0 | Success |
-1 | Failure |
Item | Description |
---|---|
ENOENT | Project definition does not exist |
EPERM | Permission denied. The user is not a privileged user. |
EINVAL | Passed pointer is NULL or the flag parameter holds an invalid value. |