From ef1ebf12d98359c0d75ce48a1b05737f7e4e93c0 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 27 Dec 2025 20:49:27 +0900 Subject: cmd/sharefs: handle mount -t fuse.sharefs This should have been handled in a custom option parsing function, but that much extra complexity is unnecessary for this edge case. Honestly I do not know why libfuse does not handle this itself. Signed-off-by: Ophestra --- cmd/sharefs/fuse.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmd/sharefs/fuse.go') diff --git a/cmd/sharefs/fuse.go b/cmd/sharefs/fuse.go index 9517b561..bbbc1446 100644 --- a/cmd/sharefs/fuse.go +++ b/cmd/sharefs/fuse.go @@ -314,7 +314,7 @@ func _main(s ...string) (exitCode int) { // hack to keep fuse_parse_cmdline happy in the container mountpoint := C.GoString(opts.mountpoint) pathnameArg := -1 - for i, arg := range os.Args { + for i, arg := range s { if arg == mountpoint { pathnameArg = i break @@ -324,7 +324,7 @@ func _main(s ...string) (exitCode int) { log.Println("mountpoint must be absolute") return 2 } - os.Args[pathnameArg] = container.Nonexistent + s[pathnameArg] = container.Nonexistent } if !parseOpts(&args, &setup, msg.GetLogger()) { @@ -421,7 +421,7 @@ func _main(s ...string) (exitCode int) { } else { z.Path = a } - z.Args = os.Args + z.Args = s z.ForwardCancel = true z.SeccompPresets |= std.PresetStrict z.ParentPerm = 0700 -- cgit v1.3.1