set uid & gid when calling ioctl

Turns out certain ioctl calls check the effective user id (FS_IOC_SETFLAGS).
This commit is contained in:
Antonio SJ Musumeci 2019-06-17 13:37:15 -04:00
parent 72ac1fc0d1
commit 4c4c27a93e

View File

@ -107,12 +107,13 @@ namespace l
void *data_,
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_);
}
#ifndef O_NOATIME
#define O_NOATIME 0
#endif