Skip to contentSkip to conversation

exportfs: test_export shouldn't use invalid uid/gid

PATCH In review J. Bruce Fields 2 participants 2 messages Sep 19, 2013 – Sep 24, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 exportfs: test_export shouldn't use invalid uid/gid

From: "J. Bruce Fields" <[email protected]>

Some newer kernels are rejecting -1 uid/gid. Actually, worse--they're silently ignoring any attempt to cache such exports, thus preventing test_export from getting back the errors it needs.

And -1 wasn't a good choice anyway.

---
 utils/exportfs/exportfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
utils/exportfs/exportfs.c +1 -1
index 9f79541..4331697 100644
@@ -420,7 +420,7 @@ static int test_export(char *path, int with_fsid)
 	char buf[1024];
 	int fd, n;
 
-	sprintf(buf, "-test-client- %s 3 %d -1 -1 0\n",
+	sprintf(buf, "-test-client- %s 3 %d 65534 65534 0\n",
 		path,
 		with_fsid ? NFSEXP_FSID : 0);
 	fd = open("/proc/net/rpc/nfsd.export/channel", O_WRONLY);
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 9 lines · J. Bruce Fields

From: "J. Bruce Fields" <[email protected]>

Some newer kernels are rejecting -1 uid/gid. Actually, worse--they're silently ignoring any attempt to cache such exports, thus preventing test_export from getting back the errors it needs.

And -1 wasn't a good choice anyway.

Committed...

steved.

Quoted 18 lines
---
 utils/exportfs/exportfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
utils/exportfs/exportfs.c +1 -1
index 9f79541..4331697 100644
@@ -420,7 +420,7 @@ static int test_export(char *path, int with_fsid)
 	char buf[1024];
 	int fd, n;
 
-	sprintf(buf, "-test-client- %s 3 %d -1 -1 0\n",
+	sprintf(buf, "-test-client- %s 3 %d 65534 65534 0\n",
 		path,
 		with_fsid ? NFSEXP_FSID : 0);
 	fd = open("/proc/net/rpc/nfsd.export/channel", O_WRONLY);