]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix keystone token expiration test
authorYehuda Sadeh <yehuda@inktank.com>
Fri, 20 Sep 2013 21:04:47 +0000 (14:04 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Thu, 3 Oct 2013 21:46:30 +0000 (14:46 -0700)
Fixes: #6360
The test was inverted, need expiration to be greater than
current time in order for token to be valid.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/rgw/rgw_swift.h

index febc2675c27dca330588adff547d785bbf56a79f..cb00c40638aae5d406270caf4ac49cdfc0f50b29 100644 (file)
@@ -32,7 +32,7 @@ public:
 
   bool expired() {
     uint64_t now = ceph_clock_now(NULL).sec();
-    return (now < (uint64_t)expiration);
+    return (now >= (uint64_t)expiration);
   }
 };