(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/deliver/deliver.c) |
| |
| 885 | | | int main(int argc, char *argv[]) |
| 886 | | | { |
| 887 | | | const char *config_path = DEFAULT_CONFIG_FILE; |
| 888 | | | const char *mailbox = "INBOX"; |
| 889 | | | const char *auth_socket; |
| 890 | | | const char *home, *destaddr, *user, *value, *errstr, *path, *orig_user; |
| 891 | | | ARRAY_TYPE(const_string) = ARRAY_INIT; |
| 892 | | | struct mail_user *mail_user, *raw_mail_user; |
| 893 | | | struct mail_namespace *raw_ns; |
| 894 | | | struct mail_storage *storage; |
| 895 | | | struct mailbox *box; |
| 896 | | | struct raw_mailbox *raw_box; |
| 897 | | | struct istream *input; |
| 898 | | | struct mailbox_transaction_context *t; |
| 899 | | | struct *; |
| 900 | | | struct mail *mail; |
| 901 | | | char cwd[PATH_MAX];
x /usr/include/linux/limits.h |
| |
12 | #define PATH_MAX 4096 /* # chars in a path name including nul */ |
| |
|
| 902 | | | uid_t process_euid; |
| 903 | | | bool stderr_rejection = FALSE; |
| 904 | | | bool keep_environment = FALSE; |
| 905 | | | bool user_auth = FALSE; |
| 906 | | | time_t mtime; |
| 907 | | | int i, ret; |
| 908 | | | pool_t userdb_pool = NULL; |
| 909 | | | string_t *str; |
| 910 | | | enum mail_error error; |
| 911 | | | |
| 912 | | | if (getuid() != geteuid() && geteuid() == 0) { |
| 913 | | | |
| 914 | | | |
| 915 | | | struct stat st; |
| 916 | | | |
| 917 | | | if (stat(argv[0], &st) < 0) { |
| 918 | | | fprintf(stderr, "stat(%s) failed: %s\n", |
| 919 | | | argv[0], strerror(errno)); |
| 920 | | | return EX_CONFIG;
x /usr/include/sysexits.h |
| |
110 | #define EX_CONFIG 78 /* configuration error */ |
| |
|
| 921 | | | } else if ((st.st_mode & 1) != 0) { |
| 922 | | | fprintf(stderr, "%s must not be both world-executable " |
| 923 | | | "and setuid-root. This allows root exploits. " |
| 924 | | | "See http://wiki.dovecot.org/LDA#multipleuids\n", |
| 925 | | | argv[0]); |
| 926 | | | return EX_CONFIG;
x /usr/include/sysexits.h |
| |
110 | #define EX_CONFIG 78 /* configuration error */ |
| |
|
| 927 | | | } |
| 928 | | | } |
| 929 | | | |
| 930 | | | i_set_failure_exit_callback(failure_exit_callback); |
| 931 | | | |
| 932 | | | lib_init(); |
| 933 | | | ioloop = io_loop_create(); |
| 934 | | | |
| 935 | | | lib_signals_init(); |
| 936 | | | lib_signals_set_handler(SIGINT, TRUE, sig_die, NULL);
x /usr/include/bits/signum.h |
| |
34 | #define SIGINT 2 /* Interrupt (ANSI). */ |
| |
|
| 937 | | | lib_signals_set_handler(SIGTERM, TRUE, sig_die, NULL);
x /usr/include/bits/signum.h |
| |
48 | #define SIGTERM 15 /* Termination (ANSI). */ |
| |
|
| 938 | | | lib_signals_ignore(SIGPIPE, TRUE);
x /usr/include/bits/signum.h |
| |
46 | #define SIGPIPE 13 /* Broken pipe (POSIX). */ |
| |
|
| 939 | | | lib_signals_ignore(SIGALRM, FALSE);
x /usr/include/bits/signum.h |
| |
47 | #define SIGALRM 14 /* Alarm clock (POSIX). */ |
| |
|
| 940 | | | #ifdef SIGXFSZ
x /usr/include/bits/signum.h |
| |
59 | #define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */ |
| |
|
| 941 | | | lib_signals_ignore(SIGXFSZ, TRUE);
x /usr/include/bits/signum.h |
| |
59 | #define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */ |
| |
|
| 942 | | | #endif |
| 943 | | | |
| 944 | | | deliver_set = i_new(struct deliver_settings, 1);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/imem.h |
| |
8 | #define i_new(type, count) ((type *) i_malloc(sizeof(type) * (count))) |
| |
|
| 945 | | | deliver_set->mailbox_autocreate = TRUE; |
| 946 | | | |
| 947 | | | destaddr = user = path = NULL; |
| 948 | | | for (i = 1; i < argc; i++) { |
| 949 | | | if (strcmp(argv[i], "-a") == 0) { |
| 950 | | | |
| 951 | | | i++; |
| 952 | | | if (i == argc) |
| 953 | | | i_fatal_status(EX_USAGE, "Missing -a argument");
x /usr/include/sysexits.h |
| |
96 | #define EX_USAGE 64 /* command line usage error */ |
| |
|
| 954 | | | destaddr = argv[i]; |
| 955 | | | } else if (strcmp(argv[i], "-d") == 0) { |
| 956 | | | |
| 957 | | | i++; |
| 958 | | | if (i == argc) |
| 959 | | | i_fatal_status(EX_USAGE, "Missing -d argument");
x /usr/include/sysexits.h |
| |
96 | #define EX_USAGE 64 /* command line usage error */ |
| |
|
| 960 | | | user = argv[i]; |
| 961 | | | user_auth = TRUE; |
| 962 | | | } else if (strcmp(argv[i], "-p") == 0) { |
| 963 | | | |
| 964 | | | i++; |
| 965 | | | if (i == argc) |
| 966 | | | i_fatal_status(EX_USAGE, "Missing -p argument");
x /usr/include/sysexits.h |
| |
96 | #define EX_USAGE 64 /* command line usage error */ |
| |
|
| 967 | | | path = argv[i]; |
| 968 | | | if (*path != '/') { |
| 969 | | | |
| 970 | | | if (getcwd(cwd, sizeof(cwd)) == NULL) |
| 971 | | | i_fatal("getcwd() failed: %m"); |
| 972 | | | path = t_strconcat(cwd, "/", path, NULL); |
| 973 | | | } |
| 974 | | | } else if (strcmp(argv[i], "-e") == 0) { |
| 975 | | | stderr_rejection = TRUE; |
| 976 | | | } else if (strcmp(argv[i], "-c") == 0) { |
| 977 | | | |
| 978 | | | i++; |
| 979 | | | if (i == argc) { |
| 980 | | | i_fatal_status(EX_USAGE,
x /usr/include/sysexits.h |
| |
96 | #define EX_USAGE 64 /* command line usage error */ |
| |
|
| 981 | | | "Missing config file path argument"); |
| 982 | | | } |
| 983 | | | config_path = argv[i]; |
| 984 | | | } else if (strcmp(argv[i], "-k") == 0) { |
| 985 | | | keep_environment = TRUE; |
| 986 | | | } else if (strcmp(argv[i], "-m") == 0) { |
| 987 | | | |
| 988 | | | i++; |
| 989 | | | if (i == argc) |
| 990 | | | i_fatal_status(EX_USAGE, "Missing -m argument");
x /usr/include/sysexits.h |
| |
96 | #define EX_USAGE 64 /* command line usage error */ |
| |
|
| 991 | | | |
| 992 | | | |
| 993 | | | if (*argv[i] != '\0') { |
| 994 | | | str = t_str_new(256); |
| 995 | | | if (imap_utf8_to_utf7(argv[i], str) < 0) { |
| 996 | | | i_fatal("Mailbox name not UTF-8: %s", |
| 997 | | | mailbox); |
| 998 | | | } |
| 999 | | | mailbox = str_c(str); |
| 1000 | | | } |
| 1001 | | | } else if (strcmp(argv[i], "-n") == 0) { |
| 1002 | | | deliver_set->mailbox_autocreate = FALSE; |
| 1003 | | | } else if (strcmp(argv[i], "-s") == 0) { |
| 1004 | | | deliver_set->mailbox_autosubscribe = TRUE; |
| 1005 | | | } else if (strcmp(argv[i], "-f") == 0) { |
| 1006 | | | |
| 1007 | | | i++; |
| 1008 | | | if (i == argc) |
| 1009 | | | i_fatal_status(EX_USAGE, "Missing -f argument");
x /usr/include/sysexits.h |
| |
96 | #define EX_USAGE 64 /* command line usage error */ |
| |
|
| 1010 | | | explicit_envelope_sender = |
| 1011 | | | i_strdup(address_sanitize(argv[i])); |
| 1012 | | | } else if (argv[i][0] != '\0') { |
| 1013 | | | print_help(); |
| 1014 | | | i_fatal_status(EX_USAGE,
x /usr/include/sysexits.h |
| |
96 | #define EX_USAGE 64 /* command line usage error */ |
| |
|
| 1015 | | | "Unknown argument: %s", argv[i]); |
| 1016 | | | } |
| 1017 | | | } |
| 1018 | | | |
| 1019 | | | if (user == NULL) |
| 1020 | | | user = getenv("USER"); |
| 1021 | | | if (!keep_environment) |
| 1022 | | | deliver_env_clean(!user_auth); |
| 1023 | | | |
| 1024 | | | process_euid = geteuid(); |
| 1025 | | | if (user_auth) |
| 1026 | | | ; |
| 1027 | | | else if (process_euid != 0) { |
| 1028 | | | |
| 1029 | | | struct passwd *pw; |
| 1030 | | | |
| 1031 | | | home = getenv("HOME"); |
| 1032 | | | if (user != NULL && home != NULL) { |
| 1033 | | | |
| 1034 | | | } else if ((pw = getpwuid(process_euid)) != NULL) { |
| 1035 | | | user = t_strdup(pw->pw_name); |
| 1036 | | | if (home == NULL) |
| 1037 | | | env_put(t_strconcat("HOME=", pw->pw_dir, NULL)); |
| 1038 | | | } else if (user == NULL) { |
| 1039 | | | i_fatal_status(EX_USAGE,
x /usr/include/sysexits.h |
| |
96 | #define EX_USAGE 64 /* command line usage error */ |
| |
|
| 1040 | | | "Couldn't lookup our username (uid=%s)", |
| 1041 | | | dec2str(process_euid)); |
| 1042 | | | } |
| 1043 | | | } else { |
| 1044 | | | i_fatal_status(EX_USAGE,
x /usr/include/sysexits.h |
| |
96 | #define EX_USAGE 64 /* command line usage error */ |
| |
|
| 1045 | | | "destination user parameter (-d user) not given"); |
| 1046 | | | } |
| 1047 | | | |
| 1048 | | | T_BEGIN {
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/data-stack.h |
| |
49 | #define T_BEGIN \ |
50 | STMT_START { unsigned int _data_stack_cur_id = t_push(); |
| |
|
| 1049 | | | config_file_init(config_path); |
| 1050 | | | } T_END; |
| 1051 | | | open_logfile(user); |
| 1052 | | | |
| 1053 | | | if (getenv("MAIL_DEBUG") != NULL) |
| 1054 | | | env_put("DEBUG=1"); |
| 1055 | | | |
| 1056 | | | if (getenv("MAIL_PLUGINS") == NULL) |
| 1057 | | | modules = NULL; |
| 1058 | | | else { |
| 1059 | | | const char *plugin_dir = getenv("MAIL_PLUGIN_DIR"); |
| 1060 | | | const char *version; |
| 1061 | | | |
| 1062 | | | if (plugin_dir == NULL) |
| 1063 | | | plugin_dir = MODULEDIR"/lda"; |
| 1064 | | | |
| 1065 | | | version = getenv("VERSION_IGNORE") != NULL ? |
| 1066 | | | NULL : PACKAGE_VERSION; |
| 1067 | | | modules = module_dir_load(plugin_dir, getenv("MAIL_PLUGINS"), |
| 1068 | | | TRUE, version); |
| 1069 | | | } |
| 1070 | | | |
| 1071 | | | if (user_auth) { |
| 1072 | | | auth_socket = getenv("AUTH_SOCKET_PATH"); |
| 1073 | | | if (auth_socket == NULL) { |
| 1074 | | | const char *base_dir = getenv("BASE_DIR"); |
| 1075 | | | if (base_dir == NULL) |
| 1076 | | | base_dir = PKG_RUNDIR; |
| 1077 | | | auth_socket = t_strconcat(base_dir, "/auth-master", |
| 1078 | | | NULL); |
| 1079 | | | } |
| 1080 | | | |
| 1081 | | | userdb_pool = pool_alloconly_create("userdb lookup replys", 512); |
| 1082 | | | orig_user = user; |
| 1083 | | | ret = auth_client_lookup_and_restrict(auth_socket, |
| 1084 | | | &user, process_euid, |
| 1085 | | | userdb_pool, |
| 1086 | | | &); |
| 1087 | | | if (ret != 0) |
| 1088 | | | return ret; |
| 1089 | | | |
| 1090 | | | if (strcmp(user, orig_user) != 0) { |
| 1091 | | | |
| 1092 | | | if (getenv("DEBUG") != NULL) |
| 1093 | | | i_info("userdb changed username to %s", user); |
| 1094 | | | i_set_failure_prefix(t_strdup_printf("deliver(%s): ", |
| 1095 | | | user)); |
| 1096 | | | } |
| 1097 | | | |
| 1098 | | | |
| 1099 | | | user = t_strdup(user); |
| 1100 | | | } |
| 1101 | | | |
| 1102 | | | expand_envs(user); |
| 1103 | | | if (userdb_pool != NULL) { |
| 1104 | | | (&); |
| 1105 | | | pool_unref(&userdb_pool); |
| 1106 | | | } |
| 1107 | | | |
| 1108 | | | |
| 1109 | | | for (i = 1;; i++) { |
| 1110 | | | value = getenv(t_strdup_printf("NAMESPACE_%u", i)); |
| 1111 | | | if (value == NULL) |
| 1112 | | | break; |
| 1113 | | | |
| 1114 | | | if (*value == '\0') { |
| 1115 | | | env_put(t_strdup_printf("NAMESPACE_%u=%s", i, |
| 1116 | | | getenv("MAIL"))); |
| 1117 | | | } |
| 1118 | | | } |
| 1119 | | | |
| 1120 | | | |
| 1121 | | | |
| 1122 | | | home = getenv("HOME"); |
| 1123 | | | if (home != NULL) { |
| 1124 | | | if (chdir(home) < 0) { |
| 1125 | | | if (errno != ENOENT)
x /usr/include/asm-generic/errno-base.h |
| |
5 | #define ENOENT 2 /* No such file or directory */ |
| |
|
| 1126 | | | i_error("chdir(%s) failed: %m", home); |
| 1127 | | | else if (getenv("DEBUG") != NULL) |
| 1128 | | | i_info("Home dir not found: %s", home); |
| 1129 | | | } |
| 1130 | | | } |
| 1131 | | | |
| 1132 | | | env_put(t_strconcat("USER=", user, NULL)); |
| 1133 | | | (void)umask(0077); |
| 1134 | | | |
| 1135 | | | deliver_set->hostname = getenv("HOSTNAME"); |
| 1136 | | | if (deliver_set->hostname == NULL) |
| 1137 | | | deliver_set->hostname = my_hostname; |
| 1138 | | | deliver_set->postmaster_address = getenv("POSTMASTER_ADDRESS"); |
| 1139 | | | if (deliver_set->postmaster_address == NULL) { |
| 1140 | | | i_fatal_status(EX_CONFIG,
x /usr/include/sysexits.h |
| |
110 | #define EX_CONFIG 78 /* configuration error */ |
| |
|
| 1141 | | | "postmaster_address setting not given"); |
| 1142 | | | } |
| 1143 | | | deliver_set->sendmail_path = getenv("SENDMAIL_PATH"); |
| 1144 | | | if (deliver_set->sendmail_path == NULL) |
| 1145 | | | deliver_set->sendmail_path = DEFAULT_SENDMAIL_PATH; |
| 1146 | | | deliver_set->rejection_subject = getenv("REJECTION_SUBJECT"); |
| 1147 | | | if (deliver_set->rejection_subject == NULL) |
| 1148 | | | deliver_set->rejection_subject = DEFAULT_MAIL_REJECTION_SUBJECT; |
| 1149 | | | deliver_set->rejection_reason = getenv("REJECTION_REASON"); |
| 1150 | | | if (deliver_set->rejection_reason == NULL) { |
| 1151 | | | deliver_set->rejection_reason = |
| 1152 | | | DEFAULT_MAIL_REJECTION_HUMAN_REASON;
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/deliver/deliver.h |
| |
15 | #define DEFAULT_MAIL_REJECTION_HUMAN_REASON \ |
16 | "Your message to <%t> was automatically rejected:%n%r" |
| |
|
| 1153 | | | } |
| 1154 | | | deliver_set->log_format = getenv("DELIVER_LOG_FORMAT"); |
| 1155 | | | if (deliver_set->log_format == NULL) |
| 1156 | | | deliver_set->log_format = DEFAULT_LOG_FORMAT; |
| 1157 | | | |
| 1158 | | | dict_drivers_register_builtin(); |
| 1159 | | | duplicate_init(); |
| 1160 | | | mail_users_init(getenv("AUTH_SOCKET_PATH"), getenv("DEBUG") != NULL); |
| 1161 | | | mail_storage_init(); |
| 1162 | | | mail_storage_register_all(); |
| 1163 | | | mailbox_list_register_all(); |
| 1164 | | | |
| 1165 | | | module_dir_init(modules); |
| 1166 | | | |
| 1167 | | | mail_user = mail_user_init(user); |
| 1168 | | | mail_user_set_home(mail_user, home); |
| 1169 | | | if (mail_namespaces_init(mail_user) < 0) |
| 1170 | | | i_fatal("Namespace initialization failed"); |
| 1171 | | | |
| 1172 | | | |
| 1173 | | | raw_mail_user = mail_user_init(user); |
| 1174 | | | mail_user_set_home(raw_mail_user, NULL); |
| 1175 | | | raw_ns = mail_namespaces_init_empty(raw_mail_user); |
| 1176 | | | raw_ns->flags |= NAMESPACE_FLAG_NOQUOTA | NAMESPACE_FLAG_NOACL; |
| 1177 | | | |
| 1178 | | | if (mail_storage_create(raw_ns, "raw", "/tmp", |
| 1179 | | | MAIL_STORAGE_FLAG_FULL_FS_ACCESS, |
| 1180 | | | FILE_LOCK_METHOD_FCNTL, &errstr) < 0) |
| 1181 | | | i_fatal("Couldn't create internal raw storage: %s", errstr); |
| 1182 | | | if (path == NULL) { |
| 1183 | | | input = create_raw_stream(mail_user, 0, &mtime); |
| 1184 | | | box = mailbox_open(&raw_ns->storage, "Dovecot Delivery Mail", |
| 1185 | | | input, MAILBOX_OPEN_NO_INDEX_FILES); |
| 1186 | | | i_stream_unref(&input); |
| 1187 | | | } else { |
| 1188 | | | mtime = (time_t)-1; |
| 1189 | | | box = mailbox_open(&raw_ns->storage, path, NULL, |
| 1190 | | | MAILBOX_OPEN_NO_INDEX_FILES); |
| 1191 | | | } |
| 1192 | | | if (box == NULL) { |
| 1193 | | | i_fatal("Can't open delivery mail as raw: %s", |
| 1194 | | | mail_storage_get_last_error(raw_ns->storage, &error)); |
| 1195 | | | } |
| 1196 | | | if (mailbox_sync(box, 0, 0, NULL) < 0) { |
| 1197 | | | i_fatal("Can't sync delivery mail: %s", |
| 1198 | | | mail_storage_get_last_error(raw_ns->storage, &error)); |
| 1199 | | | } |
| 1200 | | | raw_box = (struct raw_mailbox *)box; |
| 1201 | | | raw_box->envelope_sender = explicit_envelope_sender != NULL ? |
| 1202 | | | explicit_envelope_sender : DEFAULT_ENVELOPE_SENDER; |
| 1203 | | | raw_box->mtime = mtime; |
| 1204 | | | |
| 1205 | | | t = mailbox_transaction_begin(box, 0); |
| 1206 | | | = (box, ); |
| 1207 | | | mail = mail_alloc(t, 0, ); |
| 1208 | | | mail_set_seq(mail, 1); |
| 1209 | | | |
| 1210 | | | if (destaddr == NULL) { |
| 1211 | | | destaddr = deliver_get_address(mail, "Envelope-To"); |
| 1212 | | | if (destaddr == NULL) { |
| 1213 | | | destaddr = strchr(user, '@') != NULL ? user : |
| 1214 | | | t_strconcat(user, "@", |
| 1215 | | | deliver_set->hostname, NULL); |
Ignored Return Value
The return value of t_strconcat() is never checked in the highlighted execution scenario. - If the return value can indicate an error, the error will be ignored if the highlighted code executes.
- The return value of t_strconcat() is checked 98% of the time in this project. CodeSonar is configured to enforce Ignored Return Value checks for any function whose return value is checked at least 96% of the time, unless the function is used fewer than 20 times. (To modify these thresholds, use configuration file parameters RETURN_CHECKER_SAMPLE_SIZE and RETURN_CHECKER_RATIO. To exempt t_strconcat() from the Ignored Return Value check, use configuration file parameter RETURN_CHECKER_IGNORED_FUNCS).
Show: All events | Only primary events |
|
| 1216 | | | } |
| 1217 | | | } |
| 1218 | | | |
| 1219 | | | storage = NULL; |
| 1220 | | | default_mailbox_name = mailbox; |
| 1221 | | | if (deliver_mail == NULL) |
Event 2:
Taking true branch. deliver_mail == (void *)0 evaluates to true.
hide
|
|
| 1222 | | | ret = -1; |
| 1223 | | | else { |
| 1224 | | | if (deliver_mail(mail_user->namespaces, &storage, mail, |
| 1225 | | | destaddr, mailbox) <= 0) { |
| 1226 | | | |
| 1227 | | | |
| 1228 | | | ret = saved_mail ? 0 : -1; |
| 1229 | | | } else { |
| 1230 | | | |
| 1231 | | | ret = 0; |
| 1232 | | | } |
| 1233 | | | } |
| 1234 | | | |
| 1235 | | | if (ret < 0 && !tried_default_save) { |
| 1236 | | | |
| 1237 | | | ret = deliver_save(mail_user->namespaces, |
| 1238 | | | &storage, mailbox, mail, 0, NULL); |
| 1239 | | | } |
| 1240 | | | if (ret < 0 && strcasecmp(mailbox, "INBOX") != 0) { |
| 1241 | | | |
| 1242 | | | |
| 1243 | | | ret = deliver_save(mail_user->namespaces, |
| 1244 | | | &storage, "INBOX", mail, 0, NULL); |
| 1245 | | | } |
| 1246 | | | |
| 1247 | | | if (ret < 0 ) { |
Event 5:
Taking true branch. ret < 0 evaluates to true.
hide
|
|
| 1248 | | | const char *error_string; |
| 1249 | | | enum mail_error error; |
| 1250 | | | |
| 1251 | | | if (storage == NULL) { |
Event 6:
Skipping " if". storage == (void *)0 evaluates to false.
hide
|
|
| 1252 | | | |
| 1253 | | | i_error("BUG: Saving failed for unknown storage"); |
| 1254 | | | return EX_TEMPFAIL;
x /usr/include/sysexits.h |
| |
107 | #define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */ |
| |
|
| 1255 | | | } |
| 1256 | | | |
| 1257 | | | error_string = mail_storage_get_last_error(storage, &error); |
| 1258 | | | |
| 1259 | | | if (stderr_rejection) { |
Event 7:
Taking true branch. stderr_rejection evaluates to true.
hide
|
|
| 1260 | | | |
| 1261 | | | |
| 1262 | | | fprintf(stderr, "%s\n", error_string); |
| 1263 | | | } |
| 1264 | | | |
| 1265 | | | if (error != MAIL_ERROR_NOSPACE || |
Event 8:
Taking true branch. error != MAIL_ERROR_NOSPACE evaluates to true.
hide
|
|
| 1266 | | | getenv("QUOTA_FULL_TEMPFAIL") != NULL) { |
| 1267 | | | |
| 1268 | | | |
| 1269 | | | |
| 1270 | | | return EX_TEMPFAIL;
x /usr/include/sysexits.h |
| |
107 | #define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */ |
| |
|
| 1271 | | | } |
| 1272 | | | |
| 1273 | | | |
| 1274 | | | deliver_log(mail, "rejected: %s", |
| 1275 | | | str_sanitize(error_string, 512)); |
| 1276 | | | |
| 1277 | | | if (stderr_rejection) |
| 1278 | | | return EX_NOPERM;
x /usr/include/sysexits.h |
| |
109 | #define EX_NOPERM 77 /* permission denied */ |
| |
|
| 1279 | | | ret = mail_send_rejection(mail, user, error_string); |
| 1280 | | | if (ret != 0) |
| 1281 | | | return ret < 0 ? EX_TEMPFAIL : ret;
x /usr/include/sysexits.h |
| |
107 | #define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */ |
| |
|
| 1282 | | | |
| 1283 | | | } |
| 1284 | | | i_free(explicit_envelope_sender);
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/imem.h |
| |
14 | #define i_free(mem) \ |
15 | STMT_START { \ |
16 | free(mem); \ |
17 | (mem) = NULL; \ |
18 | } STMT_END |
| |
|
| 1285 | | | |
| 1286 | | | mail_free(&mail); |
| 1287 | | | (&); |
| 1288 | | | mailbox_transaction_rollback(&t); |
| 1289 | | | mailbox_close(&box); |
| 1290 | | | |
| 1291 | | | mail_user_unref(&mail_user); |
| 1292 | | | mail_user_unref(&raw_mail_user); |
| 1293 | | | |
| 1294 | | | module_dir_unload(&modules); |
| 1295 | | | mail_storage_deinit(); |
| 1296 | | | mail_users_deinit(); |
| 1297 | | | |
| 1298 | | | duplicate_deinit(); |
| 1299 | | | dict_drivers_unregister_builtin(); |
| 1300 | | | lib_signals_deinit(); |
| 1301 | | | |
| 1302 | | | io_loop_destroy(&ioloop); |
| 1303 | | | lib_deinit(); |
| 1304 | | | |
| 1305 | | | return EX_OK;
x /usr/include/sysexits.h |
| |
92 | #define EX_OK 0 /* successful termination */ |
| |
|
| 1306 | | | } |
| |