diff options
Diffstat (limited to 'source')
64 files changed, 392 insertions, 363 deletions
diff --git a/source/client/client.c b/source/client/client.c index ac6878786af..a9e81cfd64e 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. SMB client - Copyright (C) Andrew Tridgell 1994-1995 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/client/clientutil.c b/source/client/clientutil.c index 3058f654741..d1407332ff0 100644 --- a/source/client/clientutil.c +++ b/source/client/clientutil.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. SMB client - Copyright (C) Andrew Tridgell 1994-1995 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/include/byteorder.h b/source/include/byteorder.h index 51f368e61b5..a55789a4036 100644 --- a/source/include/byteorder.h +++ b/source/include/byteorder.h @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. SMB Byte handling - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/include/charset.h b/source/include/charset.h index 72a8810e424..5f5e2016ee1 100644 --- a/source/include/charset.h +++ b/source/include/charset.h @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Character set handling - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/include/includes.h b/source/include/includes.h index 249e4940a91..e1ed3a58168 100644 --- a/source/include/includes.h +++ b/source/include/includes.h @@ -4,7 +4,7 @@ Unix SMB/Netbios implementation. Version 1.9. Machine customisation and include handling - Copyright (C) Andrew Tridgell 1994-1995 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/include/kanji.h b/source/include/kanji.h index 6bc88b704db..ee3ba7e09a6 100644 --- a/source/include/kanji.h +++ b/source/include/kanji.h @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Kanji Extensions - Copyright (C) Andrew Tridgell 1992-1994 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/include/nameserv.h b/source/include/nameserv.h index 42bfe83dcc3..12ddd033c8a 100644 --- a/source/include/nameserv.h +++ b/source/include/nameserv.h @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT netbios header - version 2 - Copyright (C) Andrew Tridgell 1994-1995 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -75,8 +75,6 @@ #define AM_BACKUP(work) (work->ServerType & SV_TYPE_BACKUP_BROWSER) #define AM_DOMMST(work) (work->ServerType & SV_TYPE_DOMAIN_MASTER) #define AM_DOMMEM(work) (work->ServerType & SV_TYPE_DOMAIN_MEMBER) -#define AM_ANY_MASTER(work) (check_work_servertype(work->work_group, \ -SV_TYPE_MASTER_BROWSER|SV_TYPE_DOMAIN_MASTER)) /* microsoft browser NetBIOS name */ #define MSBROWSE "\001\002__MSBROWSE__\002" @@ -160,6 +158,8 @@ struct name_record time_t refresh_time; /* time record should be refreshed */ }; +struct subnet_record; + /* browse and backup server cache for synchronising browse list */ struct browse_cache_record { @@ -173,6 +173,7 @@ struct browse_cache_record time_t sync_time; BOOL synced; BOOL local; + struct subnet_record *subnet; }; /* this is used to hold the list of servers in my domain, and is */ @@ -413,3 +414,15 @@ struct packet_struct SV_TYPE_PRINTQ_SERVER | SV_TYPE_SERVER_NT | \ SV_TYPE_NT ) +/* Macro's to enumerate subnets either with or without + the WINS subnet. */ + +extern struct subnet_record *subnetlist; +extern struct subnet_record *wins_subnet; + +#define FIRST_SUBNET subnetlist +#define NEXT_SUBNET_EXCLUDING_WINS(x) ((x)->next) +#define NEXT_SUBNET_INCLUDING_WINS(x) ( ((x) == wins_subnet) ? 0 : \ + (((x)->next == 0) ? wins_subnet : \ + (x)->next)) + diff --git a/source/include/proto.h b/source/include/proto.h index 63f56228036..973b1a15f39 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -295,12 +295,14 @@ int reply_sendend(char *inbuf,char *outbuf); /*The following definitions come from nameannounce.c */ +void reset_announce_timer(); void announce_request(struct work_record *work, struct in_addr ip); void do_announce_request(char *info, char *to_name, int announce_type, int from, int to, struct in_addr dest_ip); void sync_server(enum state_type state, char *serv_name, char *work_name, int name_type, + struct subnet_record *d, struct in_addr ip); void do_announce_host(int command, char *from_name, int from_type, struct in_addr from_ip, @@ -318,7 +320,9 @@ void announce_remote(time_t t); void expire_browse_cache(time_t t); struct browse_cache_record *add_browser_entry(char *name, int type, char *wg, - time_t ttl, struct in_addr ip, BOOL local); + time_t ttl, + struct subnet_record *d, + struct in_addr ip, BOOL local); void do_browser_lists(time_t t); /*The following definitions come from nameconf.c */ @@ -460,7 +464,7 @@ BOOL name_query(int fd,char *name,int name_type, /*The following definitions come from nameresp.c */ void expire_netbios_response_entries(time_t t); -struct response_record *queue_netbios_pkt_wins(struct subnet_record *d, +struct response_record *queue_netbios_pkt_wins( int fd,int quest_type,enum state_type state, char *name,int name_type,int nb_flags, time_t ttl, int server_type, char *my_name, char *my_comment, diff --git a/source/include/smb.h b/source/include/smb.h index fc9ac2048e5..a6be0f16d5b 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. SMB parameters and setup - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/include/trans2.h b/source/include/trans2.h index b99f1e6028d..70285358bc4 100644 --- a/source/include/trans2.h +++ b/source/include/trans2.h @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. SMB transaction2 handling - Copyright (C) Jeremy Allison 1994 + Copyright (C) Jeremy Allison 1994-1997 Extensively modified by Andrew Tridgell, 1995 diff --git a/source/include/version.h b/source/include/version.h index 16411094543..cc69bef5216 100644 --- a/source/include/version.h +++ b/source/include/version.h @@ -1 +1 @@ -#define VERSION "1.9.16p12alpha" +#define VERSION "1.9.17alpha1" diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c index 4654101a5c3..cf4ae4edb62 100644 --- a/source/lib/charcnv.c +++ b/source/lib/charcnv.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Character set conversion Extensions - Copyright (C) Andrew Tridgell 1992-1994 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/lib/charset.c b/source/lib/charset.c index 65e0cc9a347..1c396db241d 100644 --- a/source/lib/charset.c +++ b/source/lib/charset.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Character set handling - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/lib/fault.c b/source/lib/fault.c index 9bc2eca7e02..61715a4f225 100644 --- a/source/lib/fault.c +++ b/source/lib/fault.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Critical Fault handling - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/lib/interface.c b/source/lib/interface.c index 0e2a13e7b93..444d511426b 100644 --- a/source/lib/interface.c +++ b/source/lib/interface.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. multiple interface handling - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/lib/kanji.c b/source/lib/kanji.c index a77bdea73f0..479763fd406 100644 --- a/source/lib/kanji.c +++ b/source/lib/kanji.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Kanji Extensions - Copyright (C) Andrew Tridgell 1992-1994 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/lib/replace.c b/source/lib/replace.c index c7340bbadd2..67c18a15237 100644 --- a/source/lib/replace.c +++ b/source/lib/replace.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. replacement routines for broken systems - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/lib/system.c b/source/lib/system.c index 86c4c28a593..521f5e304ce 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Samba system utilities - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/lib/time.c b/source/lib/time.c index 215c28a2108..d16552b61e2 100644 --- a/source/lib/time.c +++ b/source/lib/time.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. time handling functions - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/lib/username.c b/source/lib/username.c index 07987fafb30..b8d152c83fd 100644 --- a/source/lib/username.c +++ b/source/lib/username.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Username handling - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/lib/util.c b/source/lib/util.c index 53b24173d51..3315f1a41a1 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Samba utility functions - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/libsmb/namequery.c b/source/libsmb/namequery.c index fc02add5b50..55f70be1222 100644 --- a/source/libsmb/namequery.c +++ b/source/libsmb/namequery.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. name query routines - Copyright (C) Andrew Tridgell 1994-1995 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/libsmb/nmblib.c b/source/libsmb/nmblib.c index a0f93331d95..89a5cf9534b 100644 --- a/source/libsmb/nmblib.c +++ b/source/libsmb/nmblib.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT netbios library routines - Copyright (C) Andrew Tridgell 1994-1995 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/libsmb/smbencrypt.c b/source/libsmb/smbencrypt.c index ee2b17ae5d1..8bb21cfed20 100644 --- a/source/libsmb/smbencrypt.c +++ b/source/libsmb/smbencrypt.c @@ -3,7 +3,7 @@ Unix SMB/Netbios implementation. Version 1.9. SMB parameters and setup - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 Modified by Jeremy Allison 1995. This program is free software; you can redistribute it and/or modify diff --git a/source/locking/locking.c b/source/locking/locking.c index ce96aa01cf3..7c23e5b3cab 100644 --- a/source/locking/locking.c +++ b/source/locking/locking.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Locking functions - Copyright (C) Andrew Tridgell 1992-1996 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/locking/shmem.c b/source/locking/shmem.c index 9f7b985e67a..2c02982d04a 100644 --- a/source/locking/shmem.c +++ b/source/locking/shmem.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Shared memory functions - Copyright (C) Erik Devriendt 1996 + Copyright (C) Erik Devriendt 1996-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/nameannounce.c b/source/nameannounce.c index 8f2005a73d7..b46436168c3 100644 --- a/source/nameannounce.c +++ b/source/nameannounce.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT netbios routines and daemon - version 2 - Copyright (C) Andrew Tridgell 1994-1995 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -47,7 +47,7 @@ extern int workgroup_count; extern struct in_addr wins_ip; - +extern pstring scope; /**************************************************************************** send a announce request to the local net @@ -119,12 +119,13 @@ void do_announce_request(char *info, char *to_name, int announce_type, **************************************************************************/ void sync_server(enum state_type state, char *serv_name, char *work_name, int name_type, + struct subnet_record *d, struct in_addr ip) { /* with a domain master we can get the whole list (not local only list) */ BOOL local_only = (state != NAME_STATUS_DOM_SRV_CHK); - add_browser_entry(serv_name, name_type, work_name, 0, ip, local_only); + add_browser_entry(serv_name, name_type, work_name, 0, d, ip, local_only); if (state == NAME_STATUS_DOM_SRV_CHK) { @@ -189,7 +190,7 @@ void do_announce_host(int command, void remove_my_servers(void) { struct subnet_record *d; - for (d = subnetlist; d; d = d->next) + for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_EXCLUDING_WINS(d)) { struct work_record *work; for (work = d->workgrouplist; work; work = work->next) @@ -228,7 +229,7 @@ void announce_server(struct subnet_record *d, struct work_record *work, if (!lp_wins_support() && *lp_wins_server()) { /* look up the domain master with the WINS server */ - queue_netbios_pkt_wins(d,ClientNMB,NMB_QUERY, + queue_netbios_pkt_wins(ClientNMB,NMB_QUERY, NAME_QUERY_ANNOUNCE_HOST, work->work_group,0x1b,0,ttl*1000, server_type,name,comment, @@ -305,12 +306,10 @@ void announce_host(time_t t) my_name = *myname ? myname : "NoName"; - for (d = subnetlist; d; d = d->next) + for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_EXCLUDING_WINS(d)) { struct work_record *work; - if (ip_equal(d->bcast_ip, wins_ip)) continue; - for (work = d->workgrouplist; work; work = work->next) { uint32 stype = work->ServerType; @@ -362,6 +361,19 @@ void announce_host(time_t t) } } +/* Announce timer. Moved into global static so it can be reset + when a machine becomes a master browser. */ +static time_t announce_timer_last=0; + +/**************************************************************************** + Reset the announce_timer so that a master browser announce will be done + immediately. + ****************************************************************************/ + +void reset_announce_timer() +{ + announce_timer_last = 0; +} /**************************************************************************** announce myself as a master to all other domain master browsers. @@ -373,16 +385,26 @@ void announce_host(time_t t) void announce_master(time_t t) { struct subnet_record *d; - static time_t last=0; + struct work_record *work; BOOL am_master = False; /* are we a master of some sort? :-) */ - if (!last) last = t; - if (t-last < CHECK_TIME_MST_ANNOUNCE * 60) - return; + if (!announce_timer_last) announce_timer_last = t; + if (t-announce_timer_last < CHECK_TIME_MST_ANNOUNCE * 60) + { + DEBUG(10,("announce_master: t (%d) - last(%d) < %d\n", + t, announce_timer_last, CHECK_TIME_MST_ANNOUNCE * 60 )); + return; + } + + if(wins_subnet == 0) + { + DEBUG(10,("announce_master: no wins subnet, ignoring.\n")); + return; + } - last = t; + announce_timer_last = t; - for (d = subnetlist; d; d = d->next) + for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_EXCLUDING_WINS(d)) { struct work_record *work; for (work = d->workgrouplist; work; work = work->next) @@ -398,69 +420,95 @@ void announce_master(time_t t) if (!am_master) return; /* only proceed if we are a master browser */ - /* Note that we don't do this if we are domain master browser. */ + /* Note that we don't do this if we are domain master browser + and that we *only* do this on the WINS subnet. */ + + /* Try and find our workgroup on the WINS subnet */ + work = find_workgroupstruct(wins_subnet, lp_workgroup(), False); - for (d = subnetlist; d; d = d->next) + if (work) { - /* Try and find our workgroup on this subnet */ - struct work_record *work = find_workgroupstruct(d, lp_workgroup(), False); + char *name; + int type; - if (work) + if (*lp_domain_controller()) { - char *name; - int type; - - if (*lp_domain_controller()) - { - /* the domain controller option is used to manually specify - the domain master browser to sync with - */ - - /* XXXX i'm not sure we should be using the domain controller - option for this purpose. - */ - - name = lp_domain_controller(); - type = 0x20; - } - else - { - /* assume that the domain master browser we want to sync - with is our own domain. - */ - name = work->work_group; - type = 0x1b; - } - - /* check the existence of a dmb for this workgroup, and if - one exists at the specified ip, sync with it and announce - ourselves as a master browser to it + /* the domain controller option is used to manually specify + the domain master browser to sync with */ - if (!lp_wins_support() && *lp_wins_server() && - ip_equal(d->bcast_ip, wins_ip)) - { - DEBUG(4, ("Local Announce: find %s<%02x> from WINS server %s\n", - name, type, lp_wins_server())); - - queue_netbios_pkt_wins(d,ClientNMB, - NMB_QUERY,NAME_QUERY_DOM_SRV_CHK, - name, type, 0,0,0, - work->work_group,NULL, - False, False, ipzero, ipzero); - } - else - { - DEBUG(4, ("Local Announce: find %s<%02x> on %s\n", - name, type, inet_ntoa(d->bcast_ip))); - - queue_netbios_packet(d,ClientNMB, - NMB_QUERY,NAME_QUERY_DOM_SRV_CHK, - name, type, 0,0,0, - work->work_group,NULL, - True, False, d->bcast_ip, d->bcast_ip); - } - } + /* XXXX i'm not sure we should be using the domain controller + option for this purpose. + */ + + name = lp_domain_controller(); + type = 0x20; + } + else + { + /* assume that the domain master browser we want to sync + with is our own domain. + */ + name = work->work_group; + type = 0x1b; + } + + /* check the existence of a dmb for this workgroup, and if + one exists at the specified ip, sync with it and announce + ourselves as a master browser to it + */ + + if (!lp_wins_support() && *lp_wins_server() ) + { + DEBUG(4, ("Local Announce: find %s<%02x> from WINS server %s\n", + name, type, lp_wins_server())); + + queue_netbios_pkt_wins(ClientNMB, + NMB_QUERY,NAME_QUERY_DOM_SRV_CHK, + name, type, 0,0,0, + work->work_group,NULL, + False, False, ipzero, ipzero); + } + else if(lp_wins_support()) + { + /* We are the WINS server - query ourselves for the dmb name. */ + + struct nmb_name netb_name; + struct subnet_record *d = 0; + struct name_record *nr = 0; + + make_nmb_name(&netb_name, name, type, scope); + + if ((nr = find_name_search(&d, &netb_name, FIND_WINS, ipzero)) == 0) + { + DEBUG(0, ("announce_master: unable to find domain master browser for workgroup %s \ +in our own WINS database.\n", work->work_group)); + return; + } + + /* Check that this isn't one of our addresses (ie. we are not domain master + ourselves) */ + if(ismyip(nr->ip_flgs[0].ip)) + { + DEBUG(4, ("announce_master: domain master ip found (%s) for workgroup %s \ +is one of our interfaces.\n", work->work_group, inet_ntoa(nr->ip_flgs[0].ip) )); + return; + } + + /* Issue a NAME_STATUS_DOM_SRV_CHK immediately - short circuit the + NAME_QUERY_DOM_SRV_CHK which is done only if we are talking to a + remote WINS server. */ + + DEBUG(4, ("announce_master: doing name status for %s<%02x> to domain master ip %s \ +for workgroup %s\n", name, type, inet_ntoa(nr->ip_flgs[0].ip), work->work_group )); + + queue_netbios_packet(wins_subnet, ClientNMB, + NMB_QUERY,NAME_STATUS_DOM_SRV_CHK, + name, type, 0,0,0, + work->work_group,NULL, + False, False, nr->ip_flgs[0].ip, nr->ip_flgs[0].ip); + } + } } diff --git a/source/namebrowse.c b/source/namebrowse.c index b891f51718e..1dd293d27be 100644 --- a/source/namebrowse.c +++ b/source/namebrowse.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT netbios routines and daemon - version 2 - Copyright (C) Andrew Tridgell 1994-1995 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -95,7 +95,8 @@ void expire_browse_cache(time_t t) add a browser entry ****************************************************************************/ struct browse_cache_record *add_browser_entry(char *name, int type, char *wg, - time_t ttl, struct in_addr ip, BOOL local) + time_t ttl, struct subnet_record *d, + struct in_addr ip, BOOL local) { BOOL newentry=False; @@ -137,7 +138,8 @@ struct browse_cache_record *add_browser_entry(char *name, int type, char *wg, b->ip = ip; b->type = type; b->local = local; /* local server list sync or complete sync required */ - + b->subnet = d; + if (newentry || ttl < b->sync_time) b->sync_time = ttl; @@ -164,20 +166,14 @@ find a server responsible for a workgroup, and sync browse lists **************************************************************************/ static void start_sync_browse_entry(struct browse_cache_record *b) { - struct subnet_record *d; + struct subnet_record *d = b->subnet; struct work_record *work; - /* Look for the workgroup first on the local subnet. If this - fails try WINS - we may need to sync with the domain master, - or we may be the domain master and need to sync with subnet - masters. - */ - - if (!(d = find_subnet_all(b->ip))) { - DEBUG(0, ("start_sync_browse_entry: failed to get a \ -subnet for a browse cache entry workgroup %s, server %s\n", - b->group, b->name)); - return; + /* Check panic conditions - these should not be true. */ + if(b->subnet != wins_subnet) { + DEBUG(0, + ("start_sync_browse_entry: ERROR sync requested on non-WINS subnet.\n")); + return; } if (!(work = find_workgroupstruct(d, b->group, False))) { @@ -187,29 +183,23 @@ workgroup for a browse cache entry workgroup %s, server %s\n", return; } - /* only sync if we are a subnet master or domain master - but - we sync if we are a master for this workgroup on *any* - of our interfaces. */ - if (AM_MASTER(work) || AM_DOMMST(work) || AM_ANY_MASTER(work)) { - - DEBUG(4, ("start_sync_browse_entry: Initiating %s sync with %s<0x20>, \ + DEBUG(4, ("start_sync_browse_entry: Initiating %s sync with %s<0x20>, \ workgroup %s\n", - b->local ? "local" : "remote", b->name, b->group)); + b->local ? "local" : "remote", b->name, b->group)); - /* first check whether the server we intend to sync with exists. if it - doesn't, the server must have died. o dear. */ + /* first check whether the server we intend to sync with exists. if it + doesn't, the server must have died. o dear. */ - /* see response_netbios_packet() or expire_netbios_response_entries() */ - /* We cheat here by using the my_comment field of the response_record - struct as the workgroup name we are going to do the sync for. - This is because the reply packet doesn't include the workgroup, but - we need it when the reply comes back. - */ - queue_netbios_packet(d,ClientNMB,NMB_QUERY, - b->local?NAME_QUERY_SYNC_LOCAL:NAME_QUERY_SYNC_REMOTE, - b->name,0x20,0,0,0,NULL,b->group, - False,False,b->ip,b->ip); - } + /* see response_netbios_packet() or expire_netbios_response_entries() */ + /* We cheat here by using the my_comment field of the response_record + struct as the workgroup name we are going to do the sync for. + This is because the reply packet doesn't include the workgroup, but + we need it when the reply comes back. + */ + queue_netbios_packet(d,ClientNMB,NMB_QUERY, + b->local?NAME_QUERY_SYNC_LOCAL:NAME_QUERY_SYNC_REMOTE, + b->name,0x20,0,0,0,NULL,b->group, + False,False,b->ip,b->ip); b->synced = True; } diff --git a/source/namedbname.c b/source/namedbname.c index d27bcf81586..5c514c263ff 100644 --- a/source/namedbname.c +++ b/source/namedbname.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT netbios routines and daemon - version 2 - Copyright (C) Andrew Tridgell 1994-1996 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -187,7 +187,7 @@ struct name_record *find_name_search(struct subnet_record **d, if (!(search & FIND_WINS)) return NULL; /* find WINS subnet record. */ - *d = find_subnet(wins_ip); + *d = wins_subnet; if (*d == NULL) return NULL; @@ -203,12 +203,14 @@ struct name_record *find_name_search(struct subnet_record **d, void dump_names(void) { struct name_record *n; - struct subnet_record *d; fstring fname, fnamenew; time_t t = time(NULL); FILE *f; - + + if(lp_wins_support() == False || wins_subnet == 0) + return; + strcpy(fname,lp_lockdir()); trim_string(fname,NULL,"/"); strcat(fname,"/"); @@ -224,29 +226,28 @@ void dump_names(void) return; } - DEBUG(4,("Dump of local name table:\n")); + DEBUG(4,("Dump of WINS name table:\n")); - for (d = subnetlist; d; d = d->next) - for (n = d->namelist; n; n = n->next) - { - int i; + for (n = wins_subnet->namelist; n; n = n->next) + { + int i; - DEBUG(4,("%15s ", inet_ntoa(d->bcast_ip))); - DEBUG(4,("%15s ", inet_ntoa(d->mask_ip))); - DEBUG(4,("%-19s TTL=%ld ", + DEBUG(4,("%15s ", inet_ntoa(wins_subnet->bcast_ip))); + DEBUG(4,("%15s ", inet_ntoa(wins_subnet->mask_ip))); + DEBUG(4,("%-19s TTL=%ld ", namestr(&n->name), n->death_time?n->death_time-t:0)); - for (i = 0; i < n->num_ips; i++) - { - DEBUG(4,("%15s NB=%2x source=%d", - inet_ntoa(n->ip_flgs[i].ip), + for (i = 0; i < n->num_ips; i++) + { + DEBUG(4,("%15s NB=%2x source=%d", + inet_ntoa(n->ip_flgs[i].ip), n->ip_flgs[i].nb_flags,n->source)); - } - DEBUG(4,("\n")); + } + DEBUG(4,("\n")); - if (f && ip_equal(d->bcast_ip, wins_ip) && n->source == REGISTER) + if (f && n->source == REGISTER) { /* XXXX i have little imagination as to how to output nb_flags as anything other than as a hexadecimal number :-) */ @@ -264,7 +265,7 @@ void dump_names(void) fprintf(f, "\n"); } - } + } fclose(f); unlink(fname); @@ -282,7 +283,7 @@ void dump_names(void) ****************************************************************************/ void load_netbios_names(void) { - struct subnet_record *d = find_subnet(wins_ip); + struct subnet_record *d = wins_subnet; fstring fname; FILE *f; @@ -414,6 +415,7 @@ struct name_record *add_netbios_entry(struct subnet_record *d, { struct name_record *n; struct name_record *n2=NULL; + struct subnet_record *found_subnet = 0; int search = 0; BOOL self = source == SELF; @@ -447,12 +449,13 @@ struct name_record *add_netbios_entry(struct subnet_record *d, make_nmb_name(&n->name,name,type,scope); - if ((n2 = find_name_search(&d, &n->name, search, new_only?ipzero:ip))) + if ((n2 = find_name_search(&found_subnet, &n->name, search, new_only?ipzero:ip))) { free(n->ip_flgs); free(n); if (new_only || (n2->source==SELF && source!=SELF)) return n2; n = n2; + d = found_subnet; } if (ttl) @@ -469,7 +472,7 @@ struct name_record *add_netbios_entry(struct subnet_record *d, DEBUG(3,("Added netbios name %s at %s ttl=%d nb_flags=%2x to interface %s\n", namestr(&n->name),inet_ntoa(ip),ttl,nb_flags, - ip_equal(d->bcast_ip, wins_ip) ? "WINS" : inet_ntoa(d->bcast_ip))); + ip_equal(d->bcast_ip, wins_ip) ? "WINS" : (char *)inet_ntoa(d->bcast_ip))); return(n); } @@ -485,7 +488,7 @@ void expire_names(time_t t) struct subnet_record *d; /* expire old names */ - for (d = subnetlist; d; d = d->next) + for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_INCLUDING_WINS(d)) { for (n = d->namelist; n; n = next) { @@ -522,9 +525,9 @@ struct name_record *dns_name_search(struct nmb_name *question, int Time) char *r; BOOL dns_type = (name_type == 0x20 || name_type == 0); struct in_addr dns_ip; - struct subnet_record *d = find_subnet(wins_ip); - if (d == NULL) return NULL; + if (wins_subnet == NULL) + return NULL; DEBUG(3,("Search for %s - ", namestr(question))); @@ -543,7 +546,7 @@ struct name_record *dns_name_search(struct nmb_name *question, int Time) /* no luck with DNS. We could possibly recurse here XXXX */ DEBUG(3,("not found. no recursion.\n")); /* add the fail to WINS cache of names. give it 1 hour in the cache */ - add_netbios_entry(d,qname,name_type,NB_ACTIVE,60*60,DNSFAIL,dns_ip, + add_netbios_entry(wins_subnet,qname,name_type,NB_ACTIVE,60*60,DNSFAIL,dns_ip, True, True); return NULL; } @@ -551,6 +554,6 @@ struct name_record *dns_name_search(struct nmb_name *question, int Time) DEBUG(3,("found with DNS: %s\n", inet_ntoa(dns_ip))); /* add it to our WINS cache of names. give it 2 hours in the cache */ - return add_netbios_entry(d,qname,name_type,NB_ACTIVE,2*60*60,DNS,dns_ip, + return add_netbios_entry(wins_subnet,qname,name_type,NB_ACTIVE,2*60*60,DNS,dns_ip, True,True); } diff --git a/source/namedbresp.c b/source/namedbresp.c index 6755de6534b..98f8ca774bc 100644 --- a/source/namedbresp.c +++ b/source/namedbresp.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT netbios library routines - Copyright (C) Andrew Tridgell 1994-1996 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -144,7 +144,7 @@ struct response_record *find_response_record(struct subnet_record **d, if (!d) return NULL; - for ((*d) = subnetlist; (*d); (*d) = (*d)->next) + for ((*d) = FIRST_SUBNET; (*d); (*d) = NEXT_SUBNET_INCLUDING_WINS(*d)) { for (n = (*d)->responselist; n; n = n->next) { diff --git a/source/namedbserver.c b/source/namedbserver.c index afb1dc14315..9c7bb664ab2 100644 --- a/source/namedbserver.c +++ b/source/namedbserver.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT netbios routines and daemon - version 2 - Copyright (C) Andrew Tridgell 1994-1996 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -208,7 +208,7 @@ void expire_servers(time_t t) { struct subnet_record *d; - for (d = subnetlist ; d ; d = d->next) + for (d = FIRST_SUBNET; d ; d = NEXT_SUBNET_INCLUDING_WINS(d)) { struct work_record *work; diff --git a/source/namedbsubnet.c b/source/namedbsubnet.c index 144729e1e17..25c369ab1c8 100644 --- a/source/namedbsubnet.c +++ b/source/namedbsubnet.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT netbios routines and daemon - version 2 - Copyright (C) Andrew Tridgell 1994-1996 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -50,6 +50,10 @@ extern struct interface *local_interfaces; /* this is our domain/workgroup/server database */ struct subnet_record *subnetlist = NULL; +/* WINS subnet - keep this separate so enumeration code doesn't + run onto it by mistake. */ +struct subnet_record *wins_subnet = 0; + extern uint16 nb_type; /* samba's NetBIOS name type */ /* Forward references. */ @@ -81,32 +85,19 @@ static void add_subnet(struct subnet_record *d) /**************************************************************************** - find a subnet in the subnetlist + find a subnet in the subnetlist - not including WINS. **************************************************************************/ struct subnet_record *find_subnet(struct in_addr bcast_ip) { struct subnet_record *d; /* search through subnet list for broadcast/netmask that matches - the source ip address. a subnet 255.255.255.255 represents the - WINS list. */ + the source ip address. */ - for (d = subnetlist; d; d = d->next) + for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_EXCLUDING_WINS(d)) { - if (ip_equal(bcast_ip, wins_ip)) - { - if (ip_equal(bcast_ip, d->bcast_ip)) - { - return d; - } - } - else if (same_net(bcast_ip, d->bcast_ip, d->mask_ip)) - { - if (!ip_equal(d->bcast_ip, wins_ip)) - { - return d; - } - } + if (same_net(bcast_ip, d->bcast_ip, d->mask_ip)) + return d; } return (NULL); @@ -125,8 +116,8 @@ struct subnet_record *find_req_subnet(struct in_addr ip, BOOL bcast) /* identify the subnet the broadcast request came from */ return find_subnet(*iface_bcast(ip)); } - /* find the subnet under the pseudo-ip of 255.255.255.255 */ - return find_subnet(wins_ip); + /* Return the subnet with the pseudo-ip of 255.255.255.255 */ + return wins_subnet; } /**************************************************************************** @@ -137,13 +128,13 @@ struct subnet_record *find_subnet_all(struct in_addr bcast_ip) { struct subnet_record *d = find_subnet(bcast_ip); if(!d) - return find_subnet( wins_ip); + return wins_subnet; } /**************************************************************************** create a domain entry ****************************************************************************/ -static struct subnet_record *make_subnet(struct in_addr bcast_ip, struct in_addr mask_ip) +static struct subnet_record *make_subnet(struct in_addr bcast_ip, struct in_addr mask_ip, BOOL add) { struct subnet_record *d; d = (struct subnet_record *)malloc(sizeof(*d)); @@ -159,7 +150,8 @@ static struct subnet_record *make_subnet(struct in_addr bcast_ip, struct in_addr d->mask_ip = mask_ip; d->workgrouplist = NULL; - add_subnet(d); + if(add) + add_subnet(d); return d; } @@ -179,7 +171,7 @@ void add_subnet_interfaces(void) /* add the interface into our subnet database */ if (!find_subnet(i->bcast)) { - make_subnet(i->bcast,i->nmask); + make_subnet(i->bcast,i->nmask, True); } } @@ -188,14 +180,14 @@ void add_subnet_interfaces(void) { struct in_addr wins_bcast = wins_ip; struct in_addr wins_nmask = ipzero; - make_subnet(wins_bcast, wins_nmask); + wins_subnet = make_subnet(wins_bcast, wins_nmask, False); } } /**************************************************************************** - add the default workgroup into my domain + add the default workgroup into the subnet lists. **************************************************************************/ void add_my_subnets(char *group) { @@ -212,6 +204,18 @@ void add_my_subnets(char *group) { add_subnet_entry(i->bcast,i->nmask,group, True, False); } + + /* If we are setup as a domain master browser, and are using + WINS, then we must add the workgroup to the WINS subnet. This + is used as a place to keep collated server lists. */ + + if(lp_domain_master() && (lp_wins_support() || lp_wins_server())) + if(find_workgroupstruct(wins_subnet, group, True) == 0) + DEBUG(0, ("add_my_subnets: Failed to add workgroup %s to \ +WINS subnet.\n", group)); + else + DEBUG(3,("add_my_subnets: Added workgroup %s to WINS subnet.\n", + group)); } @@ -240,7 +244,7 @@ static struct subnet_record *add_subnet_entry(struct in_addr bcast_ip, /* Note that we never add into the WINS subnet as add_subnet_entry is only called to add our local interfaces. */ if ((d = find_subnet(bcast_ip)) || - (d = make_subnet(bcast_ip, mask_ip))) + (d = make_subnet(bcast_ip, mask_ip, True))) { struct work_record *w = find_workgroupstruct(d, name, add); @@ -304,7 +308,7 @@ void write_browse_list(time_t t) return; } - for (d = subnetlist; d ; d = d->next) + for (d = FIRST_SUBNET; d ; d = NEXT_SUBNET_INCLUDING_WINS(d)) { struct work_record *work; for (work = d->workgrouplist; work ; work = work->next) diff --git a/source/namedbwork.c b/source/namedbwork.c index 80a670fea84..8c249cc82cb 100644 --- a/source/namedbwork.c +++ b/source/namedbwork.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT netbios routines and daemon - version 2 - Copyright (C) Andrew Tridgell 1994-1996 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -97,7 +97,7 @@ static struct work_record *make_workgroup(char *name) /* make sure all token representations of workgroups are unique */ - for (d = subnetlist; d && t == -1; d = d->next) + for (d = FIRST_SUBNET; d && t == -1; d = NEXT_SUBNET_INCLUDING_WINS(d)) { struct work_record *w; for (w = d->workgrouplist; w && t == -1; w = w->next) @@ -175,16 +175,6 @@ struct work_record *find_workgroupstruct(struct subnet_record *d, DEBUG(4, ("workgroup search for %s: ", name)); - if (strequal(name, "*")) - { - DEBUG(2,("add any workgroups: initiating browser search on %s\n", - inet_ntoa(d->bcast_ip))); - queue_netbios_pkt_wins(d,ClientNMB,NMB_QUERY, NAME_QUERY_FIND_MST, - MSBROWSE,0x1,0,0,0,NULL,NULL, - True,False, d->bcast_ip, d->bcast_ip); - return NULL; - } - for (ret = d->workgrouplist; ret; ret = ret->next) { if (!strcmp(ret->work_group,name)) { DEBUG(4, ("found\n")); @@ -223,7 +213,7 @@ void dump_workgroups(void) { struct subnet_record *d; - for (d = subnetlist; d; d = d->next) + for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_INCLUDING_WINS(d)) { if (d->workgrouplist) { @@ -248,42 +238,3 @@ void dump_workgroups(void) } } } - -/**************************************************************************** - check to see if a ServerType bit is set in any workgroup on any interface - except WINS. Used to determine if a nmbd is a master browser or domain - master browser in a particular workgroup on any subnet. - **************************************************************************/ -int check_work_servertype(const char *work_name, int type_mask) -{ - struct subnet_record *d; - - for (d = subnetlist; d; d = d->next) - { - if(ip_equal(d->bcast_ip, wins_ip)) - { - /* WINS ip */ - DEBUG(10,("check_work_servertype: ignoring WINS subnet\n")); - continue; - } - if (d->workgrouplist) - { - struct work_record *work; - - for (work = d->workgrouplist; work; work = work->next) - { - if(strequal(work->work_group, (char *)work_name) && - (type_mask & work->ServerType) != 0) - { - DEBUG(10, ("check_work_servertype: Workgroup %s has \ -ServerType %x - match for type_mask %x\n", work_name, work->ServerType, - type_mask)); - return 1; - } - } - } - } - DEBUG(10, ("check_work_servertype: Workgroup %s has no match for \ -type mask %x\n", work_name, type_mask)); - return 0; -} diff --git a/source/nameelect.c b/source/nameelect.c index 4aacee55d41..02fda9f817b 100644 --- a/source/nameelect.c +++ b/source/nameelect.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT netbios routines and daemon - version 2 - Copyright (C) Andrew Tridgell 1994-1996 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -67,14 +67,10 @@ void check_master_browser(time_t t) dump_workgroups(); - for (d = subnetlist; d; d = d->next) + for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_EXCLUDING_WINS(d)) { struct work_record *work; - /* don't do election stuff on the WINS subnet */ - if (ip_equal(d->bcast_ip,wins_ip)) - continue; - for (work = d->workgrouplist; work; work = work->next) { if (strequal(work->work_group, lp_workgroup()) && !AM_MASTER(work)) @@ -365,7 +361,27 @@ void become_local_master(struct subnet_record *d, struct work_record *work) /* XXXX OOPS! add_server_entry will always add one entry - our own. */ announce_request(work, d->bcast_ip); } + + /* If we have WINS support or are a WINS server we must add + the workgroup we just became master browser for to the + WINS subnet. This is needed so we have somewhere to save + server lists when we do browser synchronization. */ + if(wins_subnet != 0) + { + if(find_workgroupstruct(wins_subnet, work->work_group, True) == 0) + DEBUG(0, ("become_local_master: \ +Failed to add workgroup %s to WINS subnet.\n", + work->work_group)); + else + DEBUG(3, ("become_local_master: Added workgroup %s to WINS subnet.\n", + work->work_group)); + + /* Reset the announce master timer so that we do an announce as soon as possible + now we are a master. */ + reset_announce_timer(); + } break; + } case MST_BROWSER: @@ -642,17 +658,10 @@ void run_elections(time_t t) lastime = t; - for (d = subnetlist; d; d = d->next) + for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_EXCLUDING_WINS(d)) { struct work_record *work; - if(ip_equal(d->bcast_ip, wins_ip)) - { - /* WINS ip */ - DEBUG(10,("run_elections: ignoring WINS subnet\n")); - continue; - } - for (work = d->workgrouplist; work; work = work->next) { if (work->RunningElection) @@ -777,7 +786,7 @@ BOOL check_elections(void) struct subnet_record *d; BOOL run_any_election = False; - for (d = subnetlist; d; d = d->next) + for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_EXCLUDING_WINS(d)) { struct work_record *work; for (work = d->workgrouplist; work; work = work->next) diff --git a/source/namelogon.c b/source/namelogon.c index f3afd4273cb..1c118c85418 100644 --- a/source/namelogon.c +++ b/source/namelogon.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT netbios routines and daemon - version 2 - Copyright (C) Andrew Tridgell 1994-1995 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/namepacket.c b/source/namepacket.c index 09ee5dd79e2..c9db43dcc5f 100644 --- a/source/namepacket.c +++ b/source/namepacket.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT netbios routines and daemon - version 2 - Copyright (C) Andrew Tridgell 1994-1995 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/nameresp.c b/source/nameresp.c index fab16038ce0..3128b00ac58 100644 --- a/source/nameresp.c +++ b/source/nameresp.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT netbios library routines - Copyright (C) Andrew Tridgell 1994-1996 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -62,7 +62,7 @@ static void dead_netbios_entry(struct subnet_record *d, if ((!NAME_GROUP(n->nb_flags))) { - struct subnet_record *d1 = find_subnet(wins_ip); + struct subnet_record *d1 = wins_subnet; if (d1) { /* remove the name that had been registered with us, @@ -162,18 +162,11 @@ static void dead_netbios_entry(struct subnet_record *d, case NAME_QUERY_DOMAIN: { - /* if no response received, there is no domain controller on - this local subnet. it's ok for us to register + /* if no response was received, there is no domain controller for + this DOMAIN registered within WINS. it's ok for us to register + the DOMAIN<1b> name. */ - if (!n->bcast) - { - DEBUG(0,("NAME_QUERY_DOMAIN incorrectly used - contact samba-bugs!\n")); - /* XXXX whoops. someone's using this to unicast a packet. this state - should only be used for broadcast checks - */ - break; - } if (n->num_msgs == 0) { struct work_record *work = find_workgroupstruct(d,n->name.name,False); @@ -182,6 +175,11 @@ static void dead_netbios_entry(struct subnet_record *d, become_domain_master(d,work); } } + else + { + DEBUG(0, ("ERROR: nmbd configured as domain master and one already exitsts !!!\n")); + exit(1); + } break; } @@ -206,7 +204,7 @@ void expire_netbios_response_entries(time_t t) { struct subnet_record *d; - for (d = subnetlist; d; d = d->next) + for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_INCLUDING_WINS(d)) { struct response_record *n, *nextn; @@ -249,7 +247,7 @@ void expire_netbios_response_entries(time_t t) name server instead, if it exists. if wins is false, and there has been no WINS server specified, the packet will NOT be sent. ****************************************************************************/ -struct response_record *queue_netbios_pkt_wins(struct subnet_record *d, +struct response_record *queue_netbios_pkt_wins( int fd,int quest_type,enum state_type state, char *name,int name_type,int nb_flags, time_t ttl, int server_type, char *my_name, char *my_comment, @@ -283,7 +281,7 @@ struct response_record *queue_netbios_pkt_wins(struct subnet_record *d, if (zero_ip(send_ip)) return NULL; - return queue_netbios_packet(d,fd, quest_type, state, + return queue_netbios_packet(wins_subnet,fd, quest_type, state, name, name_type, nb_flags, ttl, server_type,my_name,my_comment, bcast, recurse, send_ip, reply_to_ip); diff --git a/source/nameserv.c b/source/nameserv.c index ac2dac1683c..022b5521a21 100644 --- a/source/nameserv.c +++ b/source/nameserv.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT netbios routines and daemon - version 2 - Copyright (C) Andrew Tridgell 1994-1996 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -85,7 +85,7 @@ void remove_name_entry(struct subnet_record *d, char *name,int type) if (!lp_wins_support()) { /* not a WINS server: we have to release them on the network */ - queue_netbios_pkt_wins(d,ClientNMB,NMB_REL,NAME_RELEASE, + queue_netbios_pkt_wins(ClientNMB,NMB_REL,NAME_RELEASE, name, type, 0, 0,0,NULL,NULL, False, True, ipzero, ipzero); } @@ -142,7 +142,7 @@ void add_my_name_entry(struct subnet_record *d,char *name,int type,int nb_flags) else { /* a time-to-live allows us to refresh this name with the WINS server. */ - queue_netbios_pkt_wins(d,ClientNMB, + queue_netbios_pkt_wins(ClientNMB, re_reg ? NMB_REG_REFRESH : NMB_REG, NAME_REGISTER, name, type, nb_flags, GET_TTL(0),0,NULL,NULL, False, True, ipzero, ipzero); @@ -171,15 +171,15 @@ void add_domain_names(time_t t) { static time_t lastrun = 0; struct subnet_record *d; + struct work_record *work; + struct nmb_name n; if (lastrun != 0 && t < lastrun + CHECK_TIME_ADD_DOM_NAMES * 60) return; lastrun = t; - for (d = subnetlist; d; d = d->next) + for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_INCLUDING_WINS(d)) { - struct work_record *work = find_workgroupstruct(d, lp_workgroup(), False); - struct nmb_name n; - + work = find_workgroupstruct(d, lp_workgroup(), False); if (lp_domain_logons() && work && work->log_state == LOGON_NONE) { make_nmb_name(&n,lp_workgroup(),0x1c,scope); @@ -191,52 +191,52 @@ void add_domain_names(time_t t) become_logon_server(d, work); } } + } - if (lp_domain_master() && work && work->dom_state == DOMAIN_NONE) + if(wins_subnet != 0) + work = find_workgroupstruct(wins_subnet, lp_workgroup(), False); + + if (lp_domain_master() && work && work->dom_state == DOMAIN_NONE) { DEBUG(0,("add_domain_names:Checking for domain master on workgroup %s\n", lp_workgroup())); make_nmb_name(&n,lp_workgroup(),0x1b,scope); - if (!find_name(d->namelist, &n, FIND_SELF)) + if (!find_name(wins_subnet->namelist, &n, FIND_SELF)) { - DEBUG(0,("add_domain_names: attempting to become domain master browser on workgroup %s, bcast %s\n", - lp_workgroup(), inet_ntoa(d->bcast_ip))); + DEBUG(0,("add_domain_names: attempting to become domain master browser on workgroup %s\n", + lp_workgroup())); - if (ip_equal(d->bcast_ip,wins_ip)) + if (lp_wins_support()) { - if (lp_wins_support()) - { - /* use the wins server's capabilities (indirectly). if - someone has already register the domain<1b> name with - the WINS server, then the WINS server's job is to _check_ - that the owner still wants it, before giving it away. - */ + /* use the wins server's capabilities (indirectly). if + someone has already registered the domain<1b> name with + the WINS server, then the WINS server's job is to _check_ + that the owner still wants it, before giving it away. + */ - DEBUG(1,("%s initiating becoming logon server for %s %s\n", - timestring(), lp_workgroup(), inet_ntoa(d->bcast_ip))); - become_domain_master(d, work); - } + DEBUG(1,("%s initiating becoming domain master for %s\n", + timestring(), lp_workgroup())); + become_domain_master(wins_subnet, work); } else { /* send out a query to establish whether there's a - domain controller on the local subnet. if not, - we can become a domain controller on that subnet. + domain controller on the WINS subnet. if not, + we can become a domain controller. it's only polite that we check, before claiming the NetBIOS name 0x1b. */ - DEBUG(0,("add_domain_names:querying for domain master on workgroup %s\n", lp_workgroup())); + DEBUG(0,("add_domain_names:querying WINS for domain master on workgroup %s\n", lp_workgroup())); - queue_netbios_packet(d,ClientNMB,NMB_QUERY,NAME_QUERY_DOMAIN, + queue_netbios_pkt_wins(ClientNMB,NMB_QUERY,NAME_QUERY_DOMAIN, lp_workgroup(), 0x1b, 0, 0,0,NULL,NULL, - True, True, d->bcast_ip, d->bcast_ip); + False, False, ipzero, ipzero); } } } - } } @@ -252,9 +252,9 @@ void add_my_names(void) there would be yet _another_ for-loop, this time on the transport type */ - for (d = subnetlist; d; d = d->next) + for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_INCLUDING_WINS(d)) { - BOOL wins = lp_wins_support() && ip_equal(d->bcast_ip,wins_ip); + BOOL wins = (lp_wins_support() && (d == wins_subnet)); struct work_record *work = find_workgroupstruct(d, lp_workgroup(), False); add_my_name_entry(d, myname,0x20,nb_type|NB_ACTIVE); @@ -268,15 +268,6 @@ void add_my_names(void) add_netbios_entry(d,"*",0x20,nb_type|NB_ACTIVE,0,SELF,d->myip,False,wins); add_netbios_entry(d,"__SAMBA__",0x20,nb_type|NB_ACTIVE,0,SELF,d->myip,False,wins); add_netbios_entry(d,"__SAMBA__",0x00,nb_type|NB_ACTIVE,0,SELF,d->myip,False,wins); - - if (lp_domain_logons() && work && work->log_state == LOGON_NONE) - { - become_logon_server(d, work); - } - if (lp_domain_master() && work && work->dom_state == DOMAIN_NONE) - { - become_domain_master(d, work); - } } } @@ -288,7 +279,7 @@ void remove_my_names() { struct subnet_record *d; - for (d = subnetlist; d; d = d->next) + for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_INCLUDING_WINS(d)) { struct name_record *n, *next; @@ -314,7 +305,7 @@ void refresh_my_names(time_t t) { struct subnet_record *d; - for (d = subnetlist; d; d = d->next) + for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_INCLUDING_WINS(d)) { struct name_record *n; @@ -347,7 +338,7 @@ void refresh_my_names(time_t t) void query_refresh_names(time_t t) { struct name_record *n; - struct subnet_record *d = find_subnet(wins_ip); + struct subnet_record *d = wins_subnet; static time_t lasttime = 0; diff --git a/source/nameservreply.c b/source/nameservreply.c index 001695b3fbd..e1738007df1 100644 --- a/source/nameservreply.c +++ b/source/nameservreply.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT netbios routines and daemon - version 2 - Copyright (C) Andrew Tridgell 1994-1996 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -433,7 +433,7 @@ void reply_name_status(struct packet_struct *p) /* end of this name list: add wins names too? */ struct subnet_record *w_d; - if (!(w_d = find_subnet(wins_ip))) break; + if (!(w_d = wins_subnet)) break; if (w_d != d) { @@ -520,7 +520,7 @@ void reply_name_query(struct packet_struct *p) } else { - if (!(d = find_subnet(wins_ip))) + if (!(d = wins_subnet)) { DEBUG(3,("name query: wins search %s not known\n", inet_ntoa(p->ip))); diff --git a/source/nameservresp.c b/source/nameservresp.c index 30541034b81..565a1565656 100644 --- a/source/nameservresp.c +++ b/source/nameservresp.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT netbios routines and daemon - version 2 - Copyright (C) Andrew Tridgell 1994-1996 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -320,7 +320,7 @@ static void response_name_status_check(struct in_addr ip, workgroup name to sync with. See response_server_check() */ sync_server(n->state,serv_name, - n->my_name,name.name_type, n->send_ip); + n->my_name,name.name_type, d, n->send_ip); } } else diff --git a/source/namework.c b/source/namework.c index 1d3ff9e0ee3..218a7a349ef 100644 --- a/source/namework.c +++ b/source/namework.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT netbios routines and daemon - version 2 - Copyright (C) Andrew Tridgell 1994-1996 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -96,7 +96,7 @@ void tell_become_backup(void) */ struct subnet_record *d; - for (d = subnetlist; d; d = d->next) + for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_EXCLUDING_WINS(d)) { struct work_record *work; for (work = d->workgrouplist; work; work = work->next) @@ -263,6 +263,7 @@ static void process_localnet_announce(struct packet_struct *p,uint16 command,cha tell_become_backup(); #endif +#if 0 /* JRA TEST - I Think this code should not be here */ /* get the local_only browse list from the local master and add it to ours. */ if (command == ANN_LocalMasterAnnouncement) @@ -270,15 +271,18 @@ static void process_localnet_announce(struct packet_struct *p,uint16 command,cha add_browser_entry(serv_name,dgram->dest_name.name_type, work->work_group,30,p->ip,True); } +#endif /* END JRA TEST */ } /******************************************************************* process a master announcement frame + Domain master browsers recieve these from local masters. The Domain + master should then issue a sync with the local master, asking for + that machines local server list. ******************************************************************/ static void process_master_announce(struct packet_struct *p,char *buf) { struct dgram_packet *dgram = &p->packet.dgram; - struct subnet_record *d = find_subnet_all(p->ip); /* Explicitly include WINS */ char *name = buf; struct work_record *work; name[15] = 0; @@ -287,9 +291,9 @@ static void process_master_announce(struct packet_struct *p,char *buf) if (same_context(dgram)) return; - if (!d) + if (!wins_subnet) { - DEBUG(3,("process_master_announce: Cannot find interface\n")); + DEBUG(3,("process_master_announce: No wins subnet !\n")); return; } @@ -299,12 +303,12 @@ static void process_master_announce(struct packet_struct *p,char *buf) return; } - for (work = d->workgrouplist; work; work = work->next) + for (work = wins_subnet->workgrouplist; work; work = work->next) { - if (AM_MASTER(work) || AM_DOMMST(work) || AM_ANY_MASTER(work)) + if (AM_MASTER(work) || AM_DOMMST(work)) { /* merge browse lists with them */ - add_browser_entry(name,0x1d, work->work_group,30,p->ip,True); + add_browser_entry(name,0x1d, work->work_group,30,wins_subnet,p->ip,True); } } } @@ -434,7 +438,7 @@ static void send_backup_list(char *work_name, struct nmb_name *src_name, #if 0 - for (d = subnetlist; d; d = d->next) + for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_INCLUDING_WINS(d)) { struct work_record *work; @@ -573,7 +577,7 @@ static void process_reset_browser(struct packet_struct *p,char *buf) if (state & 0x1) { struct subnet_record *d; - for (d = subnetlist; d; d = d->next) + for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_EXCLUDING_WINS(d)) { struct work_record *work; for (work = d->workgrouplist; work; work = work->next) @@ -594,7 +598,7 @@ static void process_reset_browser(struct packet_struct *p,char *buf) if (state & 0x2) { struct subnet_record *d; - for (d = subnetlist; d; d = d->next) + for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_INCLUDING_WINS(d)) { struct work_record *work; for (work=d->workgrouplist;work;work=remove_workgroup(d,work,True)); diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c index eefb4162f79..550f3198f7c 100644 --- a/source/nmbd/nmbd.c +++ b/source/nmbd/nmbd.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT netbios routines and daemon - version 2 - Copyright (C) Andrew Tridgell 1994-1995 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -206,6 +206,13 @@ BOOL reload_services(BOOL test) load_interfaces(); add_subnet_interfaces(); + /* Do a sanity check for a misconfigured nmbd */ + if(lp_wins_support() && *lp_wins_server()) { + DEBUG(0,("ERROR: both 'wins support = true' and 'wins server = <server>' \ +cannot be set in the smb.conf file. nmbd aborting.\n")); + exit(10); + } + return(ret); } @@ -546,6 +553,7 @@ static void usage(char *pname) if (strequal(lp_workgroup(),"*")) { DEBUG(0,("ERROR: a workgroup name of * is no longer supported\n")); + exit(1); } add_my_subnets(lp_workgroup()); diff --git a/source/nmbsync.c b/source/nmbsync.c index fa60b3ac35a..7c23c64a96a 100644 --- a/source/nmbsync.c +++ b/source/nmbsync.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT netbios routines to synchronise browse lists - Copyright (C) Andrew Tridgell 1994-1995 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -140,7 +140,13 @@ void sync_browse_lists(struct subnet_record *d, struct work_record *work, { uint32 local_type = local ? SV_TYPE_LOCAL_LIST_ONLY : 0; - if (!d || !work || !AM_ANY_MASTER(work)) return; + if (!d || !work ) return; + + if(d != wins_subnet) { + DEBUG(0, + ("sync_browse_lists: ERROR sync requested on non-WINS subnet.\n")); + return; + } pid = getpid(); uid = getuid(); diff --git a/source/param/loadparm.c b/source/param/loadparm.c index 961aaa9c982..40611e4c3a3 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Parameter loading functions - Copyright (C) Karl Auer 1993,1994 + Copyright (C) Karl Auer 1993,1997 Largely re-written by Andrew Tridgell, September 1994 diff --git a/source/param/params.c b/source/param/params.c index 8030e4ab583..0fdde0348ff 100644 --- a/source/param/params.c +++ b/source/param/params.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Parameter loading utlities - Copyright (C) Karl Auer 1993,1994 + Copyright (C) Karl Auer 1993,1994,1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/printing/printing.c b/source/printing/printing.c index d2071ace594..c4dd9803ebe 100644 --- a/source/printing/printing.c +++ b/source/printing/printing.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. printing routines - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/smbd/dir.c b/source/smbd/dir.c index f3c1ae020e1..2437b8b17e8 100644 --- a/source/smbd/dir.c +++ b/source/smbd/dir.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Directory handling routines - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/smbd/ipc.c b/source/smbd/ipc.c index 9a80a8d062d..1f1ac8600a0 100644 --- a/source/smbd/ipc.c +++ b/source/smbd/ipc.c @@ -3,7 +3,7 @@ Unix SMB/Netbios implementation. Version 1.9. Inter-process communication and named pipe handling - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/smbd/mangle.c b/source/smbd/mangle.c index 5fdf31b7a41..96e787b07fb 100644 --- a/source/smbd/mangle.c +++ b/source/smbd/mangle.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Name mangling - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/smbd/message.c b/source/smbd/message.c index 2ef5b246c44..93a2d9d850a 100644 --- a/source/smbd/message.c +++ b/source/smbd/message.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. SMB messaging - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/smbd/password.c b/source/smbd/password.c index 2c24913c86a..7885fd1bbc9 100644 --- a/source/smbd/password.c +++ b/source/smbd/password.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Password and authentication handling - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/smbd/pipes.c b/source/smbd/pipes.c index 06f3aeb0fb0..634d7af7f42 100644 --- a/source/smbd/pipes.c +++ b/source/smbd/pipes.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Pipe SMB reply routines - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/smbd/predict.c b/source/smbd/predict.c index 7f1692931c9..691d8fbb4e0 100644 --- a/source/smbd/predict.c +++ b/source/smbd/predict.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. file read prediction routines - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/smbd/quotas.c b/source/smbd/quotas.c index 05b40ada0f2..eba76d4c74b 100644 --- a/source/smbd/quotas.c +++ b/source/smbd/quotas.c @@ -3,7 +3,7 @@ Unix SMB/Netbios implementation. Version 1.9. support for quotas - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/smbd/reply.c b/source/smbd/reply.c index f532d613b4a..bb75211deb5 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Main SMB reply routines - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/smbd/server.c b/source/smbd/server.c index 57611553cc8..0f72efc4788 100644 --- a/source/smbd/server.c +++ b/source/smbd/server.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Main SMB server routines - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/smbd/smbrun.c b/source/smbd/smbrun.c index d547c796e07..42ce7f60ad0 100644 --- a/source/smbd/smbrun.c +++ b/source/smbd/smbrun.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. external program running routine - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 2c0d5903e61..38c7031b665 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. SMB transaction2 handling - Copyright (C) Jeremy Allison 1994 + Copyright (C) Jeremy Allison 1994-1997 Extensively modified by Andrew Tridgell, 1995 diff --git a/source/smbd/uid.c b/source/smbd/uid.c index 4fa0ed89da7..e2c5f590b7a 100644 --- a/source/smbd/uid.c +++ b/source/smbd/uid.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. uid/user handling - Copyright (C) Andrew Tridgell 1992-1995 + Copyright (C) Andrew Tridgell 1992-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/utils/nmblookup.c b/source/utils/nmblookup.c index c9692768385..582f4eb6db3 100644 --- a/source/utils/nmblookup.c +++ b/source/utils/nmblookup.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. NBT client - used to lookup netbios names - Copyright (C) Andrew Tridgell 1994-1995 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index c79aa15c807..c820ad673a0 100644 --- a/source/utils/smbpasswd.c +++ b/source/utils/smbpasswd.c @@ -2,7 +2,7 @@ /* * Unix SMB/Netbios implementation. Version 1.9. smbpasswd module. Copyright - * (C) Jeremy Allison 1995. + * (C) Jeremy Allison 1995-1997. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free diff --git a/source/utils/status.c b/source/utils/status.c index 459349f5eb7..ba7c5f32105 100644 --- a/source/utils/status.c +++ b/source/utils/status.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. status reporting - Copyright (C) Andrew Tridgell 1994-1995 + Copyright (C) Andrew Tridgell 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/source/utils/testparm.c b/source/utils/testparm.c index 7e05283625d..81e69cd76fb 100644 --- a/source/utils/testparm.c +++ b/source/utils/testparm.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. Test validity of smb.conf - Copyright (C) Karl Auer 1993, 1994 + Copyright (C) Karl Auer 1993, 1994-1997 Extensively modified by Andrew Tridgell, 1995 diff --git a/source/utils/testprns.c b/source/utils/testprns.c index 4709eb06917..4a2ddb7c635 100644 --- a/source/utils/testprns.c +++ b/source/utils/testprns.c @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. test printer setup - Copyright (C) Karl Auer 1993, 1994 + Copyright (C) Karl Auer 1993, 1994-1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by |