]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-login.c
Init_Server_Struct(): correctly zero Server->bind_addr
[ngircd-alex.git] / src / ngircd / irc-login.c
index edaefd61cfc119fbd26de3a26d55eb65bc0146d0..884a06becee921df8f4ab42248e619853492cf85 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2010 Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2011 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -959,6 +959,7 @@ Hello_User(CLIENT * Client)
        } else {
                /* Sub process */
                Log_Init_Subprocess("Auth");
+               Conn_CloseAllSockets(NONE);
                result = PAM_Authenticate(Client);
                if (write(pipefd[1], &result, sizeof(result)) != sizeof(result))
                        Log_Subprocess(LOG_ERR,
@@ -1009,6 +1010,7 @@ cb_Read_Auth_Result(int r_fd, UNUSED short events)
 
        /* Read result from pipe */
        len = Proc_Read(proc, &result, sizeof(result));
+       Proc_Close(proc);
        if (len == 0)
                return;