X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Frgw%2Frgw_aclparser.cc;fp=src%2Fceph%2Fsrc%2Frgw%2Frgw_aclparser.cc;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=4367fd45bfe13568122027135bb065ee4ebaa7f0;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/rgw/rgw_aclparser.cc b/src/ceph/src/rgw/rgw_aclparser.cc deleted file mode 100644 index 4367fd4..0000000 --- a/src/ceph/src/rgw/rgw_aclparser.cc +++ /dev/null @@ -1,61 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab - -#include - -#include "common/ceph_context.h" -#include "include/types.h" -#include "rgw/rgw_acl.h" - -#include -#include - -#define dout_subsys ceph_subsys_rgw - -int main(int argc, char **argv) { - RGWACLXMLParser parser; - - if (!parser.init()) - exit(1); - - char buf[1024]; - - for (;;) { - int done; - int len; - - len = fread(buf, 1, sizeof(buf), stdin); - if (ferror(stdin)) { - fprintf(stderr, "Read error\n"); - exit(-1); - } - done = feof(stdin); - - parser.parse(buf, len, done); - - if (done) - break; - } - - RGWAccessControlPolicy *policy = (RGWAccessControlPolicy *)parser.find_first("AccessControlPolicy"); - - if (policy) { - string id="79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be"; - dout(10) << hex << policy->get_perm(g_ceph_context, id, RGW_PERM_ALL) << dec << dendl; - policy->to_xml(cout); - } - - cout << parser.get_xml() << endl; - - bufferlist bl; - policy->encode(bl); - - RGWAccessControlPolicy newpol; - bufferlist::iterator iter = bl.begin(); - newpol.decode(iter); - - newpol.to_xml(cout); - - exit(0); -} -