]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Fix return value for swift user not found 385/head
authorChristophe Courtaut <christophe.courtaut@gmail.com>
Mon, 1 Jul 2013 12:57:17 +0000 (14:57 +0200)
committerChristophe Courtaut <christophe.courtaut@gmail.com>
Mon, 1 Jul 2013 12:57:17 +0000 (14:57 +0200)
http://tracker.ceph.com/issues/1779 fixes #1779

Adjust the return value from rgw_get_user_info_by_swift call
in RGW_SWIFT_Auth_Get::execute() to have the correct
return code in response.

src/rgw/rgw_swift_auth.cc

index b0be5d459387248ffcbb7d9e2e43fbb067c99585..d0987e1033359ec13d9dbb2a31d82f331fe741bb 100644 (file)
@@ -181,7 +181,10 @@ void RGW_SWIFT_Auth_Get::execute()
   user_str = user;
 
   if ((ret = rgw_get_user_info_by_swift(store, user_str, info)) < 0)
+  {
+    ret = -EACCES;
     goto done;
+  }
 
   siter = info.swift_keys.find(user_str);
   if (siter == info.swift_keys.end()) {