linux/net/ceph
Ilya Dryomov 61ca49a910 libceph: don't set global_id until we get an auth ticket
With the introduction of enforcing mode, setting global_id as soon
as we get it in the first MAuth reply will result in EACCES if the
connection is reset before we get the second MAuth reply containing
an auth ticket -- because on retry we would attempt to reclaim that
global_id with no auth ticket at hand.

Neither ceph_auth_client nor ceph_mon_client depend on global_id
being set ealy, so just delay the setting until we get and process
the second MAuth reply.  While at it, complain if the monitor sends
a zero global_id or changes our global_id as the session is likely
to fail after that.

Cc: stable@vger.kernel.org # needs backporting for < 5.11
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2021-04-27 23:52:24 +02:00
..
crush treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
armor.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
auth_none.c libceph: drop ac->ops->name field 2020-12-14 23:21:50 +01:00
auth_none.h ceph: fix whitespace 2018-08-02 21:33:21 +02:00
auth_x_protocol.h libceph, ceph: incorporate nautilus cephx changes 2020-12-14 23:21:50 +01:00
auth_x.c libceph: bump CephXAuthenticate encoding version 2021-04-27 23:52:24 +02:00
auth_x.h ceph: fix whitespace 2018-08-02 21:33:21 +02:00
auth.c libceph: don't set global_id until we get an auth ticket 2021-04-27 23:52:24 +02:00
buffer.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ceph_common.c libceph: remove osdtimeout option entirely 2021-02-16 12:09:52 +01:00
ceph_hash.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ceph_strings.c libceph: introduce connection modes and ms_mode option 2020-12-14 23:21:50 +01:00
cls_lock_client.c rbd: support for object-map and fast-diff 2019-07-08 14:01:45 +02:00
crypto.c libceph: zero out session key and connection secret 2021-01-04 17:31:32 +01:00
crypto.h libceph, ceph: incorporate nautilus cephx changes 2020-12-14 23:21:50 +01:00
debugfs.c libceph: dump class and method names on method calls 2020-08-03 11:03:01 +02:00
decode.c libceph, ceph: implement msgr2.1 protocol (crc and secure modes) 2020-12-14 23:21:50 +01:00
Kconfig libceph, ceph: implement msgr2.1 protocol (crc and secure modes) 2020-12-14 23:21:50 +01:00
Makefile libceph, ceph: implement msgr2.1 protocol (crc and secure modes) 2020-12-14 23:21:50 +01:00
messenger_v1.c libceph: fix "Boolean result is used in bitwise operation" warning 2021-01-21 16:49:59 +01:00
messenger_v2.c libceph: zero out session key and connection secret 2021-01-04 17:31:32 +01:00
messenger.c libceph, ceph: implement msgr2.1 protocol (crc and secure modes) 2020-12-14 23:21:50 +01:00
mon_client.c libceph, ceph: disambiguate ceph_connection_operations handlers 2021-01-04 17:31:32 +01:00
msgpool.c libceph: preallocate message data items 2018-10-22 10:28:22 +02:00
osd_client.c libceph, ceph: disambiguate ceph_connection_operations handlers 2021-01-04 17:31:32 +01:00
osdmap.c libceph, ceph: get and handle cluster maps with addrvecs 2020-12-14 23:21:50 +01:00
pagelist.c libceph: introduce ceph_pagelist_alloc() 2018-10-22 10:28:21 +02:00
pagevec.c libceph: remove ceph_get_direct_page_vector() 2019-07-08 14:01:40 +02:00
snapshot.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 268 2019-06-05 17:30:29 +02:00
string_table.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
striper.c rbd: support for object-map and fast-diff 2019-07-08 14:01:45 +02:00