svn commit: samba r3824 - in branches/SAMBA_3_0/source/smbd: .
vlendec at samba.org
vlendec at samba.org
Wed Nov 17 21:22:35 GMT 2004
Author: vlendec
Date: 2004-11-17 21:22:35 +0000 (Wed, 17 Nov 2004)
New Revision: 3824
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3824
Log:
Fix crash in api_RNetShareEnum. ServicePtrs[] may contain invalid
entries. Happened after rev3708 removed non-existing cups printers.
Volker
Modified:
branches/SAMBA_3_0/source/smbd/lanman.c
Changeset:
Modified: branches/SAMBA_3_0/source/smbd/lanman.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/lanman.c 2004-11-17 21:05:47 UTC (rev 3823)
+++ branches/SAMBA_3_0/source/smbd/lanman.c 2004-11-17 21:22:35 UTC (rev 3824)
@@ -1502,6 +1502,8 @@
data_len = fixed_len = string_len = 0;
for (i=0;i<count;i++) {
fstring servicename_dos;
+ if (!(lp_browseable(i) && lp_snum_ok(i)))
+ continue;
push_ascii_fstring(servicename_dos, lp_servicename(i));
if( lp_browseable( i )
&& lp_snum_ok( i )
@@ -1530,6 +1532,8 @@
for( i = 0; i < count; i++ )
{
fstring servicename_dos;
+ if (!(lp_browseable(i) && lp_snum_ok(i)))
+ continue;
push_ascii_fstring(servicename_dos, lp_servicename(i));
if( lp_browseable( i )
&& lp_snum_ok( i )
More information about the samba-cvs
mailing list