mirror of
https://github.com/trapexit/mergerfs.git
synced 2025-06-21 04:41:25 +08:00
platform specific code to deal with sete{u,g}id. closes #17
This commit is contained in:
@ -22,6 +22,8 @@
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <fuse.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
@ -67,8 +69,9 @@ namespace mergerfs
|
||||
rename(const char *from,
|
||||
const char *to)
|
||||
{
|
||||
const ugid::SetResetGuard uid;
|
||||
const struct fuse_context *fc = fuse_get_context();
|
||||
const config::Config &config = config::get();
|
||||
const ugid::SetResetGuard ugid(fc->uid,fc->gid);
|
||||
|
||||
if(from == config.controlfile)
|
||||
return -ENOENT;
|
||||
|
Reference in New Issue
Block a user