Update Android port

* src/androidvfs.c (android_saf_tree_chmod): Repair file access
permissions allowed within FLAGS.
This commit is contained in:
Po Lu 2023-08-06 11:46:15 +08:00
parent 2867f62484
commit 669a4b96c3
2 changed files with 9 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2023-08-06 Po Lu <luangruo@yahoo.com>
* src/androidvfs.c (android_saf_tree_chmod): Repair file access
permissions allowed within FLAGS.
2023-08-05 Po Lu <luangruo@yahoo.com>
* doc/lispref/commands.texi (Touchscreen Events): Fix typo.

View file

@ -5101,17 +5101,17 @@ static int
android_saf_tree_chmod (struct android_vnode *vnode, mode_t mode,
int flags)
{
/* Return EACCESS should MODE contain unusual bits besides S_IFDIR |
S_IRUSR | S_IXUSR. */
/* Return EACCESS should MODE contain unusual bits besides the
standard file access permissions. */
if (mode & ~(S_IFDIR | S_IRUSR | S_IXUSR))
if (mode & ~0777)
{
errno = EACCES;
return -1;
}
/* Otherwise, no further action is necessary, as SAF nodes already
pretend to be S_IFDIR | S_IRUSR | S_IXUSR. */
pretend to be S_IRUSR | S_IWUSR. */
return 0;
}