49 |
/* Private variables */ |
/* Private variables */ |
50 |
static time_t rc_last_modified; |
static time_t rc_last_modified; |
51 |
|
|
|
/* Private functions */ |
|
|
static int check_file(char *filename, char *description, |
|
|
int permmask); |
|
|
|
|
52 |
|
|
53 |
/** |
/** |
54 |
* Utilities used for managing files used by monit. |
* Utilities used for managing files used by monit. |
312 |
} |
} |
313 |
|
|
314 |
|
|
|
/* ------------------------------------------------------------------ Public */ |
|
|
|
|
315 |
/** |
/** |
316 |
* Security check for files. The files must have the same uid as the |
* Security check for files. The files must have the same uid as the |
317 |
* REAL uid of this process, it must have permissions no greater than |
* REAL uid of this process, it must have permissions no greater than |
322 |
* @param permmask The permission mask for the file |
* @param permmask The permission mask for the file |
323 |
* @return TRUE if the test passed otherwise FALSE |
* @return TRUE if the test passed otherwise FALSE |
324 |
*/ |
*/ |
325 |
static int check_file(char *filename, char *description, |
int check_file(char *filename, char *description, |
326 |
int permmask) { |
int permmask) { |
327 |
|
|
328 |
struct stat buf; |
struct stat buf; |