Changeset 51180 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- May 2, 2014 11:45:03 AM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 93548
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/process-creation-posix.cpp
r50292 r51180 114 114 pw->pw_passwd = spwd->sp_pwdp; 115 115 116 /* be reentrant */ 117 struct crypt_data *data = (struct crypt_data*)RTMemTmpAllocZ(sizeof(*data)); 118 char *pszEncPasswd = crypt_r(pszPasswd, pw->pw_passwd, data); 119 int fCorrect = !strcmp(pszEncPasswd, pw->pw_passwd); 120 RTMemTmpFree(data); 116 /* Default fCorrect=true if no password specified. In that case, pw->pw_passwd 117 * must be NULL (no password set for this user). Fail if a password is specified 118 * but the user does not have one assigned. */ 119 int fCorrect = !pszPasswd || !*pszPasswd; 120 if (pw->pw_passwd) 121 { 122 struct crypt_data *data = (struct crypt_data*)RTMemTmpAllocZ(sizeof(*data)); 123 /* be reentrant */ 124 char *pszEncPasswd = crypt_r(pszPasswd, pw->pw_passwd, data); 125 fCorrect = pszEncPasswd && !strcmp(pszEncPasswd, pw->pw_passwd); 126 RTMemTmpFree(data); 127 } 121 128 if (!fCorrect) 122 129 return VERR_PERMISSION_DENIED;
Note:
See TracChangeset
for help on using the changeset viewer.