INN commit: trunk/nnrpd (perm.c)
INN Commit
Russ_Allbery at isc.org
Sun Aug 31 07:08:08 UTC 2008
Date: Sunday, August 31, 2008 @ 00:08:07
Author: iulius
Revision: 7987
Use the new PERMcanauthenticate global boolean variable instead of
a local canauthenticate integer.
Modified:
trunk/nnrpd/perm.c
--------+
perm.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
Modified: perm.c
===================================================================
--- perm.c 2008-08-29 05:45:57 UTC (rev 7986)
+++ perm.c 2008-08-31 07:08:07 UTC (rev 7987)
@@ -1376,13 +1376,12 @@
{
int i;
char *uname;
- int canauthenticate;
auth_realms = NULL;
access_realms = NULL;
success_auth = NULL;
- PERMcanauthenticate = true;
+ PERMcanauthenticate = false;
PERMcanread = PERMcanpost = false;
PERMreadlist = PERMpostlist = false;
PERMaccessconf = NULL;
@@ -1407,10 +1406,9 @@
}
/* auth_realms are all expected to match the user. */
- canauthenticate = 0;
for (i = 0; auth_realms[i]; i++)
if (auth_realms[i]->auth_methods)
- canauthenticate = 1;
+ PERMcanauthenticate = true;
uname = 0;
while (!uname && i--) {
if ((uname = ResolveUser(auth_realms[i])) != NULL)
@@ -1431,10 +1429,10 @@
PERMneedauth = false;
success_auth = auth_realms[i];
syslog(L_TRACE, "%s res %s", Client.host, PERMuser);
- } else if (!canauthenticate) {
- /* couldn't resolve the user. */
+ } else if (!PERMcanauthenticate) {
+ /* Couldn't resolve the user. */
syslog(L_NOTICE, "%s no_user", Client.host);
- Printf("%d Could not get your access name. Goodbye.\r\n",
+ Printf("%d Could not get your access name. Goodbye!\r\n",
NNTP_ERR_ACCESS);
ExitWithStats(1, true);
} else {
More information about the inn-committers
mailing list