mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-19 14:36:36 -05:00
platform specific code to deal with sete{u,g}id. closes #17
This commit is contained in:
parent
716453596a
commit
0e12d79659
39 changed files with 323 additions and 131 deletions
|
|
@ -22,6 +22,8 @@
|
|||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <fuse.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
|
@ -76,8 +78,9 @@ namespace mergerfs
|
|||
link(const char *from,
|
||||
const char *to)
|
||||
{
|
||||
const ugid::SetResetGuard ugid;
|
||||
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 -EPERM;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue