Package: nfs-common
Version: 1:1.2.4-1
Tags: patch

I'm using Samba and NFSv4 with the same ldap and therefore I have groups with spaces (Domain Administrators, ...).

When I chgrp a file on the NFSv4 share to a group containing a space, the client process is stuck (chgrp D) and there are rpc.idmapd errors on the server side:

Aug 26 20:27:48 <host> rpc.idmapd[16848]: nfsdcb: bad name in upcall

I backported 1:1.2.4-1 to squeeze, but the bug persisted.

The attached patch fixes the idmapd to correctly decode octal encoded values (like space).

Upstream bug: https://bugzilla.linux-nfs.org/show_bug.cgi?id=202

Jan-Marek
idmapd: correctly convert octal encoded field values

We want to check for (unsigned char) -1.

--- nfs-utils-1.2.4.orig/utils/idmapd/idmapd.c
+++ nfs-utils-1.2.4/utils/idmapd/idmapd.c
@@ -925,9 +925,9 @@ getfield(char **bpp, char *fld, size_t f
 		if (*bp == '\\') {
 			if ((n = sscanf(bp, "\\%03o", &val)) != 1)
 				return (-1);
-			if (val > (char)-1)
+			if (val > UCHAR_MAX)
 				return (-1);
-			*fld++ = (char)val;
+			*fld++ = val;
 			bp += 4;
 		} else {
 			*fld++ = *bp;

Reply via email to