Browse Source
Merge pull request #843 from trapexit/policyfixes
msp policies: used wrong path to check existance
pull/844/head
trapexit
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
3 additions and
6 deletions
-
src/policy_msplfs.cpp
-
src/policy_msplus.cpp
-
src/policy_mspmfs.cpp
|
@ -42,7 +42,6 @@ namespace msplfs |
|
|
{ |
|
|
{ |
|
|
int rv; |
|
|
int rv; |
|
|
uint64_t lfs; |
|
|
uint64_t lfs; |
|
|
string fusepath; |
|
|
|
|
|
fs::info_t info; |
|
|
fs::info_t info; |
|
|
const Branch *branch; |
|
|
const Branch *branch; |
|
|
const string *basepath; |
|
|
const string *basepath; |
|
@ -55,7 +54,7 @@ namespace msplfs |
|
|
|
|
|
|
|
|
if(branch->ro_or_nc()) |
|
|
if(branch->ro_or_nc()) |
|
|
error_and_continue(*err_,EROFS); |
|
|
error_and_continue(*err_,EROFS); |
|
|
if(!fs::exists(branch->path,fusepath)) |
|
|
|
|
|
|
|
|
if(!fs::exists(branch->path,fusepath_)) |
|
|
error_and_continue(*err_,ENOENT); |
|
|
error_and_continue(*err_,ENOENT); |
|
|
rv = fs::info(branch->path,&info); |
|
|
rv = fs::info(branch->path,&info); |
|
|
if(rv == -1) |
|
|
if(rv == -1) |
|
|
|
@ -42,7 +42,6 @@ namespace msplus |
|
|
{ |
|
|
{ |
|
|
int rv; |
|
|
int rv; |
|
|
uint64_t lus; |
|
|
uint64_t lus; |
|
|
string fusepath; |
|
|
|
|
|
fs::info_t info; |
|
|
fs::info_t info; |
|
|
const Branch *branch; |
|
|
const Branch *branch; |
|
|
const string *basepath; |
|
|
const string *basepath; |
|
@ -55,7 +54,7 @@ namespace msplus |
|
|
|
|
|
|
|
|
if(branch->ro_or_nc()) |
|
|
if(branch->ro_or_nc()) |
|
|
error_and_continue(*err_,EROFS); |
|
|
error_and_continue(*err_,EROFS); |
|
|
if(!fs::exists(branch->path,fusepath)) |
|
|
|
|
|
|
|
|
if(!fs::exists(branch->path,fusepath_)) |
|
|
error_and_continue(*err_,ENOENT); |
|
|
error_and_continue(*err_,ENOENT); |
|
|
rv = fs::info(branch->path,&info); |
|
|
rv = fs::info(branch->path,&info); |
|
|
if(rv == -1) |
|
|
if(rv == -1) |
|
|
|
@ -42,7 +42,6 @@ namespace mspmfs |
|
|
{ |
|
|
{ |
|
|
int rv; |
|
|
int rv; |
|
|
uint64_t mfs; |
|
|
uint64_t mfs; |
|
|
string fusepath; |
|
|
|
|
|
fs::info_t info; |
|
|
fs::info_t info; |
|
|
const Branch *branch; |
|
|
const Branch *branch; |
|
|
const string *basepath; |
|
|
const string *basepath; |
|
@ -55,7 +54,7 @@ namespace mspmfs |
|
|
|
|
|
|
|
|
if(branch->ro_or_nc()) |
|
|
if(branch->ro_or_nc()) |
|
|
error_and_continue(*err_,EROFS); |
|
|
error_and_continue(*err_,EROFS); |
|
|
if(!fs::exists(branch->path,fusepath)) |
|
|
|
|
|
|
|
|
if(!fs::exists(branch->path,fusepath_)) |
|
|
error_and_continue(*err_,ENOENT); |
|
|
error_and_continue(*err_,ENOENT); |
|
|
rv = fs::info(branch->path,&info); |
|
|
rv = fs::info(branch->path,&info); |
|
|
if(rv == -1) |
|
|
if(rv == -1) |
|
|