]>
git.apps.os.sepia.ceph.com Git - ceph.git/log
Adam Kupczyk [Mon, 19 Oct 2015 10:20:37 +0000 (12:20 +0200)]
Speed optimizations. Merged 3 writes into 1.
Got rid of std::string construction.
More unification on syslog,stderr,fd.
Signed-off-by: Adam Kupczyk <akupczyk@mirantis.com>
Sage Weil [Thu, 1 Oct 2015 15:51:50 +0000 (11:51 -0400)]
Merge remote-tracking branch 'gh/infernalis'
Sage Weil [Thu, 1 Oct 2015 15:03:09 +0000 (11:03 -0400)]
Merge branch 'wip-mdscap'
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Reviewed-by: Yan, Zheng <zyan@redhat.com>
Ken Dreyer [Thu, 1 Oct 2015 15:04:15 +0000 (09:04 -0600)]
Merge pull request #6114 from SUSE/wip-suse-spec-fixes
ceph.spec.in: correctly declare systemd dependency for SLE/openSUSE
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Sage Weil [Thu, 1 Oct 2015 14:15:52 +0000 (10:15 -0400)]
Merge pull request #6134 from SUSE/wip-13318-infernalis
install-deps.sh: openSUSE-release/sles-release/sled-release are always present
Nathan Cutler [Thu, 1 Oct 2015 14:04:26 +0000 (16:04 +0200)]
install-deps.sh: openSUSE-release/sles-release/sled-release are always present
http://tracker.ceph.com/issues/13318 Fixes: #13318
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Sage Weil [Thu, 3 Sep 2015 17:47:55 +0000 (13:47 -0400)]
ceph_test_libcephfs: remove remaining pool name assumptions
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Thu, 3 Sep 2015 17:41:43 +0000 (13:41 -0400)]
client: clarify setattr forced sync behavior
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Thu, 3 Sep 2015 17:29:33 +0000 (13:29 -0400)]
qa/workunits/fs/test_auth_caps: superceded by ceph_test_libcephfs
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Thu, 3 Sep 2015 17:28:45 +0000 (13:28 -0400)]
ceph_test_libcephfs: fix LibCephFS.OpenLayout test
We can't make assumptions about the name of the data pool.
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Thu, 3 Sep 2015 17:08:00 +0000 (13:08 -0400)]
unittest_mds_authcap: improve user tests
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Thu, 3 Sep 2015 16:44:20 +0000 (12:44 -0400)]
mds: drop MAY_CREATE
The check is a no-op. We already verify the uid/gid combo is valid and
that the dir is writeable with MAY_WRITE. The new file is always set to
the caller uid:gid.
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Thu, 3 Sep 2015 16:34:33 +0000 (12:34 -0400)]
mds/MDSAuthCap: verify the caller_gid is valid
Verify both the caller uid and gid are a match for the given rule.
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Thu, 3 Sep 2015 16:21:47 +0000 (12:21 -0400)]
mds: fix chown/chgrp check and tests
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Thu, 3 Sep 2015 14:56:11 +0000 (10:56 -0400)]
mds/MDSAuthCaps: rename args for is_capable
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Thu, 3 Sep 2015 14:45:18 +0000 (10:45 -0400)]
ceph_test_libcephfs: add AccessTest.User
Covers read/write/create.
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Thu, 3 Sep 2015 14:44:59 +0000 (10:44 -0400)]
mds/SessionMap: fix MAY_CREATE check
It's about caller_uid/gid.
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Wed, 2 Sep 2015 14:43:44 +0000 (10:43 -0400)]
ceph_test_libcephfs: make foo, path tests use unique paths, users
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Wed, 2 Sep 2015 02:31:39 +0000 (22:31 -0400)]
qa/workunits: drop bash path tests
ceph_test_libcephfs ones are better.
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Wed, 2 Sep 2015 02:30:36 +0000 (22:30 -0400)]
mds/SessionMap: fix check_access for stray inodes
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Wed, 2 Sep 2015 02:26:01 +0000 (22:26 -0400)]
mds/SessionMap: move Session method definitions together
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Wed, 2 Sep 2015 02:14:27 +0000 (22:14 -0400)]
mds/Locker: do not ack from do_cap_update
Caller (handle_client_caps) already does it if we return
false.
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Tue, 1 Sep 2015 20:52:27 +0000 (16:52 -0400)]
ceph_test_libcephfs: fix update-after-unlink test
This needs to be done with a user restricted to a path.
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Fri, 28 Aug 2015 21:32:11 +0000 (17:32 -0400)]
mds/Server: skip auth check on session-less mdr's
The mds internal requests don't have a session.
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Wed, 19 Aug 2015 13:48:16 +0000 (09:48 -0400)]
client: do sync setattr when caller != last cap dirtier
This way we can still do cap writeback in general when the caller is not
the same as the mount_uid/gid, but we flip to a sync setattr when we have
to because the dirty caps have a different uid/gid than the current
caller.
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Wed, 19 Aug 2015 13:38:25 +0000 (09:38 -0400)]
client: consolidate client_mount_{uid,gid} and client_{user,group}_id options
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Wed, 19 Aug 2015 13:36:16 +0000 (09:36 -0400)]
client: add get_{uid,gid} helpers for consistent uid/gids
Signed-off-by: Sage Weil <sage@redhat.com>
Nishtha Rai [Wed, 5 Aug 2015 14:05:39 +0000 (19:35 +0530)]
add caps_dirty to setattr
Signed-off-by: Nishtha Rai <nishtha3rai@gmail.com>
Sage Weil [Mon, 24 Aug 2015 17:02:40 +0000 (13:02 -0400)]
unittest_mds_authcaps: fix a few unit tests
The MAY_CREATE conditoin is simple: the created inode must match the caller
uid and gid.
Signed-off-by: Sage Weil <sage@redhat.com>
Jashan Kamboj [Wed, 12 Aug 2015 15:38:02 +0000 (21:08 +0530)]
fix test_path_caps
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Wed, 12 Aug 2015 15:39:24 +0000 (21:09 +0530)]
doc:fix path-based restriction
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Tue, 18 Aug 2015 15:09:58 +0000 (20:39 +0530)]
test/libcephfs/access: add update_after_unlink test
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Mon, 17 Aug 2015 20:23:36 +0000 (01:53 +0530)]
test/libcephfs/access: add ReadOnly restriction test
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Mon, 17 Aug 2015 20:22:19 +0000 (01:52 +0530)]
test/libcephfs/access: add Path restriction test
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Nishtha Rai [Mon, 17 Aug 2015 14:50:46 +0000 (20:20 +0530)]
client/Client: added client_mount_uid and gid as parameters to getattr call
Signed-off-by: Nishtha Rai <nishtha3rai@gmail.com>
Sage Weil [Mon, 17 Aug 2015 14:08:55 +0000 (10:08 -0400)]
mds/MDSAuthCap: fix creation ownership check
Check uid too.
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Mon, 17 Aug 2015 14:07:15 +0000 (10:07 -0400)]
mds/MDSAuthCaps: whitespace
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Mon, 17 Aug 2015 14:07:07 +0000 (10:07 -0400)]
mds/MDSAuthCaps: only verify create git when not AUTH_UID_ANY
Signed-off-by: Sage Weil <sage@redhat.com>
Yan, Zheng [Fri, 14 Aug 2015 07:33:27 +0000 (15:33 +0800)]
mds: send cap flush ack even when access check failed.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Yan, Zheng [Fri, 14 Aug 2015 07:29:02 +0000 (15:29 +0800)]
client: force setattr to MDS when caller's {uid,gid} are not the specified ones
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Yan, Zheng [Fri, 14 Aug 2015 07:21:17 +0000 (15:21 +0800)]
client: allow specifying default caller_{uid,gid} of MClientRequest
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Yan, Zheng [Fri, 14 Aug 2015 07:04:22 +0000 (15:04 +0800)]
client: add options to specify caller_{uid,gid} of MClientCaps
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Yan, Zheng [Fri, 14 Aug 2015 06:49:08 +0000 (14:49 +0800)]
messages: add caller_{uid,gid} to cap msgs
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Sage Weil [Wed, 12 Aug 2015 18:36:54 +0000 (14:36 -0400)]
test/libcephfs/access: expand example test a bit
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Wed, 12 Aug 2015 17:58:05 +0000 (13:58 -0400)]
mds/Server: fix check_access
Pass through correct mask. Clean up formatting.
Signed-off-by: Sage Weil <sage@redhat.com>
Yan, Zheng [Wed, 12 Aug 2015 07:36:06 +0000 (15:36 +0800)]
client: properly set caller_{uid,gid} of readdir request
save uid/gid of ll_opendir caller in dir_result_t, use the saved
uid/gid for readdir request.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Sage Weil [Mon, 10 Aug 2015 17:50:36 +0000 (13:50 -0400)]
ceph_test_libcephfs: skeleton for access tests
Signed-off-by: Sage Weil <sage@redhat.com>
Yan, Zheng [Mon, 10 Aug 2015 08:31:53 +0000 (16:31 +0800)]
mds: fix Server::check_access
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Jashan Kamboj [Tue, 4 Aug 2015 17:59:19 +0000 (23:29 +0530)]
doc/cephfs: path-based restriction
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Mon, 3 Aug 2015 19:11:15 +0000 (00:41 +0530)]
add check_access in _do_cap_update
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Mon, 3 Aug 2015 18:48:38 +0000 (00:18 +0530)]
move _check_access to SessionMap
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Fri, 31 Jul 2015 20:47:05 +0000 (02:17 +0530)]
add _check_access for async cap updates
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Thu, 30 Jul 2015 15:43:23 +0000 (21:13 +0530)]
add stray_prior_path for is_stray
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Tue, 28 Jul 2015 19:07:34 +0000 (00:37 +0530)]
add stray_prior_path to store path before rename
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Nishtha Rai [Fri, 31 Jul 2015 17:31:04 +0000 (23:01 +0530)]
mds/MDSAuthCaps: add test cases for is_capable
Nishtha Rai [Wed, 29 Jul 2015 14:20:25 +0000 (19:50 +0530)]
mds/Server: add chown and chgrp check access to setattr
Nishtha Rai [Tue, 28 Jul 2015 17:56:19 +0000 (23:26 +0530)]
mds/Server: add create access check for openc
Signed-off-by: Nishtha Rai <nishtha3rai@gmail.com>
Nishtha Rai [Tue, 28 Jul 2015 17:08:15 +0000 (22:38 +0530)]
Server: add create access check for mknod and symlink
Nishtha Rai [Tue, 28 Jul 2015 17:05:54 +0000 (22:35 +0530)]
test_auth_caps: add mkdir check with mode 557
Nishtha Rai [Mon, 27 Jul 2015 13:34:30 +0000 (19:04 +0530)]
test_auth_caps: resolve bug with other bits test case
Nishtha Rai [Mon, 27 Jul 2015 12:58:40 +0000 (18:28 +0530)]
test_auth_caps: remove grp mount
Signed-off-by: Nishtha Rai <nishtha3rai@gmail.com>
Nishtha Rai [Thu, 23 Jul 2015 15:20:18 +0000 (20:50 +0530)]
MDSAuthCaps: validate create access
Signed-off-by: Nishtha Rai <nishtha3rai@gmail.com>
Jashan Kamboj [Tue, 28 Jul 2015 16:54:36 +0000 (22:24 +0530)]
add stray_prior_path to store path before unlink
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Fri, 24 Jul 2015 16:12:43 +0000 (21:42 +0530)]
add open check_access
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Tue, 21 Jul 2015 19:36:50 +0000 (01:06 +0530)]
add link check_access
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Tue, 21 Jul 2015 19:35:37 +0000 (01:05 +0530)]
add rename check_access
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Tue, 21 Jul 2015 19:33:27 +0000 (01:03 +0530)]
add snaps(ls,mk,rm,rename) check_access
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Tue, 21 Jul 2015 17:10:00 +0000 (22:40 +0530)]
add setlayout, setdirlayout, setxattr check_access
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Tue, 21 Jul 2015 17:08:20 +0000 (22:38 +0530)]
add readdir check_access
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Sage Weil [Tue, 21 Jul 2015 16:50:24 +0000 (12:50 -0400)]
mds/Server: clean up check_access a bit
Signed-off-by: Sage Weil <sage@redhat.com>
Nishtha Rai [Tue, 21 Jul 2015 15:09:40 +0000 (20:39 +0530)]
MDSAuthCaps: add logic for group bits check
Signed-off-by: Nishtha Rai <nishtha3rai@gmail.com>
Nishtha Rai [Mon, 20 Jul 2015 16:04:04 +0000 (21:34 +0530)]
test_auth_caps: add test for user bits
Signed-off-by: Nishtha Rai <nishtha3rai@gmail.com>
Nishtha Rai [Mon, 20 Jul 2015 14:01:25 +0000 (19:31 +0530)]
mds/MDSAuthCaps: add permissions for user bits
Signed-off-by: Nishtha Rai <nishtha3rai@gmail.com>
Sage Weil [Mon, 20 Jul 2015 17:58:23 +0000 (13:58 -0400)]
Makefile: include ceph-fuse in base target
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Tue, 1 Sep 2015 20:48:17 +0000 (16:48 -0400)]
client: behave if we can't getattr parents of mount point
If our cap locks us into a subdirectory (e.g., /foo), we will fail to
getattr on its parents (e.g., /). This is expected. Tolerate this case,
and warn that quotas may misbehave in that case (if they are set on one of
those parents).
Signed-off-by: Sage Weil <sage@redhat.com>
Nishtha Rai [Mon, 20 Jul 2015 13:32:03 +0000 (19:02 +0530)]
test_auth_caps: Move trap and cleanup to the top
Nishtha Rai [Thu, 16 Jul 2015 20:22:16 +0000 (01:52 +0530)]
test_auth_caps: Added test logic for world bits
Nishtha Rai [Mon, 20 Jul 2015 13:35:01 +0000 (09:35 -0400)]
MDSAuthCaps: add world bits check logic
Signed-off-by: Nishtha Rai <nishtha3rai@gmail.com>
Sage Weil [Thu, 16 Jul 2015 20:00:55 +0000 (16:00 -0400)]
client: pass uid, gid to lookup
The MDS cares about who is performing lookup, too!
Signed-off-by: Sage Weil <sage@redhat.com>
Jashan Kamboj [Wed, 15 Jul 2015 13:56:40 +0000 (19:26 +0530)]
add unlink, rmdir check_access test
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Wed, 15 Jul 2015 13:43:19 +0000 (19:13 +0530)]
add unlink, rmdir check_access
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Tue, 14 Jul 2015 21:32:49 +0000 (03:02 +0530)]
add symlink test
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Tue, 14 Jul 2015 21:30:38 +0000 (03:00 +0530)]
add symlink check_access
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Tue, 14 Jul 2015 21:29:43 +0000 (02:59 +0530)]
Add mknod check_access
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Sage Weil [Fri, 10 Jul 2015 18:42:59 +0000 (14:42 -0400)]
qa/workunits/fs/test_path_caps: tolerate existing directories
Signed-off-by: Sage Weil <sage@redhat.com>
Jashan Kamboj [Fri, 10 Jul 2015 18:30:28 +0000 (00:00 +0530)]
functional test of mds cap path restriction
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Jashan Kamboj [Fri, 10 Jul 2015 14:20:15 +0000 (19:50 +0530)]
mds/Server.cc: drop leading / from path in is_capable check
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Sage Weil [Thu, 9 Jul 2015 16:13:55 +0000 (12:13 -0400)]
unittest_mds_authcap: test lists of allow grants
Signed-off-by: Sage Weil <sage@redhat.com>
Jashan Kamboj [Thu, 9 Jul 2015 13:41:12 +0000 (19:11 +0530)]
mds: mkdir check_access
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Sage Weil [Thu, 9 Jul 2015 15:18:42 +0000 (11:18 -0400)]
mds/MDSAuthCaps: fix parse error message
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Thu, 9 Jul 2015 15:18:08 +0000 (11:18 -0400)]
mds: whitespace
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Thu, 9 Jul 2015 15:18:04 +0000 (11:18 -0400)]
mds: log to cluster log if mds cap parse fails
It's an admin error; tell an admin.
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Wed, 8 Jul 2015 20:20:46 +0000 (16:20 -0400)]
mds/MDSAuthCaps: debug is_capable
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Wed, 8 Jul 2015 20:15:05 +0000 (16:15 -0400)]
mds/MDSAuthCap: fix debug prefix
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Wed, 8 Jul 2015 20:01:07 +0000 (16:01 -0400)]
mds/MDSAuthCap: drop leading / in paths
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Wed, 8 Jul 2015 19:58:51 +0000 (15:58 -0400)]
mds/MDSAuthCaps: fix allow_all
Empty path is '', not '/'.
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Wed, 8 Jul 2015 19:47:00 +0000 (15:47 -0400)]
mds/MDSAuthCaps: add cct for debug context
signed-off-by: Nishtha Rai <nishtha3rai@gmail.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Jashan Kamboj [Mon, 15 Jun 2015 21:20:55 +0000 (02:50 +0530)]
mds: calculate path in check_access()
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
Sage Weil [Thu, 4 Jun 2015 21:40:21 +0000 (14:40 -0700)]
mds/MDSAuthCaps: normalize path, drop useless constant.
Use an empty string for no path--this is more efficient. This generalizes
to losing any leading '/' character.
Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Thu, 4 Jun 2015 20:52:05 +0000 (13:52 -0700)]
mds/MDSAuthCaps: pass down inode uid.gid and mode
We will need this to evaluate the unix permissions.
Signed-off-by: Sage Weil <sage@redhat.com>