S3: Small fix to get rid of annoying log message.
authorBo Yang <boyang@samba.org>
Wed, 15 Jul 2009 07:36:02 +0000 (15:36 +0800)
committerBo Yang <boyang@samba.org>
Wed, 15 Jul 2009 09:05:46 +0000 (17:05 +0800)
Signed-off-by: Bo Yang <boyang@samba.org>
source3/param/loadparm.c
source3/rpc_server/srv_srvsvc_nt.c

index 7b4e363f1b9338ccddd2a7b35b9ef98d117fb176..4415804a2d6565cfc08cfd0fc282685957489249 100644 (file)
@@ -5142,6 +5142,9 @@ static char *lp_string(const char *s)
 #if 0
        DEBUG(10, ("lp_string(%s)\n", s));
 #endif
+       if (!s) {
+               return NULL;
+       }
 
        ret = talloc_sub_basic(ctx,
                        get_current_username(),
index 44acf4d647eb322d230764c761d423b91fc48abe..c58c08ecdc7216e1582f683b4ffcbf800b41ad39 100644 (file)
@@ -540,11 +540,13 @@ static WERROR init_srv_share_info_ctr(pipes_struct *p,
                 if (lp_browseable(snum) && lp_snum_ok(snum) &&
                     is_enumeration_allowed(p, snum) &&
                     (all_shares || !is_hidden_share(snum)) ) {
-                        DEBUG(10, ("counting service %s\n", lp_servicename(snum)));
+                        DEBUG(10, ("counting service %s\n",
+                               lp_servicename(snum) ? lp_servicename(snum) : "(null)"));
                         allowed[snum] = true;
                         num_entries++;
                 } else {
-                        DEBUG(10, ("NOT counting service %s\n", lp_servicename(snum)));
+                        DEBUG(10, ("NOT counting service %s\n",
+                               lp_servicename(snum) ? lp_servicename(snum) : "(null)"));
                 }
         }