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

1731 Commits

Author SHA1 Message Date
Andrew Tridgell
5e20600e54 minor fixes to the DMB<->DMB sync code. We now get the dmb name from
the local_master name on the unicast subnet if it is unknown.
(This used to be commit 222b6d90e0)
1998-08-31 07:23:11 +00:00
Andrew Tridgell
9076947b93 if an address is ipzero in cli_connect() then do a name query
(This used to be commit 0a5718b0ae)
1998-08-31 07:21:54 +00:00
Andrew Tridgell
f8ad53aa03 I realised that my DMB<->DMB sync code has the property that the
amount of network traffic grows as the square of the number of
workgroups. It probably wouldn't have caused problems but to be safe I
changed the code to use random() to decrease the probability of a
DMB<->DMB sync in proportion to the number of known workgroups. This
keeps the nice browse connectivity while making the traffic rise only
linearly with the number of workgroups.
(This used to be commit 685f4ef2e1)
1998-08-31 06:59:23 +00:00
Samba Release Account
36bbc13fcd preparing for release of 2.0.0 alpha 1
(This used to be commit d7e50f0111)
1998-08-31 05:26:18 +00:00
Samba Release Account
af9e2513bf preparing for release of 2.0.0 alpha
(This used to be commit 70b8c9f05e)
1998-08-31 05:23:33 +00:00
Andrew Tridgell
60be7d222e fixed a comment
(This used to be commit 560ed560f4)
1998-08-31 05:21:39 +00:00
Andrew Tridgell
c98d175de5 updated the WHATSNEW in preparation for an alpha release
(This used to be commit 2f09b68e52)
1998-08-31 05:21:09 +00:00
Andrew Tridgell
055e3c88e6 set a maximum name refresh time of 20 minutes.
The previous code was strictly correct, but not very practical. self
names were only refreshed every 3 days. I hit a situation where the
Samba WINS server was restarted after deleting wins.dat and didn't
notice some remote subnets (also running Samba). I realised that the
complete database wouldn't have been rebuilt for 3 days, which is way
too long. In order to recover from WINS restarts we need a much
shorter maximum refresh time.
(This used to be commit 1d23dd0912)
1998-08-31 04:19:31 +00:00
Andrew Tridgell
cc022132a6 cast the qsort to prevent warnings
(This used to be commit 55333edd2e)
1998-08-31 03:13:20 +00:00
Andrew Tridgell
61b5fd6f32 bounds check next_token() to prevent possible buffer overflows
(This used to be commit 3eade55dc7)
1998-08-31 03:11:42 +00:00
Andrew Tridgell
ab4577f141 added a dest_port parameter to send_mailslot() so we send replies to
the correct port in environments like ip masq.
(This used to be commit 7d455ee637)
1998-08-30 17:04:24 +00:00
Andrew Tridgell
98b0fafc61 a couple of debug lines
(This used to be commit 03d343ddf5)
1998-08-30 16:33:48 +00:00
Andrew Tridgell
998db177ba finished the asynchronous browse synchronisation code. It even seems
to work (not a lot of testing yet though).

Now we just need to deal with people worried about having more than
two nmbd processes sometimes. (the async processes are created on
demand for browse sync, so you'll only see more than 2 occasionally)
(This used to be commit a350a54680)
1998-08-30 15:58:17 +00:00
Andrew Tridgell
b295144273 This should fix the zombie problem that luke noticed.
(This used to be commit 425ccf9271)
1998-08-30 12:32:45 +00:00
Andrew Tridgell
f04d5b6b11 we we have successfully done a query on *<1b> from a wins server and
then obtained a node status response we need to remember the server
name of the master browser so that other browse clients asking us for
a workgroup list will get a entry for the master of that workgroup.
(This used to be commit 601f995ffb)
1998-08-30 09:50:45 +00:00
Andrew Tridgell
179e8c66f1 changed the way that name query records are sorted in replies. They
are now sorted by the number of common leading bits in the IP address
with the address of the querying host.
(This used to be commit 4460a1bc6a)
1998-08-30 08:45:23 +00:00
Andrew Tridgell
3debe642bd include our netbios names list and our workgroup in the wins.dat hash
(This used to be commit f555a76df6)
1998-08-30 06:49:14 +00:00
Andrew Tridgell
36ca3e3411 don't put two spaces at the start of lines if logging to stdout
or not timestamping.
(This used to be commit 70ed0ec202)
1998-08-30 05:57:21 +00:00
Andrew Tridgell
5a44ce9caa changed the format of the wins.dat file slightly.
It now has a line like this:

VERSION 1 251152

the first number is a version #define in nmbd_winsserver.c and will be
used if we ever have to change the format again.

The second number is a hash of the current interfaces setting. It is
used to detect the case where nmbd is restarted on a machine after the
IP of the machine has changed (or the interfaces list has changed in
any way). When that happens we need to discard the old wins.dat cache
or you end up with chaos. This has bitten quite a few people, they
find that when they move a machine it continues using the old IP for
some things for the next week until the wins entries time out!

I've checked, and the old nmbd can handle the new format, although it
does spit out a spurious error message about the VERSION line. So
users can safely run 2.0alpha then switch back to 1.9.18 without
problems.
(This used to be commit c4a8cdc60a)
1998-08-30 05:43:59 +00:00
Andrew Tridgell
56cbed3904 allow smbclient to connect to IPC$ as an IPC service
(This used to be commit 275679db29)
1998-08-30 04:37:07 +00:00
Andrew Tridgell
98411c48c0 - zero shared memory before freeing it
- changed the hash size to 13 (much smaller than before). This should
  make for more efficient shared memory usage as it will lead to less
  fragmentation.
(This used to be commit 9c1e4c2dae)
1998-08-30 04:35:54 +00:00
Andrew Tridgell
a6c94d7eb1 added a function zero_free(void *, int size) that zeros an area of
memory then frees it. Useful for catching bugs.
(This used to be commit 99782754f7)
1998-08-30 04:31:55 +00:00
Andrew Tridgell
c021867fee changed the size of a char array in the userdata_struct from 1 to 16
to account for padding/alignment issues. Eventually I'd like to find a
way to get rid of this construct altogether as it is a bit error
prone and hard to debug.

also added a new macro:

ZERO_STRUCTP() that takes a pointer to a structure and zeros the
structure. Used in nmbd to zero allocated structures before freeing
them to try to catch bugs a bit faster.
(This used to be commit d3dda65d51)
1998-08-30 04:30:57 +00:00
Andrew Tridgell
1778debff1 added some defensive programming to nmbd. This mostly means zeroing
areas of memory before freeing them.

While doing this I also found a couple of real bugs. In two places we
were freeing some memory that came from the stack, which leads to
a certain core dump on many sytems.
(This used to be commit c5e5c25c85)
1998-08-30 04:27:26 +00:00
Andrew Tridgell
48514704c2 got rid of calls to update_protected_database(). It was causing core
dumps. It is gone until someone can tell us why its needed and what it
does. (It was only used on OSF1 and core dumped there anyway!)
(This used to be commit a564e46627)
1998-08-29 14:08:17 +00:00
Andrew Tridgell
7731692b74 don't exit on a SIGPIPE
(This used to be commit f18b4e95bf)
1998-08-29 03:10:39 +00:00
Jeremy Allison
38142a1ebb This checking fixes the statcache bug that stopped NetBench from running
correctly. Added new parameter "stat cache size" - set to 50 by default.

I now declare the statcache code officially "open" for business :-).
It gets a hit rate of 97% with a NetBench run and seems to make
using a case insensitive run as efficient as a case sensitive run.

Also tidied up our sys_select usage - added a maxfd parameter and
also added an implementation of select in terms of poll(), for systems
where poll() is much faster. This is disabled by default.

Jeremy.
(This used to be commit 779b924ec1)
1998-08-28 21:46:29 +00:00
Andrew Tridgell
c077bce5c0 nmbd would core dump if a large number of netbios aliases is set. The
problem was a buffer overflow in process_node_status_request().

this really points out a general problem is allocating MAX_DGRAM_SIZE
packets on the stack in nmbd. There must be a better way.
(This used to be commit 7db45f169c)
1998-08-28 14:35:24 +00:00
Jeremy Allison
d0cfc1f041 Fixed stat cache statistics calculation. Oops.
Jeremy.
(This used to be commit d6a9087e7e)
1998-08-27 20:51:12 +00:00
Jeremy Allison
5e5e320d36 This is the stat cache code - seems to work fine (needs heavy
NetBench testing though.... :-). Attempts to efficiently reduce
the number of stat() calls Samba does.
Jeremy.
(This used to be commit d0e48a2d80)
1998-08-27 20:38:53 +00:00
Luke Leighton
74a2764726 oops - added /usr/include/rpc includes.
(This used to be commit cdc38c276d)
1998-08-26 14:05:23 +00:00
Andrew Tridgell
520d24c191 use a separate ZERO_ARRAY() macro instead of ZERO_STRUCT() for
arrays. This prevents (harmless) warnings from some compilers
(This used to be commit c2da46d1d0)
1998-08-26 03:06:48 +00:00
Andrew Tridgell
f1451f5d2e get includes right for systems that use getpwanam()
(This used to be commit afe98165a2)
1998-08-26 02:36:27 +00:00
Andrew Tridgell
54499a925c took all the rpc includes back out until we can work out _why_ freebsd
needs them and what should really be there.
(This used to be commit c2bf18fb8d)
1998-08-26 02:02:55 +00:00
Andrew Tridgell
7bc68de378 added a warning when loading a parameter that is deprecated
(This used to be commit c8b0041570)
1998-08-26 01:57:17 +00:00
Christopher R. Hertel
93e016e3d5 Finally got around to updating the man pages for nmbd and smbd to reflect
the changes made re: -a and -o options.

Chris -)-----
(This used to be commit e162819054)
1998-08-25 15:53:49 +00:00
Luke Leighton
3131d67cfd added loads of pointless rpcsvc/ and rpc/ include files, all because
rpcsvc/ypclnt.h wants a struct dom_binding.  knock-on include effect under
freebsd 2.1.
(This used to be commit d1005b5692)
1998-08-25 13:17:04 +00:00
Andrew Tridgell
44079f1aec note that "alternate permissions" is deprecated in man page
(This used to be commit 2af9565017)
1998-08-25 07:19:34 +00:00
Andrew Tridgell
0d35fe8992 proto changes
(This used to be commit e4f81f4a23)
1998-08-25 06:52:26 +00:00
Andrew Tridgell
085c66aea5 some smbtorture hacks (random IPC calls)
(This used to be commit b32a346a1c)
1998-08-25 06:42:09 +00:00
Andrew Tridgell
2c065107b1 changed the default permissions code to do this:
if ((sbuf->st_mode & S_IWUSR) == 0)
      result |= aRONLY;

rather than the very complex user/group permissions checks we do
currently. This is equivalent ot setting "alternate permissions = yes"
in the old code. The change is motivated by three main reasons:

1) it's basically impossible to second guess whether a file is
writeable without trying to open it for writing. ACLs, root squash etc
just make it too hard.

2) setting it not RONLY if the owner can write is closer to what NT
does (eg. look at a cdrom - files are not marked read only).

3) it prevents the silly problem of copying files from a read only
share to a writeable share and then finding you can't write to them as
windows preserves the RONLY flag. Lots of people get bitten by this
when they drag a folder from a Samba drive. It also hurts some install
programs.

I have also added a new flag type for loadparm.c called
FLAG_DEPRECATED which I've set for "alternate permissions". I'll soon
add code to testparm to give a warning about deprecated options.
(This used to be commit c4363a12fd)
1998-08-25 06:40:42 +00:00
Jeremy Allison
5ae06b99c0 Added code to (correctly) ignore TRANSACT2_SETFILEINFO with SMB_SET_FILE_ALLOCATION_INFO.
Office 97 expects this call to succeed when you tell it you do NT SMB calls.
Jeremy.
(This used to be commit 260e7e2740)
1998-08-25 02:29:17 +00:00
Jeremy Allison
8afc9c80ac Changed ASSERT macros to SMB_ASSERT macros as some systems already
have an ASSERT macro defined.
Jeremy.
(This used to be commit dbe6ad014a)
1998-08-24 21:49:10 +00:00
Luke Leighton
0e877bd53b resource.h on FreeBSD 2.1 requires sys/time.h to come first.
(This used to be commit e94ab03a4f)
1998-08-24 18:53:37 +00:00
Andrew Tridgell
3f3f47b0bd added ASSERT() and ASSERT_ARRAY() macros and sprinkled them liberally
in the rpc code.
(This used to be commit e6ce1c5b5a)
1998-08-22 02:54:21 +00:00
Andrew Tridgell
bce4d95ca9 expanded MAX_LOOKUP_SIDS to 30 (I saw 21 in a packet)
(This used to be commit bd9290c36c)
1998-08-22 02:52:25 +00:00
Christopher R. Hertel
c8b2ee3e4e Just tweaking.
If the output line is longer than the format buffer could manage, I was
simply ignoring the additional output (that is, *not* copying it to the
format buffer--thus avoiding a buffer overrun).  Instead, I now output
the current content followed by " +>\n", and then reset the format buffer.
I have never seen a debug line that exceeds the size of a pstring, but I
might as well handle the situation...just in case.

Chris -)-----
(This used to be commit 8a11d04b77)
1998-08-21 19:57:59 +00:00
Christopher R. Hertel
7fe3a42857 nmbd and smbd had different behavior with respect to log files. nmbd would
default to overwrite and smbd would default to append.  Also, the -a option
(actually a toggle, such that "-a -a" would set the default) was documented
as append mode for nmbd, and *overwrite mode* for smbd.

nmbd now defaults to append mode, to match smbd.  The -a option now always
means append, and I've added the -o option to both, meaning overwrite.

Note that the change to nmbd's default behavior may confuse some people.
I've not seen anything about 2.0.0 changes in the WHATSNEW.txt file.
Where would I document a change like this?

Chris -)-----
(This used to be commit b1d374fb14)
1998-08-21 17:21:55 +00:00
Andrew Tridgell
541cd2a2d9 don't attempt to answer QFILEINFO/SMB_QUERY_FILE_STREAM_INFO queries -
if we do then NTws gets a BSOD.

I checked and NT server refuses these queries too :)
(This used to be commit d2fb7ee8f5)
1998-08-21 14:31:43 +00:00
John Terpstra
c8f34dac39 Adding first cut of the new Red Hat Linux packaging tools.
Note: It is intended to extend this so that the release
process produces all the packaging scripts, templates, etc.
that may be needed.
(This used to be commit 6e196841c6)
1998-08-21 14:20:38 +00:00