Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 8952 - Sendmail: creation of the smmp group/user needs to be done before src_install
Summary: Sendmail: creation of the smmp group/user needs to be done before src_install
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Nick Hadaway
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 12537
  Show dependency tree
 
Reported: 2002-10-09 19:49 UTC by Christian Birchinger (RETIRED)
Modified: 2004-10-17 11:52 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Birchinger (RETIRED) gentoo-dev 2002-10-09 19:49:10 UTC
there are chown/chgrp functions in src_install() and those will fail
if those users don't exist.This is a fixed version

http://www.netswarm.net/sendmail.fix.ebuild.tar.gz

It also uses the queue runner feature and starts it as user smmmp instead
of just one task as root
Comment 1 Grant Goodyear (RETIRED) gentoo-dev 2002-10-25 10:09:52 UTC
Could you provide some info on what (if any) changes are necessary for users
upgrading to this version of sendmail?  I have to admit that I'm not 
familiar with queue running.
Comment 2 Grant Goodyear (RETIRED) gentoo-dev 2002-10-25 10:20:57 UTC
Thank you very much, by the way.  One technical comment:

For adding a user you want to use pkg_preinst{}, not pkg_setup{}.  The
reason is that pkg_setup{} is not run when a .tbz2 package is installed.

I'm adding raker to the CC list in case he's interested.  I have it working
here, but I would like it to have a bit more testing.  Also, do the 
changes in the conf.d and init files break earlier sendmail ebuilds?  If so,
those need to be fixed (given new names in the files directory).
Comment 3 Christian Birchinger (RETIRED) gentoo-dev 2002-10-25 21:08:40 UTC
Ok maybe pkg_setup{} is a bad place for the adduser but pkg_preinst{} simply
wont work. As already written in the report "make install" *needs* the smmsp
user and group to work otherwise the chown/chgrp operations all fail.

Ok now the queue runner thing (which is the default way of running sendmail
since 8.11.x). It does not need different .cf or .mc files. You only need to
launch sendmail with different options. I've put those options in the conf.d and
init.d directories. If you use those new init script it will run out of the box
with your old setup. Ofcourse this security feature uses the smmsp user/group.
So it's important that the "make install" phase has those users available.

Btw. the best workaround for the whole issue is putting smmsp in the standard
passwd/group file. There are already less important and more unknown users in
there. Why not this one?
Comment 4 Grant Goodyear (RETIRED) gentoo-dev 2002-10-26 09:34:52 UTC
I believe that a sensible way of managing daemon users/groups is
something that we're still working on.  Azarah, do you know the
current status?

My understanding was that pkg_preinst was run before pkg_unpack, but
I might be wrong about that.  If so, then perhaps we should have pkg_setup
modified so that it runs for both binary and source installs.  Carpaski?
Comment 5 Christian Birchinger (RETIRED) gentoo-dev 2002-10-26 10:21:31 UTC
function order from the ebuild.sh:

...
src_compile()
src_install()
pkg_preinst()
...

src_install() (make install) needs the uid/gid but they aren't there before
pkg_preinst() is started
Comment 6 Grant Goodyear (RETIRED) gentoo-dev 2002-11-01 13:35:48 UTC
Out of town; reassigning
Comment 7 Nick Hadaway 2002-11-17 21:41:45 UTC
azarah, I'd like to have this added to the default passwd and group files

user: smmsp
group: smmsp

I am not sure what UID or GID should be used for either of these as they are 
specific to sendmail.  There is no default value.
Comment 8 Christian Birchinger (RETIRED) gentoo-dev 2002-11-18 13:06:36 UTC
I was always a big fan of UID/GID == bind port. Like 53 for bind, 21 for ftp or
22 for ssh but 25 has already been wasted to "at" :). Well technicaly it doesn't
matter what smmsp has as long as it's available.
Comment 9 Nick Hadaway 2002-12-01 19:24:01 UTC
as soon as the users are added to the next baselayout release I will post on
this bug and add the smmsp support to the ebuild.
Comment 10 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-08 15:25:16 UTC
--------------
azarah@nosferatu rc-scripts $ grep smmsp etc/* 
etc/group:smmsp:x:209:smmsp
etc/passwd:smmsp:x:209:209:smmsp::/bin/false
azarah@nosferatu rc-scripts $ 
--------------

What should home be ?

Comment 11 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-09 04:13:27 UTC
Nick, is this ok??
Comment 12 Nick Hadaway 2002-12-18 22:36:49 UTC
the smmsp user and group are now in the baselayout.

Sendmail 8.12.7 will be out soon.  That ebuild will have the smmsp hooks 
removed.
Comment 13 Nick Hadaway 2003-01-19 20:04:09 UTC
sendmail-8.12.7 has been marked stable in portage.