mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
vfs: modify nuttx file access permission check
N/A Signed-off-by: yinshengkai <yinshengkai@xiaomi.com> Change-Id: Iac3541f05fae7cb505701ee07ab351f352ba1583
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user