Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-58829

Make canonicalizeName and wrapper functions return StatusWith

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.1.0-rc0
    • None
    • None
    • Fully Compatible
    • Security 2021-08-09

    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.

      Attachments

        Activity

          People

            erwin.pe@mongodb.com Erwin Pe
            spencer.jackson@mongodb.com Spencer Jackson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: