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.
This commit is contained in:
Po Lu 2024-08-07 09:17:57 +08:00
parent f0a7eec5a7
commit 679f7ccc49

View file

@ -2599,9 +2599,10 @@ android_content_name (struct android_vnode *vnode, char *name,
component_end++;
/* Now, find out if the first component is a special vnode; if so,
call its root lookup function with the rest of NAME there. */
call its root lookup function with the rest of NAME there. What is
more, content files are inaccessible in the absence of a GUI. */
if (api < 19)
if (api < 19 || !android_init_gui)
i = 3;
else if (api < 21)
i = 1;