summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorShirish Kalele <kalele@samba.org>2000-05-18 18:43:53 +0000
committerShirish Kalele <kalele@samba.org>2000-05-18 18:43:53 +0000
commit74d677ec591a715e28dba29a33ee40e1b1c2f830 (patch)
tree110c04458f574ca708fe3616b40ed2ba32d2cbaf /source3/include
parent7b49e6ac6c1b1d9e3fe0e4498a1def63b9532906 (diff)
downloadsamba-74d677ec591a715e28dba29a33ee40e1b1c2f830.tar.gz
samba-74d677ec591a715e28dba29a33ee40e1b1c2f830.tar.bz2
samba-74d677ec591a715e28dba29a33ee40e1b1c2f830.zip
Added the NETDFS pipe to allow remote administration of the msdfs symlinks
on the samba server. (This used to be commit 15e7d8f6c5cddf6ce409ee2505744250d181ec34)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/msdfs.h2
-rw-r--r--source3/include/ntdomain.h1
-rw-r--r--source3/include/proto.h41
-rw-r--r--source3/include/rpc_dfs.h202
-rw-r--r--source3/include/smb.h1
5 files changed, 245 insertions, 2 deletions
diff --git a/source3/include/msdfs.h b/source3/include/msdfs.h
index ac054307b5..5323b8749a 100644
--- a/source3/include/msdfs.h
+++ b/source3/include/msdfs.h
@@ -38,7 +38,7 @@
struct referral
{
- pstring alternate_path; /* contains the path referred (UNICODE?) */
+ pstring alternate_path; /* contains the path referred */
uint32 proximity;
uint32 ttl; /* how long should client cache referral */
};
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h
index 8f5332e2ec..3a3bea16fb 100644
--- a/source3/include/ntdomain.h
+++ b/source3/include/ntdomain.h
@@ -236,6 +236,7 @@ struct acct_info
#include "rpc_srvsvc.h"
#include "rpc_wkssvc.h"
#include "rpc_spoolss.h"
+#include "rpc_dfs.h"
#include "sids.h"
#endif /* _NT_DOMAIN_H */
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 45fd66cd09..9dec5f16e0 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -873,11 +873,16 @@ BOOL posix_locking_end(void);
/*The following definitions come from msdfs/msdfs.c */
+BOOL remove_msdfs_link(struct junction_map* jn);
+BOOL create_msdfs_link(struct junction_map* jn, BOOL exists);
BOOL is_msdfs_volume(connection_struct* conn, char* path);
+BOOL get_referred_path(struct junction_map* junction);
BOOL dfs_redirect(char* pathname, connection_struct* conn);
BOOL dfs_findfirst_redirect(char* pathname, connection_struct* conn);
+BOOL create_junction(char* pathname, struct junction_map* jn);
int setup_dfs_referral(char* pathname, int max_referral_level,
char** ppdata);
+int enum_msdfs_junctions(struct junction_map* jn);
int dfs_path_error(char* inbuf, char* outbuf);
int setup_dfs_referral(char* pathname, int max_referral_level,
char** ppdata);
@@ -1731,7 +1736,7 @@ BOOL do_reg_query_key(struct cli_state *cli, POLICY_HND *hnd,
uint32 *sec_desc, NTTIME *mod_time);
BOOL do_reg_unknown_1a(struct cli_state *cli, POLICY_HND *hnd, uint32 *unk);
BOOL do_reg_query_info(struct cli_state *cli, POLICY_HND *hnd,
- char *type, uint32 *unk_0, uint32 *unk_1);
+ char *key_value, uint32* key_type);
BOOL do_reg_set_key_sec(struct cli_state *cli, POLICY_HND *hnd, SEC_DESC_BUF *sec_desc_buf);
BOOL do_reg_get_key_sec(struct cli_state *cli, POLICY_HND *hnd, uint32 *sec_buf_size, SEC_DESC_BUF **ppsec_desc_buf);
BOOL do_reg_delete_val(struct cli_state *cli, POLICY_HND *hnd, char *val_name);
@@ -1869,6 +1874,36 @@ BOOL create_user_creds( prs_struct *ps,
uint32 pid,
const struct user_creds *usr);
+/*The following definitions come from rpc_parse/parse_dfs.c */
+
+BOOL dfs_io_r_dfs_exist(char *desc, DFS_R_DFS_EXIST *q_d, prs_struct *ps,
+ int depth);
+BOOL make_dfs_q_dfs_remove(DFS_Q_DFS_REMOVE *q_d, char *entrypath,
+ char *servername, char *sharename);
+BOOL dfs_io_q_dfs_remove(char *desc, DFS_Q_DFS_REMOVE *q_d, prs_struct *ps,
+ int depth);
+BOOL dfs_io_r_dfs_remove(char *desc, DFS_R_DFS_REMOVE *r_d, prs_struct *ps,
+ int depth);
+BOOL make_dfs_q_dfs_add(DFS_Q_DFS_ADD *q_d, char *entrypath, char *servername,
+ char *sharename, char *comment, uint32 flags);
+BOOL dfs_io_q_dfs_add(char *desc, DFS_Q_DFS_ADD *q_d, prs_struct *ps,
+ int depth);
+BOOL dfs_io_r_dfs_add(char *desc, DFS_R_DFS_ADD *r_d, prs_struct *ps,
+ int depth);
+BOOL dfs_io_q_dfs_get_info(char* desc, DFS_Q_DFS_GET_INFO* q_i,
+ prs_struct* ps, int depth);
+BOOL dfs_io_r_dfs_get_info(char* desc, DFS_R_DFS_GET_INFO* r_i,
+ prs_struct* ps, int depth);
+BOOL make_dfs_q_dfs_enum(DFS_Q_DFS_ENUM *q_d, uint32 level, DFS_INFO_CTR *ctr);
+BOOL dfs_io_q_dfs_enum(char *desc, DFS_Q_DFS_ENUM *q_d, prs_struct *ps,
+ int depth);
+BOOL dfs_io_dfs_info_ctr(char* desc, DFS_INFO_CTR* ctr, uint32 num_entries,
+ uint32 level,
+ prs_struct* ps, int depth);
+BOOL dfs_io_r_dfs_enum(char *desc, DFS_R_DFS_ENUM *q_d, prs_struct *ps, int depth);
+BOOL dfs_io_dfs_storage_info(char *desc, DFS_INFO_3* info3,
+ prs_struct *ps, int depth);
+
/*The following definitions come from rpc_parse/parse_lsa.c */
void init_lsa_trans_name(LSA_TRANS_NAME *trn, UNISTR2 *uni_name,
@@ -2686,6 +2721,10 @@ void init_wks_r_query_info(WKS_R_QUERY_INFO *r_u,
int status) ;
BOOL wks_io_r_query_info(char *desc, WKS_R_QUERY_INFO *r_u, prs_struct *ps, int depth);
+/*The following definitions come from rpc_server/srv_dfs.c */
+
+BOOL api_netdfs_rpc(pipes_struct *p, prs_struct *data);
+
/*The following definitions come from rpc_server/srv_lsa.c */
#if OLD_NTDOMAIN
diff --git a/source3/include/rpc_dfs.h b/source3/include/rpc_dfs.h
new file mode 100644
index 0000000000..e85a39eabb
--- /dev/null
+++ b/source3/include/rpc_dfs.h
@@ -0,0 +1,202 @@
+/*
+ Unix SMB/Netbios implementation.
+ Version 3.0
+ Samba parameters and setup
+ Copyright (C) Andrew Tridgell 1992-2000
+ Copyright (C) Luke Kenneth Casson Leighton 1996 - 2000
+ Copyright (C) Shirish Kalele 2000
+
+ 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 2 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, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifndef _RPC_DFS_H
+#define _RPC_DFS_H
+
+/* NETDFS pipe: calls */
+#define DFS_EXIST 0x00
+#define DFS_ADD 0x01
+#define DFS_REMOVE 0x02
+#define DFS_GET_INFO 0x04
+#define DFS_ENUM 0x05
+
+/* dfsadd flags */
+#define DFSFLAG_ADD_VOLUME 0x00000001
+#define DFSFLAG_RESTORE_VOLUME 0x00000002
+
+/* API errors from lmerr.h */
+#ifndef NERR_BASE
+#define NERR_BASE (2100)
+#endif
+
+#define NERR_DfsNoSuchVolume (NERR_BASE+562)
+#define NERR_DfsNoSuchShare (NERR_BASE+565)
+#define NERR_DfsNoSuchServer (NERR_BASE+573)
+#define NERR_DfsInternalError (NERR_BASE+590)
+#define NERR_DfsCantCreateJunctionPoint (NERR_BASE+569)
+
+typedef struct dfs_r_dfs_exist
+{
+ uint32 dfs_exist_flag;
+}
+DFS_R_DFS_EXIST;
+
+typedef struct dfs_q_dfs_add
+{
+ uint32 ptr_DfsEntryPath;
+ UNISTR2 DfsEntryPath;
+ uint32 ptr_ServerName;
+ UNISTR2 ServerName;
+ uint32 ptr_ShareName;
+ UNISTR2 ShareName;
+ uint32 ptr_Comment;
+ UNISTR2 Comment;
+ uint32 Flags;
+}
+DFS_Q_DFS_ADD;
+
+typedef struct dfs_r_dfs_add
+{
+ uint32 status;
+}
+DFS_R_DFS_ADD;
+
+/********************************************/
+typedef struct dfs_q_dfs_remove
+{
+ UNISTR2 DfsEntryPath;
+ uint32 ptr_ServerName;
+ UNISTR2 ServerName;
+ uint32 ptr_ShareName;
+ UNISTR2 ShareName;
+}
+DFS_Q_DFS_REMOVE;
+
+typedef struct dfs_r_dfs_remove
+{
+ uint32 status;
+}
+DFS_R_DFS_REMOVE;
+
+/********************************************/
+typedef struct dfs_info_1
+{
+ uint32 ptr_entrypath;
+ UNISTR2 entrypath;
+}
+DFS_INFO_1;
+
+typedef struct dfs_info_2
+{
+ uint32 ptr_entrypath;
+ UNISTR2 entrypath;
+ uint32 ptr_comment;
+ UNISTR2 comment;
+ uint32 state;
+ uint32 num_storages;
+}
+DFS_INFO_2;
+
+typedef struct dfs_storage_info
+{
+ uint32 state;
+ uint32 ptr_servername;
+ UNISTR2 servername;
+ uint32 ptr_sharename;
+ UNISTR2 sharename;
+}
+DFS_STORAGE_INFO;
+
+typedef struct dfs_info_3
+{
+ uint32 ptr_entrypath;
+ UNISTR2 entrypath;
+ uint32 ptr_comment;
+ UNISTR2 comment;
+ uint32 state;
+ uint32 num_storages;
+ uint32 ptr_storages;
+ uint32 num_storage_infos;
+ DFS_STORAGE_INFO* storages;
+}
+DFS_INFO_3;
+
+typedef struct dfs_info_ctr
+{
+
+ uint32 switch_value;
+ uint32 num_entries;
+ uint32 ptr_dfs_ctr; /* pointer to dfs info union */
+ union
+ {
+ DFS_INFO_1 *info1;
+ DFS_INFO_2 *info2;
+ DFS_INFO_3 *info3;
+ } dfs;
+}
+DFS_INFO_CTR;
+
+typedef struct dfs_q_dfs_get_info
+{
+ UNISTR2 uni_path;
+
+ uint32 ptr_server;
+ UNISTR2 uni_server;
+
+ uint32 ptr_share;
+ UNISTR2 uni_share;
+
+ uint32 level;
+}
+DFS_Q_DFS_GET_INFO;
+
+typedef struct dfs_r_dfs_get_info
+{
+ uint32 level;
+ uint32 ptr_ctr;
+ DFS_INFO_CTR ctr;
+ uint32 status;
+}
+DFS_R_DFS_GET_INFO;
+
+typedef struct dfs_q_dfs_enum
+{
+ uint32 level;
+ uint32 maxpreflen;
+ uint32 ptr_buffer;
+ uint32 level2;
+ uint32 ptr_num_entries;
+ uint32 num_entries;
+ uint32 ptr_num_entries2;
+ uint32 num_entries2;
+ ENUM_HND reshnd;
+}
+DFS_Q_DFS_ENUM;
+
+typedef struct dfs_r_dfs_enum
+{
+ DFS_INFO_CTR *ctr;
+ uint32 ptr_buffer;
+ uint32 level;
+ uint32 level2;
+ uint32 ptr_num_entries;
+ uint32 num_entries;
+ uint32 ptr_num_entries2;
+ uint32 num_entries2;
+ ENUM_HND reshnd;
+ uint32 status;
+}
+DFS_R_DFS_ENUM;
+
+#endif
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 62cb8e55b4..e6fee32b80 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -278,6 +278,7 @@ typedef smb_ucs2_t wfstring[128];
#define PIPE_LSASS "\\PIPE\\lsass"
#define PIPE_LSARPC "\\PIPE\\lsarpc"
#define PIPE_SPOOLSS "\\PIPE\\spoolss"
+#define PIPE_NETDFS "\\PIPE\\netdfs"
/* 64 bit time (100usec) since ????? - cifs6.txt, section 3.5, page 30 */
typedef struct nttime_info