1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

472 Commits

Author SHA1 Message Date
Jeremy Allison
55f400bd84 This is *not* a big change (although it looks like one).
This is merely updating the Copyright statements from 1997 to 1998.
It's a once a year thing :-).
NO OTHER CHANGES WERE MADE.
Jeremy.
(This used to be commit b9c1697723)
1998-01-22 13:27:43 +00:00
Jeremy Allison
2d1ff641f0 Fixed send_mailslot code where src_type was always being set to zero.
Fix found by Bernhard Laeser <nlaesb@ascom.ch>.
Jeremy.
(This used to be commit 303b5a79c8)
1998-01-21 12:15:07 +00:00
Jeremy Allison
c247cc7187 Fixed bug found by Bernhard Laeser where we are announcing to the wrong
DMB name.
Jeremy.
(This used to be commit 6b3d4620c1)
1998-01-20 04:58:41 +00:00
Jeremy Allison
0d1933fefc docs/Support.txt: Removed consultant.
source/Makefile: Added Volker's comment.
source/nmbd_become_lmb.c:
source/nmbd_browsesync.c:
source/nmbd_incomingdgrams.c: Fixed userdata alignment problems.
source/mem_man/mem_man.c:
source/mem_man/mem_man.h: added smb_ prefix to stop namespace collisions.
Jeremy.
(This used to be commit 4c8af3bc9f)
1998-01-09 05:33:27 +00:00
Jeremy Allison
c23ed625b2 includes.h: Added FreeBSD 3.x fixes. Added HPUX10.x fixes.
interface.c: Added netmask fix.
nmbd_nameregister.c: Fixed unitialised variable warnings.
nmbd_winsproxy.c: Fixed unitialised variable warnings.
nmbd_winsserver.c: Fixed DEC warnings.
print_svid.c: Fixed DEC warnings.
printing.c: Added LPRng fixes.
Jeremy.
(This used to be commit 28aff043c4)
1998-01-07 06:21:56 +00:00
Herb Lewis
d018d7b42a added timestrings to become and unbecome domain/local master browser
messages.
(This used to be commit 5e7e3d18b5)
1998-01-03 03:35:13 +00:00
Andrew Tridgell
b26a147f04 fixed another couple of minor type errors (they could cause incorrect
output but not a core dump)
(This used to be commit 4dc66214a0)
1997-12-26 10:07:05 +00:00
Andrew Tridgell
ed2ed5671b fixed a couple of illegal uses of scanf() in the nmbd wins code. They
caused a core dump under IRIX when compiled with -64.
In general you cannot assume things about variable sizes. In
particular sizeof(time_t) may not equal sizeof(long) and
sizeof(uint16) may not equal sizeof(short).
There are probably other bugs like this. We'll need to check all
format statements for use of %ld, %hx etc. In general these should not
be used unless you have an explicit cast to the appropriate type.
(This used to be commit 6ea907e786)
1997-12-26 10:01:57 +00:00
Andrew Tridgell
65a21bcbdd use _exit to exit a child
(This used to be commit 992b1cbc14)
1997-12-26 09:57:40 +00:00
Herb Lewis
7f49012b1d This is actually Jeremy, working as Herb :-).
Fixed bug where, when server is shut down it would always
do a lm announce broadcast of shutdown. This could cause other
nmbd's to think that they have seen an lm announce broadcast and
start doing it themselves.
Changed to only send lm announce shutdown if admin configured it
or one was seen on the subnet.
Jeremy.
(This used to be commit 64c8111574)
1997-12-24 15:42:14 +00:00
Jeremy Allison
aef2c5d699 Added SIGUSR1/SIGUSR2 handling.
Sending nmbd/smbd a SIGUSR1 will raise the debug level by one (capped at 10)
sending a SIGUSR2 will lower it (lower limit at zero).
Jeremy.
(This used to be commit 6a3cb6f4b4)
1997-12-24 09:30:56 +00:00
Jeremy Allison
5cdb60bd93 nmbd_elections.c: Added new parameter to dump_workgroups call.
nmbd_incomingdgrams.c: Deal with announcements with servertype == 0 - these
 are announcements that a machine is shutting down and must be treated differently.
nmbd_serverlistdb.c: Exposed remove_server_from_workgroup as external.
  Added code to dump out workgroups on signal correctly.
nmbd_workgroupdb.c: Added new parameter to dump_workgroups call.
Jeremy.
(This used to be commit f7591109b9)
1997-12-24 08:49:44 +00:00
Jeremy Allison
0c0777400f Finally added the code Andrew wanted that will allow a Samba domain
master browser to use the *<1b> feature of the Samba WINS server to
get a full workgroup list.
nmbd.c: Added timed call to collect_all_workgroup_names_from_wins_server().
nmbd_browsesync.c: Meat of the code to implement collect_all_workgroup_names_from_wins_server().
nmbd_incomingdgrams.c: Fixed comment typo.
Jeremy.
(This used to be commit 1a3ab3e84a)
1997-12-24 07:10:04 +00:00
Jeremy Allison
74c807fcc5 architecture.doc: Re-added since I lost it (sorry Dan :-).
nmbd.c nmbd_responserecordsdb.c: Spelling mistake fixes.
Jeremy.
(This used to be commit f5dfc8913b)
1997-12-23 06:38:36 +00:00
Jeremy Allison
b80b6ea3b4 kanji.h: Fixed problems with re-definitions of strchr and others on AIX.
nmbd_nameregister.c: Applied fix found by "Eloy A. Paris" <eparis@ven.ra.rockwell.com>
(don't re-use lists after you have freed them :-).
Jeremy.
(This used to be commit bcfcc39a27)
1997-12-18 11:05:00 +00:00
Jeremy Allison
e9ef2a5a5e WHATSNEW.txt - updated for 1.9.18alpha13.
docs/smb.conf.5: Removed unused NTDOMAIN params. Added new params.
source/loadparm.c: Put #ifdef NTDOMAIN around unused params.
source/nmbd_become_lmb.c: Removed check for workgroup name in lmb name.
Jeremy.
(This used to be commit 5136c5ec11)
1997-12-16 12:21:39 +00:00
Jeremy Allison
16bf14adf1 Added Lanman announce patch from Jacco de Leeuw <leeuw@wins.uva.nl>.
Also added code to stop old Samba servers that announce the workgroup
name as master browser name when they are a local master browser.
Jeremy.
(This used to be commit 3605da0557)
1997-12-16 09:20:34 +00:00
Jeremy Allison
5d4345b66d nmbd_incomingdgrams.c: Fix bug with Syntax 5.1 servers reported by SGI where
they do host announcements to LOCAL_MASTER_BROWSER_NAME<00> rather than
WORKGROUP<1d>.
nmbd_incomingrequests.c: Deal with WINS_PROXY_NAME issues - don't reply
with that name if it's the same broadcast net.
nmbd_serverlistdb.c: Stopped writing "Unknown" for local master browsers
we don't know.
nmbd_winsproxy.c: Deal with WINS_PROXY_NAME issues - don't reply
with that name if it's the same broadcast net.
Jeremy.
(This used to be commit 5adfff94c9)
1997-12-16 07:30:25 +00:00
Andrew Tridgell
111245cd73 allow name_type 0x20 as well as name_type 0x0 in dns proxying
(This used to be commit be8a40487c)
1997-12-14 17:49:41 +00:00
Jeremy Allison
64f0348a3f This is it ! The mega-merge of the JRA_NMBD_REWRITE branch
back into the main tree.
For the cvs logs of all the files starting nmbd_*.c, look
in the JRA_NMBD_REWRITE branch. That branch has now been
discontinued.
Jeremy.
(This used to be commit d80b0cb645)
1997-12-13 14:16:07 +00:00
Andrew Tridgell
00fc025b93 catch signals in the async dns daemon and allow it to auto-restart if
necessary
(This used to be commit fa599067f0)
1997-12-04 10:58:40 +00:00
Andrew Tridgell
bb97a6adac allow for zero size reads in asyncdns. These can happen after a signal
(This used to be commit 8bac91a6e7)
1997-12-04 08:10:49 +00:00
Jeremy Allison
c4aaa6bc3f asyncdns.c: Removed warning when compiling with -DSYNC_DNS.
nameelect.c: Tidied up settings of work->ServerType when unbecoming things.
nmbd.c: Fixed pidFile warning.
server.c: Fixed pidFile warning.
Jeremy.
(This used to be commit 94d53dcac5)
1997-12-02 19:00:18 +00:00
John Terpstra
4e92c7d1a3 Added in mods for new smb.conf "remote browse sync" option as posted to
the samba-1.9.17 tree moments ago.
(This used to be commit 2ee25cd117)
1997-11-21 14:01:23 +00:00
Andrew Tridgell
5c3f9f4e2c auto-create the locks directory on startup
(This used to be commit a0ab8fe54c)
1997-11-11 00:48:42 +00:00
Andrew Tridgell
d186100b66 fix comments
(This used to be commit b3fd976b6c)
1997-11-02 01:33:28 +00:00
Andrew Tridgell
4fe3b2ce75 to avoid any possibility of the pipe getting full and blocking we now
only allow one query in the async dns pipe at a time. The others are
queued in the parent.
(This used to be commit f1004dd52a)
1997-11-02 01:25:50 +00:00
Andrew Tridgell
87cada5fd3 minor async DNS cleanups
- start it earlier
- set DEBUGLEVEL to -1 to prevent any debug calls in child
- exit with _exit() to prevent logfile corruption
(This used to be commit 21dd073a20)
1997-11-01 23:42:28 +00:00
Jeremy Allison
abb255cfe6 Big change to make nmbd code more readable/understandable.
Main change is removal of find_name_search() confusion.
This has been replaced with find_name_on_subnet() which
makes it explicit what is being searched.

Also changed wins_subnet to be wins_client_subnet in
preparation for splitting the wins subnet into client
and server pieces.

This is a big nmbd change and I'd appreciate any
bug reports.

Specific changes follow :

asyncdns.c:
     Removed wins entry from add_netbios_entry(). This is now
     explicit in the subnet_record parameter.

interface.c:
     iface_bcast(), iface_nmask(), iface_ip() return the
     default interface if none can be found. Made this
     behavior explicit - some code in nmbd incorrectly
     depended upon this (reply_name_status() for instance).

nameannounce.c:
     find_name_search changes to find_name_on_subnet.

namebrowse.c:
     wins_subnet renamed to wins_client_subnet.

namedbname.c:
     find_name_search removed. find_name_on_subnet added.
     add_netbios_entry - wins parameter removed.

namedbsubnet.c:
     find_req_subnet removed - not explicit enough.

nameelect.c:
     wins_subnet renamed to wins_client_subnet.

namepacket.c:
     listening() simplified.

nameresp.c:
     wins_subnet renamed to wins_client_subnet.

nameserv.c:
     find_name_search moved to find_name_on_subnet.

nameserv.h:
     FIND_XXX  -> changed to FIND_SELF_NAME, FIND_ANY_NAME.

nameservreply.c:
     find_name_search moved to find_name_on_subnet.
     Debug entries changed.

nameservresp.c:
     wins_subnet renamed to wins_client_subnet.

namework.c:
     wins_subnet renamed to wins_client_subnet.

nmbd.c:
     wins parameter removed from add_netbios_entry.

nmbsync:
     wins_subnet renamed to wins_client_subnet.

proto.h: The usual.

server.c:
     remove accepted fd from fd_set.

Jeremy (jallison@whistle.com)
(This used to be commit 2c97b33fc0)
1997-10-23 22:30:57 +00:00
Andrew Tridgell
e5c319186d Implemented asynchronous DNS lookups in nmbd.
I realised this afternoon just how easy it is to add this, so I
thought I'd implement it while the idea was fresh.

nmbd forks at startup and uses a pipe to talk to its child. The child
does the DNS lookups and the file descriptor of the child is added to
the main select loop.

While I was doing this I discovered a bug in nmbd that explains why
the dns proxy option has been so expensive. The DNS cache entries in
the WINS list were never being checked, which means we always did a
DNS lookup even if we have done it before and it is in cache. I'm sure
this used to work (I tested the DNS cache when I added it) so someone
broke it :-(

Anyway, the async DNS gets rid of the problem completely. I'll commit
just the fix to the DNS cache bug to the 1.9.17 tree.

You can disable async DNS by adding -DSYNC_DNS to the compile flags.
(This used to be commit 178e27de07)
1997-10-22 11:02:00 +00:00
Jeremy Allison
c336a2f081 .cvsignore: Added make_smbcodepage
interface.c: Added is_local_net().
locking.c: Added Fix for zero length share files from Gerald Werner <wernerg@mfldclin.edu>
           plus a race condition fix for the fix.
nameannounce.c: Made function static.
namedbresp.c: extern int ClientDGRAM removed - not used.
namedbserver.c: extern int ClientDGRAM removed - not used.
namedbsubnet.c: Added code to make sockets per subnet.
namepacket.c: Added code to read from all sockets & filter.
nameresp.c: extern int ClientDGRAM removed - not used.
nameserv.c: Indentation tidyup :-).
nameserv.h: Added sockets to struct subnet.
nameservresp.c: Improved debug message.
nmbd.c: Changed to terminte on listen_for_packets exiting.
nmbsync.c: extern int ClientDGRAM & ClientNMB removed - not used.
proto.h: The usual.
util.c: Fixed debug message.
Jeremy (jallison@whistle.com)
(This used to be commit 6904c2de08)
1997-10-17 23:08:07 +00:00
Andrew Tridgell
4fe23997bf added -a "append log" option
(This used to be commit 4b7d51ffb8)
1997-10-17 01:46:16 +00:00
Jeremy Allison
cef59090bb Adding Andrews buffer overflow fixes into the main branch.
Jeremy (jallison@whistle.com)
(This used to be commit e7eb1f044d)
1997-09-26 18:55:29 +00:00
Samba Release Account
363b9a2739 loadparm.c: Added new netbios aliases parameter (code from Cisco)
nameannounce.c: Code to announce aliases as well as our own names.
namedbsubnet.c: Code to add the aliases to the server list.
nameserv.c:		Code to defend our aliases on the namelist.
namework.c:		Code to check it's one of our aliases.
nmbd.c:			Code to initialise the aliases.
proto.h:		Fixup protos.
util.c:			Code to check it's one of our aliases.
All above code based on code for 1.9.16p11 donated by Cisco
from Ben Woodard <bwoodard@luthien.cisco.com>
Jeremy (jallison@whistle.com)
(This used to be commit a2ce1c0cb1)
1997-07-31 18:47:26 +00:00
Samba Release Account
15ae50ca52 Makefile: Added UNIXWARE 2.x with shadow passwords from fja@extratech.com
client.c:	Made prompt appear at debug level 0. Fixed strcasecmp redefinition.
            Caused client to use set_blocking rather than making fcntl calls itself.
dir.c:		Removed redundent snum parameters.
includes.h:	Added SCO fixes.
loadparm.c:	Made default 'files to hide' a null string.
nmbd.c:		Removed O_NONBLOCK from pid file open for platforms that dont have it.
proto.h:	Changed snum to cnum where needed. Changed is_xx_path to is_in_path
            (now called via MACRO).
quotas.c:	Swapped setuid/seteuid calls when restoring uid.
reply.c:	Removed redundent snum parameters.
server.c:	Changed snum to cnum where needed. Setup new veto_list, hide_list
            namelists. Added standard_sub changes from
            Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu> and
            Paul Rippin <pr3245@nopc.eurostat.cec.be>
shmem.c:	Changed cast for sizeof to be int before negating.
smb.h:		Added new veto_list, hide_list entries to connections.
            Added IS_PRINT, IS_HIDDEN_PATH, IS_VETO_PATH macros.
trans2.c:	Removed redundent snum parameters.
util.c:		Added standard_sub_basic changes from
            Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu> and
            Paul Rippin <pr3245@nopc.eurostat.cec.be>
            Fixed up veto/hidden path processing so the paths are
            pres-parsed and checked for wildcards (for speed).
Jeremy (jallison@whistle.com)
(This used to be commit 9afa36f787)
1997-07-24 17:25:11 +00:00
Samba Release Account
612111c7a1 charset.c: Split charset_initialise() into 2 - a charset_initialise() and
a codepage_initialise(). Fixes problem with initialising dos map
            twice.
charset.h:  Changes to support charset changes.
client.c:   Changes to support charset changes.
loadparm.c:	follow symlinks parameter from David Clerc <David.Clerc@cui.unige.ch>
nmbd.c:		Changes to support charset changes.
nmblookup.c:Changes to support charset changes.
proto.h:	Changes to support charset changes.
reply.c:	Don't call security=server with no user/no password guest. Fix from
            Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu>
server.c:   follow symlinks code from David Clerc <David.Clerc@cui.unige.ch>
smbpasswd.c:Changes to support charset changes.
status.c:	Changes to support charset changes.
testparm.c: Changes to support charset changes.
testprns.c: Changes to support charset changes.
uid.c:		Fixed log message with no \n.
Jeremy (jallison@whistle.com)
(This used to be commit 2a28a6e5e4)
1997-07-18 20:21:32 +00:00
Samba Release Account
25eae02948 Makefile: Added AIX targets from Ole Holm Nielsen <Ole.H.Nielsen@uni-c.dk>
chgpasswd.c:	Added Samba/GPL notice (for obvious reasons).
clitar.c:		Updated Copyright date to include 1997 (for obvious reasons).
getsmbpass.c:	Updated Copyright date to include 1997 (for obvious reasons).
includes.h:		Added stropts for solaris.
loadparm.c:		Changed comment for hide files option.
nameconf.c:		Updated Copyright date to include 1997 (for obvious reasons).
nmbd.c:			Updated Copyright date to include 1997 (for obvious reasons).
pcap.c:			Updated Copyright date to include 1997 (for obvious reasons).
proto.h:		Re-added accidentaly deleted smb_shm_ calls.
quotas.c:		Added AIX quota patch from Ole Holm Nielsen <ohnielse@fysik.dtu.dk>
server.c:		Optimization on calling is_hidden_path. Updated Copyrights.
smb.h:			Changed DEFAULT_FILES_TO_HIDE from  "*/.*" to ".*".
smbpass.c:		Updated Copyright date to include 1997 (for obvious reasons).
ufc.c:			Updated Copyright date to include 1997 (for obvious reasons).
util.c:			Added last component code to is_in_path().
Jeremy (jallison@whistle.com)
(This used to be commit 9385ae1005)
1997-07-08 16:54:44 +00:00
Samba Release Account
c6e63aa896 Makefile: Added quoata changes for Linux from Thorvald Natvig
Makefile.RPM:	Added quoata changes for Linux from Thorvald Natvig
charset.c:	Large changes to add multiple client code pages.
charset.h:	Changed charset_initialise() proto.
client.c:	Fixed message sending bug. Changed charset_initialise().
ipc.c:		Fixed #ifdef compile problems.
loadparm.c:	Added "client code page" option.
nmbd.c:		Changed charset_initialise(). Fixed lmhosts read.
nmblookup.c:	Changed charset_initialise().
proto.h:	Added lp_client_code_page(void).
quotas.c:	Added quoata changes for Linux from Thorvald Natvig
reply.c:	Changed debug level. Made SMBecho ignore tid.
server.c:	Changed charset_initialise().
smb.h:		Added DEFAULT_CLIENT_CODE_PAGE as 850.
smbpasswd.c:	Changed charset_initialise().
status.c:	Changed charset_initialise().
testparm.c:	Changed charset_initialise().
testprns.c:	Changed charset_initialise().
Jeremy Allison (jallison@whistle.com)
(This used to be commit 957025bace)
1997-06-11 01:03:06 +00:00
Samba Release Account
d98bea900e namepacket.c: Block SIGTERM correctly - we can only take them at defined points.
nameserv.c:		Fixup name release code - used when we are going down.
nameservreply.c:	Relaxed check for deleting name - original code never deleted.
nmbd.c:			Block SIGTERM signals most of the time - see comment on namepacket above.
Jeremy (jallison@whistle.com)
(This used to be commit 9f4e012247)
1997-05-31 01:11:40 +00:00
Samba Release Account
3ab97ebe6d charcnv.c: Fixed silly bugs detected on IRIX.
client.c:	Fixed silly bugs detected on IRIX.
namedbname.c:	Stopped 1d names from being registered in WINS db.
namedbsubnet.c:	Only register 1e names on broadcast subnet.
nameelect.c:	Changed add_my_name entries. Forced host announces if we
                have less than 10 servers listed. Fixed registering 1b
                domain name issues.
namepacket.c:	Added error message when dgram discarded.
nameserv.c:	Added notion of 'direct' names that are not registered on
                the network. Needed to get around bugs in earlier nmbd
                handling of DOMAIN(1b) names.
nameservreply.c:Tidied up debug message.
nameservresp.c:	Added response_name_query_domain() code. Deals with
                re-registering DOMAIN(1b) name.
nmbd.c:		Fixed silly bugs detected on IRIX.
nmblib.c:	Added paranoia debugs.
proto.h:	Updated remove_name_entry(), add_my_name_entry().
server.c:	Fixed silly bugs detected on IRIX.
trans2.c:	Fixed silly bugs detected on IRIX.
uid.c:		Fixed silly bugs detected on IRIX.
version.h:	Updated to alpha3.
Jeremy (jallison@whistle.com).
(This used to be commit f08222bd8b)
1997-05-30 20:40:48 +00:00
Samba Release Account
aa864415c5 dir.c: Fixed double slash issue.
includes.h: Changed to ifdef FAST_SHARE_MODES.
ipc.c:  Changed lp_workgroup() to myworkgroup.
loadparm.c:  Added new shared mem parameters. Added Luke's fix.
locking.c: Rewrite to do share modes better (both fast and slow modes).
nameannounce.c:  Changed lp_workgroup() to myworkgroup. Added Luke's fix.
nameconf.c:  Changed lp_workgroup() to myworkgroup.
namedbname.c:  Improved debug.
namedbserver.c:  Changed lp_workgroup() to myworkgroup.
namedbsubnet.c:  Added Luke's fix - rewritten somewhat.
namedbwork.c:  Changed lp_workgroup() to myworkgroup.
nameelect.c:  Added Luke's fix - rewritten somewhat.
nameresp.c:  Stoped shadowing global.
nameserv.c:  Added Luke's fix - Improved debug.
nameservreply.c:  Improved debug.
namework.c:  Changed lp_workgroup() to myworkgroup.
nmbd.c:  Added Luke's fix - Changed lp_workgroup() to myworkgroup.
pipes.c:   Changed lp_workgroup() to myworkgroup.
proto.h:   Added Luke's fix, added smb_shm_ proto's.
reply.c:  Changed lp_workgroup() to myworkgroup.
server.c:  Rewrite to do share modes better (both fast and slow modes).
shmem.c:  Rewrite to do share modes better (both fast and slow modes).
smb.h:  Rewrite to do share modes better (both fast and slow modes).
status.c:  Rewrite to do share modes better (both fast and slow modes).
trans2.c:  Fixed double slash issue.
util.c:  Tidied up, created myworkgroup.
Jeremy Allison (jallison@whistle.com).
(This used to be commit 2a1711eaaf)
1997-05-20 00:32:51 +00:00
Samba Release Account
0f1f0ceb95 'The mother of all checkins' :-). Jeremy Allison (jallison@whistle.com)
Wed May  7 1997: Update for 1.9.17alpha1 release - 'browsefix release'
designed to make browsing across subnets work.

byteorder.h:	Updated copyright to 1997.
charcnv.c:      Updated copyright to 1997.
charset.c 	Updated copyright to 1997.
charset.h	Updated copyright to 1997.
client.c	Updated copyright to 1997.
clientutil.c	Updated copyright to 1997.
dir.c		Updated copyright to 1997.
fault.c		Updated copyright to 1997.
includes.h	Updated copyright to 1997.
interface.c	Updated copyright to 1997.
ipc.c		Updated copyright to 1997.
kanji.c		Updated copyright to 1997.
kanji.h		Updated copyright to 1997.
loadparm.c	Updated copyright to 1997.
locking.c	Updated copyright to 1997.
mangle.c	Updated copyright to 1997.
message.c	Updated copyright to 1997.
nameannounce.c

	Made use of WINS subnet explicit.
Added reset_announce_timer() so announcement
can be made immediately when we become a master.
Expanded code to do sync with dmb.

namebrowse.c

	Removed redundent checks for AM_MASTER in
sync code. Made use of WINS subnet explicit.

namedbname.c	Made use of WINS subnet explicit.
namedbresp.c	Made use of WINS subnet explicit.
namedbserver.c	Made use of WINS subnet explicit.

namedbsubnet.c

	Explicitly add workgroup to WINS subnet
when we become a dmb. Made use of WINS subnet explicit.

namedbwork.c

	Made use of WINS subnet explicit. Removed
redundent check_work_servertype() function.

nameelect.c

	Explicitly add workgroup to WINS subnet
when we become a master browser. Made use of WINS subnet explicit.

namelogon.c	Updated copyright to 1997.
namepacket.c	Updated copyright to 1997.
namequery.c	Updated copyright to 1997.

nameresp.c

	Made use of WINS subnet explicit. Made nmbd fail if
configured as master browser and one exists already.

nameserv.c

	Made use of WINS subnet explicit. Remove redundent
logon server and domain master code.

nameserv.h	Add emumerate subnet macros.
nameservreply.c	Made use of WINS subnet explicit.
nameservresp.c	Updated copyright to 1997.

namework.c

	Made use of WINS subnet explicit. Updated code to
add sync browser entries to add subnet parameter.

nmbd.c

	Added sanity check for misconfigured nmbd.

nmblib.c	Updated copyright to 1997.
nmblookup.c	Updated copyright to 1997.
nmbsync.c

	Removed redundent AM_ANY_MASTER check.

params.c	Updated copyright to 1997.
password.c	Updated copyright to 1997.
pipes.c		Updated copyright to 1997.
predict.c	Updated copyright to 1997.
printing.c	Updated copyright to 1997.

proto.h

	Changed protos for new nmbd code.

quotas.c	Updated copyright to 1997.
replace.c	Updated copyright to 1997.
reply.c		Updated copyright to 1997.
server.c	Updated copyright to 1997.
shmem.c		Updated copyright to 1997.
smb.h		Updated copyright to 1997.
smbencrypt.c	Updated copyright to 1997.
smbpasswd.c	Updated copyright to 1997.
smbrun.c	Updated copyright to 1997.
status.c	Updated copyright to 1997.
system.c	Updated copyright to 1997.
testparm.c	Updated copyright to 1997.
testprns.c	Updated copyright to 1997.
time.c		Updated copyright to 1997.
trans2.c	Updated copyright to 1997.
trans2.h	Updated copyright to 1997.
uid.c		Updated copyright to 1997.
username.c	Updated copyright to 1997.
util.c		Updated copyright to 1997.
version.h

	Changed to 1.9.17alpha1.
(This used to be commit cf23a155a1)
1997-05-08 01:14:17 +00:00
Samba Release Account
20b5dea237 Large changes from jra@cygnus.com. Mainly browser updates.
access.c: Fixed crash if yp domain unavailable.
includes.h: Moved ifdefs for minor platform.
interface.c: Changed name of ipgrp to wins_ip to make it clearer.
loadparm.c: Changed default of wins support to 'no'.
nameannounce.c: Many changes to fix cross subnet browsing.
namebrowse.c: Many changes to fix cross subnet browsing.
namedbname.c: Many changes to fix cross subnet browsing.
namedbresp.c: Many changes to fix cross subnet browsing.
namedbsubnet.c: Many changes to fix cross subnet browsing.
namedbwork.c: Many changes to fix cross subnet browsing.
nameelect.c: Many changes to fix cross subnet browsing.
namelogon.c: Many changes to fix cross subnet browsing.
namepacket.c: Many changes to fix cross subnet browsing.
nameresp.c: Many changes to fix cross subnet browsing.
nameserv.c: Many changes to fix cross subnet browsing.
nameserv.h: Many changes to fix cross subnet browsing.
nameservreply.c: Many changes to fix cross subnet browsing.
nameservresp.c: Many changes to fix cross subnet browsing.
namework.c: Many changes to fix cross subnet browsing.
nmbd.c: Change to search wins subnet.
nmbsync.c: Change to check if we are any master before proceeding.
proto.h: Added find_subnet_all() and check_work_servertype().
util.c: Moved 'done' settings on name resolution.
(This used to be commit a82476eee2)
1997-04-09 01:19:25 +00:00
Samba Release Account
b581d03240 1) updated ipc.c NetUserGetInfo - load \\%L\%U instead of \\%L\HOMES
because the share must be browseable by a w95 client

2) send_mailslot_reply - unique or group datagram argument added.

3) netlogon.c - rewrote response packet to do the right thing for w95.

4) server.c reply_nt1() - added OEMDomainstring to the end.

5) (deep breath) reworked the nmbd-browsing code a little bit.
   i discovered two months ago that becoming a primary domain controller
   (and domain master browser) is done independently of becoming a
   backup domain controller (logon server) is done independently of
   becoming a local master browser.

   therefore, three sets of state-machines (instead of just one) are in
   place - each of which is responsible for taking samba through the
   required stages to become:  a logon server; a domain master browser;
   and a local master browser.

   each of these three things can occur independently on each interface,
   _including_ the wins pseudo-interface.  the only slight caveat is that
   the wins pseudo-interface, by virtue of _not_ being a broadcast
   interface, does _not_ register as a local master browser with the wins
   server, as this doesn't make sense.

lkcl
(This used to be commit 88c6a00c3c)
1997-03-09 14:58:22 +00:00
Samba Release Account
61236274fe Added -f option for lock file.
jra@cygnus.com
(This used to be commit 0c8df4cef9)
1996-12-10 17:55:27 +00:00
Andrew Tridgell
8781e4d787 - changed the default nmbd loop timout to 10 seconds (2 seconds was much
too short)

- got rid of many unnecessary calls to time(NULL) in nmbd. They were
causing it to chew too much CPU time when idle. Now we pass a time
value in from the top level.
(This used to be commit 3cd7303dbc)
1996-10-07 01:56:21 +00:00
Andrew Tridgell
afd08462ad backout all the changes to nmbd.
The 1.9.16 tree is now back to 1.9.16p2 as far as nmbd is concerned
apart from a small change that fixes the announce type in two places.
(This used to be commit 45e66a69d3)
1996-10-02 15:41:30 +00:00
Andrew Tridgell
5a2f52b79e - a huge pile of changes from Luke which implement the browse.conf
stuff and also fix a pile of nmbd bugs. Unfortunately I found it very
hard to disentangle the new features from the bug fixes so I am
putting in the new code. I hope this is the last big pile of changes
to the 1.9.16 series!
(This used to be commit 20b6203dac)
1996-10-02 14:09:22 +00:00
Samba Release Account
9ad5a3fe36 removed all of lukes recent changes. I need to do a p2 release but
can't test the multi group changes.

I also found that some of lukes changes wiped out some recent bug
fixes. Is your CVS tree ok luke?
(This used to be commit 8b7fe224bc)
1996-08-24 01:41:46 +00:00
Samba Release Account
5945be9718 - fixed bugs in nmb response packet checking.
- added multiple workgroup code - samba can register under different
  (unique) NetBIOS aliases, one per workgroup it joins.

lkcl
(This used to be commit f24e341e7e)
1996-08-23 10:17:30 +00:00
Andrew Tridgell
9155889092 - add timeouts to connect() for password server connections. This
makes multiple password servers practical.
(This used to be commit 5c3e8326cc)
1996-08-22 06:32:03 +00:00
Andrew Tridgell
1073bd6541 - removed ServerComment and instead set the comment string in nmbd
using the "server string" option. This replaces the -C option to nmbd
(This used to be commit 9e0fab2ee6)
1996-08-20 16:09:41 +00:00
Andrew Tridgell
0c33046a0a - added "netbios name" option in smb.conf to make controlling the name
that samba uses possible

- added "socket address" option to allow virtual SMB servers (on
systems with IP aliasing line Linux)

- disabled FAST_SHARE_MODES by default in Linux as older Linux boxes
can't do shared writeable mappings. We really need autoconf ...

- added new option types in loadparm so a string type can be specified
ot be uppercase only, this is used for the workgroup and netbios name
options

- auto-create the lock directory if it doesn't exist in shared mem
startup

- get rid of announce_backup()

- change a few comments in nmbd code

- rewrote the chaining code completely. Hopefully it will handle any
depth chains now.

- added LPRng support
(This used to be commit e9eac6cd49)
1996-08-19 11:17:29 +00:00
Samba Release Account
1aedda6160 - fixed wins.dat reloading (it wasn't happening!)
- made nb_flags an unsigned 16 bit int in nameserv.h

- nmbd was calling add_my_subnets() with an uninitialised parameter group.
  removed it.

lkcl
(This used to be commit 3d55e54156)
1996-08-17 15:14:24 +00:00
Andrew Tridgell
28177ca73b - added support for Amiga-unix (based on BSD I think)
- changed the order of PROGS and SPROGS in Makefile (SPROGS first)

- another 64 bit cleanup (for INADDR_NONE)

- added paranoia code in DirCacheAdd() to detect looping

- fixed important DirCache flush bug

- rewrote the NetServerEnum code after I found it could return servers
from multiple workgroups at once, and this could cause browsing
havoc. Now a null workgroup query is equivalent to a query for the
servers primary workgroup

- got rid of my_workgroup()

- got rid of "workgroup = *" comment in Makefile. We no longer support
a workgroup of *, users must set the workgroup explicitly

- the wins.dat file was being stored in a different format to what it
was being loaded in - this could cause havoc. fixed.

- uppercase our netbios name and the workgroup name at startup

- if accept fails in main loop when running as a daemon then continue,
don't just exit!

- don't use ./ on smbclient in smbtar

- better code to detect if a process exists
(This used to be commit ec3d539630)
1996-08-17 11:37:44 +00:00
Andrew Tridgell
f63d4c830a - added the "remote announce" option
- made the lp_string() code able to handle any length string
- got rid of the obsolete lmhosts code, instead users should use
"interfaces" and "remote announce". lmhosts now is just used as a IP
to netbios name map
- cleanup the inet_address() code
(This used to be commit be2b679403)
1996-08-16 13:03:26 +00:00
Andrew Tridgell
47673b32ed - added FAST_SHARE_MODES code
- added some named pipe code from Jim
(This used to be commit c94866e9e4)
1996-08-15 15:11:34 +00:00
Samba Release Account
02b98a8965 applying login updates from jim@oxfordcc.co.uk, sent in by
lewis2@server.uwindsor.ca. rest of this patch to follow.

bug in interface.c - uninitialised pointer.
nmbd has 0x20 as well as 0x0 NetBIOS name when lmhosts entry is added.

lkcl
(This used to be commit 2b9475cc5f)
1996-08-09 18:05:34 +00:00
Samba Release Account
3ffb30e8be local_only NetServerEnum syncs can now be issued.
bug spotted in nameservresp.c - arguments to test subnet the response
is received on (same_net()) were the wrong way round (ccm@shentel.net)

samba was adding WORKGROUP(1e) as a unique not a group name: fixed this

bug in reply_name_status() and reply_name_query(): WINS entries weren't
being looked up.

name status reply adds local SELF entries to WINS SELF entries: some
SELF entries are only added locally, while others are only added via
WINS. name status needs to have both, combined.

a sync will only occur when an ANN_LocalMasterAnnouncement is received, NOT
an ANN_HostAnnouncement or an ANN_DomainAnnouncement.

when samba is a member of a workgroup, it looks for (using a wins server)
and announces to its domain master. NAME_QUERY_ANNOUNCE_HOST - yet another
'state' - has been created to do this: do the name query on the wins server
and send the announce host to the answer to this query.

jeremy @ vantive wrote the original code to do this, which used the
name_query() function.  i'm trying to avoid name_query: it times out and
generally messes things up, but using queue_netbios_packet() and
queue_netbios_pkt_wins() is... not intuitive?

lkcl with help from jra
(This used to be commit 6e932e4bae)
1996-08-01 17:49:40 +00:00
Samba Release Account
25b30c08dc lots of changes to nmbd
lkcl
(This used to be commit 45d3b26447)
1996-07-17 18:33:36 +00:00
Samba Release Account
9d59ce1d57 missed nmbd.c in previous update.
did a make proto

lkcl
(This used to be commit 4ccc84989e)
1996-07-09 18:11:47 +00:00
Samba Release Account
7812ff0813 modified become_master() to a state-based system. becoming a master
is now performed in stages: wait for each NetBIOS name to be
successfully registered before proceeding to the next stage.

tied implicit name registration and release (broadcast method) to the
same piece of code as explicit method (via WINS server).

created special_browser_name() function that checks __MSBROWSE__
name: this name is ignored by WINS servers apparently.

fixed likely incompatibility between refresh_my_names() and add_my_names().
(netbios entries were unlikely to be refreshed).

NOTE: none of these changes have been tested. at all.

lkcl
(This used to be commit 7719fb0652)
1996-07-04 19:19:26 +00:00
Samba Release Account
ed2639ebe2 luke's first attempt at using cvs
accidentally updated the Makefile

updated the name database structure (again!). this time, there is one
name database per local interface. there is also a pseudo-interface on
ip 255.255.255.255. its purpose is to store WINS name entries. all the
local interface name databases store SELF names only. the WINS name
database stores non-special browser names.

added wins.dat file: records WINS entries in ascii format. this is reloaded
when nmbd restarts.

added repeating code for response packets. timer is in seconds only at the
moment.

updated the response queue code to deal with samba registering with a
WINS server a bit better (added more cases when a response isn't received).
tidied up the response packet processing code and expire_response_queue()
code. added cross references between response received and await-response
expired code.

added over-zealous code that checks all machines that register with samba
as a WINS server (every 10 minutes i think): to see whether they are still
alive or not (see rfc1001.txt)

bug reported by terry@ren.pc.athabascau.ca: DNSFAILed names _stay_ as
DNSFAIL, even though the machine may come back up and REGISTER.

removed update_from_reg() function. it's not necessary, and it does too much.

added code that announces on each local interface samba's ttl as zero and
servertype as zero when nmbd is kill -TERMed

first attempt at putting the first functionality of samba browsing back in
(remote subnets should have samba appear in a workgroup specified through
the lmhosts file)

lots of other miscellaneous tidying up / chopping about.
(This used to be commit 7e8c60cfe5)
1996-06-29 18:49:20 +00:00
Andrew Tridgell
7e3b4a1c0d got rid of a lot of redundent header files as we now globally generate
prototypes automatically using "make proto". This is much less prone
to error than the old method of manually adding prototypes
(This used to be commit b551dc98f7)
1996-06-10 04:38:24 +00:00
Andrew Tridgell
e2eac352b1 updates from Luke to rename "domains" more accurately to "subnets"
(This used to be commit 0a044c25ab)
1996-06-10 03:38:08 +00:00
Andrew Tridgell
3f6fb647e7 more changes from Luke
(This used to be commit df44f10d74)
1996-06-08 05:37:33 +00:00
Andrew Tridgell
bfbca5ac77 changes from Luke
(This used to be commit 5269aa277c)
1996-06-08 04:41:51 +00:00
Andrew Tridgell
d160d93d8f - added predict.c, moving the routines from util.c
- added iface_count() and iface_n_ip() routines so its easy to loop
over the local interface list

- made readsize a normal loadparm global

- check for null w in add_domain_entry()

- set the deathtime to time()-1 for doamin entries with servertype==0
This allows servers that are shutting down to be removed

- add the 0x1c name at startup if we are a WINS server. Previously we
added it only if we were a master

- loop over interfaces in add_my_domains(), so people don't have to
have a lmhosts file to get lp_workgroup() on all interfaces

- set add to True for find_workgroupstruct() in nmbsync, and check for
null return

- remove some ugly "errno = EBADF" bits. they just confused things.
(This used to be commit 88b191b488)
1996-06-07 03:34:22 +00:00
Andrew Tridgell
b9ae225b28 - added interface.c and removed all the references to myip, bcast_ip
and Netmask, instead replacing them with calls to routines in
interface.c

- got rid of old MAXINT define

- added code to ensure we only return one entry for each name in the ipc
enum routines

- added new_only option to add_netbios_entry() to prevent overwriting
of important names

- minor time handling fixup
(This used to be commit 7ed71b73ae)
1996-06-06 11:43:09 +00:00
Andrew Tridgell
e38afbf382 - changed some debug levels in clientutil.c
- added dir_check_ftype() to clean up the file type checking a bit

- added check for libc version >= 5 for setfsuid() for Linux

- moved the AM_MASTER() and related macros to nameserv.h

- added proper defines for the various netbios announce types

- don't call the announce_backup() code, as I'm pretty sure its wrong
it sent ANN_GetBackupListReq packets as broadcasts, they are supposed
to be used only by clients to the master browser to find a list of
available backup servers to remote a netserverenum to, I don't think
nmbd should ever send one.

- fixed a bug in the browse list writing

- minor debug cleanups

- put in the code to discard our own broadcasts (it won't work for
multi-homed hosts though)

- changed ELECTION_VERSION to 1 so we can be beaten by a NT 3.51 server by
lowering the os level.

- only do sync_browse_lists() if we are the master browser, otherwise
we'll cause network overload

- don't call tell_become_backup() as it appears to be badly broken, it
should only be used when the machine being told has its MAINTAIN_LIST
to to auto. Not calling it does no great harm anyway

- fix a nasty bug where becomebackup was confused with reset browser!

- make setbuffer() not get caught by the auto protototypes
(This used to be commit cfbad9b082)
1996-06-05 15:16:09 +00:00
Andrew Tridgell
a2641cfe00 Did more integration of Lukes code ready for the first release.
I've now got WINS registration working, and refresh working. Its
looking pretty good so far, but needs lots of testing.
(This used to be commit 045014aa57)
1996-06-04 15:14:47 +00:00
Andrew Tridgell
a2c1623827 a huge pile of changes :-)
The biggest thing is the integration of Lukes new nmbd. Its still
largely untested, so we will really need some feedback

I've also added auto prototype generation and cleaned up a lot of
minor things as a result
(This used to be commit 0d8dcfa13c)
1996-06-04 06:42:03 +00:00