summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-09-09 19:31:03 +0200
committerGünther Deschner <gd@samba.org>2008-09-11 14:36:28 +0200
commitcb1e34745b180f93a58d29a566ac11b4253ff806 (patch)
tree72882a6aa51a65c762d17d2cac91746eccc793e2
parent120e7ba1f43783e451ab752ac4d4aee11a50d777 (diff)
downloadsamba-cb1e34745b180f93a58d29a566ac11b4253ff806.tar.gz
samba-cb1e34745b180f93a58d29a566ac11b4253ff806.tar.bz2
samba-cb1e34745b180f93a58d29a566ac11b4253ff806.zip
netapi: implement NetFileClose_r.
Guenther (This used to be commit 0cbbdf21ed0c9270c00a7fd08f42f6546b9ac9b8)
-rw-r--r--source3/lib/netapi/file.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/source3/lib/netapi/file.c b/source3/lib/netapi/file.c
index aa80e8d56a..c0edb8e062 100644
--- a/source3/lib/netapi/file.c
+++ b/source3/lib/netapi/file.c
@@ -30,7 +30,33 @@
WERROR NetFileClose_r(struct libnetapi_ctx *ctx,
struct NetFileClose *r)
{
- return WERR_NOT_SUPPORTED;
+ WERROR werr;
+ NTSTATUS status;
+ struct cli_state *cli = NULL;
+ struct rpc_pipe_client *pipe_cli = NULL;
+
+ werr = libnetapi_open_pipe(ctx, r->in.server_name,
+ &ndr_table_srvsvc.syntax_id,
+ &cli,
+ &pipe_cli);
+ if (!W_ERROR_IS_OK(werr)) {
+ goto done;
+ }
+
+ status = rpccli_srvsvc_NetFileClose(pipe_cli, ctx,
+ r->in.server_name,
+ r->in.fileid,
+ &werr);
+ if (!W_ERROR_IS_OK(werr)) {
+ goto done;
+ }
+
+ done:
+ if (!cli) {
+ return werr;
+ }
+
+ return werr;
}
/****************************************************************