aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2014-07-15 16:03:12 +0200
committerDan Pasanen <dan.pasanen@gmail.com>2015-10-28 21:00:11 -0500
commita199012e06b47f0be72b628ef63c8401793eb4cf (patch)
tree1e58eeb7f4fd48cc7f93d51c77fc2ddbd1549649 /util
parent88536d6388e1083298feb23eae4f90a5565fdfee (diff)
downloadandroid_external_fuse-a199012e06b47f0be72b628ef63c8401793eb4cf.tar.gz
android_external_fuse-a199012e06b47f0be72b628ef63c8401793eb4cf.tar.bz2
android_external_fuse-a199012e06b47f0be72b628ef63c8401793eb4cf.zip
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. Change-Id: Ic7ed0a7391b49adf31db2129b00beb0e1e60f652
Diffstat (limited to 'util')
-rw-r--r--util/fusermount.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/fusermount.c b/util/fusermount.c
index e5c98c7..f2daeac 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);
}