diff options
author | Jesse Hall <jessehall@google.com> | 2017-01-12 14:56:17 -0800 |
---|---|---|
committer | Dimitry Ivanov <dimitry@google.com> | 2017-02-02 11:36:14 -0800 |
commit | e7005979c2ba01e13d75df218c0bc07ea71a479b (patch) | |
tree | ab528b2a4092ae4981acb875ad2b9e48f76d36a6 /libnativeloader | |
parent | b75d82b42a52faa66a6c00d46bf0de6391c95db4 (diff) | |
download | system_core-e7005979c2ba01e13d75df218c0bc07ea71a479b.tar.gz system_core-e7005979c2ba01e13d75df218c0bc07ea71a479b.tar.bz2 system_core-e7005979c2ba01e13d75df218c0bc07ea71a479b.zip |
dlext_namespace.h: Declare android_get_LD_LIBRARY_PATH
This allows clients creating their own namespace do so by modifying
the default library path, rather than hardcoding it multiple places in
the system.
Bug: 33531483
Test: build
Change-Id: I321e219392b38c235b220986e1520b49a4669863
(cherry picked from commit 823c266a8a9d9db9654103456a7b759358ce4e10)
Diffstat (limited to 'libnativeloader')
-rw-r--r-- | libnativeloader/include/nativeloader/dlext_namespaces.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libnativeloader/include/nativeloader/dlext_namespaces.h b/libnativeloader/include/nativeloader/dlext_namespaces.h index 13a44e2bf..02e7075d7 100644 --- a/libnativeloader/include/nativeloader/dlext_namespaces.h +++ b/libnativeloader/include/nativeloader/dlext_namespaces.h @@ -86,6 +86,19 @@ extern struct android_namespace_t* android_create_namespace(const char* name, const char* permitted_when_isolated_path, android_namespace_t* parent); +/* + * Get the default library search path. + * The path will be copied into buffer, which must have space for at least + * buffer_size chars. Elements are separated with ':', and the path will always + * be null-terminated. + * + * If buffer_size is too small to hold the entire default search path and the + * null terminator, this function will abort. There is currently no way to find + * out what the required buffer size is. At the time of this writing, PATH_MAX + * is sufficient and used by all callers of this function. + */ +extern void android_get_LD_LIBRARY_PATH(char* buffer, size_t buffer_size); + __END_DECLS #endif /* __ANDROID_DLEXT_NAMESPACES_H__ */ |