From 1c6e433caa22813a699c9766847886eb59755f8b Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Tue, 1 Jul 1997 01:19:13 +0000 Subject: client.c: New print queue query code from Jeff C. Foster " ipc.c: Added code for returning restricted lists of servers. loadparm.c: Changed default for force create mode to 000. Changed default maxmux to 50 to comply with NT. locking.c: Fixed silly crash bug with slow share mode code. nameannounce.c: Added code for returning restricted lists of servers. namedbserver.c: Added code for returning restricted lists of servers. nameelect.c: Added code for returning restricted lists of servers. namework.c: Added code for returning restricted lists of servers. nmbsync.c: Added code for returning restricted lists of servers. server.c: Added quota fix Albrecht Gebhardt smb.h: Added define for COPYBUF_SIZE. system.c: Rename across filesystems Patch from Warren Birnbaum util.c: Minor fix for warning. --- source/smbd/ipc.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'source/smbd/ipc.c') diff --git a/source/smbd/ipc.c b/source/smbd/ipc.c index 6b3953e6c86..7922e416236 100644 --- a/source/smbd/ipc.c +++ b/source/smbd/ipc.c @@ -770,6 +770,7 @@ static int get_server_info(uint32 servertype, int count=0; int alloced=0; pstring line; + BOOL local_list_only; strcpy(fname,lp_lockdir()); trim_string(fname,NULL,"/"); @@ -784,7 +785,10 @@ static int get_server_info(uint32 servertype, } /* request for everything is code for request all servers */ - if (servertype == SV_TYPE_ALL) servertype &= ~SV_TYPE_DOMAIN_ENUM; + if (servertype == SV_TYPE_ALL) + servertype &= ~(SV_TYPE_DOMAIN_ENUM|SV_TYPE_LOCAL_LIST_ONLY); + + local_list_only = (servertype & SV_TYPE_LOCAL_LIST_ONLY); DEBUG(4,("Servertype search: %8x\n",servertype)); @@ -821,6 +825,14 @@ static int get_server_info(uint32 servertype, ok = False; } + /* Filter the servers/domains we return based on what was asked for. */ + + /* Check to see if we are being asked for a local list only. */ + if(local_list_only && ((s->type & SV_TYPE_LOCAL_LIST_ONLY) == 0)) { + DEBUG(4,("r: local list only")); + ok = False; + } + /* doesn't match up: don't want it */ if (!(servertype & s->type)) { DEBUG(4,("r:serv type ")); @@ -839,6 +851,9 @@ static int get_server_info(uint32 servertype, ok = False; } + /* We should never return a server type with a SV_TYPE_LOCAL_LIST_ONLY set. */ + s->type &= ~SV_TYPE_LOCAL_LIST_ONLY; + if (ok) { DEBUG(4,("**SV** %20s %8x %25s %15s\n", -- cgit