From odip@softberry.ru  Mon Aug 30 19:28:35 2004
Return-Path: <odip@softberry.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 21CCD16A4CF
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 30 Aug 2004 19:28:35 +0000 (GMT)
Received: from cosmos.softberry.ru (cosmos.softberry.ru [80.66.88.137])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7E51C43D31
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 30 Aug 2004 19:28:34 +0000 (GMT)
	(envelope-from odip@softberry.ru)
Received: by cosmos.softberry.ru (Postfix, from userid 501)
	id AA891154D9; Tue, 31 Aug 2004 02:28:32 +0700 (NOVST)
Message-Id: <20040830192832.AA891154D9@cosmos.softberry.ru>
Date: Tue, 31 Aug 2004 02:28:32 +0700 (NOVST)
From: Dmitry A Grigorovich <odip@bionet.nsc.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] Incorrect rights for setup devel/bugzilla
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         71161
>Category:       ports
>Synopsis:       [PATCH] Incorrect rights for setup devel/bugzilla
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 30 19:30:25 GMT 2004
>Closed-Date:    Wed Oct 27 19:24:20 GMT 2004
>Last-Modified:  Wed Oct 27 19:24:20 GMT 2004
>Originator:     Dmitry A Grigorovich
>Release:        FreeBSD 4.9-RELEASE-p4 i386
>Organization:
ICiG SB RAS
>Environment:
System: FreeBSD 4.9-RELEASE-p4
>Description:

File /usr/ports/devel/bugzilla/pkg-message have incorrect right
for setup bugzilla:

  1. Create database user who has rights on bugs database manipulation
     by following mysql commands:

     GRANT SELECT,INSERT,UPDATE,DELETE,INDEX, ALTER,CREATE,DROP,REFERENCES \
           ON <database>.* TO <dbuser>@<host> IDENTIFIED BY '<password>';

====

On first login in bugzilla I found,
that also needed LOCK TABLES for this list or rights

>How-To-Repeat:

Install mysql40

Install devel/bugzilla
Configure bugzilla via ./checksetup.pl
After complete you will be have administrator with password
Login as administrator in bugzilla
You are get error about LOCK TABLES in global.pl

>Fix:

Apply patch

--- diff begins here ---
--- pkg-message	Fri Jul 23 13:41:02 2004
+++ pkg-message.new	Tue Aug 31 02:15:51 2004
@@ -4,8 +4,9 @@
   1. Create database user who has rights on bugs database manipulation
      by following mysql commands:
 
-     GRANT SELECT,INSERT,UPDATE,DELETE,INDEX, ALTER,CREATE,DROP,REFERENCES \
-           ON <database>.* TO <dbuser>@<host> IDENTIFIED BY '<password>'; 
+     GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,DROP,REFERENCES,\
+	   LOCK TABLES ON <database>.* TO <dbuser>@<host> \
+	   IDENTIFIED BY '<password>'; 
      FLUSH PRIVILEGES;
 
      where <database> is a bugs database name; <dbuser> is a bugs database
--- diff ends here ---

Now you are known what rights needed :)
Change rights and bugzilla worked
>Release-Note:
>Audit-Trail:

From: "Dmitry Grigorovich" <odip@bionet.nsc.ru>
To: <freebsd-gnats-submit@FreeBSD.org>, <odip@bionet.nsc.ru>
Cc:  
Subject: Re: ports/71161: [PATCH] Incorrect rights for setup devel/bugzilla
Date: Tue, 31 Aug 2004 03:42:11 +0700

 More correctly:
 
 If you are using MySQL 4.0 or newer, enter: 
 
 mysql> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX, ALTER,CREATE,DROP,LOCK
 TABLES,CREATE TEMPORARY TABLES,REFERENCES ON bugs.* TO bugs@localhost
 IDENTIFIED BY '<bugs_password>';  
 mysql> FLUSH PRIVILEGES;  
 
 If you are using an older version of MySQL, the LOCK TABLES and CREATE
 TEMPORARY TABLES permissions need to be removed from the list: 
 
 mysql> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX, ALTER,CREATE,DROP,REFERENCES
 ON bugs.* TO bugs@localhost IDENTIFIED BY '<bugs_password>';  
 mysql> FLUSH PRIVILEGES;  
 
 [ODiP] == Dmitry Grigorovich
 
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Wed Oct 27 19:24:13 GMT 2004 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71161 
>Unformatted:
