diff options
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/security.cxx | 6 | ||||
-rw-r--r-- | sal/osl/unx/uunxapi.cxx | 8 | ||||
-rw-r--r-- | sal/rtl/bootstrap.cxx | 3 |
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)) { |