summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-03-06 17:01:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:57 -0500
commit0a516662abf927f96a66abb65034edab639b2682 (patch)
tree7fe2d156f5e548069d8de009ca0e9b88fbbfe45b /source3/nmbd
parent9f2e29799eac96068fa033bdc4a9df5a82ec470d (diff)
downloadsamba-0a516662abf927f96a66abb65034edab639b2682.tar.gz
samba-0a516662abf927f96a66abb65034edab639b2682.tar.bz2
samba-0a516662abf927f96a66abb65034edab639b2682.zip
r13873: I think this is the longstanding wins server crash bug, not
part of the changes I made but something that's been there a while.... Coverity bugid #41. Jeremy. (This used to be commit 2f6cf810eae124820a073258ffe62aace7a92d9c)
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd_winsserver.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c
index ddc9edfb06..f6f9d743b5 100644
--- a/source3/nmbd/nmbd_winsserver.c
+++ b/source3/nmbd/nmbd_winsserver.c
@@ -1246,25 +1246,24 @@ already exists in WINS as a GROUP name.\n", nmb_namestr(question) ));
if ( namerec != NULL ) {
pull_ascii_nstring(name, sizeof(name), namerec->name.name);
- } else {
- name[0] = '\0';
- }
-
- if( is_myname(name) ) {
- if(!ismyip(from_ip)) {
- DEBUG(3,("wins_process_name_registration_request: Attempt to register name %s. Name \
+ if( is_myname(name) ) {
+ if(!ismyip(from_ip)) {
+ DEBUG(3,("wins_process_name_registration_request: Attempt to register name %s. Name \
is one of our (WINS server) names. Denying registration.\n", nmb_namestr(question) ));
- send_wins_name_registration_response(RFS_ERR, 0, p);
- return;
- } else {
- /*
- * It's one of our names and one of our IP's - update the ttl.
- */
- update_name_ttl(namerec, ttl);
- wins_hook("refresh", namerec, ttl);
- send_wins_name_registration_response(0, ttl, p);
- return;
+ send_wins_name_registration_response(RFS_ERR, 0, p);
+ return;
+ } else {
+ /*
+ * It's one of our names and one of our IP's - update the ttl.
+ */
+ update_name_ttl(namerec, ttl);
+ wins_hook("refresh", namerec, ttl);
+ send_wins_name_registration_response(0, ttl, p);
+ return;
+ }
}
+ } else {
+ name[0] = '\0';
}
/*