X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=nfs%2Fnfsacl.c;h=4561589d1ca9e9f1a8fb616be8f8b131d3c8f35e;hb=fa3c25beeeb4c533089a2af8454ef50e21e7b8f5;hp=797745c1f514b5a7e33964700df1d5359d723293;hpb=3847f8f6ae1ff8c10513c3f24cb43942737cc6d0;p=deb_libnfs.git
diff --git a/nfs/nfsacl.c b/nfs/nfsacl.c
index 797745c..4561589 100644
--- a/nfs/nfsacl.c
+++ b/nfs/nfsacl.c
@@ -14,10 +14,14 @@
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, see .
*/
+#ifdef WIN32
+#include "win32_compat.h"
+#else
+#include
+#endif/*WIN32*/
#include
#include
-#include
#include
#include
#include
@@ -76,3 +80,28 @@ int rpc_nfsacl_getacl_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 *
return 0;
}
+
+int rpc_nfsacl_setacl_async(struct rpc_context *rpc, rpc_cb cb, struct SETACL3args *args, void *private_data)
+{
+ struct rpc_pdu *pdu;
+
+ pdu = rpc_allocate_pdu(rpc, NFSACL_PROGRAM, NFSACL_V3, NFSACL3_SETACL, cb, private_data, (xdrproc_t)xdr_SETACL3res, sizeof(SETACL3res));
+ if (pdu == NULL) {
+ rpc_set_error(rpc, "Out of memory. Failed to allocate pdu for nfsacl/setacl call");
+ return -1;
+ }
+
+ if (xdr_SETACL3args(&pdu->xdr, args) == 0) {
+ rpc_set_error(rpc, "XDR error: Failed to encode SETACL3args");
+ rpc_free_pdu(rpc, pdu);
+ return -2;
+ }
+
+ if (rpc_queue_pdu(rpc, pdu) != 0) {
+ rpc_set_error(rpc, "Out of memory. Failed to queue pdu for nfsacl/setacl call");
+ rpc_free_pdu(rpc, pdu);
+ return -2;
+ }
+
+ return 0;
+}