(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/cydir/cydir-storage.c) |
| |
| 76 | | | static int cydir_create(struct mail_storage *_storage, const char *data, |
| 77 | | | const char **error_r) |
| 78 | | | { |
| 79 | | | struct cydir_storage *storage = (struct cydir_storage *)_storage; |
| 80 | | | struct mailbox_list_settings list_set; |
| 81 | | | struct stat st; |
| 82 | | | const char *layout; |
| 83 | | | |
| 84 | | | if (cydir_get_list_settings(&list_set, data, _storage, |
Event 1:
&list_set is passed to cydir_get_list_settings() as the first argument.
hide
|
|
| 85 | [+] | | &layout, error_r) < 0) |
 |
| 86 | | | return -1; |
| 87 | | | list_set.mail_storage_flags = &_storage->flags; |
| 88 | | | list_set.lock_method = &_storage->lock_method; |
| 89 | | | |
| 90 | | | if ((_storage->flags & MAIL_STORAGE_FLAG_NO_AUTOCREATE) != 0) { |
Event 61:
Taking true branch. (_storage->flags & MAIL_STORAGE_FLAG_NO_AUTOCREATE) != 0 evaluates to true.
hide
|
|
| 91 | | | if (stat(list_set.root_dir, &st) < 0) { |
Event 62:
list_set.root_dir, which evaluates to the value assigned to mem at strfuncs.c:43, is passed to stat64() as the first argument. See related event 56.
hide
Event 63:
stat64() accesses the file named list_set.root_dir, where list_set.root_dir is the value assigned to mem at strfuncs.c:43. - The same name is used to access a file later, but it is not safe to assume that it will be the same underlying file.
See related event 62.
hide
Event 64:
Taking true branch. stat(...) < 0 evaluates to true.
hide
|
|
| 92 | | | if (errno == ENOENT) {
x /usr/include/asm-generic/errno-base.h |
| |
5 | #define ENOENT 2 /* No such file or directory */ |
| |
|
Event 65:
Taking false branch. errno == 2 evaluates to false.
hide
|
|
| 93 | | | *error_r = t_strdup_printf( |
| 94 | | | "Root mail directory doesn't exist: %s", |
| 95 | | | list_set.root_dir); |
| 96 | | | } else if (errno == EACCES) {
x /usr/include/asm-generic/errno-base.h |
| |
16 | #define EACCES 13 /* Permission denied */ |
| |
|
Event 66:
Taking true branch. errno == 13 evaluates to true.
hide
|
|
| 97 | | | *error_r = mail_error_eacces_msg("stat", |
| 98 | [+] | | list_set.root_dir); |
Event 67:
list_set.root_dir, which evaluates to the value assigned to mem at strfuncs.c:43, is passed to mail_error_eacces_msg() as the second argument. See related event 56.
hide
|
|
 |
| |