X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Flogin.c;h=ba9378f824e333b1576bb7837094acf221d6b26e;hb=0d503945cb527e275ef6644a234a6876ff61322b;hp=23c3b6848d94e540bc71f7a38ab504ff6bbb9ca8;hpb=485d0aec813db9966922f17aae044df2d82b0b67;p=ngircd-alex.git diff --git a/src/ngircd/login.c b/src/ngircd/login.c index 23c3b684..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 @@ -16,36 +16,34 @@ * Functions to deal with client logins */ -#include "imp.h" #include #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" -#include "exp.h" #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 /** @@ -94,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; @@ -194,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);