[SERVER-58829] Make canonicalizeName and wrapper functions return StatusWith Created: 26/Jul/21 Updated: 29/Oct/23 Resolved: 02/Aug/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.1.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Spencer Jackson | Assignee: | Erwin Pe |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Security 2021-08-09 |
| Participants: |
| Description |
|
canonicalizeName and its wrapper functions in in mongo_gssapi.cpp accept a std::string* as an out-parameter which they populate with a canonical name. These functions return a Status to indicate whether canonicalization was successful. Out-parameters aren't preferred in our codebase, because they aren't clear. Instead, we should modify the functions to return StatusWith<std::string>, which represents either a std::string, or a Status object containing an error. This style is more clear as to the intent of the returned string, and is assumed to have equivalent performance. |
| Comments |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] |
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! |
| Comment by Githook User [ 02/Aug/21 ] |
|
Author: {'name': 'Erwin Pe', 'email': 'erwin.pe@mongodb.com', 'username': 'erwee'}Message: |