X-Git-Url: https://git.saurik.com/apple/securityd.git/blobdiff_plain/2f9dc5dc91d2adf097a030bc067f00235982c474..4cd1cad0dea00daa03e1b54fdf2797a02373ad5b:/src/token.cpp diff --git a/src/token.cpp b/src/token.cpp index 1f8f7c0..55198c1 100644 --- a/src/token.cpp +++ b/src/token.cpp @@ -270,12 +270,16 @@ void Token::insert(::Reader &slot, RefPointer tokend) secdebug("token", "%p installing MDS from %s(%s)", this, tokend->bundlePath().c_str(), mdsDirectory[0] ? mdsDirectory : "ALL"); - string holdGuid = mGuid.toString(); // extend lifetime of .toString() + string holdGuid = mGuid.toString(); // extend lifetime of std::string + string holdTokenUid; + if (tokend->hasTokenUid()) + holdTokenUid = tokend->tokenUid(); + string holdPrintName = this->printName(); MDS_InstallDefaults mdsDefaults = { holdGuid.c_str(), mSubservice, - tokend->hasTokenUid() ? tokend->tokenUid().c_str() : "", - this->printName().c_str() + holdTokenUid.c_str(), + holdPrintName.c_str() }; mds().install(&mdsDefaults, tokend->bundlePath().c_str(),