22 |
int cgul_read_proxy(const char *path, int lock_type, char **proxy, gid_t read_gid); |
int cgul_read_proxy(const char *path, int lock_type, char **proxy, gid_t read_gid); |
23 |
|
|
24 |
/** |
/** |
25 |
|
* Used to read in a config file, the path is checked to be trusted using |
26 |
|
* safe_is_path_trusted_r() from the safefile library of J. Kupsch. |
27 |
|
* Upon successful completion config contains the contents of path |
28 |
|
* Return values: |
29 |
|
* 0: succes |
30 |
|
* -1: I/O error |
31 |
|
* -2: privilege-drop error |
32 |
|
* -3: permission error (untrusted path) |
33 |
|
* -4: memory error |
34 |
|
* -5: unknown or safefile error |
35 |
|
*/ |
36 |
|
int cgul_read_config(const char *path, char **config, gid_t read_gid); |
37 |
|
|
38 |
|
/** |
39 |
* Writes proxy from *proxy to *path using given lock_type (see cgul_filelock). |
* Writes proxy from *proxy to *path using given lock_type (see cgul_filelock). |
40 |
* It tries to drop privilege to given write_uid, gid_t write_gid. When either |
* It tries to drop privilege to given write_uid, gid_t write_gid. When either |
41 |
* of them is -1, that one is ignored. |
* of them is -1, that one is ignored. |