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. --- lib/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/mount.c') diff --git a/lib/mount.c b/lib/mount.c index fb9231a..111b32b 100644 --- a/lib/mount.c +++ b/lib/mount.c @@ -462,7 +462,7 @@ static int fuse_mount_sys(const char *mnt, struct mount_opts *mo, if (!O_CLOEXEC) fcntl(fd, F_SETFD, FD_CLOEXEC); - snprintf(tmp, sizeof(tmp), "fd=%i,rootmode=%o,user_id=%i,group_id=%i", + snprintf(tmp, sizeof(tmp), "fd=%i,rootmode=%o,user_id=%u,group_id=%u", fd, stbuf.st_mode & S_IFMT, getuid(), getgid()); res = fuse_opt_add_opt(&mo->kernel_opts, tmp); -- cgit v1.2.3