From: Po Lu Date: Sun, 6 Aug 2023 03:46:15 +0000 (+0800) Subject: Update Android port X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=669a4b96c374801faa137f43b4497b2ed6511104;p=emacs.git Update Android port * src/androidvfs.c (android_saf_tree_chmod): Repair file access permissions allowed within FLAGS. --- diff --git a/ChangeLog.android b/ChangeLog.android index d973dbcaf18..689482d2f1a 100644 --- a/ChangeLog.android +++ b/ChangeLog.android @@ -1,3 +1,8 @@ +2023-08-06 Po Lu + + * src/androidvfs.c (android_saf_tree_chmod): Repair file access + permissions allowed within FLAGS. + 2023-08-05 Po Lu * doc/lispref/commands.texi (Touchscreen Events): Fix typo. diff --git a/src/androidvfs.c b/src/androidvfs.c index 0d99116c75c..dc5097f463e 100644 --- a/src/androidvfs.c +++ b/src/androidvfs.c @@ -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; }