vfs: modify nuttx file access permission check

N/A

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Change-Id: Iac3541f05fae7cb505701ee07ab351f352ba1583
This commit is contained in:
yinshengkai
2021-09-16 15:17:06 +08:00
parent c74bb5ccec
commit 169966fff9
2 changed files with 0 additions and 10 deletions
-5
View File
@@ -118,11 +118,6 @@ static int chstat(FAR const char *path,
/* Adjust and check buf and flags */
if ((flags & CH_STAT_MODE) && (buf->st_mode & ~07777))
{
goto errout;
}
if ((flags & CH_STAT_UID) && buf->st_uid == -1)
{
flags &= ~CH_STAT_UID;
-5
View File
@@ -112,11 +112,6 @@ int file_fchstat(FAR struct file *filep, FAR struct stat *buf, int flags)
/* Adjust and check buf and flags */
if ((flags & CH_STAT_MODE) && (buf->st_mode & ~07777))
{
return -EINVAL;
}
if ((flags & CH_STAT_UID) && buf->st_uid == -1)
{
flags &= ~CH_STAT_UID;