Changes to gnats/gnats/cmds.c

Milan Zamazal <[email protected]> Fri, 19 Jul 2002 02:59:13 -0400
Newsgroups gmane.comp.bug-tracking.gnats.patches
Message-ID <[email protected]>
Index: gnats/gnats/cmds.c
diff -c gnats/gnats/cmds.c:1.66 gnats/gnats/cmds.c:1.67
*** gnats/gnats/cmds.c:1.66	Sun Dec 23 15:21:52 2001
--- gnats/gnats/cmds.c	Fri Jul 19 02:59:13 2002
***************
*** 1,6 ****
  /* Commands for the GNATS server.
!    Copyright (C) 2001 Milan Zamazal
!    Copyright (C) 1994, 95, 95, 1997 Free Software Foundation, Inc.
     Contributed by Brendan Kehoe ([email protected]).
     Further hacked by Milan Zamazal ([email protected]) and other contributors.
  
--- 1,5 ----
  /* Commands for the GNATS server.
!    Copyright (C) 1994, 95, 95, 1997, 2001, 2002 Free Software Foundation, Inc.
     Contributed by Brendan Kehoe ([email protected]).
     Further hacked by Milan Zamazal ([email protected]) and other contributors.
  
***************
*** 622,633 ****
        if (! verifyHostAndUser (new_db, current_host, current_addr, 
  			       currentUsername, currentPassword, &access))
  	{
  	  /* Hmmm.  Should we still do this here? ??? XXX !!! */
  	  syslog (LOG_ERR, "host %s (%s) not allowed access for %s",
! 		  current_host, current_addr, nameOfDb);
  	  setError (err, CODE_NO_ACCESS, 
  		    "You are not permitted to access database %s.\r\n",
! 		    nameOfDb);
  	  freeDatabaseInfo (new_db);
  	}
        else
--- 621,633 ----
        if (! verifyHostAndUser (new_db, current_host, current_addr, 
  			       currentUsername, currentPassword, &access))
  	{
+ 	  char *database_name = databaseName(new_db);
  	  /* Hmmm.  Should we still do this here? ??? XXX !!! */
  	  syslog (LOG_ERR, "host %s (%s) not allowed access for %s",
! 		  current_host, current_addr, database_name);
  	  setError (err, CODE_NO_ACCESS, 
  		    "You are not permitted to access database %s.\r\n",
! 		    database_name);
  	  freeDatabaseInfo (new_db);
  	}
        else