summaryrefslogtreecommitdiff
path: root/src/VBox/Runtime/r3/posix/process-creation-posix.cpp
diff options
context:
space:
mode:
authorFelix Geyer <debfx-pkg@fobos.de>2011-06-28 12:27:03 +0200
committerFelix Geyer <debfx-pkg@fobos.de>2011-06-28 12:27:03 +0200
commit6a16f6900dd884e07125b51c9625f6be0a1f9b70 (patch)
treeca3a5bca20c886411320d15508fbd741cba63545 /src/VBox/Runtime/r3/posix/process-creation-posix.cpp
parent0056814bdb2f8a457b56803fd24c72347173250d (diff)
downloadvirtualbox-6a16f6900dd884e07125b51c9625f6be0a1f9b70.tar.gz
Imported Upstream version 4.0.10-dfsgupstream/4.0.10-dfsg
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);