summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorAndreas Schneider <anschneider@suse.de>2008-02-22 17:35:53 +0100
committerVolker Lendecke <vl@samba.org>2008-02-26 21:34:05 +0100
commitd85c517b45b8feb8469f7073d770e7fedc818259 (patch)
tree9edda2d85be6ed4a6ab70c3e0052f717d5746270 /source3/param
parentbe626225ef8b70694012d539489075d240b4f2a8 (diff)
downloadsamba-d85c517b45b8feb8469f7073d770e7fedc818259.tar.gz
samba-d85c517b45b8feb8469f7073d770e7fedc818259.tar.bz2
samba-d85c517b45b8feb8469f7073d770e7fedc818259.zip
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)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 86446d5b75..79c522f77c 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -420,6 +420,7 @@ typedef struct {
bool bRead_only;
bool bNo_set_dir;
bool bGuest_only;
+ bool bHidden;
bool bGuest_ok;
bool bPrint_ok;
bool bMap_system;
@@ -562,6 +563,7 @@ static service sDefault = {
True, /* bRead_only */
True, /* bNo_set_dir */
False, /* bGuest_only */
+ False, /* bHidden */
False, /* bGuest_ok */
False, /* bPrint_ok */
False, /* bMap_system */
@@ -971,6 +973,7 @@ static struct parm_struct parm_table[] = {
{"inherit owner", P_BOOL, P_LOCAL, &sDefault.bInheritOwner, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE},
{"guest only", P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE},
{"only guest", P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL, NULL, FLAG_HIDE},
+ {"hidden", P_BOOL, P_LOCAL, &sDefault.bHidden, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT},
{"guest ok", P_BOOL, P_LOCAL, &sDefault.bGuest_ok, NULL, NULL, FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT},
{"public", P_BOOL, P_LOCAL, &sDefault.bGuest_ok, NULL, NULL, FLAG_HIDE},
@@ -2137,6 +2140,7 @@ FN_LOCAL_BOOL(lp_readonly, bRead_only)
FN_LOCAL_BOOL(lp_no_set_dir, bNo_set_dir)
FN_LOCAL_BOOL(lp_guest_ok, bGuest_ok)
FN_LOCAL_BOOL(lp_guest_only, bGuest_only)
+FN_LOCAL_BOOL(lp_hidden, bHidden)
FN_LOCAL_BOOL(lp_print_ok, bPrint_ok)
FN_LOCAL_BOOL(lp_map_hidden, bMap_hidden)
FN_LOCAL_BOOL(lp_map_archive, bMap_archive)
@@ -2774,6 +2778,7 @@ static bool lp_add_ipc(const char *ipc_name, bool guest_ok)
ServicePtrs[i]->bAvailable = True;
ServicePtrs[i]->bRead_only = True;
ServicePtrs[i]->bGuest_only = False;
+ ServicePtrs[i]->bHidden = True;
ServicePtrs[i]->bGuest_ok = guest_ok;
ServicePtrs[i]->bPrint_ok = False;
ServicePtrs[i]->bBrowseable = sDefault.bBrowseable;