#include "config.h"
#include "check_path_exists.h"
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
Go to the source code of this file.
◆ check_mode
| #define check_mode |
( |
|
m, |
|
|
|
c |
|
) |
| (((m) | (c)) == (m) ? 1 : 0) |
◆ checkpermission_root
◆ perm_group
| #define perm_group |
( |
|
m | ) |
((m & S_IRWXG) >> 3) |
◆ perm_other
| #define perm_other |
( |
|
m | ) |
(m & S_IRWXO) |
◆ perm_owner
| #define perm_owner |
( |
|
m | ) |
((m & S_IRWXU) >> 6) |
◆ check_path_exists()
| int check_path_exists |
( |
const char * |
path, |
|
|
mode_t |
type, |
|
|
mode_t |
mode |
|
) |
| |
Check the existence, type and permissions of a path.
- Parameters
-
| [in] | path | Pointer to a string representing the path. |
| [in] | type | The type the path should be (0 disables this check). |
| [in] | mode | Type of access the path should have (0 disables this check). |
- Returns
- return value
- 0 the path exists and has at least the requested permissions
- -1 the path does not exists or has not the requested permissions
Definition at line 60 of file check_path_exists.c.
◆ checkpermission()
| int checkpermission |
( |
struct stat * |
st, |
|
|
mode_t |
mode |
|
) |
| |
◆ read_all_groups()
| int read_all_groups |
( |
gid_t ** |
g | ) |
|