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

1750 Commits

Author SHA1 Message Date
Jeremy Allison
623a18db4b More 64 bit stuff - now the fcntl locks are 64 bit clean.
Nearly at the stage where I can expose the 64-bit-ness to
the NT clients....
Jeremy.
(This used to be commit 422f1dd450)
1998-09-04 00:23:28 +00:00
Jeremy Allison
7bb86c1b13 Ok - this is the 64 bit widening check in. It changes the configure
to check for stat64 and friends, and then changes much of Samba
to use the data type SMB_OFF_T for file size information.

stat/fstat/lstat/lseek/ftruncate have now become sys_stat etc. to hide
the 64 bit calls if needed.

Note that this still does not expose 64 bit functionality to the
client, as the changes to the reply_xxx smb's are not yet done.

This code change should make these changes possible.

Still to do before full 64 bit-ness to the client:

fcntl lock code.
statfs code
widening of dev_t and ino_t (now possible due to SMB_DEV_T and SMB_OFF_T
types being in place).

Let me know if wierd things happen after this check-in and I'll
fix them :-).

Jeremy.
(This used to be commit 14500936c3)
1998-09-03 18:40:31 +00:00
Andrew Tridgell
4acd373e5b changed the SMBtrans reply code to align at the same alignment as
observed from NT. We were aligning the data before but not the
parameters. This aligns both.

This change may break some other parts of ipc.c if we have relied on
the alignment somewhere, so if you think this broke something then let
me know.
(This used to be commit d252d33101)
1998-09-03 05:37:15 +00:00
Andrew Tridgell
ea1cd3fbd7 we were setting the strings 1 too long in make_srv_share_info1_str()
(This used to be commit 29e1e59db8)
1998-09-03 05:35:13 +00:00
Andrew Tridgell
0b5cc17309 fixed a bug in the name mangling code. It implicitly assumed that
mangling a name can't increase it's size which isn't true. (imagine a
file called "L B" which mangles to "LB~XX")

The symptoms were that users couldn't run batch files from short
directory names that contained non 8.3 characters (such as spaces).
(This used to be commit c319d8ea3f)
1998-09-03 03:14:31 +00:00
Jeremy Allison
0067ea1b5a Fix for PR#9497 - not waiting for child.
Jeremy.
(This used to be commit e817d836bb)
1998-09-02 17:23:41 +00:00
Andrew Tridgell
148691b1c5 we are never interested in SIGPIPE so just ignore (block) it
always. Don't even install a handler.
(This used to be commit 72c383f4b7)
1998-09-02 05:00:47 +00:00
Andrew Tridgell
054a7bcd3a changed ref to samba.gif to use /swat/ prefix
(This used to be commit f297662d64)
1998-09-02 02:12:07 +00:00
Andrew Tridgell
b68d65d4bc use /swat/ prefix in both inetd and cgi modes, to enable a static header.html
(This used to be commit ddb788c24d)
1998-09-02 02:02:30 +00:00
Jeremy Allison
80ec5e4a4d Missed one struct stat.
Jeremy.
(This used to be commit 03ae657a36)
1998-09-01 20:17:16 +00:00
Jeremy Allison
1855627413 More abstraction of file system data types, to move to a 64
bit file interface for the NT SMB's.

Created a new define, SMB_STRUCT_STAT that currently is
defined to be struct stat - this wil change to a user
defined type containing 64 bit info when the correct
wrappers are written for 64 bit stat(), fstat() and lstat()
calls.

Also changed all sys_xxxx() calls that were previously just
wrappers to the same call prefixed by a dos_to_unix() call
into dos_xxxx() calls. This makes it explicit when a pathname
translation is being done, and when it is not.

Now, all sys_xxx() calls are meant to be wrappers to mask
OS differences, and not silently converting filenames on
the fly.

Jeremy.
(This used to be commit 28aa182dbf)
1998-09-01 20:11:54 +00:00
Andrew Tridgell
6f53e2097d Matthew is no longer wokring on SWAT
(This used to be commit 8bd2cf0eb7)
1998-09-01 07:10:44 +00:00
Andrew Tridgell
5ac39c2623 need to istall new files
(This used to be commit c53ead308e)
1998-09-01 06:03:52 +00:00
Andrew Tridgell
7b07680d3b spruced up SWAT a bit - it now uses the new Samba logo at the top and
a table to give it a little border
(This used to be commit d35c6e8098)
1998-09-01 06:03:03 +00:00
Andrew Tridgell
296038d498 fixed a bug in the base64 hanlding that led to auth failures for some
passwords with SWAT
(This used to be commit edcde70108)
1998-09-01 06:01:19 +00:00
Andrew Tridgell
a5f8955ccb check that a valid pipe is passed before doing a pipe close.
I made this change after getting a segv in reply_pipe_close(). The
funny thing was that pipes_open was 1 and Pipes was NULL. That "can't
happen" and suggests that we have a wild pointer somewhere.

I suspect the rpc code, as I was playing with long share names (a
share called "averylongusername") at the time and the logs show lots
of srvsvc operations. I bet there is a buffer in the rpc code
somewhere that is overflowing and trashing bits of the data segment.
(This used to be commit 9fee8c2eb7)
1998-09-01 01:10:01 +00:00
Jeremy Allison
693480af8b configure.in, configure: include/config.h.in: Added stropts and poll.
include/smb.h: Moved old typedefs of uint8 etc. into include/includes.h where
               all the other defines live (changed them from typedefs to
               defines).
Other changes : changed from using uint32 to SMB_DEV_T and SMB_INO_T
in preparation for moving to size independed (ie. 64 bit clean) device
and inode access. Stat call wrapper comes next :-).

Jeremy.
(This used to be commit 3d9ec96de5)
1998-08-31 20:20:54 +00:00
Christopher R. Hertel
d2e0d0f73b I added notes about the changes I've made to 2.0.0. I put the change to
nmbd default behavior (appending to logs instead of overwriting them) into
the "Major Changes" section, but added a "Minor Changes" section for the
things that wouldn't affect the running of Samba itself (eg., the splay
tree for WINS and the change to DEBUG output).

Chris -)-----
(This used to be commit d4b714a6be)
1998-08-31 14:46:19 +00:00
Andrew Tridgell
a2450e6fb3 I looked at the refresh issue a bit more and discovered that Samba
also doesn't switch to a registration if a refresh fails, instead the
name is removed! This makes it even more imortant that a Samba WINS
server accepts refresh requests as registration requests if the name
is not registered. I've gone ahead and implemented this.
(This used to be commit 07f825fc94)
1998-08-31 09:38:50 +00:00
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