(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-storage/index/dbox/dbox-storage.c) |
| |
| 97 | | | static int dbox_create(struct mail_storage *_storage, const char *data, |
| 98 | | | const char **error_r) |
| 99 | | | { |
| 100 | | | struct dbox_storage *storage = (struct dbox_storage *)_storage; |
| 101 | | | struct mailbox_list_settings list_set; |
| 102 | | | struct stat st; |
| 103 | | | const char *layout, *alt_dir; |
| 104 | | | |
| 105 | | | if (dbox_get_list_settings(&list_set, data, _storage, |
Event 1:
&list_set is passed to dbox_get_list_settings() as the first argument.
hide
|
|
| 106 | [+] | | &layout, &alt_dir, error_r) < 0) |
 |
| 107 | | | return -1; |
| 108 | | | list_set.mail_storage_flags = &_storage->flags; |
| 109 | | | list_set.lock_method = &_storage->lock_method; |
| 110 | | | |
| 111 | | | if ((_storage->flags & MAIL_STORAGE_FLAG_NO_AUTOCREATE) != 0) { |
Event 63:
Taking true branch. (_storage->flags & MAIL_STORAGE_FLAG_NO_AUTOCREATE) != 0 evaluates to true.
hide
|
|
| 112 | | | if (stat(list_set.root_dir, &st) < 0) { |
Event 64:
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 65:
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 64.
hide
Event 66:
Taking true branch. stat(...) < 0 evaluates to true.
hide
|
|
| 113 | | | if (errno == ENOENT) {
x /usr/include/asm-generic/errno-base.h |
| |
5 | #define ENOENT 2 /* No such file or directory */ |
| |
|
Event 67:
Taking false branch. errno == 2 evaluates to false.
hide
|
|
| 114 | | | *error_r = t_strdup_printf( |
| 115 | | | "Root mail directory doesn't exist: %s", |
| 116 | | | list_set.root_dir); |
| 117 | | | } else if (errno == EACCES) {
x /usr/include/asm-generic/errno-base.h |
| |
16 | #define EACCES 13 /* Permission denied */ |
| |
|
Event 68:
Taking true branch. errno == 13 evaluates to true.
hide
|
|
| 118 | | | *error_r = mail_error_eacces_msg("stat", |
| 119 | [+] | | list_set.root_dir); |
Event 69:
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
|
|
 |
| |