Changeset 79559 in vbox for trunk/src/VBox/Runtime/r3/posix
- Timestamp:
- Jul 5, 2019 3:42:51 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 131847
- Location:
- trunk/src/VBox/Runtime/r3/posix
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/ldrNative-posix.cpp
r79003 r79559 148 148 size_t const cchFilename = strlen(pszFilename); 149 149 size_t const cchSuffix = strlen(pszExt); 150 char *pszTmp = (char *)alloca(cchFilename + cchSuffix + 1 );150 char *pszTmp = (char *)alloca(cchFilename + cchSuffix + 16 + 1); 151 151 memcpy(pszTmp, pszFilename, cchFilename); 152 152 memcpy(&pszTmp[cchFilename], pszExt, cchSuffix); 153 153 pszTmp[cchFilename + cchSuffix] = '\0'; 154 154 155 return RTLdrLoadEx(pszTmp, phLdrMod, fFlags, NULL); 155 int rc = RTLdrLoadEx(pszTmp, phLdrMod, fFlags, NULL); 156 157 #if !defined(RT_OS_DARWIN) && !defined(RT_OS_OS2) && !defined(RT_OS_WINDOWS) 158 /* 159 * If no version was given after the .so and do .so.MAJOR search according 160 * to the range in the fFlags. 161 */ 162 if (RT_FAILURE(rc) && !(fFlags & RTLDRLOAD_FLAGS_NO_SUFFIX)) 163 { 164 const char *pszActualSuff = RTPathSuffix(pszTmp); 165 if (pszActualSuff && strcmp(pszActualSuff, ".so") == 0) 166 { 167 uint32_t const uBegin = (fFlags & RTLDRLOAD_FLAGS_SO_VER_BEGIN_MASK) >> RTLDRLOAD_FLAGS_SO_VER_BEGIN_SHIFT; 168 uint32_t const uEnd = (fFlags & RTLDRLOAD_FLAGS_SO_VER_END_MASK) >> RTLDRLOAD_FLAGS_SO_VER_END_SHIFT; 169 int32_t const iIncr = uBegin <= uEnd ? 1 : -1; 170 for (uint32_t uMajorVer = uBegin; uMajorVer != uEnd; uMajorVer += iIncr) 171 { 172 RTStrPrintf(&pszTmp[cchFilename + cchSuffix], 16 + 1, ".%u", uMajorVer); 173 rc = RTLdrLoadEx(pszTmp, phLdrMod, fFlags, NULL); 174 if (RT_SUCCESS(rc)) 175 break; 176 } 177 } 178 } 179 #endif 180 181 return rc; 156 182 } 157 183 -
trunk/src/VBox/Runtime/r3/posix/process-creation-posix.cpp
r79014 r79559 204 204 return pfnCryptR(pszKey, pszSalt, pData); 205 205 206 pfnCryptR = (PFNCRYPTR)(uintptr_t)RTLdrGetSystemSymbol ("libcrypt.so", "crypt_r");206 pfnCryptR = (PFNCRYPTR)(uintptr_t)RTLdrGetSystemSymbolEx("libcrypt.so", "crypt_r", RTLDRLOAD_FLAGS_SO_VER_RANGE(1, 6)); 207 207 if (!pfnCryptR) 208 pfnCryptR = (PFNCRYPTR)(uintptr_t)RTLdrGetSystemSymbol ("libxcrypt.so", "crypt_r");208 pfnCryptR = (PFNCRYPTR)(uintptr_t)RTLdrGetSystemSymbolEx("libxcrypt.so", "crypt_r", RTLDRLOAD_FLAGS_SO_VER_RANGE(1, 32)); 209 209 if (pfnCryptR) 210 210 {
Note:
See TracChangeset
for help on using the changeset viewer.