Changeset 27514 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Mar 19, 2010 2:21:03 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstRTProcCreateEx.cpp
r27509 r27514 75 75 }; 76 76 77 77 78 static int tstRTCreateProcEx5Child(int argc, char **argv) 78 79 { … … 139 140 } 140 141 141 static void tstRTCreateProcEx5( void)142 { 143 RTTestISub ("Impersonation (as user \"test\")");142 static void tstRTCreateProcEx5(const char *pszUser, const char *pszPassword) 143 { 144 RTTestISubF("As user \"%s\" with password \"%s\"", pszUser, pszPassword); 144 145 145 146 const char * apszArgs[3] = … … 152 153 RTPROCESS hProc; 153 154 RTTESTI_CHECK_RC_RETV(RTProcCreateEx(g_szExecName, apszArgs, RTENV_DEFAULT, 0 /*fFlags*/, NULL, 154 NULL, NULL, "testcase", "test", &hProc), VINF_SUCCESS);155 NULL, NULL, pszUser, pszPassword, &hProc), VINF_SUCCESS); 155 156 RTPROCSTATUS ProcStatus = { -1, RTPROCEXITREASON_ABEND }; 156 157 RTTESTI_CHECK_RC(RTProcWait(hProc, RTPROCWAIT_FLAGS_BLOCK, &ProcStatus), VINF_SUCCESS); … … 412 413 if (argc == 2 && !strcmp(argv[1], "--testcase-child-5")) 413 414 return tstRTCreateProcEx5Child(argc, argv); 415 const char *pszAsUser = NULL; 416 const char *pszPassword = NULL; 414 417 if (argc != 1) 415 return 99; 418 { 419 if (argc != 4 || strcmp(argv[1], "--as-user")) 420 return 99; 421 pszAsUser = argv[2]; 422 pszPassword = argv[4]; 423 } 416 424 417 425 RTTEST hTest; … … 431 439 tstRTCreateProcEx3(); 432 440 tstRTCreateProcEx4(); 433 /** @todo Do not run tstRTCreateProcEx5 on NT4, may not work (?) */ 434 tstRTCreateProcEx5(); 441 if (pszAsUser) 442 { 443 /** @todo Do not run tstRTCreateProcEx5 on NT4, may not work (?) */ 444 tstRTCreateProcEx5(pszAsUser, pszPassword); 445 } 435 446 /** @todo Cover files, ++ */ 436 447
Note:
See TracChangeset
for help on using the changeset viewer.