summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2003-04-11 13:23:49 +0000
committerVladimir Glazounov <vg@openoffice.org>2003-04-11 13:23:49 +0000
commitc0ecce64cea28ebc582db5bcfe88436f9634e84b (patch)
treeface50ba2c031e96d7372e2080af4ebed9c934dd /sal
parent86f5d6c35f6649f4eee463776d6377bbabc05f06 (diff)
INTEGRATION: CWS sal01 (1.5.30.1.8); FILE MERGED
2003/04/01 13:28:31 hro 1.5.30.1.8.1: #106576# Don't use environment variable /home/hr93777 to retrieve home directory on solaris
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/security.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sal/osl/unx/security.c b/sal/osl/unx/security.c
index 861d65596..4db483736 100644
--- a/sal/osl/unx/security.c
+++ b/sal/osl/unx/security.c
@@ -2,9 +2,9 @@
*
* $RCSfile: security.c,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: hr $ $Date: 2003-03-26 16:46:05 $
+ * last change: $Author: vg $ $Date: 2003-04-11 14:23:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -959,7 +959,12 @@ sal_Bool SAL_CALL osl_psz_getHomeDir(oslSecurity Security, sal_Char* pszDirector
/* if current user, check also environment for HOME */
if (getuid() == pSecImpl->m_pPasswd.pw_uid)
{
- sal_Char *pStr = getenv("HOME");
+ sal_Char *pStr;
+#ifdef SOLARIS
+ pStr = getpwuid(getuid())->pw_dir;
+#else
+ pStr = getenv("HOME");
+#endif
if ((pStr != NULL) && (strlen(pStr) > 0) &&
(access(pStr, 0) == 0))