All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: "Olaf Kirch" <olaf.kirch@oracle.com>,
	nfs@lists.sourceforge.net, "Steve Dickson" <SteveD@redhat.com>,
	"Matthias Koenig" <mkoenig@novell.com>,
	"Javier Fernández-Sanguino Peña" <jfs@computer.org>,
	anibal@debian.org
Subject: Portmap - was Re: Does mountd/statd really need to listen on a privileged port??
Date: Fri, 20 Apr 2007 13:04:24 +1000	[thread overview]
Message-ID: <17960.11704.321124.641669@notabene.brown> (raw)
In-Reply-To: 20070419012154.GB19063@javifsp.no-ip.org


Well, the consensus seems to be that a new 'upstream' would not be a
bad thing, but that including it in nfs-utils might not be the best
idea.

I can live with that, and would like to nominate myself as the new
upstream source for 'portmap'.  Does anyone object?

I have created a git repository that can be accessed via:
   git://neil.brown.name/portmap
or
   http://neil.brown.name/git?p=portmap  (for browsing).

It starts with the '5beta' tarball that both SuSE and Debian use
(Fedora uses a slightly older version 4 tarball).
It then adds a host of fixes which cover almost everything I can find
in the Debian, SuSE, and Fedora packages.
The only conflict was the SuSE and Fedora chose a syslog facility of
'AUTH' while Debian chose 'DAEMON' (the original tarball has 'MAIL').
'DAEMON' makes most sense to me, so that is in the .git.

There are two patches from Fedora that I have not included.

One uses 'getpwnam("rpc")' to find a uid to 'setuid' to.
This could be a problem is NIS is in use and 'rpc' isn't in
/etc/passwd - portmap would be need to find the NIS server to check
for 'rpc' before portmap could start.
Maybe we should make the uid a compile-time option?

The other uses gethostbyname to allow tcpwrappers to provide host-name
based access control.  This is similarly a potential ground for
deadlocks, and the man page from Debian explicitly says that isn't
supported so presumably a Debian maintainer has thought about it.

Maybe we could add a compile-time option to enable this if Fedora
really wants it.

Also I have made two enhancements of my own (which is the whole point
of doing this).

Firstly, registrations made with a privileged port are flagged as
such, and can only be deregistered with a request from a privileged
port.  That makes it safe for statd/mountd etc to listen on
unprivileged ports.

The only down side I can see to this is if the sysadmin uses:
   pmap_dump
   kill
   restart
   pmap_set
to restart portmap, all the ports will appear to be registered by a
privileged user, so a non-root user who is expecting to be able to
unregister a port will not be able to.

Partly to address this, and partly because I think it is a good idea,
portmap now keeps a copy of it's mapping table in
/var/run/portmap_mapping (even when it chroots elsewhere) and will
reload it on restart.  So pmap_dump/pmap_set is no longer needed.

After any discussion/resolution on the missing Fedora patches, and
maybe some testing/review by others, I would like to make a new
release (maybe called 6.0), announce it on freshmeat, and put a
tar-ball somewhere.  Then nfs-utils-1.1.0 will recommend that
portmap-6.0 be a dependency as mountd no longer listens on a
privileged port.


Comments/review/suggestions welcome.

Thanks for your time.
NeilBrown

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

  reply	other threads:[~2007-04-20  3:05 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-12 22:05 Does mountd/statd really need to listen on a privileged port?? Neil Brown
2007-04-13  0:05 ` Trond Myklebust
2007-04-16  1:03   ` Neil Brown
2007-04-13  0:55 ` Mike Frysinger
2007-04-13  1:09   ` Mike Frysinger
2007-04-13  1:39   ` Neil Brown
2007-04-13  2:04     ` Mike Frysinger
2007-04-17 10:14     ` Olaf Kirch
2007-04-17 11:12       ` Mike Frysinger
2007-04-16 18:13 ` Steve Dickson
2007-04-17 10:08   ` Olaf Kirch
2007-04-17 11:21     ` Mike Frysinger
2007-04-17 11:32       ` Olaf Kirch
2007-04-18  7:14     ` Neil Brown
2007-04-19  0:46       ` Neil Brown
2007-04-19  1:21         ` Javier Fernández-Sanguino Peña
2007-04-20  3:04           ` Neil Brown [this message]
2007-04-20  6:49             ` Portmap - was " Olaf Kirch
2007-04-20  8:02               ` Neil Brown
2007-04-20 13:27                 ` Olaf Kirch
2007-04-20 19:18             ` Steve Dickson
2007-04-23  4:03               ` Neil Brown
2007-04-23  6:31                 ` Neil Brown
2007-04-23 13:43                   ` Steve Dickson
2007-04-24  0:56                     ` Neil Brown
2007-04-24 17:13                       ` Steve Dickson
2007-04-23 13:28                 ` Steve Dickson
2007-04-23 23:09                   ` Neil Brown
2007-04-24  6:43                     ` Olaf Kirch
2007-04-24  7:24                       ` Neil Brown
2007-04-24 15:15                         ` Talpey, Thomas
2007-04-24 15:31                           ` Talpey, Thomas
2007-04-24  7:08                     ` Olaf Kirch
2007-04-24 15:10                       ` Steve Dickson
2007-04-24 16:10                       ` Christoph Hellwig
2007-04-24 17:04                         ` Steve Dickson
2007-04-24 17:17                           ` Christoph Hellwig
2007-04-24 17:52                             ` Steve Dickson
2007-04-24 19:09                               ` Peter Åstrand
2007-04-24 20:26                                 ` Steve Dickson
2007-04-24 20:36                                   ` Peter Staubach
2007-04-25 11:56                                     ` Olaf Kirch
2007-04-25 15:44                                       ` Peter Staubach
2007-04-25 20:14                                         ` Olaf Kirch
2007-04-26  6:32                                           ` Neil Brown
2007-04-26  8:59                                             ` Olaf Kirch
2007-04-26 13:03                                               ` Peter Staubach
2007-05-02  4:22                                                 ` Ian Kent
2007-04-27 15:07                                               ` Olaf Kirch
2007-04-27 15:18                                                 ` Christoph Hellwig
2007-04-27 17:07                                                   ` Olaf Kirch
2007-04-29 23:32                                                 ` Steve Dickson
2007-04-26  7:52                                     ` Aurélien Charbon
2007-04-25  8:57                                   ` Peter Åstrand
2007-04-25  8:56                               ` Olaf Kirch
2007-04-25  9:58                                 ` Christoph Hellwig
2007-04-25 13:22                                   ` Steve Dickson
2007-04-25 14:10                                     ` Olaf Kirch
2007-04-25 14:42                                       ` Christoph Hellwig
2007-04-26 14:30                                         ` Peter Åstrand
2007-04-25 14:37                                     ` Christoph Hellwig
2007-04-25 13:39                                 ` Steve Dickson
2007-04-26 22:22                                 ` Steve Dickson
2007-04-27  2:22                                   ` J. Bruce Fields
2007-04-27  6:20                                   ` Olaf Kirch
2007-04-27 14:01                                     ` Peter Staubach
2007-04-27 14:09                                       ` Christoph Hellwig
2007-04-27 14:21                                         ` Peter Staubach
2007-04-27 14:37                                           ` Christoph Hellwig
2007-04-29 23:39                                           ` Steve Dickson
2007-04-27 16:49                                       ` Olaf Kirch
2007-04-27 17:06                                         ` Peter Staubach
2007-04-27 17:04                                       ` Olaf Kirch
2007-04-27 17:34                                         ` Peter Staubach
2007-05-04 18:52                                     ` Steve Dickson
2007-04-24 14:38                     ` Steve Dickson
2007-04-19 15:15         ` Steve Dickson
2007-04-19 15:21           ` J. Bruce Fields
2007-04-19 15:42             ` Steve Dickson
2007-04-19 15:50               ` J. Bruce Fields
2007-04-19 16:36                 ` Steve Dickson
2007-04-19 22:50                   ` Anibal Monsalve Salazar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17960.11704.321124.641669@notabene.brown \
    --to=neilb@suse.de \
    --cc=SteveD@redhat.com \
    --cc=anibal@debian.org \
    --cc=jfs@computer.org \
    --cc=mkoenig@novell.com \
    --cc=nfs@lists.sourceforge.net \
    --cc=olaf.kirch@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.