X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Flogin.c;h=ba9378f824e333b1576bb7837094acf221d6b26e;hp=b3ab2ed3cf70138efb7326d7e9158bcf0b29e713;hb=0dc692b1f77a147d9d5bf63c1eb7889a239420b4;hpb=259c314d142abd6f9295047c116235cfdd119563 diff --git a/src/ngircd/login.c b/src/ngircd/login.c index b3ab2ed3..ba9378f8 100644 --- a/src/ngircd/login.c +++ b/src/ngircd/login.c @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors. + * Copyright (c)2001-2014 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 @@ -20,22 +20,17 @@ #include #include #include -#include #include -#include "defines.h" #include "conn.h" #include "class.h" -#include "client.h" #include "client-cap.h" #include "channel.h" #include "conf.h" -#include "io.h" #include "parse.h" #include "log.h" #include "messages.h" #include "ngircd.h" -#include "pam.h" #include "irc-info.h" #include "irc-mode.h" #include "irc-write.h" @@ -43,7 +38,12 @@ #include "login.h" #ifdef PAM + +#include "io.h" +#include "pam.h" + static void cb_Read_Auth_Result PARAMS((int r_fd, UNUSED short events)); + #endif /** @@ -92,7 +92,7 @@ Login_User(CLIENT * Client) /* Don't do any PAM authentication at all if PAM is not * enabled, instead emulate the behavior of the daemon * compiled without PAM support. */ - if (strcmp(Conn_Password(conn), Conf_ServerPwd) == 0) + if (strcmp(Conn_Password(conn), Conf_ServerPwd) == 0) return Login_User_PostAuth(Client); Client_Reject(Client, "Bad server password", false); return DISCONNECTED; @@ -192,7 +192,7 @@ Login_User_PostAuth(CLIENT *Client) /* Set default user modes */ if (Conf_DefaultUserModes[0]) { snprintf(modes, sizeof(modes), "+%s", Conf_DefaultUserModes); - Req.prefix = Client_ThisServer(); + Req.prefix = Client_ID(Client_ThisServer()); Req.command = "MODE"; Req.argc = 2; Req.argv[0] = Client_ID(Client);