Retrieves the project definition from the kernel project registry for the requested project name.
The libaacct.a library.
Generally, the projects are loaded from the system project definition file or LDAP, or from both. When more than one of these project repositories are used, project name and project ID collisions are possible. These projects are differentiated by the kernel using an origin flag. This origin flag designates the project repository from where the project definition is obtained. If the caller wants to retrieve the project definition that belongs to a specific project repository, the specific origin value should be passed in the flags field of the project structure. Valid project origins values that can be passed are defined in the sys/aacct.h file. If the projects are currently loaded from the project repository represented by the origin value, getproj returns the specified project if it exists. If the origin value is not passed, the first project reference found in the kernel registry is returned. Regardless of whether the origin is passed or not, getproj always returns the project origin flags in the output project structure.
Item | Description |
---|---|
project | Pointer holding the project whose information is required. |
flag | An integer flag that indicates whether the match needs to be performed on the supplied project name or number. |
There are no restrictions. Any user can call this function.
Item | Description |
---|---|
0 | Success |
-1 | Failure |
Item | Description |
---|---|
EINVAL | Invalid argument. The flag parameter is not valid or the passed pointer is NULL. |
ENOENT | Project not found. |