* @param name name of attribute
* @param value pointer to begin buffer
* @param size buffer size
- * @param uid user ID
- * @param gid group ID
+ * @param perms pointer to UserPerms object
* @returns size of returned buffer. Negative number in error case
*/
int ceph_ll_getxattr(struct ceph_mount_info *cmount, struct Inode *in,
- const char *name, void *value, size_t size, int uid,
- int gid);
+ const char *name, void *value, size_t size,
+ 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);
extern "C" int ceph_ll_getxattr(class ceph_mount_info *cmount,
Inode *in, const char *name, void *value,
- size_t size, int uid, int gid)
+ size_t size, const UserPerm *perms)
{
- UserPerm perms(uid, gid);
- return (cmount->get_client()->ll_getxattr(in, name, value, size, perms));
+ return (cmount->get_client()->ll_getxattr(in, name, value, size, *perms));
}
+
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)
res = ceph_ll_setxattr(cmount, existent_file_handle, valid_name, value, strlen(value), 0, 0, 0);
ASSERT_EQ(res, 0);
- res = ceph_ll_getxattr(cmount, existent_file_handle, valid_name, value_buf, 256, 0, 0);
+ res = ceph_ll_getxattr(cmount, existent_file_handle, valid_name, value_buf, 256, perms);
ASSERT_EQ(res, (int)strlen(value));
value_buf[res] = '\0';