(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/eacces-error.c) |
| |
| 29 | | | static int test_access(const char *path, int mode, string_t *errmsg) |
| 30 | | | { |
| 31 | | | struct stat st; |
| 32 | | | |
| 33 | | | if (getuid() == geteuid()) { |
Event 1:
Skipping " if". getuid() == geteuid() evaluates to false.
hide
|
|
| 34 | | | if (access(path, mode) == 0) |
| 35 | | | return 0; |
| 36 | | | |
| 37 | | | if (errno != EACCES) {
x /usr/include/asm-generic/errno-base.h |
| |
16 | #define EACCES 13 /* Permission denied */ |
| |
|
| 38 | | | str_printfa(errmsg, " access(%s, %d) failed: %m", |
| 39 | | | path, mode); |
| 40 | | | } |
| 41 | | | return -1; |
| 42 | | | } |
| 43 | | | |
| 44 | | | |
| 45 | | | |
| 46 | | | switch (mode) { |
Event 2:
mode evaluates to 1.
hide
|
|
| 47 | | | case X_OK:
x /usr/include/unistd.h |
| |
284 | #define X_OK 1 /* Test for execute permission. */ |
| |
|
| 48 | [+] | | if (stat(t_strconcat(path, "/test", NULL), &st) == 0) |
 |
| |