X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fpam.c;h=4e47ddb16d8d8be0eaa3b0ccddb6e411e1837960;hp=88872c47c5f841d9b008da5fdc59a39281f4f2bb;hb=e84000f7b8b8fb8ae29f53f66dea488f904e0838;hpb=bcefdef1eaed14d3156b7fb5b9ad6d3b7078efcf diff --git a/src/ngircd/pam.c b/src/ngircd/pam.c index 88872c47..4e47ddb1 100644 --- a/src/ngircd/pam.c +++ b/src/ngircd/pam.c @@ -1,6 +1,6 @@ /* * 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 @@ -15,29 +15,25 @@ /** * @file - * PAM User Authentification + * PAM User Authentication */ -#include "imp.h" #include - -#include "defines.h" -#include "log.h" -#include "conn.h" -#include "client.h" - #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 "conf.h" + #include "pam.h" static char *password; @@ -87,7 +83,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. */ @@ -106,7 +102,7 @@ PAM_Authenticate(CLIENT *Client) { conv.appdata_ptr = Conn_Password(Client_Conn(Client)); /* Initialize PAM */ - retval = pam_start("ngircd", Client_OrigUser(Client), &conv, &pam); + retval = pam_start(Conf_PAMServiceName, Client_OrigUser(Client), &conv, &pam); if (retval != PAM_SUCCESS) { Log(LOG_ERR, "PAM: Failed to create authenticator! (%d)", retval); return false;