1 |
/* Commands for the GNATS server. |
/* Commands for the GNATS server. |
2 |
Copyright (C) 2001 Milan Zamazal |
Copyright (C) 1994, 95, 95, 1997, 2001, 2002 Free Software Foundation, Inc. |
|
Copyright (C) 1994, 95, 95, 1997 Free Software Foundation, Inc. |
|
3 |
Contributed by Brendan Kehoe (brendan@cygnus.com). |
Contributed by Brendan Kehoe (brendan@cygnus.com). |
4 |
Further hacked by Milan Zamazal (pdm@zamazal.org) and other contributors. |
Further hacked by Milan Zamazal (pdm@zamazal.org) and other contributors. |
5 |
|
|
621 |
if (! verifyHostAndUser (new_db, current_host, current_addr, |
if (! verifyHostAndUser (new_db, current_host, current_addr, |
622 |
currentUsername, currentPassword, &access)) |
currentUsername, currentPassword, &access)) |
623 |
{ |
{ |
624 |
|
char *database_name = databaseName(new_db); |
625 |
/* Hmmm. Should we still do this here? ??? XXX !!! */ |
/* Hmmm. Should we still do this here? ??? XXX !!! */ |
626 |
syslog (LOG_ERR, "host %s (%s) not allowed access for %s", |
syslog (LOG_ERR, "host %s (%s) not allowed access for %s", |
627 |
current_host, current_addr, nameOfDb); |
current_host, current_addr, database_name); |
628 |
setError (err, CODE_NO_ACCESS, |
setError (err, CODE_NO_ACCESS, |
629 |
"You are not permitted to access database %s.\r\n", |
"You are not permitted to access database %s.\r\n", |
630 |
nameOfDb); |
database_name); |
631 |
freeDatabaseInfo (new_db); |
freeDatabaseInfo (new_db); |
632 |
} |
} |
633 |
else |
else |