diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2003-04-11 13:23:49 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2003-04-11 13:23:49 +0000 |
commit | d19bd8fe257c6f0d82d6ad7c37fcac7065d000c7 (patch) | |
tree | 1dc881b14cf1088a7e015750109b8db1de524efe /sal | |
parent | cb2db8b87865de492b4591840f010fe75d4b6b88 (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.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sal/osl/unx/security.c b/sal/osl/unx/security.c index 1de58130b457..f7bbe4970657 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)) |