aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorGravatar Miklos Szeredi <mszeredi@suse.cz>2014-07-15 16:03:12 +0200
committerGravatar Miklos Szeredi <mszeredi@suse.cz>2014-07-15 16:03:12 +0200
commit52f46cfa682e284835807bcd60086a71b4365e91 (patch)
treee89aa72b22cd73da48b7c3d048640e454870b189 /util
parent780d47bbea52f1760908653f131063229053896b (diff)
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.
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 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);
}