(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/plugins/virtual/virtual-storage.c) |
| |
| 111 | | | static int virtual_create(struct mail_storage *_storage, const char *data, |
| 112 | | | const char **error_r) |
| 113 | | | { |
| 114 | | | struct virtual_storage *storage = (struct virtual_storage *)_storage; |
| 115 | | | struct mailbox_list_settings list_set; |
| 116 | | | struct stat st; |
| 117 | | | const char *layout; |
| 118 | | | |
| 119 | | | _storage->ns->flags |= NAMESPACE_FLAG_NOQUOTA; |
| 120 | | | |
| 121 | | | if (virtual_get_list_settings(&list_set, data, _storage, |
Event 1:
&list_set is passed to virtual_get_list_settings() as the first argument.
hide
|
|
| 122 | [+] | | &layout, error_r) < 0) |
 |
| 123 | | | return -1; |
| 124 | | | list_set.mail_storage_flags = &_storage->flags; |
| 125 | | | list_set.lock_method = &_storage->lock_method; |
| 126 | | | |
| 127 | | | if (stat(list_set.root_dir, &st) < 0) { |
Event 61:
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 62:
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 61.
hide
Event 63:
Taking true branch. stat(...) < 0 evaluates to true.
hide
|
|
| 128 | | | if (errno == ENOENT) {
x /usr/include/asm-generic/errno-base.h |
| |
5 | #define ENOENT 2 /* No such file or directory */ |
| |
|
Event 64:
Taking false branch. errno == 2 evaluates to false.
hide
|
|
| 129 | | | *error_r = t_strdup_printf( |
| 130 | | | "Root mail directory doesn't exist: %s", |
| 131 | | | list_set.root_dir); |
| 132 | | | } else if (errno == EACCES) {
x /usr/include/asm-generic/errno-base.h |
| |
16 | #define EACCES 13 /* Permission denied */ |
| |
|
Event 65:
Taking true branch. errno == 13 evaluates to true.
hide
|
|
| 133 | | | *error_r = mail_error_eacces_msg("stat", |
| 134 | [+] | | list_set.root_dir); |
Event 66:
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
|
|
 |
| |