s3-libsmb: only include rap client when needed.
authorGünther Deschner <gd@samba.org>
Thu, 24 Feb 2011 09:46:55 +0000 (10:46 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 15 Mar 2011 20:16:35 +0000 (21:16 +0100)
Guenther

20 files changed:
source3/client/client.c
source3/include/libsmb_internal.h
source3/include/proto.h
source3/libsmb/clidfs.c
source3/libsmb/clifile.c
source3/libsmb/cliprint.c
source3/libsmb/clirap.c
source3/libsmb/clirap.h [new file with mode: 0644]
source3/libsmb/clirap2.c
source3/libsmb/passchange.c
source3/nmbd/nmbd_synclists.c
source3/torture/mangle_test.c
source3/torture/nbench.c
source3/torture/nbio.c
source3/torture/torture.c
source3/torture/utable.c
source3/utils/net_rap.c
source3/utils/net_rpc.c
source3/utils/smbcacls.c
source3/utils/smbtree.c

index e979f74fa44775f2891bdec9a811a219b3eb0bdd..a6a7a22e3f3e338a6ee7d264325e4322857fb365 100644 (file)
@@ -31,6 +31,7 @@
 #include "../libcli/smbreadline/smbreadline.h"
 #include "../libcli/security/security.h"
 #include "system/select.h"
+#include "libsmb/clirap.h"
 
 #ifndef REGISTER
 #define REGISTER 0
index 39a32f99fb1142bdcf5fd976be4c8f09dc6643f5..61dc95e0ad63a4164a0b62693a53b87115cade60 100644 (file)
@@ -29,6 +29,7 @@
 #define _LIBSMB_INTERNAL_H_
 
 #include "../include/libsmbclient.h"
+#include "libsmb/clirap.h"
 
 #define SMBC_MAX_NAME  1023
 #define SMBC_FILE_MODE (S_IFREG | 0444)
index 2cb21f5ab67bf93622cafe6cc3908c333131d991..e8971c372116b2630321958b2cc26e1178aca878 100644 (file)
@@ -2232,186 +2232,6 @@ NTSTATUS cli_get_fs_quota_info(struct cli_state *cli, int quota_fnum,
 NTSTATUS cli_set_fs_quota_info(struct cli_state *cli, int quota_fnum,
                               SMB_NTQUOTA_STRUCT *pqt);
 
-/* The following definitions come from libsmb/clirap.c  */
-
-bool cli_api(struct cli_state *cli,
-            char *param, int prcnt, int mprcnt,
-            char *data, int drcnt, int mdrcnt,
-            char **rparam, unsigned int *rprcnt,
-            char **rdata, unsigned int *rdrcnt);
-bool cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation);
-int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state);
-bool cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
-                      void (*fn)(const char *, uint32, const char *, void *),
-                      void *state);
-bool cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password,
-                             const char *old_password);
-struct tevent_req *cli_qpathinfo1_send(TALLOC_CTX *mem_ctx,
-                                      struct event_context *ev,
-                                      struct cli_state *cli,
-                                      const char *fname);
-NTSTATUS cli_qpathinfo1_recv(struct tevent_req *req,
-                            time_t *change_time,
-                            time_t *access_time,
-                            time_t *write_time,
-                            SMB_OFF_T *size,
-                            uint16 *mode);
-NTSTATUS cli_qpathinfo1(struct cli_state *cli,
-                       const char *fname,
-                       time_t *change_time,
-                       time_t *access_time,
-                       time_t *write_time,
-                       SMB_OFF_T *size,
-                       uint16 *mode);
-NTSTATUS cli_setpathinfo_basic(struct cli_state *cli, const char *fname,
-                              time_t create_time,
-                              time_t access_time,
-                              time_t write_time,
-                              time_t change_time,
-                              uint16 mode);
-struct tevent_req *cli_qpathinfo2_send(TALLOC_CTX *mem_ctx,
-                                      struct event_context *ev,
-                                      struct cli_state *cli,
-                                      const char *fname);
-NTSTATUS cli_qpathinfo2_recv(struct tevent_req *req,
-                            struct timespec *create_time,
-                            struct timespec *access_time,
-                            struct timespec *write_time,
-                            struct timespec *change_time,
-                            SMB_OFF_T *size, uint16 *mode,
-                            SMB_INO_T *ino);
-NTSTATUS cli_qpathinfo2(struct cli_state *cli, const char *fname,
-                       struct timespec *create_time,
-                       struct timespec *access_time,
-                       struct timespec *write_time,
-                       struct timespec *change_time,
-                       SMB_OFF_T *size, uint16 *mode,
-                       SMB_INO_T *ino);
-struct tevent_req *cli_qpathinfo_streams_send(TALLOC_CTX *mem_ctx,
-                                             struct tevent_context *ev,
-                                             struct cli_state *cli,
-                                             const char *fname);
-NTSTATUS cli_qpathinfo_streams_recv(struct tevent_req *req,
-                                   TALLOC_CTX *mem_ctx,
-                                   unsigned int *pnum_streams,
-                                   struct stream_struct **pstreams);
-NTSTATUS cli_qpathinfo_streams(struct cli_state *cli, const char *fname,
-                              TALLOC_CTX *mem_ctx,
-                              unsigned int *pnum_streams,
-                              struct stream_struct **pstreams);
-NTSTATUS cli_qfilename(struct cli_state *cli, uint16_t fnum, char *name,
-                      size_t namelen);
-NTSTATUS cli_qfileinfo_basic(struct cli_state *cli, uint16_t fnum,
-                            uint16 *mode, SMB_OFF_T *size,
-                            struct timespec *create_time,
-                            struct timespec *access_time,
-                            struct timespec *write_time,
-                            struct timespec *change_time,
-                            SMB_INO_T *ino);
-struct tevent_req *cli_qpathinfo_basic_send(TALLOC_CTX *mem_ctx,
-                                           struct event_context *ev,
-                                           struct cli_state *cli,
-                                           const char *fname);
-NTSTATUS cli_qpathinfo_basic_recv(struct tevent_req *req,
-                                 SMB_STRUCT_STAT *sbuf, uint32 *attributes);
-NTSTATUS cli_qpathinfo_basic(struct cli_state *cli, const char *name,
-                            SMB_STRUCT_STAT *sbuf, uint32 *attributes);
-NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name);
-struct tevent_req *cli_qpathinfo_send(TALLOC_CTX *mem_ctx,
-                                     struct tevent_context *ev,
-                                     struct cli_state *cli, const char *fname,
-                                     uint16_t level, uint32_t min_rdata,
-                                     uint32_t max_rdata);
-NTSTATUS cli_qpathinfo_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
-                           uint8_t **rdata, uint32_t *num_rdata);
-NTSTATUS cli_qpathinfo(TALLOC_CTX *mem_ctx, struct cli_state *cli,
-                      const char *fname, uint16_t level, uint32_t min_rdata,
-                      uint32_t max_rdata,
-                      uint8_t **rdata, uint32_t *num_rdata);
-
-struct tevent_req *cli_qfileinfo_send(TALLOC_CTX *mem_ctx,
-                                     struct tevent_context *ev,
-                                     struct cli_state *cli, uint16_t fnum,
-                                     uint16_t level, uint32_t min_rdata,
-                                     uint32_t max_rdata);
-NTSTATUS cli_qfileinfo_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
-                           uint8_t **rdata, uint32_t *num_rdata);
-NTSTATUS cli_qfileinfo(TALLOC_CTX *mem_ctx, struct cli_state *cli,
-                      uint16_t fnum, uint16_t level, uint32_t min_rdata,
-                      uint32_t max_rdata,
-                      uint8_t **rdata, uint32_t *num_rdata);
-
-struct tevent_req *cli_flush_send(TALLOC_CTX *mem_ctx,
-                                 struct event_context *ev,
-                                 struct cli_state *cli,
-                                 uint16_t fnum);
-NTSTATUS cli_flush_recv(struct tevent_req *req);
-NTSTATUS cli_flush(TALLOC_CTX *mem_ctx, struct cli_state *cli, uint16_t fnum);
-
-struct tevent_req *cli_shadow_copy_data_send(TALLOC_CTX *mem_ctx,
-                                            struct tevent_context *ev,
-                                            struct cli_state *cli,
-                                            uint16_t fnum,
-                                            bool get_names);
-NTSTATUS cli_shadow_copy_data_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
-                                  char ***pnames, int *pnum_names);
-NTSTATUS cli_shadow_copy_data(TALLOC_CTX *mem_ctx, struct cli_state *cli,
-                             uint16_t fnum, bool get_names,
-                             char ***pnames, int *pnum_names);
-
-/* The following definitions come from libsmb/clirap2.c  */
-struct rap_group_info_1;
-struct rap_user_info_1;
-struct rap_share_info_2;
-
-int cli_NetGroupDelete(struct cli_state *cli, const char *group_name);
-int cli_NetGroupAdd(struct cli_state *cli, struct rap_group_info_1 *grinfo);
-int cli_RNetGroupEnum(struct cli_state *cli, void (*fn)(const char *, const char *, void *), void *state);
-int cli_RNetGroupEnum0(struct cli_state *cli,
-                      void (*fn)(const char *, void *),
-                      void *state);
-int cli_NetGroupDelUser(struct cli_state * cli, const char *group_name, const char *user_name);
-int cli_NetGroupAddUser(struct cli_state * cli, const char *group_name, const char *user_name);
-int cli_NetGroupGetUsers(struct cli_state * cli, const char *group_name, void (*fn)(const char *, void *), void *state );
-int cli_NetUserGetGroups(struct cli_state * cli, const char *user_name, void (*fn)(const char *, void *), void *state );
-int cli_NetUserDelete(struct cli_state *cli, const char * user_name );
-int cli_NetUserAdd(struct cli_state *cli, struct rap_user_info_1 * userinfo );
-int cli_RNetUserEnum(struct cli_state *cli, void (*fn)(const char *, const char *, const char *, const char *, void *), void *state);
-int cli_RNetUserEnum0(struct cli_state *cli,
-                     void (*fn)(const char *, void *),
-                     void *state);
-int cli_NetFileClose(struct cli_state *cli, uint32 file_id );
-int cli_NetFileGetInfo(struct cli_state *cli, uint32 file_id, void (*fn)(const char *, const char *, uint16, uint16, uint32));
-int cli_NetFileEnum(struct cli_state *cli, const char * user,
-                   const char * base_path,
-                   void (*fn)(const char *, const char *, uint16, uint16,
-                              uint32));
-int cli_NetShareAdd(struct cli_state *cli, struct rap_share_info_2 * sinfo );
-int cli_NetShareDelete(struct cli_state *cli, const char * share_name );
-bool cli_get_pdc_name(struct cli_state *cli, const char *workgroup, char **pdc_name);
-bool cli_get_server_domain(struct cli_state *cli);
-bool cli_get_server_type(struct cli_state *cli, uint32 *pstype);
-bool cli_get_server_name(TALLOC_CTX *mem_ctx, struct cli_state *cli,
-                        char **servername);
-bool cli_ns_check_server_type(struct cli_state *cli, char *workgroup, uint32 stype);
-bool cli_NetWkstaUserLogoff(struct cli_state *cli, const char *user, const char *workstation);
-int cli_NetPrintQEnum(struct cli_state *cli,
-               void (*qfn)(const char*,uint16,uint16,uint16,const char*,const char*,const char*,const char*,const char*,uint16,uint16),
-               void (*jfn)(uint16,const char*,const char*,const char*,const char*,uint16,uint16,const char*,unsigned int,unsigned int,const char*));
-int cli_NetPrintQGetInfo(struct cli_state *cli, const char *printer,
-       void (*qfn)(const char*,uint16,uint16,uint16,const char*,const char*,const char*,const char*,const char*,uint16,uint16),
-       void (*jfn)(uint16,const char*,const char*,const char*,const char*,uint16,uint16,const char*,unsigned int,unsigned int,const char*));
-int cli_RNetServiceEnum(struct cli_state *cli, void (*fn)(const char *, const char *, void *), void *state);
-int cli_NetSessionEnum(struct cli_state *cli, void (*fn)(char *, char *, uint16, uint16, uint16, unsigned int, unsigned int, unsigned int, char *));
-int cli_NetSessionGetInfo(struct cli_state *cli, const char *workstation,
-               void (*fn)(const char *, const char *, uint16, uint16, uint16, unsigned int, unsigned int, unsigned int, const char *));
-int cli_NetSessionDel(struct cli_state *cli, const char *workstation);
-int cli_NetConnectionEnum(struct cli_state *cli, const char *qualifier,
-                       void (*fn)(uint16_t conid, uint16_t contype,
-                               uint16_t numopens, uint16_t numusers,
-                               uint32_t contime, const char *username,
-                               const char *netname));
-
 /* The following definitions come from libsmb/clireadwrite.c  */
 
 struct tevent_req *cli_read_andx_create(TALLOC_CTX *mem_ctx,
index 1c879884fe1ca6cbea9ed1c946ff33856e6de0a6..a23f47734300e5417a0d4ef66cdfb1552099442a 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include "includes.h"
+#include "libsmb/clirap.h"
 
 /********************************************************************
  Important point.
index 68dd6c814f81e7bc1e17338d559eb4e146a3b61b..72f0e4b8eb76bb0ce1a793e0815bc39896dd1a67 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "includes.h"
 #include "async_smb.h"
+#include "libsmb/clirap.h"
 
 /***********************************************************
  Common function for pushing stings, used by smb_bytes_push_str()
index 9125c5d6a40121803edfdc9a480546ebb50d0188..10d1759de82a9ad7757a810c92d31ab0c3b8b8ea 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include "includes.h"
+#include "libsmb/clirap.h"
 
 /*****************************************************************************
  Convert a character pointer in a cli_call_api() response to a form we can use.
index 781dbe64afec857a49189a5f2584d291a96fb951..1756c479b4e18d62a83ec06872c87377eb5cdd7d 100644 (file)
@@ -24,6 +24,7 @@
 #include "../librpc/gen_ndr/rap.h"
 #include "../lib/crypto/arcfour.h"
 #include "async_smb.h"
+#include "libsmb/clirap.h"
 
 #define PIPE_LANMAN   "\\PIPE\\LANMAN"
 
diff --git a/source3/libsmb/clirap.h b/source3/libsmb/clirap.h
new file mode 100644 (file)
index 0000000..6ea6978
--- /dev/null
@@ -0,0 +1,208 @@
+/*
+   Samba Unix/Linux SMB client library
+   More client RAP (SMB Remote Procedure Calls) functions
+   Copyright (C) 2001 Steve French (sfrench@us.ibm.com)
+   Copyright (C) 2001 Jim McDonough (jmcd@us.ibm.com)
+   Copyright (C) 2007 Jeremy Allison. jra@samba.org
+   Copyright (C) Andrew Tridgell         1994-1998
+   Copyright (C) Gerald (Jerry) Carter   2004
+   Copyright (C) James Peach            2007
+
+   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/>.
+*/
+
+#ifndef _LIBSMB_CLIRAP_H
+#define _LIBSMB_CLIRAP_H
+
+/* The following definitions come from libsmb/clirap.c  */
+
+bool cli_api(struct cli_state *cli,
+            char *param, int prcnt, int mprcnt,
+            char *data, int drcnt, int mdrcnt,
+            char **rparam, unsigned int *rprcnt,
+            char **rdata, unsigned int *rdrcnt);
+bool cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation);
+int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *, void *), void *state);
+bool cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
+                      void (*fn)(const char *, uint32, const char *, void *),
+                      void *state);
+bool cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password,
+                             const char *old_password);
+struct tevent_req *cli_qpathinfo1_send(TALLOC_CTX *mem_ctx,
+                                      struct event_context *ev,
+                                      struct cli_state *cli,
+                                      const char *fname);
+NTSTATUS cli_qpathinfo1_recv(struct tevent_req *req,
+                            time_t *change_time,
+                            time_t *access_time,
+                            time_t *write_time,
+                            SMB_OFF_T *size,
+                            uint16 *mode);
+NTSTATUS cli_qpathinfo1(struct cli_state *cli,
+                       const char *fname,
+                       time_t *change_time,
+                       time_t *access_time,
+                       time_t *write_time,
+                       SMB_OFF_T *size,
+                       uint16 *mode);
+NTSTATUS cli_setpathinfo_basic(struct cli_state *cli, const char *fname,
+                              time_t create_time,
+                              time_t access_time,
+                              time_t write_time,
+                              time_t change_time,
+                              uint16 mode);
+struct tevent_req *cli_qpathinfo2_send(TALLOC_CTX *mem_ctx,
+                                      struct event_context *ev,
+                                      struct cli_state *cli,
+                                      const char *fname);
+NTSTATUS cli_qpathinfo2_recv(struct tevent_req *req,
+                            struct timespec *create_time,
+                            struct timespec *access_time,
+                            struct timespec *write_time,
+                            struct timespec *change_time,
+                            SMB_OFF_T *size, uint16 *mode,
+                            SMB_INO_T *ino);
+NTSTATUS cli_qpathinfo2(struct cli_state *cli, const char *fname,
+                       struct timespec *create_time,
+                       struct timespec *access_time,
+                       struct timespec *write_time,
+                       struct timespec *change_time,
+                       SMB_OFF_T *size, uint16 *mode,
+                       SMB_INO_T *ino);
+struct tevent_req *cli_qpathinfo_streams_send(TALLOC_CTX *mem_ctx,
+                                             struct tevent_context *ev,
+                                             struct cli_state *cli,
+                                             const char *fname);
+NTSTATUS cli_qpathinfo_streams_recv(struct tevent_req *req,
+                                   TALLOC_CTX *mem_ctx,
+                                   unsigned int *pnum_streams,
+                                   struct stream_struct **pstreams);
+NTSTATUS cli_qpathinfo_streams(struct cli_state *cli, const char *fname,
+                              TALLOC_CTX *mem_ctx,
+                              unsigned int *pnum_streams,
+                              struct stream_struct **pstreams);
+NTSTATUS cli_qfilename(struct cli_state *cli, uint16_t fnum, char *name,
+                      size_t namelen);
+NTSTATUS cli_qfileinfo_basic(struct cli_state *cli, uint16_t fnum,
+                            uint16 *mode, SMB_OFF_T *size,
+                            struct timespec *create_time,
+                            struct timespec *access_time,
+                            struct timespec *write_time,
+                            struct timespec *change_time,
+                            SMB_INO_T *ino);
+struct tevent_req *cli_qpathinfo_basic_send(TALLOC_CTX *mem_ctx,
+                                           struct event_context *ev,
+                                           struct cli_state *cli,
+                                           const char *fname);
+NTSTATUS cli_qpathinfo_basic_recv(struct tevent_req *req,
+                                 SMB_STRUCT_STAT *sbuf, uint32 *attributes);
+NTSTATUS cli_qpathinfo_basic(struct cli_state *cli, const char *name,
+                            SMB_STRUCT_STAT *sbuf, uint32 *attributes);
+NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name);
+struct tevent_req *cli_qpathinfo_send(TALLOC_CTX *mem_ctx,
+                                     struct tevent_context *ev,
+                                     struct cli_state *cli, const char *fname,
+                                     uint16_t level, uint32_t min_rdata,
+                                     uint32_t max_rdata);
+NTSTATUS cli_qpathinfo_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
+                           uint8_t **rdata, uint32_t *num_rdata);
+NTSTATUS cli_qpathinfo(TALLOC_CTX *mem_ctx, struct cli_state *cli,
+                      const char *fname, uint16_t level, uint32_t min_rdata,
+                      uint32_t max_rdata,
+                      uint8_t **rdata, uint32_t *num_rdata);
+
+struct tevent_req *cli_qfileinfo_send(TALLOC_CTX *mem_ctx,
+                                     struct tevent_context *ev,
+                                     struct cli_state *cli, uint16_t fnum,
+                                     uint16_t level, uint32_t min_rdata,
+                                     uint32_t max_rdata);
+NTSTATUS cli_qfileinfo_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
+                           uint8_t **rdata, uint32_t *num_rdata);
+NTSTATUS cli_qfileinfo(TALLOC_CTX *mem_ctx, struct cli_state *cli,
+                      uint16_t fnum, uint16_t level, uint32_t min_rdata,
+                      uint32_t max_rdata,
+                      uint8_t **rdata, uint32_t *num_rdata);
+
+struct tevent_req *cli_flush_send(TALLOC_CTX *mem_ctx,
+                                 struct event_context *ev,
+                                 struct cli_state *cli,
+                                 uint16_t fnum);
+NTSTATUS cli_flush_recv(struct tevent_req *req);
+NTSTATUS cli_flush(TALLOC_CTX *mem_ctx, struct cli_state *cli, uint16_t fnum);
+
+struct tevent_req *cli_shadow_copy_data_send(TALLOC_CTX *mem_ctx,
+                                            struct tevent_context *ev,
+                                            struct cli_state *cli,
+                                            uint16_t fnum,
+                                            bool get_names);
+NTSTATUS cli_shadow_copy_data_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
+                                  char ***pnames, int *pnum_names);
+NTSTATUS cli_shadow_copy_data(TALLOC_CTX *mem_ctx, struct cli_state *cli,
+                             uint16_t fnum, bool get_names,
+                             char ***pnames, int *pnum_names);
+
+/* The following definitions come from libsmb/clirap2.c  */
+struct rap_group_info_1;
+struct rap_user_info_1;
+struct rap_share_info_2;
+
+int cli_NetGroupDelete(struct cli_state *cli, const char *group_name);
+int cli_NetGroupAdd(struct cli_state *cli, struct rap_group_info_1 *grinfo);
+int cli_RNetGroupEnum(struct cli_state *cli, void (*fn)(const char *, const char *, void *), void *state);
+int cli_RNetGroupEnum0(struct cli_state *cli,
+                      void (*fn)(const char *, void *),
+                      void *state);
+int cli_NetGroupDelUser(struct cli_state * cli, const char *group_name, const char *user_name);
+int cli_NetGroupAddUser(struct cli_state * cli, const char *group_name, const char *user_name);
+int cli_NetGroupGetUsers(struct cli_state * cli, const char *group_name, void (*fn)(const char *, void *), void *state );
+int cli_NetUserGetGroups(struct cli_state * cli, const char *user_name, void (*fn)(const char *, void *), void *state );
+int cli_NetUserDelete(struct cli_state *cli, const char * user_name );
+int cli_NetUserAdd(struct cli_state *cli, struct rap_user_info_1 * userinfo );
+int cli_RNetUserEnum(struct cli_state *cli, void (*fn)(const char *, const char *, const char *, const char *, void *), void *state);
+int cli_RNetUserEnum0(struct cli_state *cli,
+                     void (*fn)(const char *, void *),
+                     void *state);
+int cli_NetFileClose(struct cli_state *cli, uint32 file_id );
+int cli_NetFileGetInfo(struct cli_state *cli, uint32 file_id, void (*fn)(const char *, const char *, uint16, uint16, uint32));
+int cli_NetFileEnum(struct cli_state *cli, const char * user,
+                   const char * base_path,
+                   void (*fn)(const char *, const char *, uint16, uint16,
+                              uint32));
+int cli_NetShareAdd(struct cli_state *cli, struct rap_share_info_2 * sinfo );
+int cli_NetShareDelete(struct cli_state *cli, const char * share_name );
+bool cli_get_pdc_name(struct cli_state *cli, const char *workgroup, char **pdc_name);
+bool cli_get_server_domain(struct cli_state *cli);
+bool cli_get_server_type(struct cli_state *cli, uint32 *pstype);
+bool cli_get_server_name(TALLOC_CTX *mem_ctx, struct cli_state *cli,
+                        char **servername);
+bool cli_ns_check_server_type(struct cli_state *cli, char *workgroup, uint32 stype);
+bool cli_NetWkstaUserLogoff(struct cli_state *cli, const char *user, const char *workstation);
+int cli_NetPrintQEnum(struct cli_state *cli,
+               void (*qfn)(const char*,uint16,uint16,uint16,const char*,const char*,const char*,const char*,const char*,uint16,uint16),
+               void (*jfn)(uint16,const char*,const char*,const char*,const char*,uint16,uint16,const char*,unsigned int,unsigned int,const char*));
+int cli_NetPrintQGetInfo(struct cli_state *cli, const char *printer,
+       void (*qfn)(const char*,uint16,uint16,uint16,const char*,const char*,const char*,const char*,const char*,uint16,uint16),
+       void (*jfn)(uint16,const char*,const char*,const char*,const char*,uint16,uint16,const char*,unsigned int,unsigned int,const char*));
+int cli_RNetServiceEnum(struct cli_state *cli, void (*fn)(const char *, const char *, void *), void *state);
+int cli_NetSessionEnum(struct cli_state *cli, void (*fn)(char *, char *, uint16, uint16, uint16, unsigned int, unsigned int, unsigned int, char *));
+int cli_NetSessionGetInfo(struct cli_state *cli, const char *workstation,
+               void (*fn)(const char *, const char *, uint16, uint16, uint16, unsigned int, unsigned int, unsigned int, const char *));
+int cli_NetSessionDel(struct cli_state *cli, const char *workstation);
+int cli_NetConnectionEnum(struct cli_state *cli, const char *qualifier,
+                       void (*fn)(uint16_t conid, uint16_t contype,
+                               uint16_t numopens, uint16_t numusers,
+                               uint32_t contime, const char *username,
+                               const char *netname));
+
+#endif /* _LIBSMB_CLIRAP_H */
index 20efca3dc325906c7b32005f3bf9e75d7b92d0c2..44a9d7c8c496290021ff92821526ddfa80a7212e 100644 (file)
@@ -78,6 +78,7 @@
 #include "includes.h"
 #include "../librpc/gen_ndr/rap.h"
 #include "../librpc/gen_ndr/svcctl.h"
+#include "libsmb/clirap.h"
 
 #define WORDSIZE 2
 #define DWORDSIZE 4
index 989406fc9a692e38071a8a401923993a08dd2d45..289bf4bd8e3f161e54dd9972efe404cd87ccb2e5 100644 (file)
@@ -21,6 +21,7 @@
 #include "../librpc/gen_ndr/ndr_samr.h"
 #include "rpc_client/cli_pipe.h"
 #include "rpc_client/cli_samr.h"
+#include "libsmb/clirap.h"
 
 /*************************************************************
  Change a password on a remote machine using IPC calls.
index 5c139b31afb3723ef938f4a6bb44a6ffdece7639..136a5c416cf05768774ef895d478a5b512b7668c 100644 (file)
@@ -29,6 +29,7 @@
 #include "includes.h"
 #include "../librpc/gen_ndr/svcctl.h"
 #include "nmbd/nmbd.h"
+#include "libsmb/clirap.h"
 
 struct sync_record {
        struct sync_record *next, *prev;
index 594caba6043e3d1a618721542e6209d3f7c868e2..6b9263e5de27b0a1ac807faa411caad9f8281fa9 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "includes.h"
 #include "torture/proto.h"
+#include "libsmb/clirap.h"
 
 extern int torture_numops;
 
index 5a83c38a46894b0fae263af4cff2259fa66323db..182f6f7cd91b1c424e26e1a466dd51729965cf3f 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "includes.h"
 #include "torture/proto.h"
+#include "libsmb/clirap.h"
 
 static long long int ival(const char *str)
 {
index a51424526d6d9d2c441dfd4166ff43e127f4266f..664943b681b583ed394d4122eca6c40e6562725a 100644 (file)
@@ -22,6 +22,7 @@
 #include "includes.h"
 #include "torture/proto.h"
 #include "../libcli/security/security.h"
+#include "libsmb/clirap.h"
 
 #define MAX_FILES 1000
 
index 2670485bcca7597e761c42c0dd5be1f13f026879..61cfb9e92fa901bf88814cbf7ac99534e222b78b 100644 (file)
@@ -30,6 +30,7 @@
 #include "dbwrap.h"
 #include "talloc_dict.h"
 #include "async_smb.h"
+#include "libsmb/clirap.h"
 
 extern char *optarg;
 extern int optind;
index d537ad77c5562174f7670530266d2945d3bf02eb..e4d2dee6f38ceab9a736c79db0d92677dcb234cc 100644 (file)
@@ -20,6 +20,7 @@
 #include "includes.h"
 #include "torture/proto.h"
 #include "../libcli/security/security.h"
+#include "libsmb/clirap.h"
 
 bool torture_utable(int dummy)
 {
index 04e81f95f737538ff063daef322bb12ad783f8cd..2cc42c89e9550cf6be2d02f8c197a749ad3e48f9 100644 (file)
@@ -26,6 +26,7 @@
 #include "../librpc/gen_ndr/rap.h"
 #include "../librpc/gen_ndr/svcctl.h"
 #include "utils/net.h"
+#include "libsmb/clirap.h"
 
 /* The following messages were for error checking that is not properly
    reported at the moment.  Which should be reinstated? */
index 0bb4305d59940ca376caaac7ce72fa3080d044e0..3fbeb87f3b19959c04fd1b95759d2366b6213419 100644 (file)
@@ -39,6 +39,7 @@
 #include "lib/netapi/netapi_net.h"
 #include "rpc_client/init_lsa.h"
 #include "../libcli/security/security.h"
+#include "libsmb/clirap.h"
 
 static int net_mode_share;
 static NTSTATUS sync_files(struct copy_clistate *cp_clistate, const char *mask);
index 24ae9e94f6a7be7754f041dcd3b510e6f4bbc69e..c7b586a4c0fa1a3a82bc910391fce1fa727ed605 100644 (file)
@@ -27,6 +27,7 @@
 #include "../librpc/gen_ndr/ndr_lsa.h"
 #include "rpc_client/cli_lsarpc.h"
 #include "../libcli/security/security.h"
+#include "libsmb/clirap.h"
 
 static int test_args;
 
index 81b9ca3257bd8aec0f9fa3c4b05ea096df0738f5..3f7fc9769865755c33446c9689df6330a178b76c 100644 (file)
@@ -23,6 +23,7 @@
 #include "popt_common.h"
 #include "rpc_client/cli_pipe.h"
 #include "../librpc/gen_ndr/ndr_srvsvc_c.h"
+#include "libsmb/clirap.h"
 
 static int use_bcast;