MCPcopy Create free account
hub / github.com/ceph/ceph / get_fscrypt_key_status

Method get_fscrypt_key_status

src/client/Client.cc:18645–18675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18643}
18644
18645int Client::get_fscrypt_key_status(fscrypt_get_key_status_arg* arg) {
18646 ceph_fscrypt_key_identifier kid;
18647 int r = kid.init(arg->key_spec);
18648 if (r < 0) {
18649 return r;
18650 }
18651 unsigned int status = 0;
18652 unsigned int status_flags = 0;
18653 unsigned int user_count = 0;
18654
18655 FSCryptKeyHandlerRef kh;
18656 r = fscrypt->get_key_store().find(kid, kh);
18657
18658 if (!kh){
18659 status = FSCRYPT_KEY_STATUS_ABSENT;
18660 goto out;
18661 }
18662
18663 user_count = kh->get_users().size();
18664
18665 if (!kh->present) {
18666 status = FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED;
18667 } else {
18668 status = FSCRYPT_KEY_STATUS_PRESENT;
18669 }
18670out:
18671 arg->status = status;
18672 arg->status_flags = status_flags; //TODO: implement this
18673 arg->user_count = user_count;
18674 return 0;
18675}
18676#endif
18677// called before mount. 0 means infinite
18678void Client::set_session_timeout(unsigned timeout)

Callers 2

fuse_ll_ioctlFunction · 0.80

Calls 3

initMethod · 0.45
findMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected