summaryrefslogtreecommitdiff
path: root/src/VBox/Runtime/r3/posix/process-creation-posix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Runtime/r3/posix/process-creation-posix.cpp')
-rw-r--r--src/VBox/Runtime/r3/posix/process-creation-posix.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/VBox/Runtime/r3/posix/process-creation-posix.cpp b/src/VBox/Runtime/r3/posix/process-creation-posix.cpp
index b79693b2e..6690baf58 100644
--- a/src/VBox/Runtime/r3/posix/process-creation-posix.cpp
+++ b/src/VBox/Runtime/r3/posix/process-creation-posix.cpp
@@ -105,9 +105,10 @@ static int rtCheckCredentials(const char *pszUser, const char *pszPasswd, gid_t
/* be reentrant */
struct crypt_data *data = (struct crypt_data*)RTMemTmpAllocZ(sizeof(*data));
char *pszEncPasswd = crypt_r(pszPasswd, pw->pw_passwd, data);
- if (strcmp(pszEncPasswd, pw->pw_passwd))
- return VERR_PERMISSION_DENIED;
+ int fCorrect = !strcmp(pszEncPasswd, pw->pw_passwd);
RTMemTmpFree(data);
+ if (!fCorrect)
+ return VERR_PERMISSION_DENIED;
*gid = pw->pw_gid;
*uid = pw->pw_uid;
@@ -264,7 +265,7 @@ RTR3DECL(int) RTProcCreateEx(const char *pszExec, const char * const *papszArg
*/
AssertPtrReturn(pszExec, VERR_INVALID_POINTER);
AssertReturn(*pszExec, VERR_INVALID_PARAMETER);
- AssertReturn(!(fFlags & ~(RTPROC_FLAGS_DETACHED | RTPROC_FLAGS_HIDDEN | RTPROC_FLAGS_SERVICE)), VERR_INVALID_PARAMETER);
+ AssertReturn(!(fFlags & ~(RTPROC_FLAGS_DETACHED | RTPROC_FLAGS_HIDDEN | RTPROC_FLAGS_SERVICE | RTPROC_FLAGS_SAME_CONTRACT | RTPROC_FLAGS_NO_PROFILE)), VERR_INVALID_PARAMETER);
AssertReturn(!(fFlags & RTPROC_FLAGS_DETACHED) || !phProcess, VERR_INVALID_PARAMETER);
AssertReturn(hEnv != NIL_RTENV, VERR_INVALID_PARAMETER);
const char * const *papszEnv = RTEnvGetExecEnvP(hEnv);