r13262: Arrgggg. Fix smbstatus and swat status to ignore
authorJeremy Allison <jra@samba.org>
Tue, 31 Jan 2006 21:54:24 +0000 (21:54 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:06:20 +0000 (11:06 -0500)
bloody placeholder share mode entries (I hate
these - I've had to add this filter code now to too
many places :-).
Jeremy.
(This used to be commit 815340e1a413f98c1c36aacc1c34041e9160d0e3)

source3/utils/status.c
source3/web/statuspage.c

index 2aed68be89717a83152be423037276caf2ffa970..c334fe6982dbb9668125f82cc1b1cd7397519f5c 100644 (file)
@@ -101,6 +101,11 @@ static BOOL Ucrit_addPid( pid_t pid )
 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");
index 24d7eaf72e7fba3e93cb8611b99b91fee90cef5d..7430f4ebf59977360506b130f0c3feb71068c0e6 100644 (file)
@@ -109,7 +109,13 @@ static char *tstring(time_t t)
 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)));