Mercurial > dovecot > original-hg > dovecot-1.2
diff src/master/login-process.c @ 805:5ac361acb316 HEAD
Marked all non-trivial buffer modifications with @UNSAFE tag. Several
cleanups and a couple of minor bugfixes.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 18 Dec 2002 17:15:41 +0200 |
parents | 86224ff16bf6 |
children | 35abd7a5d381 |
line wrap: on
line diff
--- a/src/master/login-process.c Wed Dec 18 12:40:43 2002 +0200 +++ b/src/master/login-process.c Wed Dec 18 17:15:41 2002 +0200 @@ -79,7 +79,8 @@ if (o_stream_send(process->output, &reply, sizeof(reply)) < 0) login_process_destroy(process); - (void)close(request->fd); + if (close(request->fd) < 0) + i_error("close(imap client) failed: %m"); login_process_unref(process); i_free(request); } @@ -212,7 +213,8 @@ o_stream_close(p->output); io_remove(p->io); - (void)close(p->fd); + if (close(p->fd) < 0) + i_error("close(login) failed: %m"); if (!p->listening) login_process_remove_from_lists(p); @@ -270,17 +272,17 @@ /* move communication handle */ if (dup2(fd[1], LOGIN_MASTER_SOCKET_FD) < 0) - i_fatal("login: dup2() failed: %m"); + i_fatal("login: dup2(master) failed: %m"); fd_close_on_exec(LOGIN_MASTER_SOCKET_FD, FALSE); /* move the listen handle */ if (dup2(imap_fd, LOGIN_IMAP_LISTEN_FD) < 0) - i_fatal("login: dup2() failed: %m"); + i_fatal("login: dup2(imap) failed: %m"); fd_close_on_exec(LOGIN_IMAP_LISTEN_FD, FALSE); /* move the SSL listen handle */ if (dup2(imaps_fd, LOGIN_IMAPS_LISTEN_FD) < 0) - i_fatal("login: dup2() failed: %m"); + i_fatal("login: dup2(imaps) failed: %m"); fd_close_on_exec(LOGIN_IMAPS_LISTEN_FD, FALSE); /* imap_fd and imaps_fd are closed by clean_child_process() */ @@ -297,10 +299,8 @@ if (!set_login_chroot) { /* no chrooting, but still change to the directory */ - if (chdir(set_login_dir) < 0) { - i_fatal("chdir(%s) failed: %m", - set_login_dir); - } + if (chdir(set_login_dir) < 0) + i_fatal("chdir(%s) failed: %m", set_login_dir); } if (!set_ssl_disable) {