NetBSD Problem Report #35141
From ascent@gehakt.student.utwente.nl Mon Nov 27 17:03:54 2006
Return-Path: <ascent@gehakt.student.utwente.nl>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 852AA63B400
for <gnats-bugs@gnats.NetBSD.org>; Mon, 27 Nov 2006 17:03:54 +0000 (UTC)
Message-Id: <20061127160116.A84E628AB0B@gehakt.student.utwente.nl>
Date: Mon, 27 Nov 2006 17:01:16 +0100 (CET)
From: Wouter Schoot <ascent@schoot.org>
Reply-To: Wouter Schoot <ascent@schoot.org>
To: gnats-bugs@NetBSD.org
Subject: databases/phpmyadmin blindly trusts on www user existance (pkgsrc-current)
X-Send-Pr-Version: 3.95
>Number: 35141
>Category: pkg
>Synopsis: databases/phpmyadmin blindly trusts on www user existance
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: tron
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 27 17:05:00 +0000 2006
>Closed-Date: Mon Nov 27 17:36:49 +0000 2006
>Last-Modified: Mon Nov 27 18:20:00 +0000 2006
>Originator: Wouter Schoot <ascent@schoot.org>
>Release: NetBSD 4.99.4
>Organization:
>Environment:
System: NetBSD gehakt.student.utwente.nl 4.99.4 NetBSD 4.99.4 (GEHAKT) #10: Sat Nov 25 19:53:04 CET 2006 root@gehakt.student.utwente.nl:/usr/src/sys/arch/i386/compile/GEHAKT i386
Architecture: i386
Machine: i386
>Description:
When installing databases/phpmyadmin from pkgsrc-current, it has the apache user
being www hardcoded in the Makefile. I think it should check if that user
exists, and otherwise use some option to set the user. When installing lighttpd
instead of apache (which doesn't create a www user), the chown's in the end
fail.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->tron
Responsible-Changed-By: tron@netbsd.org
Responsible-Changed-When: Mon, 27 Nov 2006 17:10:26 +0000
Responsible-Changed-Why:
Mine.
From: Matthias Scheler <tron@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/35141 CVS commit: pkgsrc/databases/phpmyadmin
Date: Mon, 27 Nov 2006 17:30:56 +0000 (UTC)
Module Name: pkgsrc
Committed By: tron
Date: Mon Nov 27 17:30:56 UTC 2006
Modified Files:
pkgsrc/databases/phpmyadmin: Makefile
Log Message:
Fix various problems:
1.) Don't use hardcoded group "wheel". Use "APACHE_GROUP" instead which
defaults to "www".
2.) Create user and group if necessary. This fixces PR pkg/35141 by
Wouter Schoot.
3.) Fix path to Perl interpreter in helper script "convertcfg.pl" and
add missing dependence on Perl package.
Bump package revision because of these fixes.
To generate a diff of this commit:
cvs rdiff -r1.55 -r1.56 pkgsrc/databases/phpmyadmin/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: tron@netbsd.org
State-Changed-When: Mon, 27 Nov 2006 17:36:49 +0000
State-Changed-Why:
I've fixed the "phpmyadmin" package. Thanks for the bug report.
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/35141: databases/phpmyadmin blindly trusts on www user
existance (pkgsrc-current)
Date: Mon, 27 Nov 2006 18:36:11 +0100
On Mon, Nov 27, 2006 at 05:05:00PM +0000, Wouter Schoot wrote:
> When installing databases/phpmyadmin from pkgsrc-current, it has the apache user
> being www hardcoded in the Makefile. I think it should check if that user
> exists, and otherwise use some option to set the user. When installing lighttpd
> instead of apache (which doesn't create a www user), the chown's in the end
> fail.
Are you refering to the configuration file? For what reason is that 0600
anyway? The default at least makes sense only for mod_php usage and no
sense for FastCGI setups.
Joerg
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: PR/35141 CVS commit: pkgsrc/databases/phpmyadmin
Date: Mon, 27 Nov 2006 18:46:08 +0100
On Mon, Nov 27, 2006 at 05:35:02PM +0000, Matthias Scheler wrote:
> 1.) Don't use hardcoded group "wheel". Use "APACHE_GROUP" instead which
> defaults to "www".
> 2.) Create user and group if necessary. This fixces PR pkg/35141 by
> Wouter Schoot.
Infact, looking at the content a bit more, I see *no* reason for
non-default permissions here.
Joerg
From: Matthias Scheler <tron@NetBSD.org>
To: Joerg Sonnenberger <joerg@britannica.bec.de>
Cc: NetBSD GNATS <gnats-bugs@NetBSD.org>
Subject: Re: PR/35141 CVS commit: pkgsrc/databases/phpmyadmin
Date: Mon, 27 Nov 2006 17:53:30 +0000
On Mon, Nov 27, 2006 at 05:50:03PM +0000, Joerg Sonnenberger wrote:
> From: Joerg Sonnenberger <joerg@britannica.bec.de>
> To: gnats-bugs@NetBSD.org
> Cc:
> Subject: Re: PR/35141 CVS commit: pkgsrc/databases/phpmyadmin
> Date: Mon, 27 Nov 2006 18:46:08 +0100
>
> On Mon, Nov 27, 2006 at 05:35:02PM +0000, Matthias Scheler wrote:
> > 1.) Don't use hardcoded group "wheel". Use "APACHE_GROUP" instead which
> > defaults to "www".
> > 2.) Create user and group if necessary. This fixces PR pkg/35141 by
> > Wouter Schoot.
>
> Infact, looking at the content a bit more, I see *no* reason for
> non-default permissions here.
The configuration usually contains the admin password for the MySQL server.
So it should be only readable by the webserver user.
Kind regards
--
Matthias Scheler http://zhadum.org.uk/
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: Matthias Scheler <tron@NetBSD.org>
Cc: NetBSD GNATS <gnats-bugs@NetBSD.org>
Subject: Re: PR/35141 CVS commit: pkgsrc/databases/phpmyadmin
Date: Mon, 27 Nov 2006 19:13:19 +0100
On Mon, Nov 27, 2006 at 05:53:30PM +0000, Matthias Scheler wrote:
> On Mon, Nov 27, 2006 at 05:50:03PM +0000, Joerg Sonnenberger wrote:
> > Infact, looking at the content a bit more, I see *no* reason for
> > non-default permissions here.
>
> The configuration usually contains the admin password for the MySQL server.
> So it should be only readable by the webserver user.
There are at least two different configurations for phpmyadmin: with
default authentication and without. This applies only to the former
(which IMO should be discouraged as default). Independent of that, it
applies only to the mod_php, as e.g. fastcgi allows running PHP as any
user and the webserver should not have access permissions on the file
for that case.
Shall I fill a separate PR for this? :-)
Joerg
From: Matthias Scheler <tron@NetBSD.org>
To: Joerg Sonnenberger <joerg@britannica.bec.de>
Cc: NetBSD GNATS <gnats-bugs@NetBSD.org>
Subject: Re: PR/35141 CVS commit: pkgsrc/databases/phpmyadmin
Date: Mon, 27 Nov 2006 18:17:12 +0000
On Mon, Nov 27, 2006 at 07:13:19PM +0100, Joerg Sonnenberger wrote:
> There are at least two different configurations for phpmyadmin: with
> default authentication and without. This applies only to the former
> (which IMO should be discouraged as default). Independent of that, it
> applies only to the mod_php, as e.g. fastcgi allows running PHP as any
> user and the webserver should not have access permissions on the file
> for that case.
>
> Shall I fill a separate PR for this? :-)
Only if you are willing to fix it yourself.
Kind regards
--
Matthias Scheler http://zhadum.org.uk/
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.