1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

- removed ServerComment and instead set the comment string in nmbd

using the "server string" option. This replaces the -C option to nmbd
This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent 2d0ec53c50
commit 9e0fab2ee6
7 changed files with 6 additions and 29 deletions

View 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 */

View 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";

View 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)));
}

View 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)
{

View 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;

View 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 */

View 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(),"*")) {