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

Method fchmod

src/client/Client.cc:9244–9265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9242}
9243
9244int Client::fchmod(int fd, mode_t mode, const UserPerm& perms)
9245{
9246 RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
9247 if (!mref_reader.is_state_satisfied())
9248 return -ENOTCONN;
9249
9250 tout(cct) << __func__ << std::endl;
9251 tout(cct) << fd << std::endl;
9252 tout(cct) << mode << std::endl;
9253
9254 std::scoped_lock lock(client_lock);
9255 Fh *f = get_filehandle(fd);
9256 if (!f)
9257 return -EBADF;
9258#if defined(__linux__) && defined(O_PATH)
9259 if (f->flags & O_PATH)
9260 return -EBADF;
9261#endif
9262 struct stat attr;
9263 attr.st_mode = mode;
9264 return _setattr(f->inode, &attr, CEPH_SETATTR_MODE, perms);
9265}
9266
9267int Client::chmodat(int dirfd, const char *relpath, mode_t mode, int flags,
9268 const UserPerm& perms) {

Callers 12

_verify_quiesceMethod · 0.45
ceph_fchmodFunction · 0.45
authorize_ssh_keyFunction · 0.45
revoke_ssh_keyFunction · 0.45
write_newFunction · 0.45
write_tmp_fileFunction · 0.45
_write_remote_fileMethod · 0.45
_reconfig_sshMethod · 0.45
run_grace_toolMethod · 0.45
_get_ssl_ca_bundleMethod · 0.45
test_fchmodFunction · 0.45

Calls 1

is_state_satisfiedMethod · 0.80

Tested by 3

_verify_quiesceMethod · 0.36
test_fchmodFunction · 0.36