const UserPerm *perms);
int ceph_ll_setxattr(struct ceph_mount_info *cmount, struct Inode *in,
const char *name, const void *value, size_t size,
- int flags, int uid, int gid);
+ int flags, const UserPerm *perms);
int ceph_ll_listxattr(struct ceph_mount_info *cmount, struct Inode *in,
- char *list, size_t buf_size, size_t *list_size, int uid, int gid);
+ char *list, size_t buf_size, size_t *list_size,
+ const UserPerm *perms);
int ceph_ll_removexattr(struct ceph_mount_info *cmount, struct Inode *in,
- const char *name, int uid, int gid);
+ const char *name, const UserPerm *perms);
int ceph_ll_create(struct ceph_mount_info *cmount, struct Inode *parent,
const char *name, mode_t mode, int flags,
struct stat *attr, struct Inode **out, Fh **fhp,
extern "C" int ceph_ll_listxattr(struct ceph_mount_info *cmount,
Inode *in, char *list,
- size_t buf_size, size_t *list_size, int uid, int gid)
+ size_t buf_size, size_t *list_size,
+ const UserPerm *perms)
{
- UserPerm perms(uid, gid);
- int res = cmount->get_client()->ll_listxattr(in, list, buf_size, perms);
+ int res = cmount->get_client()->ll_listxattr(in, list, buf_size, *perms);
if (res >= 0) {
*list_size = (size_t)res;
return 0;
extern "C" int ceph_ll_setxattr(class ceph_mount_info *cmount,
Inode *in, const char *name,
const void *value, size_t size,
- int flags, int uid, int gid)
+ int flags, const UserPerm *perms)
{
- UserPerm perms(uid, gid);
- return (cmount->get_client()->ll_setxattr(in, name, value, size, flags, perms));
+ return (cmount->get_client()->ll_setxattr(in, name, value, size, flags, *perms));
}
extern "C" int ceph_ll_removexattr(class ceph_mount_info *cmount,
Inode *in, const char *name,
- int uid, int gid)
+ const UserPerm *perms)
{
- UserPerm perms(uid, gid);
- return (cmount->get_client()->ll_removexattr(in, name, perms));
+ return (cmount->get_client()->ll_removexattr(in, name, *perms));
}
extern "C" int ceph_ll_getlk(struct ceph_mount_info *cmount,
const char *value = "attrvalue";
char value_buf[256] = { 0 };
- res = ceph_ll_setxattr(cmount, existent_file_handle, valid_name, value, strlen(value), 0, 0, 0);
+ res = ceph_ll_setxattr(cmount, existent_file_handle, valid_name, value, strlen(value), 0, perms);
ASSERT_EQ(res, 0);
res = ceph_ll_getxattr(cmount, existent_file_handle, valid_name, value_buf, 256, perms);