ShellExec::execute: nothing passes an nFlags of 42 anymore
42 was never a flag value. SystemShellExecuteFlags publishes DEFAULTS 0, NO_SYSTEM_ERROR_MESSAGE 1 and URIS_ONLY 2, and 42 needs bits 2, 8 and 32. It was a private signal meaning the parameter is already quoted. since: commitc582b21de9Date: Wed Jul 11 14:04:25 2007 +0000 INTEGRATION: CWS stclient (1.16.22); FILE MERGED 2007/07/03 07:43:38 obr 1.16.22.1: #b6573281# the answer to all questions the only caller arrived the same day inc61477eea7, a Solaris Service Tags startup job in framework/source/jobs/shelljob.cxx. It defined the number as ANSWER_TO_ALL_QUESTIONS and carried the comment explaining it, which is why a bare 42 was all that was left here. the job moved to osl_executeProcess in January 2008 in5629b13246, and the wrapper it drove went in6b8e02c741, "Kill Sun-specific stclient_wrapper". unreachable regardless since URIS_ONLY took the value 2 ind4b67611c4, because 42 & 2 is 2 and so the URIS_ONLY test above it diverts any caller passing 42. so always escape the parameter and drop the unused branch Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com> Change-Id: I6f95a0a6a1ff7d39456b999c11f8aa91e36833c0 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12883 Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com> Tested-by: Jenkins CPCI <releng@collaboraoffice.com> (cherry picked from commit 0e4a3baffc249372706508681977a9c486e4d73f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211109 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
committed by
Xisco Fauli
parent
397519e8d8
commit
449bf4afc0
@@ -229,10 +229,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
|
||||
aBuffer.append("--args ");
|
||||
}
|
||||
#endif
|
||||
if( nFlags != 42 )
|
||||
escapeForShell(aBuffer, OUStringToOString(aParameter, osl_getThreadTextEncoding()));
|
||||
else
|
||||
aBuffer.append(OUStringToOString(aParameter, osl_getThreadTextEncoding()));
|
||||
escapeForShell(aBuffer, OUStringToOString(aParameter, osl_getThreadTextEncoding()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user