mirror of
https://github.com/trapexit/mergerfs.git
synced 2024-11-25 17:57:41 +08:00
Merge pull request #643 from trapexit/ioctl_setuid
set uid & gid when calling ioctl
This commit is contained in:
commit
10e5829b8e
|
@ -107,12 +107,13 @@ namespace l
|
||||||
void *data_,
|
void *data_,
|
||||||
uint32_t *out_bufsz_)
|
uint32_t *out_bufsz_)
|
||||||
{
|
{
|
||||||
FileInfo *fi = reinterpret_cast<FileInfo*>(ffi_->fh);
|
FileInfo *fi = reinterpret_cast<FileInfo*>(ffi_->fh);
|
||||||
|
const fuse_context *fc = fuse_get_context();
|
||||||
|
const ugid::Set ugid(fc->uid,fc->gid);
|
||||||
|
|
||||||
return l::ioctl(fi->fd,cmd_,data_,out_bufsz_);
|
return l::ioctl(fi->fd,cmd_,data_,out_bufsz_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef O_NOATIME
|
#ifndef O_NOATIME
|
||||||
#define O_NOATIME 0
|
#define O_NOATIME 0
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user