summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2022-01-09 00:40:43 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2022-01-19 10:50:35 +0100
commitad5563b4f210b32bcdd7a2efb167ce2c2745f9db (patch)
tree5e193a9885010ce12107cf4a46939fa2e61ff52b /sal
parent599cbdb9c2a1184680bb89aa2978e8003eca93d9 (diff)
WASM setup as non-multiuser, desktop build
Change-Id: I2ee6e006554cf1e5e5e42c2f4f73d8788bff8f4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128585 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/security.cxx6
-rw-r--r--sal/osl/unx/uunxapi.cxx8
-rw-r--r--sal/rtl/bootstrap.cxx3
3 files changed, 13 insertions, 4 deletions
diff --git a/sal/osl/unx/security.cxx b/sal/osl/unx/security.cxx
index f6fc52ce5398..f541c90001b3 100644
--- a/sal/osl/unx/security.cxx
+++ b/sal/osl/unx/security.cxx
@@ -127,7 +127,7 @@ oslSecurity SAL_CALL osl_getCurrentSecurity()
if (p == nullptr) {
return nullptr;
}
-#if defined(IOS) && defined(X86_64)
+#if (defined(IOS) && defined(X86_64)) || defined(EMSCRIPTEN)
// getpwuid_r() does not work in the iOS simulator
(void) found;
char * buffer = p->m_buffer;
@@ -140,10 +140,13 @@ oslSecurity SAL_CALL osl_getCurrentSecurity()
buffer += strlen(buffer) + 1;
p->m_pPasswd.pw_uid = geteuid();
p->m_pPasswd.pw_gid = getegid();
+#if !defined(EMSCRIPTEN)
p->m_pPasswd.pw_change = 0;
strcpy(buffer, "");
p->m_pPasswd.pw_class = buffer;
buffer += strlen(buffer) + 1;
+ p->m_pPasswd.pw_expire = 0;
+#endif
strcpy(buffer, "Mobile User");
p->m_pPasswd.pw_gecos = buffer;
buffer += strlen(buffer) + 1;
@@ -153,7 +156,6 @@ oslSecurity SAL_CALL osl_getCurrentSecurity()
strcpy(buffer, "");
p->m_pPasswd.pw_shell = buffer;
buffer += strlen(buffer) + 1;
- p->m_pPasswd.pw_expire = 0;
return p;
#else
switch (getpwuid_r(getuid(), &p->m_pPasswd, p->m_buffer, n, &found)) {
diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx
index 917476d7ab03..eaa902839428 100644
--- a/sal/osl/unx/uunxapi.cxx
+++ b/sal/osl/unx/uunxapi.cxx
@@ -214,8 +214,12 @@ template<> OUString fromOString(OString const & s)
template<typename T> bool realpath_(const T& pstrFileName, T& ppstrResolvedName)
{
OString fn = toOString(pstrFileName);
-#ifdef ANDROID
+#if defined ANDROID || defined(EMSCRIPTEN)
+#if defined ANDROID
if (fn == "/assets" || fn.startsWith("/assets/"))
+#else
+ if (fn == "/instdir" || fn.startsWith("/instdir/"))
+#endif
{
if (osl::access(fn, F_OK) == -1)
return false;
@@ -224,7 +228,7 @@ template<typename T> bool realpath_(const T& pstrFileName, T& ppstrResolvedName)
return true;
}
-#endif
+#endif // ANDROID || EMSCRIPTEN
#ifdef MACOSX
fn = macxp_resolveAliasAndConvert(fn);
diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx
index 93d1c5a11648..f2bb6d58a962 100644
--- a/sal/rtl/bootstrap.cxx
+++ b/sal/rtl/bootstrap.cxx
@@ -223,6 +223,9 @@ static OUString & getIniFileName_Impl()
// .apk (zip) archive as the /assets/rc file.
fileName = OUString("vnd.sun.star.pathname:/assets/rc");
resolvePathnameUrl(&fileName);
+#elif defined(EMSCRIPTEN)
+ fileName = OUString("vnd.sun.star.pathname:/instdir/program/sofficerc");
+ resolvePathnameUrl(&fileName);
#else
if (getFromCommandLineArgs("INIFILENAME", &fileName))
{