Changeset 27576 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Mar 22, 2010 9:39:11 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 59101
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/Makefile.kmk
r27503 r27576 1023 1023 VBoxRT_LIBS.win = \ 1024 1024 $(PATH_SDK_W2K3DDK_LIB)/vccomsup.lib \ 1025 $(PATH_SDK_W2K3DDK_LIB)/wbemuuid.lib \ 1026 $(PATH_SDK_W2K3DDK_LIB)/Userenv.lib 1025 $(PATH_SDK_W2K3DDK_LIB)/wbemuuid.lib 1027 1026 VBoxRT_LDFLAGS.darwin = -framework IOKit -framework CoreFoundation -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxRT.dylib 1028 1027 ifdef VBOX_USE_VCC80 -
trunk/src/VBox/Runtime/testcase/Makefile.kmk
r27439 r27576 394 394 tstRTProcCreateEx_TEMPLATE = VBOXR3TSTEXE 395 395 tstRTProcCreateEx_SOURCES = tstRTProcCreateEx.cpp 396 tstRTProcCreateEx_LIBS.win += Secur32.lib397 396 398 397 tstRTProcWait_SOURCES = tstRTProcWait.cpp -
trunk/src/VBox/Runtime/testcase/tstRTProcCreateEx.cpp
r27555 r27576 83 83 84 84 #ifdef RT_OS_WINDOWS 85 # if 0 /** @todo Something here drags in Secur32.dll and prevents the testcase from being run on NT4. Add this stuff to IPRT and dynamically resolve the problematic bits, please. */86 85 char szUser[_1K]; 87 86 DWORD cbLen = sizeof(szUser); 88 87 /** @todo Does not yet handle ERROR_MORE_DATA for user names longer than 32767. */ 89 if (!GetUserName Ex(NameSamCompatible,szUser, &cbLen))90 { 91 RTPrintf("GetUserName Exfailed with last error=%ld\n", GetLastError());88 if (!GetUserName(szUser, &cbLen)) 89 { 90 RTPrintf("GetUserName failed with last error=%ld\n", GetLastError()); 92 91 return VERR_AUTHENTICATION_FAILURE; 93 92 } 94 93 else 95 94 { 95 /* Does not work on NT4 (yet). */ 96 #if 0 96 97 DWORD cbSid = 0; 97 98 DWORD cbDomain = 0; … … 134 135 RTMemFree(pSid); 135 136 RTMemFree(pszDomain); 136 } 137 # endif 137 #endif 138 } 138 139 #else 139 140 /** @todo Lookup UID/effective UID, maybe GID? */ … … 154 155 155 156 RTPROCESS hProc; 157 158 /* Test for invalid logons. */ 159 RTTESTI_CHECK_RC_RETV(RTProcCreateEx(g_szExecName, apszArgs, RTENV_DEFAULT, 0 /*fFlags*/, NULL, 160 NULL, NULL, "not-existing-user", "wrong-password", &hProc), VERR_LOGON_FAILURE); 161 /* Test for invalid application. */ 162 RTTESTI_CHECK_RC_RETV(RTProcCreateEx("not-existing-app", apszArgs, RTENV_DEFAULT, 0 /*fFlags*/, NULL, 163 NULL, NULL, NULL, NULL, &hProc), VERR_PATH_NOT_FOUND); 164 /* Test a (hopefully) valid user/password logon (given by parameters of this function). */ 156 165 RTTESTI_CHECK_RC_RETV(RTProcCreateEx(g_szExecName, apszArgs, RTENV_DEFAULT, 0 /*fFlags*/, NULL, 157 166 NULL, NULL, pszUser, pszPassword, &hProc), VINF_SUCCESS); … … 164 173 RTTestIPassed(NULL); 165 174 } 166 175 167 176 168 177 static int tstRTCreateProcEx4Child(int argc, char **argv) … … 422 431 return 99; 423 432 pszAsUser = argv[2]; 424 pszPassword = argv[ 4];433 pszPassword = argv[3]; 425 434 } 426 435 … … 442 451 tstRTCreateProcEx4(); 443 452 if (pszAsUser) 444 {445 /** @todo Do not run tstRTCreateProcEx5 on NT4, may not work (?) */446 453 tstRTCreateProcEx5(pszAsUser, pszPassword); 447 }448 454 /** @todo Cover files, ++ */ 449 455 -
trunk/src/VBox/Runtime/win/RTErrConvertFromWin32.cpp
r26344 r27576 191 191 case ERROR_CANCELLED: return VERR_CANCELLED; 192 192 case ERROR_DIRECTORY: return VERR_NOT_A_DIRECTORY; 193 194 case ERROR_LOGON_FAILURE: return VERR_LOGON_FAILURE; 193 195 194 196 /*
Note:
See TracChangeset
for help on using the changeset viewer.