rgw: do not use UNPRIVILEGED_DAEMON option

This is sort of a backport for 4f403c26dc0048ad63e20d20369fa86bfb31c50e
in that we get the same behavior change, but only for rgw.

Signed-off-by: Sage Weil <sage@inktank.com>
osd_types: add osd_perf_stat_t type

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 95f3353a6ab3a4dd2bf28eaca7122487942e913e)
ObjectStore: add ObjectStore::get_cur_stats and impl in FileStore

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit ebde89d5602536b4bc651737e4280fdfb6634c32)
OSDMonitor: add 'osd perf' command to dump recent osd perf information

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 94c3f29a32cbf169d896015da6765febd3c724e0)
rgw: turn swift COPY into PUT

Fixes: #6606
The swift COPY operation is unique in a sense that it's a write
operation that has its destination not set by the URI target, but by a
different HTTP header. This is problematic as there are some hidden
assumptions in the code that the specified bucket/object in the URI is
the operation target. E.g., certain initialization functions, quota,
etc. Instead of creating a specialized code everywhere for this case
just turn it into a regular copy operation, that is, a PUT with
a specified copy source.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit cbf8f9a51737e7d89fb0ec0832b50fd47c35b08d)
rgw: get rid of req_state.bucket_name

No need for this field, as we already have req_state.bucket_name_str.
This saves us some memory allocation / freeing through every request
processing.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit db7eb771226beaa2372ef5860ce742cb3457cd89)

Conflicts:
	src/rgw/rgw_rest_s3.cc
rgw: init src_bucket_name, src_object in the S3 handler

Be consistent and initialize these fields also in the S3 case.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit ccaab2abf9e49ce3e50c15df793a3a3ca6b29bb8)
Validate S3 tokens against Keystone

- Added config option to allow S3 to use Keystone auth
- Implemented JSONDecoder for KeystoneToken
- RGW_Auth_S3::authorize now uses rgw_store_user_info on keystone auth
- Minor fix in get_canon_resource; dout is now after the assignment

Reviewed-by: Yehuda Sadeh<yehuda@inktank.com>
Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
(cherry picked from commit a200e184b15a03a4ca382e94caf01efb41cb9db7)

Conflicts:
	src/rgw/rgw_swift.h
rgw: Allow wildcard in supported keystone roles.

http://tracker.ceph.com/issues/4365 fixes #4365

Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
(cherry picked from commit 60195581273aee259e8c83d0b471af859d928342)