00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 typedef NTSTATUS (*rpc_command_fn)(const DOM_SID *,
00027 const char *,
00028 struct cli_state *cli,
00029 struct rpc_pipe_client *,
00030 TALLOC_CTX *,
00031 int,
00032 const char **);
00033
00034 typedef struct copy_clistate {
00035 TALLOC_CTX *mem_ctx;
00036 struct cli_state *cli_share_src;
00037 struct cli_state *cli_share_dst;
00038 char *cwd;
00039 uint16 attribute;
00040 }copy_clistate;
00041
00042 struct rpc_sh_ctx {
00043 struct cli_state *cli;
00044
00045 DOM_SID *domain_sid;
00046 char *domain_name;
00047
00048 const char *whoami;
00049 const char *thiscmd;
00050 struct rpc_sh_cmd *cmds;
00051 struct rpc_sh_ctx *parent;
00052 };
00053
00054 struct rpc_sh_cmd {
00055 const char *name;
00056 struct rpc_sh_cmd *(*sub)(TALLOC_CTX *mem_ctx,
00057 struct rpc_sh_ctx *ctx);
00058 int pipe_idx;
00059 NTSTATUS (*fn)(TALLOC_CTX *mem_ctx, struct rpc_sh_ctx *ctx,
00060 struct rpc_pipe_client *pipe_hnd,
00061 int argc, const char **argv);
00062 const char *help;
00063 };
00064
00065 enum netdom_domain_t { ND_TYPE_NT4, ND_TYPE_AD };
00066
00067
00068
00069 #include "utils/net_proto.h"
00070
00071
00072
00073 #define NET_FLAGS_MASTER 0x00000001
00074 #define NET_FLAGS_DMB 0x00000002
00075 #define NET_FLAGS_LOCALHOST_DEFAULT_INSANE 0x00000004
00076
00077
00078
00079 #define NET_FLAGS_PDC 0x00000008
00080 #define NET_FLAGS_ANONYMOUS 0x00000010
00081 #define NET_FLAGS_NO_PIPE 0x00000020
00082
00083
00084 #define NET_MODE_SHARE_MIGRATE 1
00085
00086 extern int opt_maxusers;
00087 extern const char *opt_comment;
00088 extern const char *opt_container;
00089 extern int opt_flags;
00090
00091 extern const char *opt_comment;
00092
00093 extern const char *opt_target_workgroup;
00094 extern const char *opt_workgroup;
00095 extern int opt_long_list_entries;
00096 extern int opt_verbose;
00097 extern int opt_reboot;
00098 extern int opt_force;
00099 extern int opt_machine_pass;
00100 extern int opt_timeout;
00101 extern const char *opt_host;
00102 extern const char *opt_user_name;
00103 extern const char *opt_password;
00104 extern BOOL opt_user_specified;
00105
00106 extern BOOL opt_localgroup;
00107 extern BOOL opt_domaingroup;
00108 extern const char *opt_newntname;
00109 extern int opt_rid;
00110 extern int opt_acls;
00111 extern int opt_attrs;
00112 extern int opt_timestamps;
00113 extern const char *opt_exclude;
00114 extern const char *opt_destination;
00115
00116 extern BOOL opt_have_ip;
00117 extern struct in_addr opt_dest_ip;
00118
00119 extern const char *share_type[];
00120
00121
00122
00123 typedef struct _groupmap {
00124 uint32 rid;
00125 uint32 gidNumber;
00126 fstring sambaSID;
00127 fstring group_dn;
00128 } GROUPMAP;
00129
00130 typedef struct _accountmap {
00131 uint32 rid;
00132 fstring cn;
00133 } ACCOUNTMAP;