[SCM] Samba Shared Repository - branch v3-devel updated - release-3-2-0pre2-4141-gf85dcf8

Günther Deschner gd at samba.org
Thu Sep 11 12:40:14 GMT 2008


The branch, v3-devel has been updated
       via  f85dcf8112137b7ad07f2b51eeca598e9c4d0ffa (commit)
       via  fd3d130d25a7c30fe003abe01fc18d8f754a466f (commit)
       via  fd66b72fd017013c83d36f5219192716eb17cacb (commit)
       via  32ee2dadab5b2579d53d0ecb106f0e64063da3f7 (commit)
       via  50ce2a3d1a520bd1508110872e871c2c67e0f606 (commit)
       via  8113249fe3be2968257bd6a4a12153104d91132e (commit)
       via  995dea40629883ae9ac2871eeb033a168a3b4935 (commit)
       via  5c234a53739d74d3cc80c4409aa32238541b31d6 (commit)
       via  66158036423f8e875921b7ba36f048033c3e98a6 (commit)
       via  5dd017b33f7d4154966aa3633d3ef3c8b482ca62 (commit)
       via  de84049bc14d5c2061cdb701fd81a7fed1546eed (commit)
       via  6c61c2e35e60a7b1398533311dab5eee38eb3b09 (commit)
       via  e82c7481a01283f446ccf5e34261835d5b69f969 (commit)
       via  368b4d262a584eb0c44e19367c1f444723efce98 (commit)
       via  0cbbdf21ed0c9270c00a7fd08f42f6546b9ac9b8 (commit)
       via  9d6e3655346b6d1e08fd180ced9bd60ee1bc2f8f (commit)
       via  502bbf00faa500765d1a9dedc1cede271c89b7d1 (commit)
       via  4a006ae644bd85b670aab835dc7d90dadaec3503 (commit)
       via  74edd3e8535620cad69f8659ff52a3142217c310 (commit)
       via  e48900e9029e87573bdf6aa95ecb57ef0eb3d119 (commit)
      from  969bc7ce3d3f266bf07784a980ea35ab458e6eae (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-devel


- Log -----------------------------------------------------------------
commit f85dcf8112137b7ad07f2b51eeca598e9c4d0ffa
Author: Günther Deschner <gd at samba.org>
Date:   Wed Sep 10 10:34:28 2008 +0200

    net: use netapi for NetFileEnum.
    
    Guenther

commit fd3d130d25a7c30fe003abe01fc18d8f754a466f
Author: Günther Deschner <gd at samba.org>
Date:   Wed Sep 10 10:34:13 2008 +0200

    net: use netapi for NetFileClose.
    
    Guenther

commit fd66b72fd017013c83d36f5219192716eb17cacb
Author: Günther Deschner <gd at samba.org>
Date:   Wed Sep 10 10:03:48 2008 +0200

    netapi: implement NetFileEnum_r.
    
    Guenther

commit 32ee2dadab5b2579d53d0ecb106f0e64063da3f7
Author: Günther Deschner <gd at samba.org>
Date:   Tue Sep 9 22:17:00 2008 +0200

    netapi: add NetFileEnum example code.
    
    Guenther

commit 50ce2a3d1a520bd1508110872e871c2c67e0f606
Author: Günther Deschner <gd at samba.org>
Date:   Tue Sep 9 22:16:07 2008 +0200

    netapi: add NetFileEnum to public header.
    
    Guenther

commit 8113249fe3be2968257bd6a4a12153104d91132e
Author: Günther Deschner <gd at samba.org>
Date:   Tue Sep 9 22:01:32 2008 +0200

    netapi: add NetFileEnum skeleton.
    
    Guenther

commit 995dea40629883ae9ac2871eeb033a168a3b4935
Author: Günther Deschner <gd at samba.org>
Date:   Tue Sep 9 21:59:36 2008 +0200

    re-run make idl.
    
    Guenther

commit 5c234a53739d74d3cc80c4409aa32238541b31d6
Author: Günther Deschner <gd at samba.org>
Date:   Tue Sep 9 21:59:22 2008 +0200

    netapi: add NetFileEnum to IDL.
    
    Guenther

commit 66158036423f8e875921b7ba36f048033c3e98a6
Author: Günther Deschner <gd at samba.org>
Date:   Tue Sep 9 21:56:29 2008 +0200

    netapi: add NetFileGetInfo example code.
    
    Guenther

commit 5dd017b33f7d4154966aa3633d3ef3c8b482ca62
Author: Günther Deschner <gd at samba.org>
Date:   Tue Sep 9 21:56:04 2008 +0200

    netapi: add NetFileGetInfo to public header.
    
    Guenther

commit de84049bc14d5c2061cdb701fd81a7fed1546eed
Author: Günther Deschner <gd at samba.org>
Date:   Tue Sep 9 21:55:45 2008 +0200

    netapi: implement NetFileGetInfo_r.
    
    Guenther

commit 6c61c2e35e60a7b1398533311dab5eee38eb3b09
Author: Günther Deschner <gd at samba.org>
Date:   Tue Sep 9 19:43:02 2008 +0200

    netapi: add NetFileGetInfo skeleton.
    
    Guenther

commit e82c7481a01283f446ccf5e34261835d5b69f969
Author: Günther Deschner <gd at samba.org>
Date:   Tue Sep 9 19:30:43 2008 +0200

    re-run make idl.
    
    Guenther

commit 368b4d262a584eb0c44e19367c1f444723efce98
Author: Günther Deschner <gd at samba.org>
Date:   Tue Sep 9 19:30:25 2008 +0200

    netapi: add IDL for NetFileGetInfo.
    
    Guenther

commit 0cbbdf21ed0c9270c00a7fd08f42f6546b9ac9b8
Author: Günther Deschner <gd at samba.org>
Date:   Tue Sep 9 19:31:03 2008 +0200

    netapi: implement NetFileClose_r.
    
    Guenther

commit 9d6e3655346b6d1e08fd180ced9bd60ee1bc2f8f
Author: Günther Deschner <gd at samba.org>
Date:   Tue Sep 9 19:37:17 2008 +0200

    netapi: add NetFileClose example code.
    
    Guenther

commit 502bbf00faa500765d1a9dedc1cede271c89b7d1
Author: Günther Deschner <gd at samba.org>
Date:   Tue Sep 9 19:37:39 2008 +0200

    netapi: add NetFileClose to public header.
    
    Guenther

commit 4a006ae644bd85b670aab835dc7d90dadaec3503
Author: Günther Deschner <gd at samba.org>
Date:   Tue Sep 9 19:21:48 2008 +0200

    netapi: add NetFileClose skeleton.
    
    Guenther

commit 74edd3e8535620cad69f8659ff52a3142217c310
Author: Günther Deschner <gd at samba.org>
Date:   Tue Sep 9 19:20:05 2008 +0200

    re-run make idl.
    
    Guenther

commit e48900e9029e87573bdf6aa95ecb57ef0eb3d119
Author: Günther Deschner <gd at samba.org>
Date:   Tue Sep 9 19:19:49 2008 +0200

    netapi: add NetFileClose to IDL.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source/Makefile.in                             |    3 +-
 source/lib/netapi/examples/Makefile.in         |   20 ++-
 source/lib/netapi/examples/file/file_close.c   |   83 +++++++
 source/lib/netapi/examples/file/file_enum.c    |  146 ++++++++++++
 source/lib/netapi/examples/file/file_getinfo.c |  112 +++++++++
 source/lib/netapi/file.c                       |  289 ++++++++++++++++++++++++
 source/lib/netapi/libnetapi.c                  |  145 ++++++++++++
 source/lib/netapi/libnetapi.h                  |   27 +++
 source/lib/netapi/netapi.h                     |   79 +++++++
 source/librpc/gen_ndr/libnetapi.h              |   61 +++++
 source/librpc/gen_ndr/ndr_libnetapi.c          |  107 +++++++++
 source/librpc/gen_ndr/ndr_libnetapi.h          |   17 ++-
 source/librpc/idl/libnetapi.idl                |   48 ++++
 source/utils/net_rpc.c                         |  146 ++++--------
 14 files changed, 1179 insertions(+), 104 deletions(-)
 create mode 100644 source/lib/netapi/examples/file/file_close.c
 create mode 100644 source/lib/netapi/examples/file/file_enum.c
 create mode 100644 source/lib/netapi/examples/file/file_getinfo.c
 create mode 100644 source/lib/netapi/file.c


Changeset truncated at 500 lines:

diff --git a/source/Makefile.in b/source/Makefile.in
index e0f390c..8b46ab6 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -1835,7 +1835,8 @@ LIBNETAPI_OBJ0 = lib/netapi/netapi.o \
 		 lib/netapi/localgroup.o \
 		 lib/netapi/samr.o \
 		 lib/netapi/sid.o \
-		 lib/netapi/share.o
+		 lib/netapi/share.o \
+		 lib/netapi/file.o
 
 LIBNETAPI_OBJ  = $(LIBNETAPI_OBJ0) $(LIBNET_OBJ) \
 		 $(LIBSMBCONF_OBJ) \
diff --git a/source/lib/netapi/examples/Makefile.in b/source/lib/netapi/examples/Makefile.in
index 3eea96a..b1c1e59 100644
--- a/source/lib/netapi/examples/Makefile.in
+++ b/source/lib/netapi/examples/Makefile.in
@@ -59,7 +59,10 @@ PROGS = bin/getdc at EXEEXT@ \
 	bin/share_del at EXEEXT@ \
 	bin/share_enum at EXEEXT@ \
 	bin/share_getinfo at EXEEXT@ \
-	bin/share_setinfo at EXEEXT@
+	bin/share_setinfo at EXEEXT@ \
+	bin/file_close at EXEEXT@ \
+	bin/file_getinfo at EXEEXT@ \
+	bin/file_enum at EXEEXT@
 
 all: $(PROGS)
 
@@ -131,6 +134,9 @@ SHAREDEL_OBJ = share/share_del.o $(CMDLINE_OBJ)
 SHAREENUM_OBJ = share/share_enum.o $(CMDLINE_OBJ)
 SHAREGETINFO_OBJ = share/share_getinfo.o $(CMDLINE_OBJ)
 SHARESETINFO_OBJ = share/share_setinfo.o $(CMDLINE_OBJ)
+FILECLOSE_OBJ = file/file_close.o $(CMDLINE_OBJ)
+FILEGETINFO_OBJ = file/file_getinfo.o $(CMDLINE_OBJ)
+FILEENUM_OBJ = file/file_enum.o $(CMDLINE_OBJ)
 
 bin/getdc at EXEEXT@: $(BINARY_PREREQS) $(GETDC_OBJ)
 	@echo Linking $@
@@ -304,6 +310,18 @@ bin/share_setinfo at EXEEXT@: $(BINARY_PREREQS) $(SHARESETINFO_OBJ)
 	@echo Linking $@
 	@$(CC) $(FLAGS) -o $@ $(SHARESETINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS)
 
+bin/file_close at EXEEXT@: $(BINARY_PREREQS) $(FILECLOSE_OBJ)
+	@echo Linking $@
+	@$(CC) $(FLAGS) -o $@ $(FILECLOSE_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS)
+
+bin/file_getinfo at EXEEXT@: $(BINARY_PREREQS) $(FILEGETINFO_OBJ)
+	@echo Linking $@
+	@$(CC) $(FLAGS) -o $@ $(FILEGETINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS)
+
+bin/file_enum at EXEEXT@: $(BINARY_PREREQS) $(FILEENUM_OBJ)
+	@echo Linking $@
+	@$(CC) $(FLAGS) -o $@ $(FILEENUM_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS)
+
 clean:
 	-rm -f $(PROGS)
 	-rm -f core */*~ *~ \
diff --git a/source/lib/netapi/examples/file/file_close.c b/source/lib/netapi/examples/file/file_close.c
new file mode 100644
index 0000000..759173a
--- /dev/null
+++ b/source/lib/netapi/examples/file/file_close.c
@@ -0,0 +1,83 @@
+/*
+ *  Unix SMB/CIFS implementation.
+ *  NetFileClose query
+ *  Copyright (C) Guenther Deschner 2008
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <sys/types.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <netapi.h>
+
+#include "common.h"
+
+int main(int argc, const char **argv)
+{
+	NET_API_STATUS status;
+	struct libnetapi_ctx *ctx = NULL;
+	const char *hostname = NULL;
+	uint32_t fileid = 0;
+
+	poptContext pc;
+	int opt;
+
+	struct poptOption long_options[] = {
+		POPT_AUTOHELP
+		POPT_COMMON_LIBNETAPI_EXAMPLES
+		POPT_TABLEEND
+	};
+
+	status = libnetapi_init(&ctx);
+	if (status != 0) {
+		return status;
+	}
+
+	pc = poptGetContext("file_close", argc, argv, long_options, 0);
+
+	poptSetOtherOptionHelp(pc, "hostname fileid");
+	while((opt = poptGetNextOpt(pc)) != -1) {
+	}
+
+	if (!poptPeekArg(pc)) {
+		poptPrintHelp(pc, stderr, 0);
+		goto out;
+	}
+	hostname = poptGetArg(pc);
+
+	if (!poptPeekArg(pc)) {
+		poptPrintHelp(pc, stderr, 0);
+		goto out;
+	}
+	fileid = atoi(poptGetArg(pc));
+
+	/* NetFileClose */
+
+	status = NetFileClose(hostname, fileid);
+	if (status != 0) {
+		printf("NetFileClose failed with: %s\n",
+			libnetapi_get_error_string(ctx, status));
+		goto out;
+	}
+
+ out:
+	libnetapi_free(ctx);
+	poptFreeContext(pc);
+
+	return status;
+}
diff --git a/source/lib/netapi/examples/file/file_enum.c b/source/lib/netapi/examples/file/file_enum.c
new file mode 100644
index 0000000..5fbb285
--- /dev/null
+++ b/source/lib/netapi/examples/file/file_enum.c
@@ -0,0 +1,146 @@
+/*
+ *  Unix SMB/CIFS implementation.
+ *  NetFileEnum query
+ *  Copyright (C) Guenther Deschner 2008
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <sys/types.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <netapi.h>
+
+#include "common.h"
+
+int main(int argc, const char **argv)
+{
+	NET_API_STATUS status;
+	struct libnetapi_ctx *ctx = NULL;
+	const char *hostname = NULL;
+	const char *basepath = NULL;
+	const char *username = NULL;
+	uint32_t level = 3;
+	uint8_t *buffer = NULL;
+	uint32_t entries_read = 0;
+	uint32_t total_entries = 0;
+	uint32_t resume_handle = 0;
+	int i;
+
+	struct FILE_INFO_2 *i2 = NULL;
+	struct FILE_INFO_3 *i3 = NULL;
+
+	poptContext pc;
+	int opt;
+
+	struct poptOption long_options[] = {
+		POPT_AUTOHELP
+		POPT_COMMON_LIBNETAPI_EXAMPLES
+		POPT_TABLEEND
+	};
+
+	status = libnetapi_init(&ctx);
+	if (status != 0) {
+		return status;
+	}
+
+	pc = poptGetContext("file_enum", argc, argv, long_options, 0);
+
+	poptSetOtherOptionHelp(pc, "hostname basepath username level");
+	while((opt = poptGetNextOpt(pc)) != -1) {
+	}
+
+	if (!poptPeekArg(pc)) {
+		poptPrintHelp(pc, stderr, 0);
+		goto out;
+	}
+	hostname = poptGetArg(pc);
+
+	if (!poptPeekArg(pc)) {
+		poptPrintHelp(pc, stderr, 0);
+		goto out;
+	}
+	basepath = poptGetArg(pc);
+
+	if (!poptPeekArg(pc)) {
+		poptPrintHelp(pc, stderr, 0);
+		goto out;
+	}
+	username = poptGetArg(pc);
+
+	if (poptPeekArg(pc)) {
+		level = atoi(poptGetArg(pc));
+	}
+
+	/* NetFileEnum */
+
+	do {
+
+		status = NetFileEnum(hostname,
+				     basepath,
+				     username,
+				     level,
+				     &buffer,
+				     (uint32_t)-1,
+				     &entries_read,
+				     &total_entries,
+				     &resume_handle);
+		if (status == 0 || status == ERROR_MORE_DATA) {
+			printf("total entries: %d\n", total_entries);
+			switch (level) {
+				case 2:
+					i2 = (struct FILE_INFO_2 *)buffer;
+					break;
+				case 3:
+					i3 = (struct FILE_INFO_3 *)buffer;
+					break;
+				default:
+					break;
+			}
+			for (i=0; i<entries_read; i++) {
+				switch (level) {
+					case 2:
+						printf("file_id: %d\n", i2->fi2_id);
+						i2++;
+						break;
+					case 3:
+						printf("file_id: %d\n", i3->fi3_id);
+						printf("permissions: %d\n", i3->fi3_permissions);
+						printf("num_locks: %d\n", i3->fi3_num_locks);
+						printf("pathname: %s\n", i3->fi3_pathname);
+						printf("username: %s\n", i3->fi3_username);
+						i3++;
+						break;
+					default:
+						break;
+				}
+			}
+			NetApiBufferFree(buffer);
+		}
+	} while (status == ERROR_MORE_DATA);
+
+	if (status != 0) {
+		printf("NetFileEnum failed with: %s\n",
+			libnetapi_get_error_string(ctx, status));
+		goto out;
+	}
+ out:
+	libnetapi_free(ctx);
+	poptFreeContext(pc);
+
+	return status;
+}
diff --git a/source/lib/netapi/examples/file/file_getinfo.c b/source/lib/netapi/examples/file/file_getinfo.c
new file mode 100644
index 0000000..9ad8305
--- /dev/null
+++ b/source/lib/netapi/examples/file/file_getinfo.c
@@ -0,0 +1,112 @@
+/*
+ *  Unix SMB/CIFS implementation.
+ *  NetFileGetInfo query
+ *  Copyright (C) Guenther Deschner 2008
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <sys/types.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <netapi.h>
+
+#include "common.h"
+
+int main(int argc, const char **argv)
+{
+	NET_API_STATUS status;
+	struct libnetapi_ctx *ctx = NULL;
+	const char *hostname = NULL;
+	uint32_t fileid = 0;
+	uint32_t level = 3;
+	uint8_t *buffer = NULL;
+
+	struct FILE_INFO_2 *i2 = NULL;
+	struct FILE_INFO_3 *i3 = NULL;
+
+	poptContext pc;
+	int opt;
+
+	struct poptOption long_options[] = {
+		POPT_AUTOHELP
+		POPT_COMMON_LIBNETAPI_EXAMPLES
+		POPT_TABLEEND
+	};
+
+	status = libnetapi_init(&ctx);
+	if (status != 0) {
+		return status;
+	}
+
+	pc = poptGetContext("file_getinfo", argc, argv, long_options, 0);
+
+	poptSetOtherOptionHelp(pc, "hostname fileid");
+	while((opt = poptGetNextOpt(pc)) != -1) {
+	}
+
+	if (!poptPeekArg(pc)) {
+		poptPrintHelp(pc, stderr, 0);
+		goto out;
+	}
+	hostname = poptGetArg(pc);
+
+	if (!poptPeekArg(pc)) {
+		poptPrintHelp(pc, stderr, 0);
+		goto out;
+	}
+	fileid = atoi(poptGetArg(pc));
+
+	if (poptPeekArg(pc)) {
+		level = atoi(poptGetArg(pc));
+	}
+
+	/* NetFileGetInfo */
+
+	status = NetFileGetInfo(hostname,
+				fileid,
+				level,
+				&buffer);
+	if (status != 0) {
+		printf("NetFileGetInfo failed with: %s\n",
+			libnetapi_get_error_string(ctx, status));
+		goto out;
+	}
+
+	switch (level) {
+		case 2:
+			i2 = (struct FILE_INFO_2 *)buffer;
+			printf("file_id: %d\n", i2->fi2_id);
+			break;
+		case 3:
+			i3 = (struct FILE_INFO_3 *)buffer;
+			printf("file_id: %d\n", i3->fi3_id);
+			printf("permissions: %d\n", i3->fi3_permissions);
+			printf("num_locks: %d\n", i3->fi3_num_locks);
+			printf("pathname: %s\n", i3->fi3_pathname);
+			printf("username: %s\n", i3->fi3_username);
+			break;
+		default:
+			break;
+	}
+
+ out:
+	libnetapi_free(ctx);
+	poptFreeContext(pc);
+
+	return status;
+}
diff --git a/source/lib/netapi/file.c b/source/lib/netapi/file.c
new file mode 100644
index 0000000..036af32
--- /dev/null
+++ b/source/lib/netapi/file.c
@@ -0,0 +1,289 @@
+/*
+ *  Unix SMB/CIFS implementation.
+ *  NetApi File Support
+ *  Copyright (C) Guenther Deschner 2008
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "includes.h"
+
+#include "librpc/gen_ndr/libnetapi.h"
+#include "lib/netapi/netapi.h"
+#include "lib/netapi/netapi_private.h"
+#include "lib/netapi/libnetapi.h"
+
+/****************************************************************
+****************************************************************/
+
+WERROR NetFileClose_r(struct libnetapi_ctx *ctx,
+		      struct NetFileClose *r)
+{
+	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;
+}
+
+/****************************************************************
+****************************************************************/
+
+WERROR NetFileClose_l(struct libnetapi_ctx *ctx,
+		      struct NetFileClose *r)
+{
+	LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, NetFileClose);
+}
+
+/****************************************************************
+****************************************************************/
+
+static NTSTATUS map_srvsvc_FileInfo_to_FILE_INFO_buffer(TALLOC_CTX *mem_ctx,
+							uint32_t level,
+							union srvsvc_NetFileInfo *info,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list