<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nfs-utils.git/utils/statd/start-statd, branch gss-proxy-mods</title>
<subtitle>NFS utils related patches</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/'/>
<entry>
<title>start-statd: Use bash as -p is no POSIX</title>
<updated>2011-08-29T16:04:25+00:00</updated>
<author>
<name>Luk Claes</name>
<email>luk@debian.org</email>
</author>
<published>2011-08-29T16:04:25+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=708f2d63ee2641f72d3a87ce65f12e83e5ad60be'/>
<id>708f2d63ee2641f72d3a87ce65f12e83e5ad60be</id>
<content type='text'>
sh -p is not guaranteed to be provided by POSIX shells. dash for
instance does not provide this, so use bash explicitly.

Signed-off-by: Luk Claes &lt;luk@debian.org&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sh -p is not guaranteed to be provided by POSIX shells. dash for
instance does not provide this, so use bash explicitly.

Signed-off-by: Luk Claes &lt;luk@debian.org&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Ensure statd gets started if required when non-root</title>
<updated>2008-11-26T17:01:06+00:00</updated>
<author>
<name>Neil Brown</name>
<email>neilb@suse.de</email>
</author>
<published>2008-11-26T17:01:06+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=33bbeabb40d11a59266e0702adaa6a2e0acb6382'/>
<id>33bbeabb40d11a59266e0702adaa6a2e0acb6382</id>
<content type='text'>
user mounts an NFS filesystem.

The first time an NFS filesystem is mounted, we start statd from
/sbin/mount.nfs.  If this first time is a non-root user doing the
 mount, (thanks to e.g.  the 'users' option in /etc/fstab)
then we need to be sure that the 'setuid' status from mount.nfs
is inherited through to rpc.statd so that it runs as root.

There are two places where we loose our setuid status due to the shell
(/bin/sh) discarding.

1/ mount.nfs uses "system" to run /usr/sbin/start-statd.  This runs a
   shell which is likely to drop privileges.  So change that code to use
  'fork' and 'execl' explicitly.
2/ start-statd is a shell script.  To convince the shell to allow the
  program to run in privileged mode, we need to add a "-p" flag.

We could just call setuid(getuid()) at some appropriate time, and it
might be worth doing that as well, however I think that getting
rid of 'system()' is a good idea and once that is done, the
adding of '-p' is trivial and sufficient.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
user mounts an NFS filesystem.

The first time an NFS filesystem is mounted, we start statd from
/sbin/mount.nfs.  If this first time is a non-root user doing the
 mount, (thanks to e.g.  the 'users' option in /etc/fstab)
then we need to be sure that the 'setuid' status from mount.nfs
is inherited through to rpc.statd so that it runs as root.

There are two places where we loose our setuid status due to the shell
(/bin/sh) discarding.

1/ mount.nfs uses "system" to run /usr/sbin/start-statd.  This runs a
   shell which is likely to drop privileges.  So change that code to use
  'fork' and 'execl' explicitly.
2/ start-statd is a shell script.  To convince the shell to allow the
  program to run in privileged mode, we need to add a "-p" flag.

We could just call setuid(getuid()) at some appropriate time, and it
might be worth doing that as well, however I think that getting
rid of 'system()' is a good idea and once that is done, the
adding of '-p' is trivial and sufficient.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add start-statd script.</title>
<updated>2007-03-29T03:51:20+00:00</updated>
<author>
<name>Neil Brown</name>
<email>neilb@suse.de</email>
</author>
<published>2007-03-29T03:51:20+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=ff691b40aaa34d5c5cc2ae732a19eed7591f297f'/>
<id>ff691b40aaa34d5c5cc2ae732a19eed7591f297f</id>
<content type='text'>
This script is used by mount.nfs to run statd if needed.
It can be locally modified to change arguements if required.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This script is used by mount.nfs to run statd if needed.
It can be locally modified to change arguements if required.
</pre>
</div>
</content>
</entry>
</feed>
