mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-20 06:56:27 -05:00
func_getattr_combine.cpp
This commit is contained in:
parent
a26adb222b
commit
a30f8fa953
1 changed files with 7 additions and 4 deletions
|
|
@ -40,10 +40,13 @@ Func2::GetAttrCombine::operator()(const Branches &branches_,
|
|||
continue;
|
||||
}
|
||||
|
||||
if(st_->st_uid == 0)
|
||||
st_->st_uid = tmp_st.st_uid;
|
||||
if(st_->st_gid == 0)
|
||||
st_->st_gid = tmp_st.st_gid;
|
||||
// This upgrades the uid:gid because mergerfs now does most
|
||||
// file interaction as root and relies on `default-permissions`
|
||||
// to manage permissions. If the
|
||||
if(tmp_st.st_uid == 0)
|
||||
st_->st_uid = 0;
|
||||
if(tmp_st.st_gid == 0)
|
||||
st_->st_gid = 0;
|
||||
st_->st_atim = TimeSpec::newest(st_->st_atim,tmp_st.st_atim);
|
||||
st_->st_ctim = TimeSpec::newest(st_->st_ctim,tmp_st.st_ctim);
|
||||
st_->st_mtim = TimeSpec::newest(st_->st_mtim,tmp_st.st_mtim);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue