mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-27 04:12:29 +01:00
If the user is was not in readproc group, realpath() would fail causing fusermount to fail. The privilege drop for realpath() is unnecessary as the real access checks are done in other places.
29 lines
630 B
Diff
29 lines
630 B
Diff
--- fuse-2.9.3.orig/util/fusermount.c 2015-02-07 08:58:54.000000000 -0200
|
|
+++ fuse-2.9.3/util/fusermount.c 2015-02-09 09:15:16.737367957 -0200
|
|
@@ -1255,19 +1255,16 @@
|
|
|
|
origmnt = argv[optind];
|
|
|
|
- drop_privs();
|
|
mnt = fuse_mnt_resolve_path(progname, origmnt);
|
|
- if (mnt != NULL) {
|
|
- res = chdir("/");
|
|
- if (res == -1) {
|
|
- fprintf(stderr, "%s: failed to chdir to '/'\n", progname);
|
|
- exit(1);
|
|
- }
|
|
- }
|
|
- restore_privs();
|
|
if (mnt == NULL)
|
|
exit(1);
|
|
|
|
+ res = chdir("/");
|
|
+ if (res == -1) {
|
|
+ fprintf(stderr, "%s: failed to chdir to '/'\n", progname);
|
|
+ exit(1);
|
|
+ }
|
|
+
|
|
umask(033);
|
|
if (unmount)
|
|
goto do_unmount;
|