From 52f46cfa682e284835807bcd60086a71b4365e91 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Tue, 15 Jul 2014 16:03:12 +0200 Subject: fusermount, libfuse: send value as unsigned in "user_id=" and "group_id=" ...options. Uids/gids larger than 2147483647 would result in EINVAL when mounting the filesystem. This also needs a fix in the kernel. --- util/fusermount.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util') diff --git a/util/fusermount.c b/util/fusermount.c index e7dbca6..b226fbd 100644 --- a/util/fusermount.c +++ b/util/fusermount.c @@ -810,7 +810,7 @@ static int do_mount(const char *mnt, char **typep, mode_t rootmode, if (res == -1) goto err; - sprintf(d, "fd=%i,rootmode=%o,user_id=%i,group_id=%i", + sprintf(d, "fd=%i,rootmode=%o,user_id=%u,group_id=%u", fd, rootmode, getuid(), getgid()); if (check_empty && @@ -851,7 +851,7 @@ static int do_mount(const char *mnt, char **typep, mode_t rootmode, } if (res == -1 && errno == EINVAL) { /* It could be an old version not supporting group_id */ - sprintf(d, "fd=%i,rootmode=%o,user_id=%i", + sprintf(d, "fd=%i,rootmode=%o,user_id=%u", fd, rootmode, getuid()); res = mount(source, mnt, type, flags, optbuf); } -- cgit v1.2.3