![]() |
The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Functions to produce and parse the FreeRADIUS presentation format. More...
#include <pwd.h>#include <sys/stat.h>#include <sys/types.h>#include <grp.h>#include <freeradius-devel/util/talloc.h>
Include dependency graph for perm.h:Go to the source code of this file.
Functions | |
| void | fr_perm_file_error (int num) |
| Write a file access error to the fr_strerror buffer, including euid/egid. | |
| int | fr_perm_getgrgid (TALLOC_CTX *ctx, struct group **out, gid_t gid)) |
| Resolve a gid to a group database entry. | |
| int | fr_perm_getgrnam (TALLOC_CTX *ctx, struct group **out, char const *name)) |
| Resolve a group name to a group database entry. | |
| int | fr_perm_getpwnam (TALLOC_CTX *ctx, struct passwd **out, char const *name)) |
| Resolve a username to a passwd entry. | |
| int | fr_perm_getpwuid (TALLOC_CTX *ctx, struct passwd **out, uid_t uid)) |
| Resolve a uid to a passwd entry. | |
| int | fr_perm_gid_from_str (TALLOC_CTX *ctx, gid_t *out, char const *name)) |
| Resolve a group name to a GID. | |
| char * | fr_perm_gid_to_str (TALLOC_CTX *ctx, gid_t gid) |
| int | fr_perm_mode_from_str (mode_t *out, char const *str) |
| char const * | fr_perm_mode_to_oct (char out[static 5], mode_t mode) |
| char const * | fr_perm_mode_to_str (char out[static 10], mode_t mode) |
| Convert mode_t into humanly readable permissions flags. | |
| int | fr_perm_uid_from_str (TALLOC_CTX *ctx, uid_t *out, char const *name)) |
| Resolve a user name to a GID. | |
| char * | fr_perm_uid_to_str (TALLOC_CTX *ctx, uid_t uid) |
| Print uid to a string. | |
Functions to produce and parse the FreeRADIUS presentation format.
Definition in file perm.h.
| void fr_perm_file_error | ( | int | num | ) |
Write a file access error to the fr_strerror buffer, including euid/egid.
| num | Usually errno, unless the error is returned by the function. |
Definition at line 531 of file perm.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int fr_perm_getgrgid | ( | TALLOC_CTX * | ctx, |
| struct group ** | out, | ||
| gid_t | gid | ||
| ) |
Resolve a gid to a group database entry.
Resolves a gid to a group database entry. The memory to hold the group entry is talloced under ctx, and must be freed when no longer required.
| ctx | to allocate passwd entry in. |
| out | Where to write pointer to entry. |
| gid | to resolve. |
Definition at line 329 of file perm.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int fr_perm_getgrnam | ( | TALLOC_CTX * | ctx, |
| struct group ** | out, | ||
| char const * | name | ||
| ) |
Resolve a group name to a group database entry.
Resolves a group name to a group database entry. The memory to hold the group entry is talloced under ctx, and must be freed when no longer required.
| ctx | to allocate passwd entry in. |
| out | Where to write pointer to entry. |
| name | to resolve. |
Definition at line 392 of file perm.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int fr_perm_getpwnam | ( | TALLOC_CTX * | ctx, |
| struct passwd ** | out, | ||
| char const * | name | ||
| ) |
Resolve a username to a passwd entry.
Resolves a username to a passwd entry. The memory to hold the passwd entry is talloced under ctx, and must be freed when no longer required.
| ctx | to allocate passwd entry in. |
| out | Where to write pointer to entry. |
| name | to resolve. |
Definition at line 266 of file perm.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int fr_perm_getpwuid | ( | TALLOC_CTX * | ctx, |
| struct passwd ** | out, | ||
| uid_t | uid | ||
| ) |
Resolve a uid to a passwd entry.
Resolves a uid to a passwd entry. The memory to hold the passwd entry is talloced under ctx, and must be freed when no longer required.
| ctx | to allocate passwd entry in. |
| out | Where to write pointer to entry. |
| uid | to resolve. |
Definition at line 203 of file perm.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int fr_perm_gid_from_str | ( | TALLOC_CTX * | ctx, |
| gid_t * | out, | ||
| char const * | name | ||
| ) |
| char * fr_perm_gid_to_str | ( | TALLOC_CTX * | ctx, |
| gid_t | gid | ||
| ) |
| int fr_perm_mode_from_str | ( | mode_t * | out, |
| char const * | str | ||
| ) |
| char const * fr_perm_mode_to_oct | ( | char | out[static 5], |
| mode_t | mode | ||
| ) |
| char const * fr_perm_mode_to_str | ( | char | out[static 10], |
| mode_t | mode | ||
| ) |
| int fr_perm_uid_from_str | ( | TALLOC_CTX * | ctx, |
| uid_t * | out, | ||
| char const * | name | ||
| ) |
| char * fr_perm_uid_to_str | ( | TALLOC_CTX * | ctx, |
| uid_t | uid | ||
| ) |
1.9.8