diff options
author | Andrew Tridgell <tridge@samba.org> | 1996-10-07 11:06:34 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1996-10-07 11:06:34 +0000 |
commit | bfa816cc8f30d9a629b4fe9f71bf0707aa6c4502 (patch) | |
tree | dee79a8127749509c8f9a1aae37ba4df145ee4c3 /source | |
parent | 3cd7303dbc2118db7084a6d8872403d825c52323 (diff) | |
download | samba-bfa816cc8f30d9a629b4fe9f71bf0707aa6c4502.tar.gz samba-bfa816cc8f30d9a629b4fe9f71bf0707aa6c4502.tar.xz samba-bfa816cc8f30d9a629b4fe9f71bf0707aa6c4502.zip |
- continue when failing to load config file in nmblookup and smbclient
- fix important bug in nmbd where it set the return code for a
negative name response to 0 (which means success!)
Diffstat (limited to 'source')
-rw-r--r-- | source/client/client.c | 1 | ||||
-rw-r--r-- | source/namepacket.c | 2 | ||||
-rw-r--r-- | source/smbd/reply.c | 2 | ||||
-rw-r--r-- | source/utils/nmblookup.c | 12 |
4 files changed, 11 insertions, 6 deletions
diff --git a/source/client/client.c b/source/client/client.c index b8b63207d79..477c8fe1f8b 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -4500,7 +4500,6 @@ static void usage(char *pname) if (!lp_load(servicesf,True)) { fprintf(stderr, "Can't load %s - run testparm to debug it\n", servicesf); - return (-1); } if (*workgroup == 0) diff --git a/source/namepacket.c b/source/namepacket.c index 5bfa55d4f16..cd133d0a53b 100644 --- a/source/namepacket.c +++ b/source/namepacket.c @@ -252,7 +252,7 @@ void reply_netbios_packet(struct packet_struct *p1,int trn_id, nmb->header.ancount = 1; nmb->header.nscount = 0; nmb->header.arcount = 0; - nmb->header.rcode = 0; + nmb->header.rcode = rcode; bzero((char*)&nmb->question,sizeof(nmb->question)); diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 89b07f1b9ec..48a0732617e 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -302,7 +302,7 @@ int reply_unknown(char *inbuf,char *outbuf) int reply_ioctl(char *inbuf,char *outbuf) { DEBUG(3,("ignoring ioctl\n")); -#if 1 +#if 0 /* we just say it succeeds and hope its all OK. some day it would be nice to interpret them individually */ return set_message(outbuf,1,0,True); diff --git a/source/utils/nmblookup.c b/source/utils/nmblookup.c index c137b4f93ac..ccdbec45e6e 100644 --- a/source/utils/nmblookup.c +++ b/source/utils/nmblookup.c @@ -101,6 +101,8 @@ int main(int argc,char *argv[]) BOOL find_status=False; int i; static pstring servicesf = CONFIGFILE; + struct in_addr bcast_addr; + BOOL got_bcast = False; DEBUGLEVEL = 1; *lookup = 0; @@ -116,6 +118,8 @@ int main(int argc,char *argv[]) { case 'B': iface_set_default(NULL,optarg,NULL); + bcast_addr = *interpret_addr2(optarg); + got_bcast = True; break; case 'i': strcpy(scope,optarg); @@ -149,14 +153,16 @@ int main(int argc,char *argv[]) if (!lp_load(servicesf,True)) { fprintf(stderr, "Can't load %s - run testparm to debug it\n", servicesf); - return (-1); } load_interfaces(); init_structs(); if (!open_sockets()) return(1); - DEBUG(1,("Sending queries to %s\n",inet_ntoa(*iface_bcast(ipzero)))); + if (!got_bcast) + bcast_addr = *iface_bcast(ipzero); + + DEBUG(1,("Sending queries to %s\n",inet_ntoa(bcast_addr))); for (i=optind;i<argc;i++) @@ -187,7 +193,7 @@ int main(int argc,char *argv[]) } if (name_query(ServerFD,lookup,lookup_type,bcast,True, - *iface_bcast(ipzero),&ip,NULL)) + bcast_addr,&ip,NULL)) { printf("%s %s\n",inet_ntoa(ip),lookup); } |