summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-05-01 01:01:19 +0000
committerJeremy Allison <jra@samba.org>2001-05-01 01:01:19 +0000
commit8bd2a11c86ddc3bbb2bec32415e027d87df639af (patch)
tree35df56ea8db8e928720ffcc1e9f1da077600d234 /source3/include
parent0901dd473ae163b815b364fc7ac954778b77d3b5 (diff)
downloadsamba-8bd2a11c86ddc3bbb2bec32415e027d87df639af.tar.gz
samba-8bd2a11c86ddc3bbb2bec32415e027d87df639af.tar.bz2
samba-8bd2a11c86ddc3bbb2bec32415e027d87df639af.zip
Added code from "Nigel Williams" <nigel@veritas.com> (yes, the same famous
Nigel Williams who did NIS/GINA !) to implement add/modify/delete shares for Win2k. Needs testing as I made a few mods to the original code. Jeremy. (This used to be commit 9b3dd801765fad28c0f9d58e5af2537cfccdd4ee)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h10
-rw-r--r--source3/include/rpc_srvsvc.h40
2 files changed, 49 insertions, 1 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index ba13dd43c9..35d2793e9b 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2566,6 +2566,7 @@ void init_owf_info(OWF_INFO *hash, uint8 data[16]);
BOOL smb_io_owf_info(char *desc, OWF_INFO *hash, prs_struct *ps, int depth);
BOOL smb_io_gid(char *desc, DOM_GID *gid, prs_struct *ps, int depth);
BOOL smb_io_pol_hnd(char *desc, POLICY_HND *pol, prs_struct *ps, int depth);
+void init_unistr3(UNISTR3 *str, const char *buf);
BOOL smb_io_unistr3(char *desc, UNISTR3 *name, prs_struct *ps, int depth);
BOOL prs_uint64(char *name, prs_struct *ps, int depth, UINT64_S *data64);
@@ -3537,7 +3538,8 @@ void init_srv_share_info502(SH_INFO_502 *sh502,
char *net_name, uint32 type, char *remark,
uint32 perms, uint32 max_uses, uint32 num_uses,
char *path, char *passwd, SEC_DESC *psd, size_t sd_size);
-void init_srv_share_info502_str(SH_INFO_502_STR *sh502,
+void init_srv_share_info502_str(SH_INFO_502_STR *sh502str,
+ SH_INFO_502 *ptrs,
char *net_name, char *remark,
char *path, char *passwd, SEC_DESC *psd, size_t sd_size);
void init_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM *q_n,
@@ -3612,6 +3614,10 @@ void init_time_of_day_info(TIME_OF_DAY_INFO *tod, uint32 elapsedt, uint32 msecs,
uint32 zone, uint32 tintervals, uint32 day,
uint32 month, uint32 year, uint32 weekday);
BOOL srv_io_r_net_remote_tod(char *desc, SRV_R_NET_REMOTE_TOD *r_n, prs_struct *ps, int depth);
+BOOL srv_io_q_net_disk_enum(char *desc, SRV_Q_NET_DISK_ENUM *q_n, prs_struct *ps, int depth);
+BOOL srv_io_r_net_disk_enum(char *desc, SRV_R_NET_DISK_ENUM *r_n, prs_struct *ps, int depth);
+BOOL srv_io_q_net_name_validate(char *desc, SRV_Q_NET_NAME_VALIDATE *q_n, prs_struct *ps, int depth);
+BOOL srv_io_r_net_name_validate(char *desc, SRV_R_NET_NAME_VALIDATE *r_n, prs_struct *ps, int depth);
/*The following definitions come from rpc_parse/parse_wks.c */
@@ -3835,6 +3841,8 @@ uint32 _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, S
uint32 _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_SHARE_ADD *r_u);
uint32 _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_SHARE_DEL *r_u);
uint32 _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET_REMOTE_TOD *r_u);
+uint32 _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_DISK_ENUM *r_u);
+uint32 _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, SRV_R_NET_NAME_VALIDATE *r_u);
/*The following definitions come from rpc_server/srv_util.c */
diff --git a/source3/include/rpc_srvsvc.h b/source3/include/rpc_srvsvc.h
index 2224f38766..ffd619df41 100644
--- a/source3/include/rpc_srvsvc.h
+++ b/source3/include/rpc_srvsvc.h
@@ -36,9 +36,47 @@
#define SRV_NET_SHARE_DEL 0x12
#define SRV_NET_SRV_GET_INFO 0x15
#define SRV_NET_SRV_SET_INFO 0x16
+#define SRV_NET_DISK_ENUM 0x17
#define SRV_NET_REMOTE_TOD 0x1c
+#define SRV_NET_NAME_VALIDATE 0x21
#define SRV_NETSHAREENUM 0x24
+#define MAX_SERVER_DISK_ENTRIES 15
+
+typedef struct disk_info {
+ uint32 unknown;
+ UNISTR3 disk_name;
+} DISK_INFO;
+
+typedef struct disk_enum_container {
+ uint32 level;
+ uint32 entries_read;
+ uint32 unknown;
+ uint32 disk_info_ptr;
+ DISK_INFO disk_info[MAX_SERVER_DISK_ENTRIES];
+} DISK_ENUM_CONTAINER;
+
+typedef struct net_srv_disk_enum {
+ uint32 ptr_srv_name; /* pointer (to server name?) */
+ UNISTR2 uni_srv_name; /* server name */
+
+ DISK_ENUM_CONTAINER disk_enum_ctr;
+
+ uint32 preferred_len; /* preferred maximum length (0xffff ffff) */
+ uint32 total_entries; /* total number of entries */
+ ENUM_HND enum_hnd;
+ uint32 status; /* return status */
+} SRV_Q_NET_DISK_ENUM, SRV_R_NET_DISK_ENUM;
+
+typedef struct net_name_validate {
+ uint32 ptr_srv_name;
+ UNISTR2 uni_srv_name;
+ UNISTR2 uni_name; /*name to validate*/
+ uint32 type;
+ uint32 flags;
+ uint32 status;
+} SRV_Q_NET_NAME_VALIDATE, SRV_R_NET_NAME_VALIDATE;
+
/* SESS_INFO_0 (pointers to level 0 session info strings) */
typedef struct ptr_sess_info0
{
@@ -328,6 +366,8 @@ typedef struct ptr_share_info502
/* SH_INFO_502_STR (level 502 share info strings) */
typedef struct str_share_info502
{
+ SH_INFO_502 *ptrs;
+
UNISTR2 uni_netname; /* unicode string of net name (e.g NETLOGON) */
UNISTR2 uni_remark; /* unicode string of comment (e.g "Logon server share") */
UNISTR2 uni_path; /* unicode string of local path (e.g c:\winnt\system32\repl\import\scripts) */