Browse Source

set uid & gid when calling ioctl

Turns out certain ioctl calls check the effective user id (FS_IOC_SETFLAGS).
pull/643/head
Antonio SJ Musumeci 5 years ago
parent
commit
4c4c27a93e
  1. 3
      src/fuse_ioctl.cpp

3
src/fuse_ioctl.cpp

@ -108,11 +108,12 @@ namespace l
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…
Cancel
Save