diff options
author | Jeff Layton <jlayton@redhat.com> | 2016-10-24 16:02:58 +0200 |
---|---|---|
committer | Jeff Layton <jlayton@redhat.com> | 2016-10-25 19:05:16 +0200 |
commit | 35cd1a78428a15ee7ce587e28c3c03e8df2b5568 (patch) | |
tree | a202d58b9af75ba1edeae504f620cabf4a3cc336 /src/libcephfs.cc | |
parent | client: allow UserPerm constructor to populate gid list (diff) | |
download | ceph-35cd1a78428a15ee7ce587e28c3c03e8df2b5568.tar.xz ceph-35cd1a78428a15ee7ce587e28c3c03e8df2b5568.zip |
client: add C bindings for UserPerm constructor and destructor
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'src/libcephfs.cc')
-rw-r--r-- | src/libcephfs.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libcephfs.cc b/src/libcephfs.cc index f5e31c9ccbd..8b33968346c 100644 --- a/src/libcephfs.cc +++ b/src/libcephfs.cc @@ -284,6 +284,17 @@ static void do_out_buffer(string& outbl, char **outbuf, size_t *outbuflen) *outbuflen = outbl.length(); } +extern "C" UserPerm *ceph_userperm_new(uid_t uid, gid_t gid, int ngids, + gid_t *gidlist) +{ + return new (std::nothrow) UserPerm(uid, gid, ngids, gidlist); +} + +extern "C" void ceph_userperm_destroy(UserPerm *perm) +{ + delete perm; +} + extern "C" const char *ceph_version(int *pmajor, int *pminor, int *ppatch) { int major, minor, patch; |