]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_cdsa_utilities/lib/cssmcred.cpp
Security-59754.80.3.tar.gz
[apple/security.git] / OSX / libsecurity_cdsa_utilities / lib / cssmcred.cpp
index 44a31a05bef60421823d3bc127f7da45a55f7a63..ee66a633f00965a28a16fe0a763deef7121871e8 100644 (file)
 
 namespace Security {
 
-
-//
-// The null credential constant.
-//
-static const CSSM_ACCESS_CREDENTIALS null_credentials = { "" };        // and more nulls
-#if BUG_GCC
-const AccessCredentials &AccessCredentials::null =
-    *static_cast<const AccessCredentials *>(&null_credentials);
-#else
-const AccessCredentials &AccessCredentials::null =
-    static_cast<const AccessCredentials &>(null_credentials);
-#endif
-
-
 //
 // Scan a SampleGroup for samples with a given CSSM_SAMPLE_TYPE.
 // Collect all matching samples into a list (which is cleared to begin with).
@@ -67,6 +53,12 @@ bool SampleGroup::collect(CSSM_SAMPLE_TYPE sampleType, list<CssmSample> &matches
 //
 // AccessCredentials
 //
+const AccessCredentials& AccessCredentials::null_credential()
+{
+    static const CSSM_ACCESS_CREDENTIALS null_credentials = { "" };    // and more nulls
+    return AccessCredentials::overlay(null_credentials);
+}
+
 void AccessCredentials::tag(const char *tagString)
 {
        if (tagString == NULL)
@@ -92,7 +84,7 @@ bool AccessCredentials::authorizesUI() const {
         TypedList &sample = *it;
 
         if(!sample.isProper()) {
-            secdebugfunc("integrity", "found a non-proper sample, skipping...");
+            secnotice("integrity", "found a non-proper sample, skipping...");
             continue;
         }