cwfs: allow "none" user to rename files
This commit is contained in:
parent
51eaebf4f0
commit
b4b2cd72b0
1 changed files with 0 additions and 5 deletions
|
@ -1506,16 +1506,11 @@ fs_wstat(Chan* chan, Fcall* f, Fcall*, char* strs)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the file.
|
* Get the file.
|
||||||
* If user 'none' (uid == 0), can't do anything;
|
|
||||||
* if filesystem is read-only, can't change anything.
|
* if filesystem is read-only, can't change anything.
|
||||||
*/
|
*/
|
||||||
if((file = filep(chan, f->fid, 0)) == nil)
|
if((file = filep(chan, f->fid, 0)) == nil)
|
||||||
return Efid;
|
return Efid;
|
||||||
p = p1 = nil;
|
p = p1 = nil;
|
||||||
if(file->uid == 0){
|
|
||||||
error = Eaccess;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
if(file->fs->dev->type == Devro){
|
if(file->fs->dev->type == Devro){
|
||||||
error = Eronly;
|
error = Eronly;
|
||||||
goto out;
|
goto out;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue