aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2024-08-07 09:17:57 +0800
committerPo Lu2024-08-07 09:17:57 +0800
commit679f7ccc49f6300681309029f4e58cffe3e9ff1a (patch)
tree8b9a5911de974d71c87341eb63c9a47bc5af8fab
parentf0a7eec5a7ddd4a009d050b97acf29744d576e5d (diff)
downloademacs-679f7ccc49f6300681309029f4e58cffe3e9ff1a.tar.gz
emacs-679f7ccc49f6300681309029f4e58cffe3e9ff1a.zip
Prevent accesses to /content files without a GUI connection
* src/androidvfs.c (android_content_name): Hide all subdirectories when `android_init_gui' is not set.
-rw-r--r--src/androidvfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/androidvfs.c b/src/androidvfs.c
index bb855099c77..14da8eed37e 100644
--- a/src/androidvfs.c
+++ b/src/androidvfs.c
@@ -2599,9 +2599,10 @@ android_content_name (struct android_vnode *vnode, char *name,
2599 component_end++; 2599 component_end++;
2600 2600
2601 /* Now, find out if the first component is a special vnode; if so, 2601 /* Now, find out if the first component is a special vnode; if so,
2602 call its root lookup function with the rest of NAME there. */ 2602 call its root lookup function with the rest of NAME there. What is
2603 more, content files are inaccessible in the absence of a GUI. */
2603 2604
2604 if (api < 19) 2605 if (api < 19 || !android_init_gui)
2605 i = 3; 2606 i = 3;
2606 else if (api < 21) 2607 else if (api < 21)
2607 i = 1; 2608 i = 1;