]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: policy can parse IfExists conditions
authorCasey Bodley <cbodley@redhat.com>
Thu, 20 Jul 2017 20:06:27 +0000 (16:06 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 21 Jul 2017 15:41:26 +0000 (11:41 -0400)
commit2bb7408b60cffe0e9a0886cd2f344223e75e5c9d
tree927e2b8ac24698d4dd76bc006cbb7b818a9591f5
parent153d030e1db99ef71454b29bd8036a7ac1131ed8
rgw: policy can parse IfExists conditions

when ParseState::key() encounters a condition statement ending with
IfExists, it looks up the token by its prefix only

because this prefix is not null-terminated, the gperf-generated
comparison has to be modified to use strncmp() instead of strcmp() by
adding the %compare-strncmp flag to the gperf file

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_iam_policy.cc
src/rgw/rgw_iam_policy.h
src/rgw/rgw_iam_policy_keywords.gperf