Changeset 26148 in vbox for trunk/src/VBox
- Timestamp:
- Feb 2, 2010 2:24:55 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 57157
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibCredentials.cpp
r24311 r26148 53 53 * @returns IPRT status value 54 54 * @param ppszUser Receives pointer of allocated user name string. 55 * The returned pointer must be freed using RTStrFree().55 * The returned pointer must be freed using VbglR3CredentialsDestroy(). 56 56 * @param ppszPassword Receives pointer of allocated user password string. 57 * The returned pointer must be freed using RTStrFree().57 * The returned pointer must be freed using VbglR3CredentialsDestroy(). 58 58 * @param ppszDomain Receives pointer of allocated domain name string. 59 * The returned pointer must be freed using RTStrFree().59 * The returned pointer must be freed using VbglR3CredentialsDestroy(). 60 60 */ 61 61 VBGLR3DECL(int) VbglR3CredentialsRetrieve(char **ppszUser, char **ppszPassword, char **ppszDomain) … … 87 87 } 88 88 89 90 /** 91 * Clears and frees the strings 92 * 93 * @returns IPRT status value 94 * @param pszUser Receives pointer of the user name string to destroy. 95 * Optional. 96 * @param pszPassword Receives pointer of the password string to destroy. 97 * Optional. 98 * @param pszDomain Receives pointer of allocated domain name string. 99 * Optional. 100 * @param u8NumPasses Number of wipe passes. The higher the better (and slower!). 101 */ 102 VBGLR3DECL(void) VbglR3CredentialsDestroy(char *pszUser, char *pszPassword, char *pszDomain, uint8_t u8NumPasses) 103 { 104 size_t l; 105 106 if (u8NumPasses == 0) /* We at least want to have one wipe pass. */ 107 u8NumPasses = 1; 108 109 /** @todo add some for-loop with randomized content instead of 110 * zero'ing out the string only one time. Use u8NumPasses for that. */ 111 if (pszUser) 112 { 113 l = strlen(pszUser); 114 RT_BZERO(pszUser, l); 115 RTStrFree(pszUser); 116 } 117 if (pszPassword) 118 { 119 l = strlen(pszPassword); 120 RT_BZERO(pszPassword, l); 121 RTStrFree(pszPassword); 122 } 123 if (pszUser) 124 { 125 l = strlen(pszDomain); 126 RT_BZERO(pszDomain, l); 127 RTStrFree(pszDomain); 128 } 129 }
Note:
See TracChangeset
for help on using the changeset viewer.