]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
auth: fix skipping of ~/ if $HOME subst fails
authorSage Weil <sage@newdream.net>
Wed, 18 Aug 2010 19:56:53 +0000 (12:56 -0700)
committerSage Weil <sage@newdream.net>
Wed, 18 Aug 2010 19:57:13 +0000 (12:57 -0700)
We were breaking out of the loop entirely, and failing to check the rest
of the items in the path list.  Doh!

src/auth/KeyRing.cc

index fdf15bc9a8f101a17e1f1a8248099aa7cd0cd7bf..025cf4cba227a8a6139b3cda9d27683ddced199d 100644 (file)
@@ -45,7 +45,8 @@ bool KeyRing::load(const char *filename_list)
       const char *home = getenv("HOME");
       if (home)
        p->replace(pos, 1, getenv("HOME"));
-      else break; //skip, we couldn't correct it
+      else
+       continue; // skip this item, we couldn't do the substitution
     }
 
     if (bl.read_file(p->c_str(), true) == 0) {