Changeset 29636 in vbox for trunk/src/VBox
- Timestamp:
- May 18, 2010 1:43:55 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/process-posix.cpp
r29624 r29636 64 64 #include <iprt/socket.h> 65 65 #include <iprt/string.h> 66 #include <iprt/mem.h> 66 67 #include "internal/process.h" 67 68 … … 94 95 pw->pw_passwd = spwd->sp_pwdp; 95 96 96 struct crypt_data data; 97 char *pszEncPasswd = crypt_r(pszPasswd, pw->pw_passwd, &data); 97 /* be reentrant */ 98 struct crypt_data *data = (struct crypt_data*)RTMemTmpAllocZ(sizeof(*data)); 99 char *pszEncPasswd = crypt_r(pszPasswd, pw->pw_passwd, data); 98 100 if (strcmp(pszEncPasswd, pw->pw_passwd)) 99 101 return VERR_PERMISSION_DENIED; 102 RTMemTmpFree(data); 100 103 101 104 *gid = pw->pw_gid; 102 105 *uid = pw->pw_uid; 103 106 return VINF_SUCCESS; 107 104 108 #elif defined(RT_OS_SOLARIS) 105 109 struct passwd *ppw, pw; … … 125 129 *uid = ppw->pw_uid; 126 130 return VINF_SUCCESS; 131 127 132 #else 128 133 return VERR_PERMISSION_DENIED;
Note:
See TracChangeset
for help on using the changeset viewer.