Apply patch from Apple to handle missing krb5.conf for zeroconf
authorTom Yu <tlyu@mit.edu>
Thu, 10 Jul 2008 02:04:03 +0000 (02:04 +0000)
committerTom Yu <tlyu@mit.edu>
Thu, 10 Jul 2008 02:04:03 +0000 (02:04 +0000)
situations.

ticket: 5632

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20509 dc483132-0cff-0310-8789-dd5450dbe970

src/util/profile/prof_init.c

index f0ff1370c33ca83db9934701a8a487f56c8c61cc..fbcbead128d662b435468e767a4258726ad164ef 100644 (file)
@@ -34,8 +34,11 @@ profile_init(const_profile_filespec_t *files, profile_t *ret_profile)
        memset(profile, 0, sizeof(struct _profile_t));
        profile->magic = PROF_MAGIC_PROFILE;
 
-        /* if the filenames list is not specified return an empty profile */
-        if ( files ) {
+       /*
+        * If the filenames list is not specified or empty, return an empty
+        * profile.
+        */
+       if ( files && !PROFILE_LAST_FILESPEC(*files) ) {
            for (fs = files; !PROFILE_LAST_FILESPEC(*fs); fs++) {
                retval = profile_open_file(*fs, &new_file);
                /* if this file is missing, skip to the next */