summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/rpc_srvsvc.h8
-rw-r--r--source3/include/smb.h1
-rw-r--r--source3/param/loadparm.c1
-rw-r--r--source3/rpc_parse/parse_srv.c27
-rw-r--r--source3/rpc_server/srv_srvsvc.c17
5 files changed, 52 insertions, 2 deletions
diff --git a/source3/include/rpc_srvsvc.h b/source3/include/rpc_srvsvc.h
index 78949a7a7d..96961cbd2f 100644
--- a/source3/include/rpc_srvsvc.h
+++ b/source3/include/rpc_srvsvc.h
@@ -305,6 +305,12 @@ typedef struct share_info_2_info
} SRV_SHARE_INFO_2;
+/* SRV_SHARE_INFO_1005 */
+typedef struct share_info_1005_info
+{
+ uint32 dfs_root_flag;
+} SRV_SHARE_INFO_1005;
+
/* SRV_SHARE_INFO_CTR */
typedef struct srv_share_info_ctr_info
{
@@ -373,7 +379,7 @@ typedef struct r_net_share_get_info_info
union {
SRV_SHARE_INFO_1 info1;
SRV_SHARE_INFO_2 info2;
-
+ SRV_SHARE_INFO_1005 info1005;
} share;
uint32 status;
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 78d17aaa3d..ee14466cf7 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1412,6 +1412,7 @@ char *strdup(char *s);
#define SV_TYPE_SERVER_OSF 0x00100000
#define SV_TYPE_SERVER_VMS 0x00200000
#define SV_TYPE_WIN95_PLUS 0x00400000
+#define SV_TYPE_DFS_SERVER 0x00800000
#define SV_TYPE_ALTERNATE_XPORT 0x20000000
#define SV_TYPE_LOCAL_LIST_ONLY 0x40000000
#define SV_TYPE_DOMAIN_ENUM 0x80000000
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index cc5a51c6c6..ff19f34a0e 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -2946,6 +2946,7 @@ static void set_default_server_announce_type(void)
else if(lp_announce_as() == ANNOUNCE_AS_WFW)
default_server_announce |= SV_TYPE_WFW;
default_server_announce |= (lp_time_server() ? SV_TYPE_TIME_SOURCE : 0);
+ default_server_announce |= (lp_host_msdfs() ? SV_TYPE_DFS_SERVER : 0);
}
diff --git a/source3/rpc_parse/parse_srv.c b/source3/rpc_parse/parse_srv.c
index 8997b05e0b..6eeae80cfc 100644
--- a/source3/rpc_parse/parse_srv.c
+++ b/source3/rpc_parse/parse_srv.c
@@ -204,6 +204,27 @@ static BOOL srv_io_share_info2(char *desc, SH_INFO_2 *sh2, prs_struct *ps, int d
/*******************************************************************
Reads or writes a structure.
********************************************************************/
+static BOOL srv_io_share_info1005(char* desc, SRV_SHARE_INFO_1005* sh1005,
+ prs_struct* ps, int depth)
+{
+ if(sh1005 == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "srv_io_share_info1005");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!prs_uint32("dfs_root_flag", ps, depth, &sh1005->dfs_root_flag))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
+ Reads or writes a structure.
+********************************************************************/
static BOOL srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct *ps, int depth)
{
@@ -527,8 +548,12 @@ BOOL srv_io_r_net_share_get_info(char *desc, SRV_R_NET_SHARE_GET_INFO *r_n, prs_
return False;
break;
+ case 1005:
+ if(!srv_io_share_info1005("", &r_n->share.info1005,
+ ps, depth))
+ return False;
default:
- DEBUG(5,("%s no share info at switch_value %d\n",
+ DEBUG(5,("%s no share info at switch_value %d\n",
tab_depth(depth), r_n->switch_value));
break;
}
diff --git a/source3/rpc_server/srv_srvsvc.c b/source3/rpc_server/srv_srvsvc.c
index 51ba7e8a8f..bb2083e28a 100644
--- a/source3/rpc_server/srv_srvsvc.c
+++ b/source3/rpc_server/srv_srvsvc.c
@@ -90,6 +90,20 @@ static void init_srv_share_info_2(SRV_SHARE_INFO_2 *sh2, int snum)
init_srv_share_info2_str(&sh2->info_2_str, net_name, remark, path, passwd);
}
+/***************************************************************************
+ Fill in a share info level 1005 structure.
+ ***************************************************************************/
+static void init_srv_share_info_1005(SRV_SHARE_INFO_1005* sh1005, int snum)
+{
+ sh1005->dfs_root_flag = 0;
+
+#ifdef MS_DFS
+ if(lp_host_msdfs() && *lp_dfsmap(snum) && lp_dfsmap_loaded(snum))
+ sh1005->dfs_root_flag = 3;
+#endif
+
+}
+
/*******************************************************************
Fill in a share info structure.
********************************************************************/
@@ -235,6 +249,9 @@ static void init_srv_r_net_share_get_info(SRV_R_NET_SHARE_GET_INFO *r_n,
case 2:
init_srv_share_info_2(&r_n->share.info2, snum);
break;
+ case 1005:
+ init_srv_share_info_1005(&r_n->share.info1005, snum);
+ break;
default:
DEBUG(5,("init_srv_net_share_get_info: unsupported switch value %d\n", info_level));
status = 0xC0000000 | NT_STATUS_INVALID_INFO_CLASS;