diff --git a/client/cs_cmdline.cpp b/client/cs_cmdline.cpp index 33ead59ec0..3da68fff01 100644 --- a/client/cs_cmdline.cpp +++ b/client/cs_cmdline.cpp @@ -244,6 +244,7 @@ void CLIENT_STATE::parse_cmdline(int argc, char** argv) { config.suppress_net_info = true; } else if (ARG(unsigned_apps_ok)) { config.unsigned_apps_ok = true; + config.dont_check_file_sizes = true; } else if (ARG(update_prefs)) { if (i == argc-1) show_options = true; else safe_strcpy(update_prefs_url, argv[++i]); diff --git a/html/languages/translations/de.po b/html/languages/translations/de.po index 8a394f29cd..cb5edb4ae9 100644 --- a/html/languages/translations/de.po +++ b/html/languages/translations/de.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: BOINC Project (Generic) 6.x\n" "Report-Msgid-Bugs-To: BOINC translation team \n" "POT-Creation-Date: 2013-11-08 00:00 PST\n" -"PO-Revision-Date: 2013-10-30 20:04+0000\n" +"PO-Revision-Date: 2013-11-13 20:17+0000\n" "Last-Translator: Christian \n" "Language-Team: BOINC Development Team \n" "Language: de\n" @@ -20,7 +20,7 @@ msgstr "" "X-BOINC-UTF8-Marker: 简体中文, 日本語\n" "X-Poedit-SearchPath-0: html\\user\n" "X-Poedit-Basepath: C:\\Src\\BOINCSVN\\trunk\\boinc\n" -"X-POOTLE-MTIME: 1383163461.0\n" +"X-POOTLE-MTIME: 1384373822.0\n" # The name of this language in this language msgid "LANG_NAME_NATIVE" @@ -1220,7 +1220,7 @@ msgstr "Benutze Nvidia GPU %1 Unterstützt ab Version 6.10 %2" #: ../inc/prefs.inc:344 msgid "Use Intel GPU %1 Enforced by version 7.2+ %2" -msgstr "" +msgstr "Benutze Intel GPU %1 Unterstützt ab Version 7.2 %2" #: ../inc/prefs.inc:358 msgid "" diff --git a/lib/boinc_win.h b/lib/boinc_win.h index f51ff3df6d..077a00b783 100644 --- a/lib/boinc_win.h +++ b/lib/boinc_win.h @@ -86,6 +86,9 @@ #ifndef _WIN32_IE #define _WIN32_IE 0x0501 #endif +#ifndef SECURITY_WIN32 +#define SECURITY_WIN32 +#endif #include #include @@ -94,6 +97,7 @@ #include #include #include +#include #if !defined(__CYGWIN32__) || defined(USE_WINSOCK) diff --git a/lib/run_app_windows.cpp b/lib/run_app_windows.cpp index b283e7cdad..4956d5bdd8 100644 --- a/lib/run_app_windows.cpp +++ b/lib/run_app_windows.cpp @@ -35,6 +35,112 @@ HANDLE sandbox_account_interactive_token = NULL; HANDLE sandbox_account_service_token = NULL; +/*++ +This function attempts to obtain a SID representing the supplied +account on the supplied system. + +If the function succeeds, the return value is TRUE. A buffer is +allocated which contains the SID representing the supplied account. +This buffer should be freed when it is no longer needed by calling +HeapFree(GetProcessHeap(), 0, buffer) + +If the function fails, the return value is FALSE. Call GetLastError() +to obtain extended error information. + +Scott Field (sfield) 12-Jul-95 +--*/ + +BOOL +GetAccountSid( + LPCSTR SystemName, + LPCSTR AccountName, + PSID *Sid + ) +{ + LPSTR ReferencedDomain=NULL; + DWORD cbSid=128; // initial allocation attempt + DWORD cchReferencedDomain=16; // initial allocation size + SID_NAME_USE peUse; + BOOL bSuccess=FALSE; // assume this function will fail + + try + { + // + // initial memory allocations + // + *Sid = (PSID)HeapAlloc(GetProcessHeap(), 0, cbSid); + + if(*Sid == NULL) throw; + + ReferencedDomain = (LPSTR)HeapAlloc( + GetProcessHeap(), + 0, + cchReferencedDomain * sizeof(CHAR) + ); + + if(ReferencedDomain == NULL) throw; + + // + // Obtain the SID of the specified account on the specified system. + // + while(!LookupAccountNameA( + SystemName, // machine to lookup account on + AccountName, // account to lookup + *Sid, // SID of interest + &cbSid, // size of SID + ReferencedDomain, // domain account was found on + &cchReferencedDomain, + &peUse + )) { + if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) { + // + // reallocate memory + // + *Sid = (PSID)HeapReAlloc( + GetProcessHeap(), + 0, + *Sid, + cbSid + ); + if(*Sid == NULL) throw; + + ReferencedDomain = (LPSTR)HeapReAlloc( + GetProcessHeap(), + 0, + ReferencedDomain, + cchReferencedDomain * sizeof(CHAR) + ); + if(ReferencedDomain == NULL) throw; + } + else throw; + } + + // + // Indicate success. + // + bSuccess = TRUE; + + } // try + catch(...) + { + // + // Cleanup and indicate failure, if appropriate. + // + + HeapFree(GetProcessHeap(), 0, ReferencedDomain); + + if(!bSuccess) { + if(*Sid != NULL) { + HeapFree(GetProcessHeap(), 0, *Sid); + *Sid = NULL; + } + } + } // finally + + return bSuccess; +} + + void get_sandbox_account_interactive_token() { FILE* f; char buf[256]; @@ -45,7 +151,6 @@ void get_sandbox_account_interactive_token() { std::string password_str; int retval = 0; static bool first = true; - PSID sandbox_account_sid = NULL; if (!first) return; first = false; @@ -76,9 +181,6 @@ void get_sandbox_account_interactive_token() { LOGON32_PROVIDER_DEFAULT, &sandbox_account_interactive_token ); - if (retval) { - GetAccountSid(domainname_str.c_str(), username_str.c_str(), &sandbox_account_sid); - } } else { username_str = encoded_username_str; retval = LogonUserA( @@ -89,28 +191,30 @@ void get_sandbox_account_interactive_token() { LOGON32_PROVIDER_DEFAULT, &sandbox_account_interactive_token ); - if (retval) { - GetAccountSid(NULL, username_str.c_str(), &sandbox_account_sid); - } } if (!retval) { sandbox_account_interactive_token = NULL; - sandbox_account_sid = NULL; } else { - // Adjust the permissions on the current desktop and window station - // to allow the sandbox user account to create windows and such. - // - if (!AddAceToWindowStation(GetProcessWindowStation(), sandbox_account_sid)) { - fprintf(stderr, "Failed to add ACE to current WindowStation\n"); - } - if (!AddAceToDesktop(GetThreadDesktop(GetCurrentThreadId()), sandbox_account_sid)) { - fprintf(stderr, "Failed to add ACE to current Desktop\n"); - } + + } } void get_sandbox_account_service_token() { + ACCESS_ALLOWED_ACE *pace1 = NULL; + ACCESS_ALLOWED_ACE *pace2 = NULL; + ACL_SIZE_INFORMATION aclSizeInfo; + DWORD dwNewAclSize; + PACL pOldAcl = NULL; + PACL pNewAcl = NULL; + PSID pBOINCProjectSID = NULL; + PSID pBOINCMasterSID = NULL; + PTOKEN_DEFAULT_DACL pTokenDefaultDACL = NULL; + PVOID pTempAce; + DWORD dwSize = 0; + DWORD dwSizeNeeded = 0; + LPTSTR pszUserName = NULL; FILE* f; char buf[256]; std::string encoded_username_str; @@ -150,6 +254,9 @@ void get_sandbox_account_service_token() { LOGON32_PROVIDER_DEFAULT, &sandbox_account_service_token ); + if (retval) { + GetAccountSid(domainname_str.c_str(), username_str.c_str(), &pBOINCProjectSID); + } } else { username_str = encoded_username_str; retval = LogonUserA( @@ -160,10 +267,269 @@ void get_sandbox_account_service_token() { LOGON32_PROVIDER_DEFAULT, &sandbox_account_service_token ); + if (retval) { + GetAccountSid(NULL, username_str.c_str(), &pBOINCProjectSID); + } } if (!retval) { sandbox_account_service_token = NULL; + } else { + + try + { + // Obtain the current user name. + + dwSize = 0; + dwSizeNeeded = 0; + if (!GetUserNameEx( + NameSamCompatible, + pszUserName, + &dwSize) + ) + if (GetLastError() == ERROR_MORE_DATA) + { + pszUserName = (LPTSTR)HeapAlloc( + GetProcessHeap(), + HEAP_ZERO_MEMORY, + dwSize + 1); + + if (pszUserName == NULL) + throw; + + if (!GetUserNameEx( + NameSamCompatible, + pszUserName, + &dwSize) + ) + throw; + } + else + throw; + + // Obtain the SID for the current user name. + + if (!GetAccountSid( + NULL, + pszUserName, + &pBOINCMasterSID) + ) + throw; + + // Obtain the DACL for the service token. + + dwSize = 0; + dwSizeNeeded = 0; + if (!GetTokenInformation( + sandbox_account_service_token, + TokenDefaultDacl, + NULL, + dwSize, + &dwSizeNeeded) + ) + if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) + { + pTokenDefaultDACL = (PTOKEN_DEFAULT_DACL)HeapAlloc( + GetProcessHeap(), + HEAP_ZERO_MEMORY, + dwSizeNeeded); + + if (pTokenDefaultDACL == NULL) + throw; + + dwSize = dwSizeNeeded; + + if (!GetTokenInformation( + sandbox_account_service_token, + TokenDefaultDacl, + pTokenDefaultDACL, + dwSize, + &dwSizeNeeded) + ) + throw; + } + else + throw; + + // + pOldAcl = pTokenDefaultDACL->DefaultDacl; + + // Initialize the ACL. + + ZeroMemory(&aclSizeInfo, sizeof(ACL_SIZE_INFORMATION)); + aclSizeInfo.AclBytesInUse = sizeof(ACL); + + // Call only if the DACL is not NULL. + + if (pOldAcl != NULL) + { + // get the file ACL size info + if (!GetAclInformation( + pOldAcl, + (LPVOID)&aclSizeInfo, + sizeof(ACL_SIZE_INFORMATION), + AclSizeInformation) + ) + throw; + } + + // Compute the size of the new ACL. + + dwNewAclSize = aclSizeInfo.AclBytesInUse + + (2*sizeof(ACCESS_ALLOWED_ACE)) + + (2*GetLengthSid(pBOINCProjectSID)) + + (2*GetLengthSid(pBOINCMasterSID)); + + // Allocate memory for the new ACL. + + pNewAcl = (PACL)HeapAlloc( + GetProcessHeap(), + HEAP_ZERO_MEMORY, + dwNewAclSize); + + if (pNewAcl == NULL) + throw; + + // Initialize the new DACL. + + if (!InitializeAcl(pNewAcl, dwNewAclSize, ACL_REVISION)) + throw; + + // If DACL is present, copy it to a new DACL. + + if (pOldAcl) + { + // Copy the ACEs to the new ACL. + if (aclSizeInfo.AceCount) + { + for (unsigned int i=0; i < aclSizeInfo.AceCount; i++) + { + // Get an ACE. + if (!GetAce(pOldAcl, i, &pTempAce)) + throw; + + // Add the ACE to the new ACL. + if (!AddAce( + pNewAcl, + ACL_REVISION, + MAXDWORD, + pTempAce, + ((PACE_HEADER)pTempAce)->AceSize) + ) + throw; + } + } + } + + // Add the first ACE to the process. + + pace1 = (ACCESS_ALLOWED_ACE *)HeapAlloc( + GetProcessHeap(), + HEAP_ZERO_MEMORY, + sizeof(ACCESS_ALLOWED_ACE) + GetLengthSid(pBOINCProjectSID) - sizeof(DWORD) + ); + + if (pace1 == NULL) + throw; + + pace1->Header.AceType = ACCESS_ALLOWED_ACE_TYPE; + pace1->Header.AceFlags = CONTAINER_INHERIT_ACE | + INHERIT_ONLY_ACE | + OBJECT_INHERIT_ACE; + pace1->Header.AceSize = (WORD)sizeof(ACCESS_ALLOWED_ACE) + + (WORD)GetLengthSid(pBOINCProjectSID) - + (WORD)sizeof(DWORD); + pace1->Mask = PROCESS_ALL_ACCESS; + + if (!CopySid(GetLengthSid(pBOINCProjectSID), &pace1->SidStart, pBOINCProjectSID)) + throw; + + // Add an ACE to the process. + + if (!AddAce( + pNewAcl, + ACL_REVISION, + MAXDWORD, + (LPVOID)pace1, + pace1->Header.AceSize) + ) + throw; + + // Add the second ACE to the process. + + pace2 = (ACCESS_ALLOWED_ACE *)HeapAlloc( + GetProcessHeap(), + HEAP_ZERO_MEMORY, + sizeof(ACCESS_ALLOWED_ACE) + GetLengthSid(pBOINCMasterSID) - sizeof(DWORD) + ); + + if (pace2 == NULL) + throw; + + pace2->Header.AceType = ACCESS_ALLOWED_ACE_TYPE; + pace2->Header.AceFlags = CONTAINER_INHERIT_ACE | + INHERIT_ONLY_ACE | + OBJECT_INHERIT_ACE; + pace2->Header.AceSize = (WORD)sizeof(ACCESS_ALLOWED_ACE) + + (WORD)GetLengthSid(pBOINCMasterSID) - + (WORD)sizeof(DWORD); + pace2->Mask = PROCESS_ALL_ACCESS; + + if (!CopySid(GetLengthSid(pBOINCMasterSID), &pace2->SidStart, pBOINCMasterSID)) + throw; + + // Add an ACE to the process. + + if (!AddAce( + pNewAcl, + ACL_REVISION, + MAXDWORD, + (LPVOID)pace2, + pace2->Header.AceSize) + ) + throw; + + // Set a new Default DACL for the token. + pTokenDefaultDACL->DefaultDacl = pNewAcl; + + if (!SetTokenInformation( + sandbox_account_service_token, + TokenDefaultDacl, + pTokenDefaultDACL, + dwNewAclSize) + ) + throw; + + // Indicate success. + fprintf(stderr, "New Token ACL Success!!!\n"); + } + catch(...) + { + // Free the allocated buffers. + + if (pace1 != NULL) + HeapFree(GetProcessHeap(), 0, (LPVOID)pace1); + + if (pace2 != NULL) + HeapFree(GetProcessHeap(), 0, (LPVOID)pace2); + + if (pOldAcl != NULL) + HeapFree(GetProcessHeap(), 0, (LPVOID)pOldAcl); + + if (pNewAcl != NULL) + HeapFree(GetProcessHeap(), 0, (LPVOID)pNewAcl); + + if (pBOINCProjectSID != NULL) + HeapFree(GetProcessHeap(), 0, (LPVOID)pBOINCProjectSID); + + if (pBOINCMasterSID != NULL) + HeapFree(GetProcessHeap(), 0, (LPVOID)pBOINCMasterSID); + + } + + if (pszUserName != NULL) + HeapFree(GetProcessHeap(), 0, (LPVOID)pszUserName); + } } @@ -214,44 +580,6 @@ int run_app_windows( pDEB = (tDEB) GetProcAddress(hUserEnvLib, "DestroyEnvironmentBlock"); } - - // Retrieve the current window station and desktop names - char szWindowStation[256]; - memset(szWindowStation, 0, sizeof(szWindowStation)); - char szDesktop[256]; - memset(szDesktop, 0, sizeof(szDesktop)); - char szDesktopName[512]; - memset(szDesktopName, 0, sizeof(szDesktopName)); - - if (!GetUserObjectInformationA( - GetProcessWindowStation(), - UOI_NAME, - &szWindowStation, - sizeof(szWindowStation), - NULL) - ) { - windows_format_error_string(GetLastError(), error_msg, sizeof(error_msg)); - fprintf(stderr, "GetUserObjectInformation failed: %s\n", error_msg); - } - if (!GetUserObjectInformationA( - GetThreadDesktop(GetCurrentThreadId()), - UOI_NAME, - &szDesktop, - sizeof(szDesktop), - NULL) - ) { - windows_format_error_string(GetLastError(), error_msg, sizeof(error_msg)); - fprintf(stderr, "GetUserObjectInformation failed: %s\n", error_msg); - } - - // Construct the destination desktop name - strncat(szDesktopName, szWindowStation, sizeof(szDesktopName) - strlen(szDesktopName)); - strncat(szDesktopName, "\\", sizeof(szDesktopName) - strlen(szDesktopName)); - strncat(szDesktopName, szDesktop, sizeof(szDesktopName) - strlen(szDesktopName)); - - // Tell CreateProcessAsUser which desktop to use explicitly. - startup_info.lpDesktop = szDesktopName; - // Construct an environment block that contains environment variables that don't // describe the current user. if (!pCEB(&environment_block, sandbox_account_interactive_token, FALSE)) { diff --git a/lib/run_app_windows.h b/lib/run_app_windows.h index 420d07172a..8134f48a5d 100644 --- a/lib/run_app_windows.h +++ b/lib/run_app_windows.h @@ -24,3 +24,5 @@ extern void get_sandbox_account_service_token(); extern int run_app_windows( const char* path, const char* cdir, int argc, char *const argv[], HANDLE& ); + + diff --git a/lib/win_util.cpp b/lib/win_util.cpp index ab675b5332..d1588dac9a 100644 --- a/lib/win_util.cpp +++ b/lib/win_util.cpp @@ -205,548 +205,6 @@ BOOL TerminateProcessById( DWORD dwProcessID ) { } -/** - * This function adjusts the specified WindowStation to include the specfied - * user. - * - * See: http://msdn2.microsoft.com/en-us/library/aa379608(VS.85).aspx - **/ -BOOL AddAceToWindowStation(HWINSTA hwinsta, PSID psid) -{ - ACCESS_ALLOWED_ACE *pace = NULL; - ACL_SIZE_INFORMATION aclSizeInfo; - BOOL bDaclExist; - BOOL bDaclPresent; - BOOL bSuccess = FALSE; - DWORD dwNewAclSize; - DWORD dwSidSize = 0; - DWORD dwSdSizeNeeded; - PACL pacl = NULL; - PACL pNewAcl = NULL; - PSECURITY_DESCRIPTOR psd = NULL; - PSECURITY_DESCRIPTOR psdNew = NULL; - PVOID pTempAce; - SECURITY_INFORMATION si = DACL_SECURITY_INFORMATION; - unsigned int i; - - try - { - // Obtain the DACL for the window station. - - if (!GetUserObjectSecurity( - hwinsta, - &si, - psd, - dwSidSize, - &dwSdSizeNeeded) - ) - if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) - { - psd = (PSECURITY_DESCRIPTOR)HeapAlloc( - GetProcessHeap(), - HEAP_ZERO_MEMORY, - dwSdSizeNeeded); - - if (psd == NULL) - throw; - - psdNew = (PSECURITY_DESCRIPTOR)HeapAlloc( - GetProcessHeap(), - HEAP_ZERO_MEMORY, - dwSdSizeNeeded); - - if (psdNew == NULL) - throw; - - dwSidSize = dwSdSizeNeeded; - - if (!GetUserObjectSecurity( - hwinsta, - &si, - psd, - dwSidSize, - &dwSdSizeNeeded) - ) - throw; - } - else - throw; - - // Create a new DACL. - - if (!InitializeSecurityDescriptor( - psdNew, - SECURITY_DESCRIPTOR_REVISION) - ) - throw; - - // Get the DACL from the security descriptor. - - if (!GetSecurityDescriptorDacl( - psd, - &bDaclPresent, - &pacl, - &bDaclExist) - ) - throw; - - // Initialize the ACL. - - ZeroMemory(&aclSizeInfo, sizeof(ACL_SIZE_INFORMATION)); - aclSizeInfo.AclBytesInUse = sizeof(ACL); - - // Call only if the DACL is not NULL. - - if (pacl != NULL) - { - // get the file ACL size info - if (!GetAclInformation( - pacl, - (LPVOID)&aclSizeInfo, - sizeof(ACL_SIZE_INFORMATION), - AclSizeInformation) - ) - throw; - } - - // Compute the size of the new ACL. - - dwNewAclSize = aclSizeInfo.AclBytesInUse + - (2*sizeof(ACCESS_ALLOWED_ACE)) + (2*GetLengthSid(psid)) - - (2*sizeof(DWORD)); - - // Allocate memory for the new ACL. - - pNewAcl = (PACL)HeapAlloc( - GetProcessHeap(), - HEAP_ZERO_MEMORY, - dwNewAclSize); - - if (pNewAcl == NULL) - throw; - - // Initialize the new DACL. - - if (!InitializeAcl(pNewAcl, dwNewAclSize, ACL_REVISION)) - throw; - - // If DACL is present, copy it to a new DACL. - - if (bDaclPresent) - { - // Copy the ACEs to the new ACL. - if (aclSizeInfo.AceCount) - { - for (i=0; i < aclSizeInfo.AceCount; i++) - { - // Get an ACE. - if (!GetAce(pacl, i, &pTempAce)) - throw; - - // Add the ACE to the new ACL. - if (!AddAce( - pNewAcl, - ACL_REVISION, - MAXDWORD, - pTempAce, - ((PACE_HEADER)pTempAce)->AceSize) - ) - throw; - } - } - } - - // Add the first ACE to the window station. - - pace = (ACCESS_ALLOWED_ACE *)HeapAlloc( - GetProcessHeap(), - HEAP_ZERO_MEMORY, - sizeof(ACCESS_ALLOWED_ACE) + GetLengthSid(psid) - sizeof(DWORD) - ); - - if (pace == NULL) - throw; - - pace->Header.AceType = ACCESS_ALLOWED_ACE_TYPE; - pace->Header.AceFlags = CONTAINER_INHERIT_ACE | - INHERIT_ONLY_ACE | - OBJECT_INHERIT_ACE; - pace->Header.AceSize = (WORD)sizeof(ACCESS_ALLOWED_ACE) + - (WORD)GetLengthSid(psid) - - (WORD)sizeof(DWORD); - pace->Mask = GENERIC_ALL; - - if (!CopySid(GetLengthSid(psid), &pace->SidStart, psid)) - throw; - - if (!AddAce( - pNewAcl, - ACL_REVISION, - MAXDWORD, - (LPVOID)pace, - pace->Header.AceSize) - ) - throw; - - // Add an ACE to the window station. - - pace->Header.AceFlags = NO_PROPAGATE_INHERIT_ACE; - pace->Mask = GENERIC_ALL; - - if (!AddAce( - pNewAcl, - ACL_REVISION, - MAXDWORD, - (LPVOID)pace, - pace->Header.AceSize) - ) - throw; - - // Set a new DACL for the security descriptor. - - if (!SetSecurityDescriptorDacl( - psdNew, - TRUE, - pNewAcl, - FALSE) - ) - throw; - - // Set the new security descriptor for the window station. - - if (!SetUserObjectSecurity(hwinsta, &si, psdNew)) - throw; - - // Indicate success. - - bSuccess = TRUE; - } - catch(...) - { - // Free the allocated buffers. - - if (pace != NULL) - HeapFree(GetProcessHeap(), 0, (LPVOID)pace); - - if (pNewAcl != NULL) - HeapFree(GetProcessHeap(), 0, (LPVOID)pNewAcl); - - if (psd != NULL) - HeapFree(GetProcessHeap(), 0, (LPVOID)psd); - - if (psdNew != NULL) - HeapFree(GetProcessHeap(), 0, (LPVOID)psdNew); - } - - return bSuccess; - -} - - -/** - * This function adjusts the specified Desktop to include the specfied - * user. - * - * See: http://msdn2.microsoft.com/en-us/library/aa379608(VS.85).aspx - **/ -BOOL AddAceToDesktop(HDESK hdesk, PSID psid) -{ - ACL_SIZE_INFORMATION aclSizeInfo; - BOOL bDaclExist; - BOOL bDaclPresent; - BOOL bSuccess = FALSE; - DWORD dwNewAclSize; - DWORD dwSidSize = 0; - DWORD dwSdSizeNeeded; - PACL pacl = NULL; - PACL pNewAcl = NULL; - PSECURITY_DESCRIPTOR psd = NULL; - PSECURITY_DESCRIPTOR psdNew = NULL; - PVOID pTempAce; - SECURITY_INFORMATION si = DACL_SECURITY_INFORMATION; - unsigned int i; - - try - { - // Obtain the security descriptor for the desktop object. - - if (!GetUserObjectSecurity( - hdesk, - &si, - psd, - dwSidSize, - &dwSdSizeNeeded)) - { - if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) - { - psd = (PSECURITY_DESCRIPTOR)HeapAlloc( - GetProcessHeap(), - HEAP_ZERO_MEMORY, - dwSdSizeNeeded ); - - if (psd == NULL) - throw; - - psdNew = (PSECURITY_DESCRIPTOR)HeapAlloc( - GetProcessHeap(), - HEAP_ZERO_MEMORY, - dwSdSizeNeeded); - - if (psdNew == NULL) - throw; - - dwSidSize = dwSdSizeNeeded; - - if (!GetUserObjectSecurity( - hdesk, - &si, - psd, - dwSidSize, - &dwSdSizeNeeded) - ) - throw; - } - else - throw; - } - - // Create a new security descriptor. - - if (!InitializeSecurityDescriptor( - psdNew, - SECURITY_DESCRIPTOR_REVISION) - ) - throw; - - // Obtain the DACL from the security descriptor. - - if (!GetSecurityDescriptorDacl( - psd, - &bDaclPresent, - &pacl, - &bDaclExist) - ) - throw; - - // Initialize. - - ZeroMemory(&aclSizeInfo, sizeof(ACL_SIZE_INFORMATION)); - aclSizeInfo.AclBytesInUse = sizeof(ACL); - - // Call only if NULL DACL. - - if (pacl != NULL) - { - // Determine the size of the ACL information. - - if (!GetAclInformation( - pacl, - (LPVOID)&aclSizeInfo, - sizeof(ACL_SIZE_INFORMATION), - AclSizeInformation) - ) - throw; - } - - // Compute the size of the new ACL. - - dwNewAclSize = aclSizeInfo.AclBytesInUse + - sizeof(ACCESS_ALLOWED_ACE) + - GetLengthSid(psid) - sizeof(DWORD); - - // Allocate buffer for the new ACL. - - pNewAcl = (PACL)HeapAlloc( - GetProcessHeap(), - HEAP_ZERO_MEMORY, - dwNewAclSize); - - if (pNewAcl == NULL) - throw; - - // Initialize the new ACL. - - if (!InitializeAcl(pNewAcl, dwNewAclSize, ACL_REVISION)) - throw; - - // If DACL is present, copy it to a new DACL. - - if (bDaclPresent) - { - // Copy the ACEs to the new ACL. - if (aclSizeInfo.AceCount) - { - for (i=0; i < aclSizeInfo.AceCount; i++) - { - // Get an ACE. - if (!GetAce(pacl, i, &pTempAce)) - throw; - - // Add the ACE to the new ACL. - if (!AddAce( - pNewAcl, - ACL_REVISION, - MAXDWORD, - pTempAce, - ((PACE_HEADER)pTempAce)->AceSize) - ) - throw; - } - } - } - - // Add ACE to the DACL. - - if (!AddAccessAllowedAce( - pNewAcl, - ACL_REVISION, - GENERIC_ALL, - psid) - ) - throw; - - // Set new DACL to the new security descriptor. - - if (!SetSecurityDescriptorDacl( - psdNew, - TRUE, - pNewAcl, - FALSE) - ) - throw; - - // Set the new security descriptor for the desktop object. - - if (!SetUserObjectSecurity(hdesk, &si, psdNew)) - throw; - - // Indicate success. - - bSuccess = TRUE; - } - catch(...) - { - // Free buffers. - - if (pNewAcl != NULL) - HeapFree(GetProcessHeap(), 0, (LPVOID)pNewAcl); - - if (psd != NULL) - HeapFree(GetProcessHeap(), 0, (LPVOID)psd); - - if (psdNew != NULL) - HeapFree(GetProcessHeap(), 0, (LPVOID)psdNew); - } - - return bSuccess; -} - - -/*++ -This function attempts to obtain a SID representing the supplied -account on the supplied system. - -If the function succeeds, the return value is TRUE. A buffer is -allocated which contains the SID representing the supplied account. -This buffer should be freed when it is no longer needed by calling -HeapFree(GetProcessHeap(), 0, buffer) - -If the function fails, the return value is FALSE. Call GetLastError() -to obtain extended error information. - -Scott Field (sfield) 12-Jul-95 ---*/ - -BOOL -GetAccountSid( - LPCSTR SystemName, - LPCSTR AccountName, - PSID *Sid - ) -{ - LPSTR ReferencedDomain=NULL; - DWORD cbSid=128; // initial allocation attempt - DWORD cchReferencedDomain=16; // initial allocation size - SID_NAME_USE peUse; - BOOL bSuccess=FALSE; // assume this function will fail - - try - { - // - // initial memory allocations - // - *Sid = (PSID)HeapAlloc(GetProcessHeap(), 0, cbSid); - - if(*Sid == NULL) throw; - - ReferencedDomain = (LPSTR)HeapAlloc( - GetProcessHeap(), - 0, - cchReferencedDomain * sizeof(CHAR) - ); - - if(ReferencedDomain == NULL) throw; - - // - // Obtain the SID of the specified account on the specified system. - // - while(!LookupAccountNameA( - SystemName, // machine to lookup account on - AccountName, // account to lookup - *Sid, // SID of interest - &cbSid, // size of SID - ReferencedDomain, // domain account was found on - &cchReferencedDomain, - &peUse - )) { - if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) { - // - // reallocate memory - // - *Sid = (PSID)HeapReAlloc( - GetProcessHeap(), - 0, - *Sid, - cbSid - ); - if(*Sid == NULL) throw; - - ReferencedDomain = (LPSTR)HeapReAlloc( - GetProcessHeap(), - 0, - ReferencedDomain, - cchReferencedDomain * sizeof(CHAR) - ); - if(ReferencedDomain == NULL) throw; - } - else throw; - } - - // - // Indicate success. - // - bSuccess = TRUE; - - } // try - catch(...) - { - // - // Cleanup and indicate failure, if appropriate. - // - - HeapFree(GetProcessHeap(), 0, ReferencedDomain); - - if(!bSuccess) { - if(*Sid != NULL) { - HeapFree(GetProcessHeap(), 0, *Sid); - *Sid = NULL; - } - } - } // finally - - return bSuccess; -} - void chdir_to_data_dir() { LONG lReturnValue; HKEY hkSetupHive; diff --git a/lib/win_util.h b/lib/win_util.h index 55a048dd1e..688cfb36d7 100644 --- a/lib/win_util.h +++ b/lib/win_util.h @@ -21,13 +21,6 @@ extern BOOL IsWindows2000Compatible();extern BOOL IsTerminalServicesEnabled(); extern BOOL ValidateProductSuite(LPSTR SuiteName); extern BOOL TerminateProcessById(DWORD dwProcessId); -extern BOOL AddAceToWindowStation(HWINSTA hwinsta, PSID psid); -extern BOOL AddAceToDesktop(HDESK hdesk, PSID psid); -extern BOOL GetAccountSid( - LPCSTR SystemName, // where to lookup account - LPCSTR AccountName, // account of interest - PSID *Sid // resultant buffer containing SID -); extern void chdir_to_data_dir(); extern bool is_remote_desktop(); diff --git a/locale/de/BOINC-Android.po b/locale/de/BOINC-Android.po index 46de9b790a..992124e865 100644 --- a/locale/de/BOINC-Android.po +++ b/locale/de/BOINC-Android.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2013-10-18 00:00-0700\n" -"PO-Revision-Date: 2013-10-30 20:03+0000\n" +"PO-Revision-Date: 2013-11-13 20:16+0000\n" "Last-Translator: Christian \n" "Language-Team: de \n" "Language: de\n" @@ -17,7 +17,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Pootle 2.5.0\n" "Generated-By: Babel 1.0dev\n" -"X-POOTLE-MTIME: 1383163417.0\n" +"X-POOTLE-MTIME: 1384373799.0\n" #. app global msgctxt "app_name" @@ -755,7 +755,7 @@ msgstr "Kontoverwaltung deaktivieren" msgctxt "projects_confirm_remove_acctmgr_message" msgid "Are you sure you want to stop using" -msgstr "" +msgstr "Sind Sie sicher die Kontoverwaltung zu beenden" msgctxt "projects_confirm_remove_acctmgr_confirm" msgid "Disable" diff --git a/locale/de/BOINC-Project-Generic.po b/locale/de/BOINC-Project-Generic.po index 8a394f29cd..cb5edb4ae9 100644 --- a/locale/de/BOINC-Project-Generic.po +++ b/locale/de/BOINC-Project-Generic.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: BOINC Project (Generic) 6.x\n" "Report-Msgid-Bugs-To: BOINC translation team \n" "POT-Creation-Date: 2013-11-08 00:00 PST\n" -"PO-Revision-Date: 2013-10-30 20:04+0000\n" +"PO-Revision-Date: 2013-11-13 20:17+0000\n" "Last-Translator: Christian \n" "Language-Team: BOINC Development Team \n" "Language: de\n" @@ -20,7 +20,7 @@ msgstr "" "X-BOINC-UTF8-Marker: 简体中文, 日本語\n" "X-Poedit-SearchPath-0: html\\user\n" "X-Poedit-Basepath: C:\\Src\\BOINCSVN\\trunk\\boinc\n" -"X-POOTLE-MTIME: 1383163461.0\n" +"X-POOTLE-MTIME: 1384373822.0\n" # The name of this language in this language msgid "LANG_NAME_NATIVE" @@ -1220,7 +1220,7 @@ msgstr "Benutze Nvidia GPU %1 Unterstützt ab Version 6.10 %2" #: ../inc/prefs.inc:344 msgid "Use Intel GPU %1 Enforced by version 7.2+ %2" -msgstr "" +msgstr "Benutze Intel GPU %1 Unterstützt ab Version 7.2 %2" #: ../inc/prefs.inc:358 msgid "" diff --git a/locale/de/BOINC-Web.mo b/locale/de/BOINC-Web.mo index d237870b0d..314170389e 100644 Binary files a/locale/de/BOINC-Web.mo and b/locale/de/BOINC-Web.mo differ diff --git a/locale/de/BOINC-Web.po b/locale/de/BOINC-Web.po index 37b9c0f5be..9f31a6c89c 100644 --- a/locale/de/BOINC-Web.po +++ b/locale/de/BOINC-Web.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: BOINC translation team \n" "POT-Creation-Date: 2013-11-12 00:00 PST\n" -"PO-Revision-Date: 2013-11-09 07:53+0000\n" +"PO-Revision-Date: 2013-11-13 20:24+0000\n" "Last-Translator: Christian \n" "Language-Team: BOINC Development Team \n" "Language: de\n" @@ -14,7 +14,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Pootle 2.5.0\n" "X-Poedit-SourceCharset: utf-8\n" -"X-POOTLE-MTIME: 1383983630.0\n" +"X-POOTLE-MTIME: 1384374259.0\n" #: docutil.php:21 msgid "Search" @@ -34,29 +34,31 @@ msgid "" "We recommend that you also install VirtualBox, so your computer can work on " "science projects that require it." msgstr "" +"Wir empfehlen die Installation von VirtualBox, damit kann Ihr Rechner auch " +"an Projekten teilnehmen die dies erfordern." #: download.php:41 msgid "Learn more about VirtualBox." -msgstr "" +msgstr "Mehr über VirtualBox erfahren." #: download.php:51 msgid "Download BOINC + VirtualBox" -msgstr "" +msgstr "BOINC und VirtualBox herunterladen" #: download.php:54 download.php:69 #, php-format msgid "for %s" -msgstr "" +msgstr "für %s" #: download.php:57 download.php:72 #, php-format msgid "BOINC version %s" -msgstr "" +msgstr "BOINC Version %s" #: download.php:59 #, php-format msgid "VirtualBox version %s" -msgstr "" +msgstr "VirtualBox Version %s" # #######################################
# download.php
@@ -71,12 +73,17 @@ msgid "" "projects like SETI@home, Climateprediction.net, Rosetta@home, World " "Community Grid, and many others." msgstr "" +"BOINC ist ein Programm womit die ungenutzte Rechenleistung Ihres Computers, " +"für wissenschaftliche Projekte wie SETI@home, Climateprediction.net, " +"Rosetta@home, World Community Grid oder viele andere eingesetzt werden kann." #: download.php:125 msgid "" "After installing BOINC on your computer, you can connect it to as many of " "these projects as you like." msgstr "" +"Nachdem Sie BOINC auf Ihrem Computer installiert haben, können Sie es zu so " +"vielen Projekten hinzufügen wie Sie wünschen." #: download.php:127 msgid "" @@ -91,6 +98,8 @@ msgid "" "We recommend that you download BOINC from the Google Play Store or Amazon " "Appstore, not from here." msgstr "" +"Wir empfehlen BOINC über den Google Play Store oder Amazon Appstore zu " +"installieren und nicht von hier." #: download.php:167 msgid "System requirements" diff --git a/samples/vboxwrapper/vboxwrapper.cpp b/samples/vboxwrapper/vboxwrapper.cpp index e585fbaf2c..293c4ed843 100644 --- a/samples/vboxwrapper/vboxwrapper.cpp +++ b/samples/vboxwrapper/vboxwrapper.cpp @@ -665,12 +665,12 @@ int main(int argc, char** argv) { if ((vm_log.find("VERR_VMX_MSR_LOCKED_OR_DISABLED") != string::npos) || (vm_log.find("VERR_SVM_DISABLED") != string::npos)) { fprintf( stderr, - "%s NOTE: BOINC has detected that your processor supports hardware acceleration for virtual machines\n" - " but the hypervisor failed to successfully launch with this feature enabled. This means that the\n" - " hardware acceleration feature has been disabled in the computers BIOS. Please enable this\n" - " feature in your BIOS.\n" - " Intel Processors call it 'VT-x'\n" - " AMD Processors call it 'AMD-V'\n" + "%s NOTE: BOINC has detected that your computer's processor supports hardware acceleration for\n" + " virtual machines but the hypervisor failed to successfully launch with this feature enabled.\n" + " This means that the hardware acceleration feature has been disabled in the computer's BIOS.\n" + " Please enable this feature in your computer's BIOS.\n" + " Intel calls it 'VT-x'\n" + " AMD calls it 'AMD-V'\n" " More information can be found here: http://en.wikipedia.org/wiki/X86_virtualization\n" " Error Code: ERR_CPU_VM_EXTENSIONS_DISABLED\n", vboxwrapper_msg_prefix(buf, sizeof(buf)) diff --git a/win_build/boinc_cli.vcxproj b/win_build/boinc_cli.vcxproj index 33f6b3c28c..975f3ed72e 100644 --- a/win_build/boinc_cli.vcxproj +++ b/win_build/boinc_cli.vcxproj @@ -136,7 +136,7 @@ ../;%(AdditionalIncludeDirectories) - zlib1d.lib;ssleay32.lib;libeay32.lib;libcurld_imp.lib;nvapi.lib;MSVCRTD.LIB;MSVCPRTD.LIB;wsock32.lib;wininet.lib;winmm.lib;Iphlpapi.lib;kernel32.lib;user32.lib;advapi32.lib;shell32.lib;sensapi.lib;userenv.lib + zlib1d.lib;ssleay32.lib;libeay32.lib;libcurld_imp.lib;nvapi.lib;MSVCRTD.LIB;MSVCPRTD.LIB;wsock32.lib;wininet.lib;winmm.lib;Iphlpapi.lib;kernel32.lib;user32.lib;advapi32.lib;shell32.lib;sensapi.lib;userenv.lib;secur32.lib .\Build\$(Platform)\$(Configuration)\boinc.exe true ../../boinc_depends_win_vs2010/openssl/mswin/$(Platform)/$(Configuration)/lib;../../boinc_depends_win_vs2010/curl/mswin/$(Platform)/$(Configuration)/lib;../../boinc_depends_win_vs2010/zlib/mswin/$(Platform)/$(Configuration)/lib;../coprocs/NVIDIA/mswin/$(Platform)/$(Configuration)/lib;../../;$(OutDir);%(AdditionalLibraryDirectories) @@ -198,7 +198,7 @@ ../;%(AdditionalIncludeDirectories) - zlib1d.lib;ssleay32.lib;libeay32.lib;libcurld_imp.lib;nvapi.lib;MSVCRTD.LIB;MSVCPRTD.LIB;wsock32.lib;wininet.lib;winmm.lib;sensapi.lib;userenv.lib;Iphlpapi.lib;kernel32.lib;user32.lib;advapi32.lib;shell32.lib + zlib1d.lib;ssleay32.lib;libeay32.lib;libcurld_imp.lib;nvapi.lib;MSVCRTD.LIB;MSVCPRTD.LIB;wsock32.lib;wininet.lib;winmm.lib;sensapi.lib;userenv.lib;Iphlpapi.lib;kernel32.lib;user32.lib;advapi32.lib;shell32.lib;secur32.lib .\Build\$(Platform)\$(Configuration)\boinc.exe true ../../boinc_depends_win_vs2010/openssl/mswin/$(Platform)/$(Configuration)/lib;../../boinc_depends_win_vs2010/curl/mswin/$(Platform)/$(Configuration)/lib;../../boinc_depends_win_vs2010/zlib/mswin/$(Platform)/$(Configuration)/lib;../coprocs/NVIDIA/mswin/$(Platform)/$(Configuration)/lib;../../;$(OutDir);%(AdditionalLibraryDirectories) @@ -258,7 +258,7 @@ ..;%(AdditionalIncludeDirectories) - zlib1.lib;ssleay32.lib;libeay32.lib;libcurl_imp.lib;nvapi.lib;MSVCRT.LIB;MSVCPRT.LIB;wsock32.lib;wininet.lib;winmm.lib;Iphlpapi.lib;kernel32.lib;user32.lib;advapi32.lib;shell32.lib;sensapi.lib;userenv.lib + zlib1.lib;ssleay32.lib;libeay32.lib;libcurl_imp.lib;nvapi.lib;MSVCRT.LIB;MSVCPRT.LIB;wsock32.lib;wininet.lib;winmm.lib;Iphlpapi.lib;kernel32.lib;user32.lib;advapi32.lib;shell32.lib;sensapi.lib;userenv.lib;secur32.lib NotSet .\Build\$(Platform)\$(Configuration)\boinc.exe true @@ -319,7 +319,7 @@ ..;%(AdditionalIncludeDirectories) - zlib1.lib;ssleay32.lib;libeay32.lib;libcurl_imp.lib;nvapi.lib;MSVCRT.LIB;MSVCPRT.LIB;wsock32.lib;wininet.lib;winmm.lib;sensapi.lib;userenv.lib;iphlpapi.lib;kernel32.lib;user32.lib;advapi32.lib;shell32.lib + zlib1.lib;ssleay32.lib;libeay32.lib;libcurl_imp.lib;nvapi.lib;MSVCRT.LIB;MSVCPRT.LIB;wsock32.lib;wininet.lib;winmm.lib;sensapi.lib;userenv.lib;iphlpapi.lib;kernel32.lib;user32.lib;advapi32.lib;shell32.lib;secur32.lib NotSet .\Build\$(Platform)\$(Configuration)\boinc.exe true