[dovecot-cvs] dovecot/src/master mail-process.c,1.103,1.104
cras at dovecot.org
cras at dovecot.org
Fri Aug 11 04:12:08 EEST 2006
Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv1218
Modified Files:
mail-process.c
Log Message:
Check log_creaate_pipe() and dup() return values and handle failures.
Index: mail-process.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/mail-process.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- mail-process.c 6 Aug 2006 20:37:17 -0000 1.103
+++ mail-process.c 11 Aug 2006 01:12:05 -0000 1.104
@@ -474,11 +474,17 @@
}
}
- if (!dump_capability)
+ if (!dump_capability) {
log_fd = log_create_pipe(&log, 10);
- else {
+ if (log_fd == -1)
+ return FALSE;
+ } else {
log = NULL;
log_fd = dup(STDERR_FILENO);
+ if (log_fd == -1) {
+ i_error("dup() failed: %m");
+ return FALSE;
+ }
fd_close_on_exec(log_fd, TRUE);
}
More information about the dovecot-cvs
mailing list