- removed ServerComment and instead set the comment string in nmbd
authorAndrew Tridgell <tridge@samba.org>
Tue, 20 Aug 1996 16:09:41 +0000 (16:09 +0000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 20 Aug 1996 16:09:41 +0000 (16:09 +0000)
using the "server string" option. This replaces the -C option to nmbd

source/include/proto.h
source/nameannounce.c
source/namedbsubnet.c
source/nameelect.c
source/nameserv.c
source/namework.c
source/nmbd/nmbd.c

index f257ac0048f3e79c72f37a81e6984f9c83478f7a..f8685d21ea15dd5e836ee56e62f3bce847b39246 100644 (file)
@@ -488,8 +488,6 @@ void response_netbios_packet(struct packet_struct *p);
 void reset_server(char *name, int state, struct in_addr ip);
 void tell_become_backup(void);
 BOOL same_context(struct dgram_packet *dgram);
-BOOL listening_name(struct work_record *work, struct nmb_name *n);
-BOOL listening_type(struct packet_struct *p, int command);
 void process_browse_packet(struct packet_struct *p,char *buf,int len);
 
 /*The following definitions come from  nmbd.c  */
index 09aade86efa072aa425041ac0644e1ae2bcc7a34..5591c5ba19af6fb349819467a593a65f4ee6ef5a 100644 (file)
@@ -42,9 +42,6 @@ extern int ClientNMB;
 /* this is our domain/workgroup/server database */
 extern struct subnet_record *subnetlist;
 
-/* machine comment for host announcements */
-extern  pstring ServerComment;
-
 extern int  updatecount;
 extern int  workgroup_count;
 
@@ -307,7 +304,7 @@ void announce_host(void)
   pstring comment;
   char *my_name;
 
-  StrnCpy(comment, *ServerComment ? ServerComment : "NoComment", 43);
+  StrnCpy(comment, lp_serverstring(), 43);
 
   my_name = *myname ? myname : "NoName";
 
index 5c683e5e49bfbcdb86826da8422d42dae4701907..0bad79246ad7a968a590080c651f01e3a0492cff 100644 (file)
@@ -224,7 +224,6 @@ struct subnet_record *add_subnet_entry(struct in_addr bcast_ip,
       (d = make_subnet(bcast_ip, mask_ip)))
     {
       struct work_record *w = find_workgroupstruct(d, name, add);
-         extern pstring ServerComment;
       
       if (!w) return NULL;
 
@@ -239,7 +238,7 @@ struct subnet_record *add_subnet_entry(struct in_addr bcast_ip,
          lmhosts server entries to local interfaces */
       if (strequal(lp_workgroup(), name))
       {
-           add_server_entry(d,w,myname,w->ServerType,0,ServerComment,True);
+       add_server_entry(d,w,myname,w->ServerType,0,lp_serverstring(),True);
         DEBUG(3,("Added server name entry %s at %s\n",
                   name,inet_ntoa(bcast_ip)));
       }
index ef3935b1fdf3433ca3c51d57a1c74dadf80e2cd2..041e4a8cca98073130d524a93adcd55486ffb93b 100644 (file)
@@ -43,9 +43,6 @@ extern pstring myname;
 extern struct in_addr ipzero;
 extern struct in_addr ipgrp;
 
-/* machine comment for host announcements */
-extern  pstring ServerComment;
-
 /* here are my election parameters */
 
 extern time_t StartupTime;
@@ -266,7 +263,7 @@ void become_master(struct subnet_record *d, struct work_record *work)
 
       /* update our server status */
       work->ServerType &= ~SV_TYPE_POTENTIAL_BROWSER;
-      add_server_entry(d,work,myname,work->ServerType,0,ServerComment,True);
+      add_server_entry(d,work,myname,work->ServerType,0,lp_serverstring(),True);
 
       /* add special browser name */
       add_my_name_entry(d,MSBROWSE        ,0x01,nb_type|NB_ACTIVE|NB_GROUP);
@@ -295,7 +292,7 @@ void become_master(struct subnet_record *d, struct work_record *work)
 
       /* update our server status */
       work->ServerType |= SV_TYPE_MASTER_BROWSER;
-      add_server_entry(d,work,myname,work->ServerType,0,ServerComment,True);
+      add_server_entry(d,work,myname,work->ServerType,0,lp_serverstring(),True);
 
       if (work->serverlist == NULL) /* no servers! */
       {
@@ -344,7 +341,7 @@ void become_master(struct subnet_record *d, struct work_record *work)
         if (lp_domain_logons())
            {
           work->ServerType |= SV_TYPE_DOMAIN_MEMBER;
-          add_server_entry(d,work,myname,work->ServerType,0,ServerComment,True);
+          add_server_entry(d,work,myname,work->ServerType,0,lp_serverstring(),True);
         }
 
         /* add domain master name */
@@ -380,7 +377,7 @@ void become_master(struct subnet_record *d, struct work_record *work)
            }
 
                work->ServerType |= update_type;
-        add_server_entry(d,work,myname,work->ServerType,0,ServerComment,True);
+               add_server_entry(d,work,myname,work->ServerType,0,lp_serverstring(),True);
 
                for (d1 = subnetlist; d1; d1 = d1->next)
                {
index 48b00d256d760aab46544e2d74039bd2c5c499a7..d3aed24ab12997c5a859ab9b04219e634e55ce26 100644 (file)
@@ -37,7 +37,6 @@ extern int DEBUGLEVEL;
 
 extern pstring scope;
 extern pstring myname;
-extern pstring ServerComment;
 extern struct in_addr ipzero;
 extern struct in_addr ipgrp;
 
index 90ab2fb1fb63f16abb6eafef6294c0a678979993..be034488c43146df4633e8c0fcaaf7b8c8e24fdd 100644 (file)
@@ -48,9 +48,6 @@ extern int workgroup_count; /* total number of workgroups we know about */
 /* this is our domain/workgroup/server database */
 extern struct subnet_record *subnetlist;
 
-/* machine comment for host announcements */
-extern  pstring ServerComment;
-
 extern int  updatecount;
 
 /* what server type are we currently */
index 2621be87ee544ae7fa2a38b5b092d460dd20d50e..097e4f794a53d3552d57a448461e63844f185867 100644 (file)
@@ -44,9 +44,6 @@ extern pstring myname;
 /* are we running as a daemon ? */
 static BOOL is_daemon = False;
 
-/* machine comment for host announcements */
-pstring ServerComment="";
-
 /* what server type are we currently */
 
 time_t StartupTime =0;
@@ -508,13 +505,6 @@ static void usage(char *pname)
     DEBUG(3,("Loaded hosts file\n"));
   }
 
-
-
-  if (!*ServerComment)
-    strcpy(ServerComment,"Samba %v");
-  string_sub(ServerComment,"%v",VERSION);
-  string_sub(ServerComment,"%h",myhostname);
-
   add_my_names();
 
   if (strequal(lp_workgroup(),"*")) {