1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
6 #include "common/ceph_context.h"
7 #include "include/types.h"
8 #include "rgw/rgw_acl.h"
13 #define dout_subsys ceph_subsys_rgw
15 int main(int argc
, char **argv
) {
16 RGWACLXMLParser parser
;
27 len
= fread(buf
, 1, sizeof(buf
), stdin
);
29 fprintf(stderr
, "Read error\n");
34 parser
.parse(buf
, len
, done
);
40 RGWAccessControlPolicy
*policy
= (RGWAccessControlPolicy
*)parser
.find_first("AccessControlPolicy");
43 string id
="79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be";
44 dout(10) << hex
<< policy
->get_perm(g_ceph_context
, id
, RGW_PERM_ALL
) << dec
<< dendl
;
48 cout
<< parser
.get_xml() << endl
;
53 RGWAccessControlPolicy newpol
;
54 bufferlist::iterator iter
= bl
.begin();