desktop/unx/source/start.c | 9 +++++++-- sal/osl/unx/pipe.cxx | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-)
New commits: commit 39c3b7e39f76a2aacf4c1b659f98c0fe897dc396 Author: Hank Leininger <[email protected]> Date: Fri Feb 26 20:23:03 2016 -0500 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 <[email protected]> Reviewed-by: jan iversen <[email protected]> (cherry picked from commit 87c011134031374cf9104ec2fc39ef121d8a6802) Reviewed-on: https://gerrit.libreoffice.org/22829 Reviewed-by: Stephan Bergmann <[email protected]> diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c index 525fe22..b072f0f 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 ); diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx index b598ddc..1295ecf 100644 --- a/sal/osl/unx/pipe.cxx +++ b/sal/osl/unx/pipe.cxx @@ -166,11 +166,11 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions bool bNameTooLong = false; oslPipe pPipe; - if (access(PIPEDEFAULTPATH, R_OK|W_OK) == 0) + if (access(PIPEDEFAULTPATH, W_OK) == 0) { strncpy(name, PIPEDEFAULTPATH, sizeof(name)); } - else if (access(PIPEALTERNATEPATH, R_OK|W_OK) == 0) + else if (access(PIPEALTERNATEPATH, W_OK) == 0) { strncpy(name, PIPEALTERNATEPATH, sizeof(name)); } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
