| Allow non-root block device mounts when using external fuse. |
| |
| The internal libfuse has the ability to drop and restore privileges |
| using setresuid() when ntfs3g is installed with suid root. However, Chrome OS |
| does not install with suid root, but rather launches ntfs3g as a regular |
| user with the CAP_SYS_ADMIN capability. This renders the internal libfuse |
| privilege dropping code ineffective and unnecessary. Because of this, the |
| safety check to prevent unsafe use of ntfs3g compiled with external libfuse |
| can be removed, allowing ntfs3g to be compiled with external libfuse. |
| |
| --- ntfs-3g_ntfsprogs-2017.3.23/src/ntfs-3g.c |
| +++ ntfs-3g_ntfsprogs-2017.3.23_new/src/ntfs-3g.c |
| @@ -4174,7 +4174,8 @@ |
| ctx->blkdev = TRUE; |
| #endif |
| |
| -#ifndef FUSE_INTERNAL |
| +/* #if FUSE_INTERNAL */ |
| +#if 0 |
| if (getuid() && ctx->blkdev) { |
| ntfs_log_error("%s", unpriv_fuseblk_msg); |
| err = NTFS_VOLUME_NO_PRIVILEGE; |