* @param gid the group id to set on the file/directory.
* @returns 0 on success or negative error code on failure.
*/
-int ceph_chown(struct ceph_mount_info *cmount, const char *path, int uid, int gid);
+int ceph_chown(struct ceph_mount_info *cmount, const char *path, uid_t uid, gid_t gid);
/**
* Change the ownership of a file from an open file descriptor.
* @param gid the group id to set on the file/directory.
* @returns 0 on success or negative error code on failure.
*/
-int ceph_fchown(struct ceph_mount_info *cmount, int fd, int uid, int gid);
+int ceph_fchown(struct ceph_mount_info *cmount, int fd, uid_t uid, gid_t gid);
/**
* Change the ownership of a file/directory, don't follow symlinks.
* @param gid the group id to set on the file/directory.
* @returns 0 on success or negative error code on failure.
*/
-int ceph_lchown(struct ceph_mount_info *cmount, const char *path, int uid, int gid);
+int ceph_lchown(struct ceph_mount_info *cmount, const char *path, uid_t uid, gid_t gid);
/**
* Change the ownership of a file/directory releative to a file descriptor.
}
extern "C" int ceph_chown(struct ceph_mount_info *cmount, const char *path,
- int uid, int gid)
+ uid_t uid, gid_t gid)
{
if (!cmount->is_mounted())
return -ENOTCONN;
return cmount->get_client()->chown(path, uid, gid, cmount->default_perms);
}
extern "C" int ceph_fchown(struct ceph_mount_info *cmount, int fd,
- int uid, int gid)
+ uid_t uid, gid_t gid)
{
if (!cmount->is_mounted())
return -ENOTCONN;
return cmount->get_client()->fchown(fd, uid, gid, cmount->default_perms);
}
extern "C" int ceph_lchown(struct ceph_mount_info *cmount, const char *path,
- int uid, int gid)
+ uid_t uid, gid_t gid)
{
if (!cmount->is_mounted())
return -ENOTCONN;
cdef:
char* _path = path
- int _uid = uid
- int _gid = gid
+ uid_t _uid = uid
+ gid_t _gid = gid
if follow_symlink:
with nogil:
ret = ceph_chown(self.cluster, _path, _uid, _gid)
cdef:
int _fd = fd
- int _uid = uid
- int _gid = gid
+ uid_t _uid = uid
+ gid_t _gid = gid
with nogil:
ret = ceph_fchown(self.cluster, _fd, _uid, _gid)
if ret < 0:
cdef extern from "sys/types.h":
ctypedef unsigned long mode_t
ctypedef unsigned long dev_t
+ ctypedef unsigned int uid_t;
+ ctypedef unsigned int gid_t;
cdef extern from "sys/time.h":
cdef struct timeval: