First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 124680
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Quality Assistance Team <qa@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Mike Green <mikey@badpenguins.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 124680 depends on: Show dependency tree
Show dependency graph
Bug 124680 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-03-02 11:50 0000
At least 42 ebuilds in the portage snapshot dated 20060301 utilize enewuser
and/or enewgroup only within the src_compile() or src_install() functions. 
When installing binary packages the user and/or group will not be created.

At worst the installed binary package will end up running with incorrect
ownership and possibly pose a security risk to those who use them, with little
or no indication a problem exists.

------- Comment #1 From Mike Green 2006-03-02 11:51:17 0000 -------
Here are the ebuilds I found:

app-misc/dnetc/dnetc-2.9011.497.ebuild
app-misc/klive/klive-0.16.ebuild
dev-db/c-jdbc/c-jdbc-1.0.4-r1.ebuild
dev-util/perforce-proxy/perforce-proxy-2003.1.ebuild
dev-util/perforce-proxy/perforce-proxy-2003.2.ebuild
dev-util/perforce-server/perforce-server-2003.2.ebuild
dev-util/perforce/perforce-2002.2.ebuild
dev-util/perforce/perforce-2002.2-r1.ebuild
dev-util/perforce/perforce-2003.1.ebuild
dev-util/perforce/perforce-2003.1-r1.ebuild
net-dns/bind/bind-9.2.5-r6.ebuild
net-dns/bind/bind-9.2.6.ebuild
net-dns/bind/bind-9.3.2.ebuild
net-ftp/jftpgw/jftpgw-0.13.4-r1.ebuild
net-im/ejabberd/ejabberd-0.7.5.ebuild
net-im/jabber-base/jabber-base-0.00.ebuild
net-im/jabberd/jabberd-1.4.3-r4.ebuild
net-im/jabberd/jabberd-1.4.3-r5.ebuild
net-im/jabberd/jabberd-2.0.10.ebuild
net-im/jabberd/jabberd-2.0.9.ebuild
net-misc/ser/ser-0.9.0.ebuild
net-misc/ser/ser-0.9.4.ebuild
net-misc/spread/spread-3.17.3.ebuild
net-misc/tor/tor-0.1.0.14-r1.ebuild
net-misc/tor/tor-0.1.0.16.ebuild
net-misc/tor/tor-0.1.0.17.ebuild
net-p2p/amule/amule-2.0.1-r2.ebuild
net-p2p/amule/amule-2.0.3-r4.ebuild
net-p2p/amule/amule-2.1.0-r1.ebuild
net-www/apache-2.0.54-r9.ebuild
net-www/apache-2.0.54-r15.ebuild
net-www/apache-2.0.54-r16.ebuild
net-www/apache-2.0.54-r30.ebuild
sys-apps/ivman/ivman-0.6.4.ebuild
sys-apps/ivman/ivman-0.6.5.ebuild
sys-apps/ivman/ivman-0.6.6.ebuild
sys-apps/ivman/ivman-0.6.8.ebuild
sys-apps/ivman/ivman-0.6.9.ebuild
www-apps/trac-0.9.4.ebuild
www-servers/tomcat/tomcat-5.0.28-r9.ebuild
www-servers/tomcat/tomcat-5.0.28-r10.ebuild
www-servers/tomcat/tomcat-5.0.28-r12.ebuild

------- Comment #2 From Jakub Moc 2006-03-02 11:59:25 0000 -------
CCing maintainers. 

- apache is irrelevant, there's a later fixed version stable across the board
- app-misc/dnetc has no maintainer
- net-ftp/jftpgw has no maintainer
- net-misc/ser has no maintainer

------- Comment #3 From Mike Green 2006-03-02 12:08:35 0000 -------
(In reply to comment #2)
> CCing maintainers. 
> 
> - apache is irrelevant, there's a later fixed version stable across the board
> - app-misc/dnetc has no maintainer
> - net-ftp/jftpgw has no maintainer
> - net-misc/ser has no maintainer
> 

Apache is irrelevant?  If someone out there installed 2.0.54-r30 from a binary
compiled on another system, or in a chroot, what happens as a result of the
following?

        # protect the suexec binary
        if ! useq no-suexec; then
                fowners root:apache /usr/sbin/suexec
                fperms 4710 /usr/sbin/suexec
        fi

------- Comment #4 From SpanKY 2006-03-02 17:26:37 0000 -------
guess i could update enew{user,group} to fail if called inside of a src_* func

------- Comment #5 From Ciaran McCreesh 2006-03-02 17:31:50 0000 -------
Failing will break even more stuff. A carefully written warning is more
sensible.

------- Comment #6 From Mike Green 2006-03-02 17:42:06 0000 -------
(In reply to comment #4)
> guess i could update enew{user,group} to fail if called inside of a src_* func
> 

Should it _ever_ be in anything other than pkg_setup(), pkg_preinst() or
pkg_postinst()?

What happens when fowners is used in src_* with a user/group that does not
exist other than being created (later?) in pkg_preinst()?

------- Comment #7 From Mike Green 2006-03-02 17:44:46 0000 -------
(In reply to comment #5)
> Failing will break even more stuff. A carefully written warning is more
> sensible.
> 

I would prefer the install fail instead of leaving my system in a possibly
insecure and inconsistent state.  Currently it just displays an error message
(invalid user) and continues on unless the maintainer sticks a die in there.

Call me anal.

------- Comment #8 From SpanKY 2006-03-02 17:49:23 0000 -------
> Failing will break even more stuff. A carefully written warning is more
> sensible.

i'll wait until these packages are fixed then make it a failure

> Should it _ever_ be in anything other than pkg_setup(), pkg_preinst() or
> pkg_postinst()?

now

> What happens when fowners is used in src_* with a user/group that does not
> exist other than being created (later?) in pkg_preinst()?

it'll obviously fail ... fowners is just a glorified chown

------- Comment #9 From Julien Allanos (RETIRED) 2006-03-09 14:11:05 0000 -------
www-apps/trac-0.9.4.ebuild done.

------- Comment #10 From Petteri Räty 2006-03-11 09:56:22 0000 -------
c-jdbc and tomcat fixed so java should be done

------- Comment #11 From Konstantin Arkhipov 2006-03-25 13:57:53 0000 -------
*** Bug 124647 has been marked as a duplicate of this bug. ***

------- Comment #12 From Konstantin Arkhipov 2006-03-25 16:08:11 0000 -------
net-dns/bind and app-misc/dnetc fixed.

------- Comment #13 From Petteri Räty 2006-03-26 00:48:10 0000 -------
(In reply to comment #12)
> net-dns/bind and app-misc/dnetc fixed.
> 

Not everything is fixed in this bug.

------- Comment #14 From Stefan Schweizer 2006-03-26 09:17:06 0000 -------
ivman is done.

------- Comment #15 From SpanKY 2006-04-18 20:53:27 0000 -------
well packages will now start failing to emerge so you maintainers may want to
fix your stuff

------- Comment #16 From Stephan 'smg' Grein 2006-04-19 05:47:06 0000 -------
net-www/apache-2.0.55-r1

fails too

------- Comment #17 From Horst Schirmeier 2006-04-19 07:01:54 0000 -------
As far as I can see, _all_ current apache ebuilds fail. See bug #130459.

------- Comment #18 From Michael Stewart (vericgar) (RETIRED) 2006-04-19 20:35:13 0000 -------
It would have been nice if apache-bugs was CCed on this before you broke our
package. It's now fixed, thanks to chtekk.

------- Comment #19 From Daniel Drake 2006-04-20 03:04:26 0000 -------
Flameeyes fixed klive, thankyee

------- Comment #20 From Erik Wasser 2006-05-10 06:35:34 0000 -------
What about the apache 1?

>>> Install apache-1.3.34-r11 into /var/tmp/portage/apache-1.3.34-r11/image/ category net-www
 * 'enewgroup()' called from 'install()' which is not a pkg_* function.
 * Package fails at QA and at life.  Please file a bug.

And yes my portage is uptodate. B-)

------- Comment #21 From Pedro Algarvio 2006-05-22 21:16:29 0000 -------
Well I have another question, I store my users in an ldap database, and I'm
using pam_ldap and nss_ldap, when an ebuild tries to create a user that already
exists in ldap, the ebuild fails.

>>> emerge (1 of 1) net-www/apache-2.0.55-r1 to /
>>> extracting info
 *
 * LFS support has been removed due to incompatibilites with other packages.
 * You _will_ have to re-emerge any Apache modules you have installed, or
 * they will likely misbehave/segfault.
 *
 *
 * Multiple MPM support has been disabled due to problems with external
 * modules.  If you have relied on this functionality you will need
 * to find another solution.  The Gentoo Apache team apologizes for
 * any inconvienence this may cause you.
 *
>>> extracting apache-2.0.55-r1
>>> Merging net-www/apache-2.0.55-r1 to /
 * Adding group 'apache' to your system ...
 *  - Groupid: 81
groupadd: name apache is not unique
!!! FAILED preinst: 1


enew(user|group) should first check if user exists besides the /etc/group and
/etc/passwd

# cat /etc/passwd | grep apache
(ouputs nothing)
# cat /etc/group | grep apache
(ouputs nothing)
# getent passwd | grep apache
apache:x:81:81:added by portage for apache:/var/www:/usr/sbin/nologin
# getent group | grep apache
apache:x:81:

------- Comment #22 From Chris Gianelloni (RETIRED) 2006-05-23 09:21:17 0000 -------
Pedro, please file a separate bug for that issue, as it isn't related to
enewuser/enewgroup being used in src_* functions.

Thanks...

------- Comment #23 From Jakub Moc 2006-08-04 02:05:06 0000 -------
Closing; if there's anything left, then it's completely unused and unmaintained
cruft that should go to treecleaners.

First Last Prev Next    No search results available      Search page      Enter new bug