]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: print is_admin as int instead of __u8 12264/head
authorCasey Bodley <cbodley@redhat.com>
Thu, 1 Dec 2016 19:25:47 +0000 (14:25 -0500)
committerCasey Bodley <cbodley@redhat.com>
Thu, 1 Dec 2016 19:25:50 +0000 (14:25 -0500)
RGWUserInfo::admin is a __u8, so printing it directly results in output
like '\00'. this causes some tools to interpret the radosgw log as a
binary file

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_auth.cc

index 4b5f784933c0de5b79e591eb14c68204559a6652..3d6489247cf4ceeb0392492811a6f6d2d0dd3403 100644 (file)
@@ -234,7 +234,7 @@ void RGWLocalAuthApplier::to_str(std::ostream& out) const
       << ", acct_name=" << user_info.display_name
       << ", subuser=" << subuser
       << ", perm_mask=" << get_perm_mask()
-      << ", is_admin=" << user_info.admin << ")";
+      << ", is_admin=" << static_cast<int>(user_info.admin) << ")";
 }
 
 uint32_t RGWLocalAuthApplier::get_perm_mask(const std::string& subuser_name,