From d85c517b45b8feb8469f7073d770e7fedc818259 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 22 Feb 2008 17:35:53 +0100 Subject: Add variable to define if a share should be hidden. If you create a share on a Windows machine called foo$ then this share is of the type STYPE_DISKTREE. So it is possible to administrate this kind of share. Tested on Windows NT and 2003. In samba we assume that if a share with a $ at the end must be of the type STYPE_DISKTREE_HIDDEN. This is wrong, so we need a variable in the config to define if the share should be hidden or not. (This used to be commit a3da677bf0faed56e6731ee96708a7847a61d118) --- source3/rpc_server/srv_srvsvc_nt.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'source3/rpc_server/srv_srvsvc_nt.c') diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c index 1b877ee5b4..f0680a89e5 100644 --- a/source3/rpc_server/srv_srvsvc_nt.c +++ b/source3/rpc_server/srv_srvsvc_nt.c @@ -225,9 +225,6 @@ static WERROR net_enum_files( TALLOC_CTX *ctx, const char *username, ********************************************************************/ static uint32 get_share_type(int snum) { - char *net_name = lp_servicename(snum); - int len_net_name = strlen(net_name); - /* work out the share type */ uint32 type = STYPE_DISKTREE; @@ -235,7 +232,7 @@ static uint32 get_share_type(int snum) type = STYPE_PRINTQ; if (strequal(lp_fstype(snum), "IPC")) type = STYPE_IPC; - if (net_name[len_net_name-1] == '$') + if (lp_hidden(snum)) type |= STYPE_HIDDEN; return type; -- cgit