summaryrefslogtreecommitdiff
path: root/desktop/unx/source
diff options
context:
space:
mode:
authorHank Leininger <hlein@korelogic.com>2016-02-26 20:23:03 -0500
committerjan iversen <jani@documentfoundation.org>2016-03-02 08:17:13 +0000
commit87c011134031374cf9104ec2fc39ef121d8a6802 (patch)
tree40470e3a4e54dc0cb792378d36fe47e22380a7a3 /desktop/unx/source
parentf0c38c67e4a5d1b1fa58873f2db88310d8bf295a (diff)
tdf#98210 do not require R_OK for pipe dir
Also better error handling if pipe dirs are really not usable. Change-Id: I1c865b9a9f1f08d2cffd07343494feca585ec75e Reviewed-on: https://gerrit.libreoffice.org/22727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
Diffstat (limited to 'desktop/unx/source')
-rw-r--r--desktop/unx/source/start.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index 525fe22927e0..b072f0f01c25 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -323,10 +323,15 @@ get_pipe_path( rtl_uString *pAppPath )
if ( !pMd5hash )
rtl_uString_new( &pMd5hash );
- if ( access( PIPEDEFAULTPATH, R_OK|W_OK ) == 0 )
+ if ( access( PIPEDEFAULTPATH, W_OK ) == 0 )
rtl_uString_newFromAscii( &pResult, PIPEDEFAULTPATH );
- else
+ else if ( access( PIPEALTERNATEPATH, W_OK ) == 0 )
rtl_uString_newFromAscii( &pResult, PIPEALTERNATEPATH );
+ else
+ {
+ fprintf( stderr, "ERROR: no valid pipe path found.\n" );
+ exit( 1 );
+ }
rtl_uString_newFromAscii( &pTmp, "/OSL_PIPE_" );
rtl_uString_newConcat( &pResult, pResult, pTmp );