diff options
author | Jeremy Allison <jra@samba.org> | 1998-09-28 21:43:48 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-09-28 21:43:48 +0000 |
commit | cf3a9741dc7427efb97eff09a3c197a906ce6767 (patch) | |
tree | a5ca09216db91089dd5c2be34751733c4dbff2be /source3/nmbd | |
parent | cdaa53e3ef7e9bbb7dedaa82d54f730085b9250c (diff) | |
download | samba-cf3a9741dc7427efb97eff09a3c197a906ce6767.tar.gz samba-cf3a9741dc7427efb97eff09a3c197a906ce6767.tar.bz2 samba-cf3a9741dc7427efb97eff09a3c197a906ce6767.zip |
Changes to test in configure if capabilities are enabled on a system.
Changes to get Samba to compile cleanly with the IRIX compiler
with the options : -fullwarn -woff 1209,1174 (the -woff options
are to turn off warnings about unused function parameters and
controlling loop expressions being constants).
Split prototype generation as we hit a limit in IRIX nawk.
Removed "." code in smbd/filename.c (yet again :-).
Jeremy.
(This used to be commit e0567433bd72aec17bf5a54cc292701095d25f09)
Diffstat (limited to 'source3/nmbd')
-rw-r--r-- | source3/nmbd/nmbd_become_lmb.c | 9 | ||||
-rw-r--r-- | source3/nmbd/nmbd_incomingdgrams.c | 7 | ||||
-rw-r--r-- | source3/nmbd/nmbd_packets.c | 2 | ||||
-rw-r--r-- | source3/nmbd/nmbd_processlogon.c | 15 | ||||
-rw-r--r-- | source3/nmbd/nmbd_serverlistdb.c | 3 | ||||
-rw-r--r-- | source3/nmbd/nmbd_winsserver.c | 14 |
6 files changed, 9 insertions, 41 deletions
diff --git a/source3/nmbd/nmbd_become_lmb.c b/source3/nmbd/nmbd_become_lmb.c index 1e4f070271..80609cf504 100644 --- a/source3/nmbd/nmbd_become_lmb.c +++ b/source3/nmbd/nmbd_become_lmb.c @@ -280,7 +280,6 @@ static void release_msbrowse_name_fail( struct subnet_record *subrec, void unbecome_local_master_browser(struct subnet_record *subrec, struct work_record *work, BOOL force_new_election) { - struct server_record *servrec; struct name_record *namerec; struct nmb_name nmbname; @@ -289,7 +288,7 @@ void unbecome_local_master_browser(struct subnet_record *subrec, struct work_rec DEBUG(2,("unbecome_local_master_browser: unbecoming local master for workgroup %s \ on subnet %s\n",work->work_group, subrec->subnet_name)); - if((servrec = find_server_in_workgroup( work, global_myname)) == NULL) + if(find_server_in_workgroup( work, global_myname) == NULL) { DEBUG(0,("unbecome_local_master_browser: Error - cannot find server %s \ in workgroup %s on subnet %s\n", @@ -489,7 +488,6 @@ static void become_local_master_fail1(struct subnet_record *subrec, { char *work_name = rrec->userdata->data; struct work_record *work = find_workgroup_on_subnet(subrec, work_name); - struct server_record *servrec; if(!work) { @@ -498,7 +496,7 @@ workgroup %s on subnet %s\n", work_name, subrec->subnet_name)); return; } - if((servrec = find_server_in_workgroup(work, global_myname)) == NULL) + if(find_server_in_workgroup(work, global_myname) == NULL) { DEBUG(0,("become_local_master_fail1: Error - cannot find server %s \ in workgroup %s on subnet %s\n", @@ -524,7 +522,6 @@ workgroup %s on subnet %s. Couldn't register name %s.\n", void become_local_master_browser(struct subnet_record *subrec, struct work_record *work) { - struct server_record *servrec; struct userdata_struct *userdata; int size = sizeof(struct userdata_struct) + sizeof(fstring) + 1; @@ -542,7 +539,7 @@ void become_local_master_browser(struct subnet_record *subrec, struct work_recor return; } - if((servrec = find_server_in_workgroup( work, global_myname)) == NULL) + if(find_server_in_workgroup( work, global_myname) == NULL) { DEBUG(0,("become_local_master_browser: Error - cannot find server %s \ in workgroup %s on subnet %s\n", diff --git a/source3/nmbd/nmbd_incomingdgrams.c b/source3/nmbd/nmbd_incomingdgrams.c index 36242d9ac2..e6c4ab2771 100644 --- a/source3/nmbd/nmbd_incomingdgrams.c +++ b/source3/nmbd/nmbd_incomingdgrams.c @@ -544,7 +544,7 @@ static void send_backup_list_response(struct subnet_record *subrec, int port) { char outbuf[1024]; - char *p, *countptr, *nameptr; + char *p, *countptr; unsigned int count = 0; int len; struct server_record *servrec; @@ -565,8 +565,6 @@ static void send_backup_list_response(struct subnet_record *subrec, SIVAL(p,0,token); /* The sender's unique info. */ p += 4; - nameptr = p; - /* We always return at least one name - our own. */ count = 1; StrnCpy(p,global_myname,15); @@ -793,7 +791,6 @@ void process_announce_request(struct subnet_record *subrec, struct packet_struct void process_lm_announce_request(struct subnet_record *subrec, struct packet_struct *p, char *buf) { struct dgram_packet *dgram = &p->packet.dgram; - struct work_record *work; char *workgroup_name = dgram->dest_name.name; DEBUG(3,("process_lm_announce_request: Announce request from %s IP %s to %s.\n", @@ -808,7 +805,7 @@ void process_lm_announce_request(struct subnet_record *subrec, struct packet_str return; } - if((work = find_workgroup_on_subnet(subrec, workgroup_name)) == NULL) + if(find_workgroup_on_subnet(subrec, workgroup_name) == NULL) { DEBUG(0,("process_announce_request: Unable to find workgroup %s on subnet !\n", workgroup_name)); diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index 10ce2da0c1..a515ea548e 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/nmbd/nmbd_packets.c @@ -138,7 +138,7 @@ static uint16 generate_name_trn_id(void) if (!name_trn_id) { - name_trn_id = (time(NULL)%(unsigned)0x7FFF) + (getpid()%(unsigned)100); + name_trn_id = ((unsigned)time(NULL)%(unsigned)0x7FFF) + ((unsigned)getpid()%(unsigned)100); } name_trn_id = (name_trn_id+1) % (unsigned)0x7FFF; return name_trn_id; diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c index 29dc68fb80..68a0ff4000 100644 --- a/source3/nmbd/nmbd_processlogon.c +++ b/source3/nmbd/nmbd_processlogon.c @@ -41,20 +41,14 @@ void process_logon_packet(struct packet_struct *p,char *buf,int len, struct dgram_packet *dgram = &p->packet.dgram; pstring my_name; fstring reply_name; - BOOL add_slashes = False; pstring outbuf; - int code,reply_code; - char unknown_byte = 0; - uint16 request_count = 0; + int code; uint16 token = 0; uint32 ntversion; uint16 lmnttoken; uint16 lm20token; - uint32 allowableaccount; /* Control bits, i.e. 0x80 == workstation trust a/c. */ uint32 domainsidsize; - uint16 requestcount; - char *domainsid; char *getdc; char *uniuser; /* Unicode user name. */ pstring ascuser; @@ -84,13 +78,9 @@ logons are not enabled.\n", inet_ntoa(p->ip) )); getdc = skip_string(user,1); q = skip_string(getdc,1); - unknown_byte = CVAL(q,0); - request_count = SVAL(q,1); token = SVAL(q,3); - reply_code = 0x6; fstrcpy(reply_name,my_name); - add_slashes = True; DEBUG(3,("process_logon_packet: Domain login request from %s at IP %s user=%s token=%x\n", machine,inet_ntoa(p->ip),user,token)); @@ -175,14 +165,11 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n", { char *q = buf + 2; - requestcount = SVAL(q, 0); q += 2; unicomp = q; uniuser = skip_unicode_string(unicomp,1); getdc = skip_unicode_string(uniuser,1); q = skip_string(getdc,1); - allowableaccount = IVAL(q, 0); q += 4; domainsidsize = IVAL(q, 0); q += 4; - domainsid = q; q += domainsidsize + 3; ntversion = IVAL(q, 0); q += 4; lmnttoken = SVAL(q, 0); q += 2; diff --git a/source3/nmbd/nmbd_serverlistdb.c b/source3/nmbd/nmbd_serverlistdb.c index 458fbd0085..cf7295ee11 100644 --- a/source3/nmbd/nmbd_serverlistdb.c +++ b/source3/nmbd/nmbd_serverlistdb.c @@ -230,14 +230,13 @@ static uint32 write_this_server_name( struct subnet_record *subrec, { struct subnet_record *ssub; struct work_record *iwork; - struct server_record *sserv; /* Go through all the subnets we have already seen. */ for (ssub = FIRST_SUBNET; ssub != subrec; ssub = NEXT_SUBNET_INCLUDING_UNICAST(ssub)) { for(iwork = ssub->workgrouplist; iwork; iwork = iwork->next) { - if((sserv = find_server_in_workgroup( iwork, servrec->serv.name)) != NULL) + if(find_server_in_workgroup( iwork, servrec->serv.name) != NULL) { /* * We have already written out this server record, don't diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index cba3c1b308..80825579c4 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -173,7 +173,6 @@ BOOL initialise_wins(void) int type = 0; int nb_flags; int ttl; - enum name_source source; char *ptr; char *p; BOOL got_token; @@ -266,8 +265,6 @@ BOOL initialise_wins(void) { next_token(&ptr, ip_str, NULL, sizeof(ip_str)); ip_list[i] = *interpret_addr2(ip_str); - if (ip_equal(ip_list[i], ipzero)) - source = SELF_NAME; } next_token(&ptr,nb_flags_str,NULL, sizeof(nb_flags_str)); @@ -538,18 +535,10 @@ static void wins_register_query_fail(struct subnet_record *subrec, { struct userdata_struct *userdata = rrec->userdata; struct packet_struct *orig_reg_packet; - struct nmb_packet *nmb; struct name_record *namerec = NULL; - uint16 nb_flags; - BOOL group; memcpy((char *)&orig_reg_packet, userdata->data, sizeof(struct packet_struct *)); - nmb = &orig_reg_packet->packet.nmb; - - nb_flags = get_nb_flags(nmb->additional->rdata); - group = (nb_flags & NB_GROUP) ? True : False; - /* * We want to just add the name, as we now know the original owner * didn't want it. But we can't just do that as an arbitary @@ -1547,7 +1536,6 @@ void wins_write_database(BOOL background) { struct name_record *namerec; pstring fname, fnamenew; - static int child_pid; FILE *fp; @@ -1558,7 +1546,7 @@ void wins_write_database(BOOL background) doesn't block while this is done */ if (background) { CatchChild(); - if ((child_pid=fork())) { + if (fork()) { return; } } |