summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/security.cxx7
-rw-r--r--sal/osl/w32/security.c5
-rw-r--r--sal/util/sal.map5
3 files changed, 16 insertions, 1 deletions
diff --git a/sal/osl/unx/security.cxx b/sal/osl/unx/security.cxx
index 16a5f74cba36..c4d9d29fa405 100644
--- a/sal/osl/unx/security.cxx
+++ b/sal/osl/unx/security.cxx
@@ -66,7 +66,7 @@ static bool sysconf_SC_GETPW_R_SIZE_MAX(std::size_t * value) {
way and always set EINVAL, so be resilient here: */
return false;
} else {
- SAL_WARN_IF( m < 0 || (unsigned long) m >= std::numeric_limits<std::size_t>::max(), "sal.osl",
+ SAL_WARN_IF( m < 0 || (unsigned long) m >= std::numeric_limits<std::size_t>::max(), "sal.osl",
"m < 0 || (unsigned long) m >= std::numeric_limits<std::size_t>::max()");
*value = (std::size_t) m;
return true;
@@ -261,6 +261,11 @@ sal_Bool SAL_CALL osl_getUserName(oslSecurity Security, rtl_uString **ustrName)
return bRet;
}
+sal_Bool SAL_CALL osl_getShortUserName(oslSecurity Security, rtl_uString **ustrName)
+{
+ return osl_getUserName(Security, ustrName); // No domain name on unix
+}
+
static bool SAL_CALL osl_psz_getUserName(oslSecurity Security, sal_Char* pszName, sal_uInt32 nMax)
{
oslSecurityImpl *pSecImpl = static_cast<oslSecurityImpl *>(Security);
diff --git a/sal/osl/w32/security.c b/sal/osl/w32/security.c
index da13ce64665c..1d31eeffd9ba 100644
--- a/sal/osl/w32/security.c
+++ b/sal/osl/w32/security.c
@@ -424,6 +424,11 @@ sal_Bool SAL_CALL osl_getUserName(oslSecurity Security, rtl_uString **strName)
return getUserNameImpl(Security, strName, sal_True);
}
+sal_Bool SAL_CALL osl_getShortUserName(oslSecurity Security, rtl_uString **strName)
+{
+ return getUserNameImpl(Security, strName, sal_False);
+}
+
sal_Bool SAL_CALL osl_getHomeDir(oslSecurity Security, rtl_uString **pustrDirectory)
{
rtl_uString *ustrSysDir = NULL;
diff --git a/sal/util/sal.map b/sal/util/sal.map
index e3f920c7e33c..1ccac615b67f 100644
--- a/sal/util/sal.map
+++ b/sal/util/sal.map
@@ -690,6 +690,11 @@ LIBO_UDK_5.1 { # symbols available in >= LibO 5.1
rtl_uString_newReplaceFirstToAsciiL;
} LIBO_UDK_5.0;
+LIBO_UDK_5.2 { # symbols available in >= LibO 5.2
+ global:
+ osl_getShortUserName;
+} LIBO_UDK_5.1;
+
PRIVATE_1.0 {
global:
osl_detail_ObjectRegistry_storeAddresses;