<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nfs-utils.git/utils/idmapd, branch gss-fixes</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>nfs-utils: consolidate mydaemon() and release_parent() implementations</title>
<updated>2013-11-20T20:04:47+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@redhat.com</email>
</author>
<published>2013-11-20T20:00:41+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=6a46d870c61433c8dea0270d9c10702b7b4b3d99'/>
<id>6a46d870c61433c8dea0270d9c10702b7b4b3d99</id>
<content type='text'>
We currently have 2 cut-and-paste versions of this code. One for idmapd
and one for svcgssd.[1]

The two are basically equivalent but there are some small differences,
mostly related to how errors in that function are logged. svcgssd uses
printerr() with a priority of 1, which only prints errors if -v was
specified. That doesn't seem to be quite right. Daemonizing errors are
necessarily fatal and should be logged as such. The one for idmapd uses
err(), which always prints to stderr even though we have the xlog
facility set up. Since both have xlog configured at this point, log the
errors using xlog_err() instead.

The only other significant difference I see is that the idmapd version
will open "/" if it's unable to open "/dev/null". I believe that however
was a holdover from an earlier version of that function that did not
error out when we were unable to open a file descriptor. Since the
function does that now, I don't believe we need that fallback anymore.

[1]: technically, we have a third in statd too, but it's different
     enough that I don't want to touch it here.

Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We currently have 2 cut-and-paste versions of this code. One for idmapd
and one for svcgssd.[1]

The two are basically equivalent but there are some small differences,
mostly related to how errors in that function are logged. svcgssd uses
printerr() with a priority of 1, which only prints errors if -v was
specified. That doesn't seem to be quite right. Daemonizing errors are
necessarily fatal and should be logged as such. The one for idmapd uses
err(), which always prints to stderr even though we have the xlog
facility set up. Since both have xlog configured at this point, log the
errors using xlog_err() instead.

The only other significant difference I see is that the idmapd version
will open "/" if it's unable to open "/dev/null". I believe that however
was a holdover from an earlier version of that function that did not
error out when we were unable to open a file descriptor. Since the
function does that now, I don't believe we need that fallback anymore.

[1]: technically, we have a third in statd too, but it's different
     enough that I don't want to touch it here.

Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc.idmapd: silence pointless EOF warning</title>
<updated>2013-08-19T17:04:51+00:00</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@redhat.com</email>
</author>
<published>2013-08-19T16:55:01+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=7c8eba31b6c1888fad2481ed5e365f766ba6120d'/>
<id>7c8eba31b6c1888fad2481ed5e365f766ba6120d</id>
<content type='text'>
RH bz 831455 has a report that repeatedly mounting and unmounting over
lo can hit this warning in the EOF case.  I suspect that's just
normal--I'm not sure of the details, but probably idmapd gets woken up
to check for an upcall and then the upcall gets yanked away before
idmapd gets a chance to read it.

So just skip the warning in that case.  I also can't see a reason to
reopen.

Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RH bz 831455 has a report that repeatedly mounting and unmounting over
lo can hit this warning in the EOF case.  I suspect that's just
normal--I'm not sure of the details, but probably idmapd gets woken up
to check for an upcall and then the upcall gets yanked away before
idmapd gets a chance to read it.

So just skip the warning in that case.  I also can't see a reason to
reopen.

Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc.idmapd: Ignore open failures in dirscancb()</title>
<updated>2013-01-16T20:33:17+00:00</updated>
<author>
<name>David Jeffery</name>
<email>djeffery@redhat.com</email>
</author>
<published>2013-01-16T20:21:55+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=5ac9bcfd820f09af4d3f87f1f7346d896f70bc9a'/>
<id>5ac9bcfd820f09af4d3f87f1f7346d896f70bc9a</id>
<content type='text'>
From: David Jeffery &lt;djeffery@redhat.com&gt;

The daemon "rpc.idmapd" scans the /var/lib/nfs/rpc_pipefs/nfs/ directory
periodically looking for NFS client mounts to communicate to. The daemon
tried to open communication with a client mount but it disappeared in
between looking for directory entries and opening them. NFS mount was
umounted just before rpc.idmapd tried to communicate with it. This
behavior is usually seen when autofs is configured on the system.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From: David Jeffery &lt;djeffery@redhat.com&gt;

The daemon "rpc.idmapd" scans the /var/lib/nfs/rpc_pipefs/nfs/ directory
periodically looking for NFS client mounts to communicate to. The daemon
tried to open communication with a client mount but it disappeared in
between looking for directory entries and opening them. NFS mount was
umounted just before rpc.idmapd tried to communicate with it. This
behavior is usually seen when autofs is configured on the system.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>idmapd: allow non-ASCII characters (UTF-8) in NFSv4 domain name</title>
<updated>2012-12-17T21:33:17+00:00</updated>
<author>
<name>Suresh Jayaraman</name>
<email>sjayaraman@suse.com</email>
</author>
<published>2012-12-17T21:29:44+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=96892b29a50af1055bfc3ca74930e9782ead6c71'/>
<id>96892b29a50af1055bfc3ca74930e9782ead6c71</id>
<content type='text'>
The validateascii() check in imconv() maps NFSv4 domain names with
non-ASCII characters to 'nobody'. In setups where Active directory
or LDAP is used this causes names with UTF-8 characters to being
mapped to 'nobody' because of this check.

As Bruce Fields puts it:

"idmapd doesn't seem like the right place to enforce restrictions on
names.  Once the system has allowed a name it's too late to be
complaining about it here."

Replace the validateascii() call in imconv() with a check for
null-termination just to be extra-careful and remove the validateascii()
function itself as the only user of that function is being
removed by this patch.

Acked-by: J. Bruce Fields &lt;bfields@fieldses.org&gt;
Signed-off-by: Suresh Jayaraman &lt;sjayaraman@suse.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The validateascii() check in imconv() maps NFSv4 domain names with
non-ASCII characters to 'nobody'. In setups where Active directory
or LDAP is used this causes names with UTF-8 characters to being
mapped to 'nobody' because of this check.

As Bruce Fields puts it:

"idmapd doesn't seem like the right place to enforce restrictions on
names.  Once the system has allowed a name it's too late to be
complaining about it here."

Replace the validateascii() call in imconv() with a check for
null-termination just to be extra-careful and remove the validateascii()
function itself as the only user of that function is being
removed by this patch.

Acked-by: J. Bruce Fields &lt;bfields@fieldses.org&gt;
Signed-off-by: Suresh Jayaraman &lt;sjayaraman@suse.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>autoconf: don't let libnfsidmap test add -lnfsidmap to $LIBS</title>
<updated>2012-01-05T20:42:40+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@redhat.com</email>
</author>
<published>2011-12-23T19:41:11+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=17e77da99f103191da3e1e7d0b43838a04c5ac3b'/>
<id>17e77da99f103191da3e1e7d0b43838a04c5ac3b</id>
<content type='text'>
...as that makes that library get linked into every binary. Also,
replace "hardcoded" -lnfsidmap linker flag in Makefiles with
a AC_SUBST variable.

This fixes a regression introduced in commit d7c64dd.

Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
...as that makes that library get linked into every binary. Also,
replace "hardcoded" -lnfsidmap linker flag in Makefiles with
a AC_SUBST variable.

This fixes a regression introduced in commit d7c64dd.

Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>autoconf: fix up libevent autoconf test</title>
<updated>2012-01-05T20:42:40+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@redhat.com</email>
</author>
<published>2011-12-23T14:04:54+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=d33381555310aacaa9a5da05ccb3b156abea2971'/>
<id>d33381555310aacaa9a5da05ccb3b156abea2971</id>
<content type='text'>
Have it set LIBEVENT to -levent and use that in the Makefiles instead
of hardcoding it.

Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Have it set LIBEVENT to -levent and use that in the Makefiles instead
of hardcoding it.

Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc.idmapd: Dies with 'I/O possible'</title>
<updated>2011-10-04T17:37:00+00:00</updated>
<author>
<name>Luca Giuzzi</name>
<email>luca.giuzzi@gmail.com</email>
</author>
<published>2011-10-04T17:35:06+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=8f065a26d49eabebc3995b8f6966b15ef7553b3e'/>
<id>8f065a26d49eabebc3995b8f6966b15ef7553b3e</id>
<content type='text'>
We have had problems on some of our machines (all Fedora 14), where
rpc.idmapd used to die with an `I/O possible' message at (basically)
random times. A strace suggested the issue being in nfsopen() where a
signal type is reset before notification is disabled; a signal at just
the right time might be the cause of the problem; see
https://bugzilla.redhat.com/show_bug.cgi?id=684308

Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have had problems on some of our machines (all Fedora 14), where
rpc.idmapd used to die with an `I/O possible' message at (basically)
random times. A strace suggested the issue being in nfsopen() where a
signal type is reset before notification is disabled; a signal at just
the right time might be the cause of the problem; see
https://bugzilla.redhat.com/show_bug.cgi?id=684308

Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>idmapd: Fix decoding of octal encoded fields</title>
<updated>2011-09-20T18:34:42+00:00</updated>
<author>
<name>Jan-Marek Glogowski</name>
<email>glogow@fbihome.de</email>
</author>
<published>2011-09-20T18:33:22+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=076b91078411b6a2c99c8d85bc10ded5c64a7019'/>
<id>076b91078411b6a2c99c8d85bc10ded5c64a7019</id>
<content type='text'>
The decoded octal will always be positive and (char) -1 is negative. Any
field containing an encoded octal will be rejected.

As the encoded value should be an unsigned char, fix the check to reject
all values &gt; (unsigned char) -1 = UCHAR_MAX, as this indicate an error
in the encoding.

Signed-off-by: Jan-Marek Glogowski &lt;glogow@fbihome.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>
The decoded octal will always be positive and (char) -1 is negative. Any
field containing an encoded octal will be rejected.

As the encoded value should be an unsigned char, fix the check to reject
all values &gt; (unsigned char) -1 = UCHAR_MAX, as this indicate an error
in the encoding.

Signed-off-by: Jan-Marek Glogowski &lt;glogow@fbihome.de&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nfs-utils: Move common code into support</title>
<updated>2010-10-13T14:26:09+00:00</updated>
<author>
<name>Steve Dickson</name>
<email>steved@redhat.com</email>
</author>
<published>2010-10-13T14:09:53+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=c117b7a1f29db65d139824ba5bab2a58bf5609e2'/>
<id>c117b7a1f29db65d139824ba5bab2a58bf5609e2</id>
<content type='text'>
There are several source files and headers present in the ./utils/idmapd
directory which are also usable in a doimapd daemon. Because of this we
move that support into the support directory such that it can be shared by
both daemons.

Signed-off-by: Jim Rees &lt;rees@umich.edu&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are several source files and headers present in the ./utils/idmapd
directory which are also usable in a doimapd daemon. Because of this we
move that support into the support directory such that it can be shared by
both daemons.

Signed-off-by: Jim Rees &lt;rees@umich.edu&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc.idmapd: Type of idmap client should be defined by ic_id not ic_clid.</title>
<updated>2010-09-16T11:13:43+00:00</updated>
<author>
<name>Bian Naimeng</name>
<email>biannm@cn.fujitsu.com</email>
</author>
<published>2010-09-16T11:12:47+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=64bf8db367fd43e80dd135b460afc157808647fa'/>
<id>64bf8db367fd43e80dd135b460afc157808647fa</id>
<content type='text'>
The type of idmap_client is defined by idmap_client.ic_id for nfs,
so nfsd should have the same style.

Signed-off-by: Bian Naimeng &lt;biannm@cn.fujitsu.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The type of idmap_client is defined by idmap_client.ic_id for nfs,
so nfsd should have the same style.

Signed-off-by: Bian Naimeng &lt;biannm@cn.fujitsu.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
