diff mbox

exportfs: test_export shouldn't use invalid uid/gid

Message ID 20130919191203.GA29599@fieldses.org (mailing list archive)
State New, archived
Headers show

Commit Message

J. Bruce Fields Sept. 19, 2013, 7:12 p.m. UTC
From: "J. Bruce Fields" <bfields@redhat.com>

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.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
 utils/exportfs/exportfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Steve Dickson Sept. 24, 2013, 7:25 p.m. UTC | #1
On 19/09/13 15:12, J. Bruce Fields wrote:
> From: "J. Bruce Fields" <bfields@redhat.com>
> 
> 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.
> 
> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Committed...

steved.

> ---
>  utils/exportfs/exportfs.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
> index 9f79541..4331697 100644
> --- a/utils/exportfs/exportfs.c
> +++ b/utils/exportfs/exportfs.c
> @@ -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);
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
index 9f79541..4331697 100644
--- a/utils/exportfs/exportfs.c
+++ b/utils/exportfs/exportfs.c
@@ -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);