X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Fpam.c;h=d2a8a54e5d66eb15f5edfb573720c83f797d5dee;hb=7ff16e81163b3bee43ce053cb86fb2df2a023d53;hp=0d4f27f066c91dae8da42e21ec0f3136ce03af0a;hpb=76f40bdb988440a73431eb14a27f30aeaa18ebe5;p=ngircd-alex.git diff --git a/src/ngircd/pam.c b/src/ngircd/pam.c index 0d4f27f0..d2a8a54e 100644 --- a/src/ngircd/pam.c +++ b/src/ngircd/pam.c @@ -1,40 +1,38 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2010 Alexander Barton (alex@barton.de). + * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * Please read the file COPYING, README and AUTHORS for more information. - * - * PAM User Authentification */ #include "portab.h" #ifdef PAM -#include "imp.h" -#include - -#include "defines.h" -#include "log.h" -#include "conn.h" -#include "client.h" +/** + * @file + * PAM User Authentication + */ +#include #include #include - #ifdef HAVE_SECURITY_PAM_APPL_H -#include +# include #endif - #ifdef HAVE_PAM_PAM_APPL_H -#include +# include #endif -#include "exp.h" +#include "defines.h" +#include "log.h" +#include "conn.h" +#include "client.h" + #include "pam.h" static char *password; @@ -84,7 +82,7 @@ static struct pam_conv conv = { }; /** - * Authenticate a connectiong client using PAM. + * Authenticate a connecting client using PAM. * @param Client The client to authenticate. * @return true when authentication succeeded, false otherwise. */ @@ -99,8 +97,8 @@ PAM_Authenticate(CLIENT *Client) { /* Set supplied client password */ if (password) free(password); - password = strdup(Client_Password(Client)); - conv.appdata_ptr = password; + password = strdup(Conn_Password(Client_Conn(Client))); + conv.appdata_ptr = Conn_Password(Client_Conn(Client)); /* Initialize PAM */ retval = pam_start("ngircd", Client_OrigUser(Client), &conv, &pam);