svn commit: samba r13262 - in branches/SAMBA_3_0/source: utils web

jra at samba.org jra at samba.org
Tue Jan 31 21:54:26 GMT 2006


Author: jra
Date: 2006-01-31 21:54:24 +0000 (Tue, 31 Jan 2006)
New Revision: 13262

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13262

Log:
Arrgggg. Fix smbstatus and swat status to ignore
bloody placeholder share mode entries (I hate
these - I've had to add this filter code now to too
many places :-).
Jeremy.

Modified:
   branches/SAMBA_3_0/source/utils/status.c
   branches/SAMBA_3_0/source/web/statuspage.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/status.c
===================================================================
--- branches/SAMBA_3_0/source/utils/status.c	2006-01-31 21:54:22 UTC (rev 13261)
+++ branches/SAMBA_3_0/source/utils/status.c	2006-01-31 21:54:24 UTC (rev 13262)
@@ -101,6 +101,11 @@
 static void print_share_mode(const struct share_mode_entry *e, const char *sharepath, const char *fname)
 {
 	static int count;
+
+	if (!is_valid_share_mode_entry(e)) {
+		return;
+	}
+
 	if (count==0) {
 		d_printf("Locked files:\n");
 		d_printf("Pid          DenyMode   Access      R/W        Oplock           SharePath           Name\n");

Modified: branches/SAMBA_3_0/source/web/statuspage.c
===================================================================
--- branches/SAMBA_3_0/source/web/statuspage.c	2006-01-31 21:54:22 UTC (rev 13261)
+++ branches/SAMBA_3_0/source/web/statuspage.c	2006-01-31 21:54:24 UTC (rev 13262)
@@ -109,7 +109,13 @@
 static void print_share_mode(const struct share_mode_entry *e, const char *sharepath, const char *fname)
 {
 	char           *utf8_fname;
-	int deny_mode = map_share_mode_to_deny_mode(e->share_access,
+	int deny_mode;
+
+	if (!is_valid_share_mode_entry(e)) {
+		return;
+	}
+
+	deny_mode = map_share_mode_to_deny_mode(e->share_access,
 						    e->private_options);
 
 	printf("<tr><td>%s</td>",_(mapPid2Machine(e->pid)));



More information about the samba-cvs mailing list