samba.git
23 years agoupdated the WHATSNEW in preparation for an alpha release
Andrew Tridgell [Mon, 31 Aug 1998 05:21:09 +0000 (05:21 +0000)]
updated the WHATSNEW in preparation for an alpha release

23 years agoset a maximum name refresh time of 20 minutes.
Andrew Tridgell [Mon, 31 Aug 1998 04:19:31 +0000 (04:19 +0000)]
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.

23 years agocast the qsort to prevent warnings
Andrew Tridgell [Mon, 31 Aug 1998 03:13:20 +0000 (03:13 +0000)]
cast the qsort to prevent warnings

23 years agobounds check next_token() to prevent possible buffer overflows
Andrew Tridgell [Mon, 31 Aug 1998 03:11:42 +0000 (03:11 +0000)]
bounds check next_token() to prevent possible buffer overflows

23 years agoadded a dest_port parameter to send_mailslot() so we send replies to
Andrew Tridgell [Sun, 30 Aug 1998 17:04:24 +0000 (17:04 +0000)]
added a dest_port parameter to send_mailslot() so we send replies to
the correct port in environments like ip masq.

23 years agoa couple of debug lines
Andrew Tridgell [Sun, 30 Aug 1998 16:33:48 +0000 (16:33 +0000)]
a couple of debug lines

23 years agofinished the asynchronous browse synchronisation code. It even seems
Andrew Tridgell [Sun, 30 Aug 1998 15:58:17 +0000 (15:58 +0000)]
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)

23 years agoThis should fix the zombie problem that luke noticed.
Andrew Tridgell [Sun, 30 Aug 1998 12:32:45 +0000 (12:32 +0000)]
This should fix the zombie problem that luke noticed.

23 years agowe we have successfully done a query on *<1b> from a wins server and
Andrew Tridgell [Sun, 30 Aug 1998 09:50:45 +0000 (09:50 +0000)]
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.

23 years agochanged the way that name query records are sorted in replies. They
Andrew Tridgell [Sun, 30 Aug 1998 08:45:23 +0000 (08:45 +0000)]
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.

23 years agoinclude our netbios names list and our workgroup in the wins.dat hash
Andrew Tridgell [Sun, 30 Aug 1998 06:49:14 +0000 (06:49 +0000)]
include our netbios names list and our workgroup in the wins.dat hash

23 years agodon't put two spaces at the start of lines if logging to stdout
Andrew Tridgell [Sun, 30 Aug 1998 05:57:21 +0000 (05:57 +0000)]
don't put two spaces at the start of lines if logging to stdout
or not timestamping.

23 years agochanged the format of the wins.dat file slightly.
Andrew Tridgell [Sun, 30 Aug 1998 05:43:59 +0000 (05:43 +0000)]
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.

23 years agoallow smbclient to connect to IPC$ as an IPC service
Andrew Tridgell [Sun, 30 Aug 1998 04:37:07 +0000 (04:37 +0000)]
allow smbclient to connect to IPC$ as an IPC service

23 years ago- zero shared memory before freeing it
Andrew Tridgell [Sun, 30 Aug 1998 04:35:54 +0000 (04:35 +0000)]
- 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.

23 years agoadded a function zero_free(void *, int size) that zeros an area of
Andrew Tridgell [Sun, 30 Aug 1998 04:31:55 +0000 (04:31 +0000)]
added a function zero_free(void *, int size) that zeros an area of
memory then frees it. Useful for catching bugs.

23 years agochanged the size of a char array in the userdata_struct from 1 to 16
Andrew Tridgell [Sun, 30 Aug 1998 04:30:57 +0000 (04:30 +0000)]
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.

23 years agoadded some defensive programming to nmbd. This mostly means zeroing
Andrew Tridgell [Sun, 30 Aug 1998 04:27:26 +0000 (04:27 +0000)]
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.

23 years agogot rid of calls to update_protected_database(). It was causing core
Andrew Tridgell [Sat, 29 Aug 1998 14:08:17 +0000 (14:08 +0000)]
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!)

23 years agodon't exit on a SIGPIPE
Andrew Tridgell [Sat, 29 Aug 1998 03:10:39 +0000 (03:10 +0000)]
don't exit on a SIGPIPE

23 years agoThis checking fixes the statcache bug that stopped NetBench from running
Jeremy Allison [Fri, 28 Aug 1998 21:46:29 +0000 (21:46 +0000)]
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.

23 years agonmbd would core dump if a large number of netbios aliases is set. The
Andrew Tridgell [Fri, 28 Aug 1998 14:35:24 +0000 (14:35 +0000)]
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.

23 years agoFixed stat cache statistics calculation. Oops.
Jeremy Allison [Thu, 27 Aug 1998 20:51:12 +0000 (20:51 +0000)]
Fixed stat cache statistics calculation. Oops.
Jeremy.

23 years agoThis is the stat cache code - seems to work fine (needs heavy
Jeremy Allison [Thu, 27 Aug 1998 20:38:53 +0000 (20:38 +0000)]
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.

23 years agooops - added /usr/include/rpc includes.
Luke Leighton [Wed, 26 Aug 1998 14:05:23 +0000 (14:05 +0000)]
oops - added /usr/include/rpc includes.

23 years agouse a separate ZERO_ARRAY() macro instead of ZERO_STRUCT() for
Andrew Tridgell [Wed, 26 Aug 1998 03:06:48 +0000 (03:06 +0000)]
use a separate ZERO_ARRAY() macro instead of ZERO_STRUCT() for
arrays. This prevents (harmless) warnings from some compilers

23 years agoget includes right for systems that use getpwanam()
Andrew Tridgell [Wed, 26 Aug 1998 02:36:27 +0000 (02:36 +0000)]
get includes right for systems that use getpwanam()

23 years agotook all the rpc includes back out until we can work out _why_ freebsd
Andrew Tridgell [Wed, 26 Aug 1998 02:02:55 +0000 (02:02 +0000)]
took all the rpc includes back out until we can work out _why_ freebsd
needs them and what should really be there.

23 years agoadded a warning when loading a parameter that is deprecated
Andrew Tridgell [Wed, 26 Aug 1998 01:57:17 +0000 (01:57 +0000)]
added a warning when loading a parameter that is deprecated

23 years agoFinally got around to updating the man pages for nmbd and smbd to reflect
Christopher R. Hertel [Tue, 25 Aug 1998 15:53:49 +0000 (15:53 +0000)]
Finally got around to updating the man pages for nmbd and smbd to reflect
the changes made re: -a and -o options.

Chris -)-----

23 years agoadded loads of pointless rpcsvc/ and rpc/ include files, all because
Luke Leighton [Tue, 25 Aug 1998 13:17:04 +0000 (13:17 +0000)]
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.

23 years agonote that "alternate permissions" is deprecated in man page
Andrew Tridgell [Tue, 25 Aug 1998 07:19:34 +0000 (07:19 +0000)]
note that "alternate permissions" is deprecated in man page

23 years agoproto changes
Andrew Tridgell [Tue, 25 Aug 1998 06:52:26 +0000 (06:52 +0000)]
proto changes

23 years agosome smbtorture hacks (random IPC calls)
Andrew Tridgell [Tue, 25 Aug 1998 06:42:09 +0000 (06:42 +0000)]
some smbtorture hacks (random IPC calls)

23 years agochanged the default permissions code to do this:
Andrew Tridgell [Tue, 25 Aug 1998 06:40:42 +0000 (06:40 +0000)]
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.

23 years agoAdded code to (correctly) ignore TRANSACT2_SETFILEINFO with SMB_SET_FILE_ALLOCATION_INFO.
Jeremy Allison [Tue, 25 Aug 1998 02:29:17 +0000 (02:29 +0000)]
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.

23 years agoChanged ASSERT macros to SMB_ASSERT macros as some systems already
Jeremy Allison [Mon, 24 Aug 1998 21:49:10 +0000 (21:49 +0000)]
Changed ASSERT macros to SMB_ASSERT macros as some systems already
have an ASSERT macro defined.
Jeremy.

23 years agoresource.h on FreeBSD 2.1 requires sys/time.h to come first.
Luke Leighton [Mon, 24 Aug 1998 18:53:37 +0000 (18:53 +0000)]
resource.h on FreeBSD 2.1 requires sys/time.h to come first.

23 years agoadded ASSERT() and ASSERT_ARRAY() macros and sprinkled them liberally
Andrew Tridgell [Sat, 22 Aug 1998 02:54:21 +0000 (02:54 +0000)]
added ASSERT() and ASSERT_ARRAY() macros and sprinkled them liberally
in the rpc code.

23 years agoexpanded MAX_LOOKUP_SIDS to 30 (I saw 21 in a packet)
Andrew Tridgell [Sat, 22 Aug 1998 02:52:25 +0000 (02:52 +0000)]
expanded MAX_LOOKUP_SIDS to 30 (I saw 21 in a packet)

23 years agoJust tweaking.
Christopher R. Hertel [Fri, 21 Aug 1998 19:57:59 +0000 (19:57 +0000)]
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 -)-----

23 years agonmbd and smbd had different behavior with respect to log files. nmbd would
Christopher R. Hertel [Fri, 21 Aug 1998 17:21:55 +0000 (17:21 +0000)]
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 -)-----

23 years agodon't attempt to answer QFILEINFO/SMB_QUERY_FILE_STREAM_INFO queries -
Andrew Tridgell [Fri, 21 Aug 1998 14:31:43 +0000 (14:31 +0000)]
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 :)

23 years agoAdding first cut of the new Red Hat Linux packaging tools.
John Terpstra [Fri, 21 Aug 1998 14:20:38 +0000 (14:20 +0000)]
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.

23 years agoadded new smb.conf option "panic action". see my samba-technical
Andrew Tridgell [Fri, 21 Aug 1998 11:37:40 +0000 (11:37 +0000)]
added new smb.conf option "panic action". see my samba-technical
explanation.

23 years agouse ZERO_STRUCT() to initialise lots of structures.
Andrew Tridgell [Fri, 21 Aug 1998 09:44:30 +0000 (09:44 +0000)]
use ZERO_STRUCT() to initialise lots of structures.

Luke, you need to do something similar in the rest of the rpc code.
Have fun!

23 years agoadded a macro ZERO_STRUCT() which is useful for initialising
Andrew Tridgell [Fri, 21 Aug 1998 09:43:21 +0000 (09:43 +0000)]
added a macro ZERO_STRUCT() which is useful for initialising
structures declared on the stack.

23 years agoSubmitting the smbtar changes to the main branch as well.
Richard Sharpe [Fri, 21 Aug 1998 09:01:30 +0000 (09:01 +0000)]
Submitting the smbtar changes to the main branch as well.

Regards
Richard Sharpe

23 years agoFix "make clean" to also delete SPROGS.
John Terpstra [Fri, 21 Aug 1998 08:21:08 +0000 (08:21 +0000)]
Fix "make clean" to also delete SPROGS.

23 years agoand get the message right ...
Andrew Tridgell [Fri, 21 Aug 1998 07:29:42 +0000 (07:29 +0000)]
and get the message right ...

23 years agosilly me.
Andrew Tridgell [Fri, 21 Aug 1998 07:25:57 +0000 (07:25 +0000)]
silly me.

perms on lock dir should be 755 not 644.

23 years agofixed a bug in trans2_qfilepathinfo() where we used the length of the
Andrew Tridgell [Fri, 21 Aug 1998 05:58:57 +0000 (05:58 +0000)]
fixed a bug in trans2_qfilepathinfo() where we used the length of the
basename of a file but the whole file name. silly error.

23 years agoFixes for the problem in blocking locks with file_fsp returning the
Jeremy Allison [Fri, 21 Aug 1998 01:30:29 +0000 (01:30 +0000)]
Fixes for the problem in blocking locks with file_fsp returning the
chain_fsp on close (if you don't know what this means, consider yourself
lucky - this one took a day to track down :-).
Jeremy.

23 years agoTurning on blocking locking code. NB. Blocking lock requests that are not
Jeremy Allison [Thu, 20 Aug 1998 19:28:37 +0000 (19:28 +0000)]
Turning on blocking locking code. NB. Blocking lock requests that are not
the head of an SMB request (ie. are part of a chain) will not be queued -
this will be fixed when we move to the new chain code. In practice, this
doesn't seem to cause much of a problem (in my admittedly limited testing)
bug a debug level zero message will be placed in the log when this
happens to help determine how real the problem is.

smbd/locking.c: New debug messages.
smbd/blocking.c: New blocking code - handles SMBlock, SMBlockread and SMBlockingX
smbd/chgpasswd.c: Fix for master fd leak.
smbd/files.c: Tidyup comment.
smbd/nttrans.c: Added fnum to debug message.
smbd/process.c: Made chain_reply() use construct_reply_common(). Added blocking
                lock queue processing into idle loop.
smbd/reply.c: Added queue pushes for SMBlock, SMBlockread and SMBlockingX.
Jeremy.

23 years agotestparm now prints a warning if the lock directory doesn't have 0644
Andrew Tridgell [Thu, 20 Aug 1998 03:11:46 +0000 (03:11 +0000)]
testparm now prints a warning if the lock directory doesn't have 0644
permissions.

23 years agoadded a test for a working setresuid
Andrew Tridgell [Wed, 19 Aug 1998 15:01:03 +0000 (15:01 +0000)]
added a test for a working setresuid

23 years agoBlocking lock code split out...
Jeremy Allison [Wed, 19 Aug 1998 01:49:57 +0000 (01:49 +0000)]
Blocking lock code split out...
Jeremy.

23 years agoMakefile.in: Moved blocking lock code into smbd/blocking.c for link purposes.
Jeremy Allison [Wed, 19 Aug 1998 01:49:34 +0000 (01:49 +0000)]
Makefile.in: Moved blocking lock code into smbd/blocking.c for link purposes.
include/includes.h: Added nterr.h.
locking/locking.c: Moved blocking lock code into smbd/blocking.c for link purposes.
smbd/close.c: Added blocking lock removal to file close.
smbd/filename.c: Tidied up unix_convert() so I could read it (:-) in preparation
                 for the stat_cache code.
smbd/nttrans.c: Added WRITE_ATTRIBUTES check.
smbd/reply.c: Fixed multibyte char problem in wildcard mask.
Jeremy.

23 years agosmbd/nttrans.c: Fixed bug in split off pipe code.
Jeremy Allison [Mon, 17 Aug 1998 23:39:59 +0000 (23:39 +0000)]
smbd/nttrans.c: Fixed bug in split off pipe code.
locking/locking.c: More blocking lock changes.
Jeremy.

23 years agoFixed bug introduced by the recent changes where the chain_fnum
Jeremy Allison [Mon, 17 Aug 1998 22:59:53 +0000 (22:59 +0000)]
Fixed bug introduced by the recent changes where the chain_fnum
could be overwritten in oplock processing code.
Jeremy.

23 years agoremoved some of the rough edges from the splitup
Andrew Tridgell [Mon, 17 Aug 1998 14:11:44 +0000 (14:11 +0000)]
removed some of the rough edges from the splitup

23 years agomove soem variables from server.c that don't belong there.
Andrew Tridgell [Mon, 17 Aug 1998 13:44:05 +0000 (13:44 +0000)]
move soem variables from server.c that don't belong there.

23 years agothis completes the splitup of server.c.
Andrew Tridgell [Mon, 17 Aug 1998 13:11:34 +0000 (13:11 +0000)]
this completes the splitup of server.c.

the splitup was done with an axe, not a scalpel, so there are some
rough edges. I mostly wanted to get the general form right with fine
tuning of what goes where to come later. Still, this is better than
what we had before where server.c was a general repository for
anything that didn't fit elsewhere.

23 years agomore splitting of server.c
Andrew Tridgell [Mon, 17 Aug 1998 07:40:06 +0000 (07:40 +0000)]
more splitting of server.c

created dosmode.c and filename.c

23 years agonow that we have no global arrays we can start to split up the monster
Andrew Tridgell [Mon, 17 Aug 1998 07:15:54 +0000 (07:15 +0000)]
now that we have no global arrays we can start to split up the monster
server.c without breaking things.

this splits off netprot.c and fileio.c for negprot and read/write/seek
handling respectively.

23 years agoadded some optimisation for the case where the number of open files is
Andrew Tridgell [Mon, 17 Aug 1998 06:47:53 +0000 (06:47 +0000)]
added some optimisation for the case where the number of open files is
very large. files.c now promotes a files_struct to the top of the list
if it is used when it is more than 10 elements from the top.

also moved common linked list code for the 5 sets of linked lists that
I've created over the past few days into dlinklist.h (I've explained
to Chris why I didn't use the ubiqx code)

23 years agoreduced the memory footprint a bit by changing some large static int
Andrew Tridgell [Mon, 17 Aug 1998 06:14:52 +0000 (06:14 +0000)]
reduced the memory footprint a bit by changing some large static int
arrays to uchar

23 years agomoved connection_struct handling code into smbd/conn.c and changed it
Andrew Tridgell [Mon, 17 Aug 1998 06:13:32 +0000 (06:13 +0000)]
moved connection_struct handling code into smbd/conn.c and changed it
to a linked list with bitmap format.

23 years agoconverted the policy code to use a linked list and bitmap. This saves
Andrew Tridgell [Mon, 17 Aug 1998 04:54:06 +0000 (04:54 +0000)]
converted the policy code to use a linked list and bitmap. This saves
us a bit of memory.

23 years agomuch cleaner chain pointer handling for both files and pipes.
Andrew Tridgell [Mon, 17 Aug 1998 03:52:05 +0000 (03:52 +0000)]
much cleaner chain pointer handling for both files and pipes.

the chain pointer is now stored as a static and is set whenever a
handle is created or extracted. This also makes the code less error
prone.

23 years agosome cleanups from the conversion of Pipes[] to a linked list. I also
Andrew Tridgell [Mon, 17 Aug 1998 03:06:20 +0000 (03:06 +0000)]
some cleanups from the conversion of Pipes[] to a linked list. I also
removed most cases where a pnum is used and substituted a pipes_struct*.

in files.c I added a offset of 0x1000 to all file handles on the
wire. This makes it much less likely that bad parsing will give us the
wrong field.

23 years agoI think it is pretty much decided that the next major version will be
Andrew Tridgell [Sun, 16 Aug 1998 13:02:35 +0000 (13:02 +0000)]
I think it is pretty much decided that the next major version will be
2.0, so I've updated version.h to reflect this. I've put in
"2.0.0-prealpha".

23 years ago- some tidying up in files.c
Andrew Tridgell [Sun, 16 Aug 1998 06:20:18 +0000 (06:20 +0000)]
- some tidying up in files.c

- handle null fsp in DEBUG() at end of reply_ntcreate_and_X(). Jeremy,
  can you fix this properly?

- get snum right in print queue code in ipc.c (it was broken by my
  connections_struct changes).

23 years agofixed some bugs in the locking_slow code caused by the recent changes.
Andrew Tridgell [Sun, 16 Aug 1998 05:23:54 +0000 (05:23 +0000)]
fixed some bugs in the locking_slow code caused by the recent changes.

also fixed a couple of %s/%d bugs in locking slow that have been there
for a while but are now revealed by the gcc printf argument testing.

23 years agoadded include of sys/resource.h
Andrew Tridgell [Sun, 16 Aug 1998 05:22:01 +0000 (05:22 +0000)]
added include of sys/resource.h

23 years agogot rid of the Files[] array completely (previously I'd just made it
Andrew Tridgell [Sun, 16 Aug 1998 04:08:47 +0000 (04:08 +0000)]
got rid of the Files[] array completely (previously I'd just made it
private to files.c)

It now is a doubly linked list with a bitmap for allocated file
numbers. Similarly for the fd_ptr code. I also changed the default
maximum number of open files to 4096. The static cost is 1 bit per
file.

It all seems to work, and it passes the "does Sue scream" test, but if
you see weird behaviour then please investigate. With the volume of
new code that has gone in there are bound to be one or two bugs
lurking.

note that you must do a "make clean" before building this as many data
structures have changed in size.

23 years agoserver.c: fixed a bug in close_file() with the new files.c handling code
Andrew Tridgell [Sun, 16 Aug 1998 03:04:06 +0000 (03:04 +0000)]
server.c: fixed a bug in close_file() with the new files.c handling code
bitmap.c: added bitmap hanlding code in preparation for increasing the
          default max open files to several thousand

23 years agochanged find_free_file() to file_new().
Andrew Tridgell [Sun, 16 Aug 1998 02:32:55 +0000 (02:32 +0000)]
changed find_free_file() to file_new().

23 years agothis checkin gets rid of the global Files[] array and makes it local
Andrew Tridgell [Sat, 15 Aug 1998 07:27:34 +0000 (07:27 +0000)]
this checkin gets rid of the global Files[] array and makes it local
in files.c

it should now be faily easy to expand the default MAX_OPEN_FILES to
many thousands.

23 years agouse user instead of this_user to prevent global shadowing
Andrew Tridgell [Sat, 15 Aug 1998 03:31:57 +0000 (03:31 +0000)]
use user instead of this_user to prevent global shadowing

23 years agosome more dummy files to ignore
Andrew Tridgell [Sat, 15 Aug 1998 03:28:30 +0000 (03:28 +0000)]
some more dummy files to ignore

23 years agomoved the printing related files to a separate printing/ directory.
Andrew Tridgell [Sat, 15 Aug 1998 03:26:52 +0000 (03:26 +0000)]
moved the printing related files to a separate printing/ directory.

23 years agoconfigure: Changes for extra headers.
Jeremy Allison [Sat, 15 Aug 1998 01:19:26 +0000 (01:19 +0000)]
configure: Changes for extra headers.
configure.in: Source for header changes.
client/clitar.c: Fixed isXXX macros & debugs for gcc pedantic compile.
include/config.h.in: Added MEMSET, BZERO, MEMORY, RPCSVC_YPCLNT, STRINGS headers.
include/includes.h: Headers for the above.
include/smb.h: Made SIGNAL_CAST POSIX by default void (*)(int).
lib/access.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/charset.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/debug.c: Fixed signal functs.
lib/kanji.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/smbrun.c: Fixed isXXX macros & debugs for gcc pedantic compile.
lib/util.c: Fixed isXXX macros & debugs for gcc pedantic compile.
libsmb/namequery.c: Fixed isXXX macros & debugs for gcc pedantic compile.
locking/shmem.c: Fixed isXXX macros & debugs for gcc pedantic compile.
locking/shmem_sysv.c: Fixed error messages in sysV stuff.
nmbd/asyncdns.c: Fixed signal functs.
nmbd/nmbd.c: Fixed isXXX macros & debugs for gcc pedantic compile.
passdb/passdb.c: Fixed isXXX macros & debugs for gcc pedantic compile.
passdb/smbpassfile.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/chgpasswd.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/ipc.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/nttrans.c: Fixed fsp code path.
smbd/password.c: fixed HAVE_YP_GET_DEFAULT_DOMAIN problem.
smbd/printing.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/reply.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/server.c: Fixed isXXX macros & debugs for gcc pedantic compile.
smbd/trans2.c: Fixed core dump bug.
smbd/uid.c: Fixed isXXX macros & debugs for gcc pedantic compile.
Jeremy.

23 years agothis is the bug change to using connection_struct* instead of cnum.
Andrew Tridgell [Fri, 14 Aug 1998 17:38:29 +0000 (17:38 +0000)]
this is the bug change to using connection_struct* instead of cnum.
Connections[] is now a local array in server.c

I might have broken something with this change. In particular the
oplock code is suspect and some .dll files aren't being oplocked when
I expected them to be. I'll look at it after I've got some sleep.

23 years agoremove an unused variable
Andrew Tridgell [Fri, 14 Aug 1998 06:26:31 +0000 (06:26 +0000)]
remove an unused variable

23 years agodefine INADDR_NONE if not already defined
Andrew Tridgell [Fri, 14 Aug 1998 06:25:26 +0000 (06:25 +0000)]
define INADDR_NONE if not already defined

23 years agoMakefile.in: Changed so that make proto will work with ldap & nisplus.
Jeremy Allison [Fri, 14 Aug 1998 02:02:40 +0000 (02:02 +0000)]
Makefile.in: Changed so that make proto will work with ldap & nisplus.
locking/locking.c: Made #ifdef'ed out functions static for Make proto.
lib/util.c: Re-instated old mask_match code for UNIX filesystem checks
            only. Client calls use the new mask_match code. Changed the
            name of the old function to unix_mask_match.
Jeremy.

23 years agoAdded the '--with-netatalk' option to turn Netatalk support on at
John Blair [Thu, 13 Aug 1998 19:00:04 +0000 (19:00 +0000)]
Added the '--with-netatalk' option to turn Netatalk support on at
compile-time.

23 years agoAdded the APPLEDOUBLE macro for the name of the directory containing
John Blair [Thu, 13 Aug 1998 18:56:09 +0000 (18:56 +0000)]
Added the APPLEDOUBLE macro for the name of the directory containing
a file's Macintosh resource fork (normally .AppleDouble under Netatalk).

23 years agoUh... I'm checking stuff in. Jeremy will by *so* pleased :)
John Blair [Thu, 13 Aug 1998 18:46:35 +0000 (18:46 +0000)]
Uh... I'm checking stuff in.  Jeremy will by *so* pleased :)

netatalk.c contains the meat of the code required to move Macintosh resource
forks around when Windows users manipulate files created by a mac.  This
allows for greater integration between netatalk and Samba, but is, of course,
potentially a recipe for disaster.  All the netatalk related code is insulated
by #ifdefs from the standard build.

23 years agomove smbd/print_svid.o from SMBD_OBJ1 to PARAM_OBJ so that nmbd, swat, etc.
Herb Lewis [Thu, 13 Aug 1998 17:38:26 +0000 (17:38 +0000)]
move smbd/print_svid.o from SMBD_OBJ1 to PARAM_OBJ so that nmbd, swat, etc.
will link when SYSV is defined. We may want to restructure this later and
move this to param instead of smbd ???

23 years agoreturn to old behaviour of dumping ALL parameters
Herb Lewis [Thu, 13 Aug 1998 16:32:20 +0000 (16:32 +0000)]
return to old behaviour of dumping ALL parameters

23 years agoHAVE_STATVFS should be STAT_STAVFS (caused printing to break on IRIX).
Jeremy Allison [Thu, 13 Aug 1998 16:20:37 +0000 (16:20 +0000)]
HAVE_STATVFS should be STAT_STAVFS (caused printing to break on IRIX).
Jeremy.

23 years agoMore blocking lock code - still #ifdef'ed out - under development.
Jeremy Allison [Thu, 13 Aug 1998 02:10:45 +0000 (02:10 +0000)]
More blocking lock code - still #ifdef'ed out - under development.
Jeremy.

23 years agoDebug output formatting change. I'm trying to combine log lines that
Christopher R. Hertel [Thu, 13 Aug 1998 00:01:02 +0000 (00:01 +0000)]
Debug output formatting change.  I'm trying to combine log lines that
really should be together.  Chris -)-----

23 years agoChanged a call to fflush(dbg) to dbgflush().
Christopher R. Hertel [Wed, 12 Aug 1998 15:27:13 +0000 (15:27 +0000)]
Changed a call to fflush(dbg) to dbgflush().

23 years agoI've added a dbgflush() function to debug.c. Calling this will cause the
Christopher R. Hertel [Wed, 12 Aug 1998 14:51:17 +0000 (14:51 +0000)]
I've added a dbgflush() function to debug.c.  Calling this will cause the
debug format buffer to be written out (and reset).  fflush() is also called
to force the issue.  I replaced the call to fflush() in client.c with a
call to dbgflush(), which seems to have fixed the problem that Andrew was
working on (i.e., that the prompt was not displayed when using smbclient).

Chris -)-----

23 years agofixed the nested comment - Jeremy, do you want that unbecome_user() or
Andrew Tridgell [Wed, 12 Aug 1998 10:09:41 +0000 (10:09 +0000)]
fixed the nested comment - Jeremy, do you want that unbecome_user() or
not?

23 years agoinclude/smb.h: Removed dir_ptr. Not needed.
Jeremy Allison [Tue, 11 Aug 1998 23:28:35 +0000 (23:28 +0000)]
include/smb.h: Removed dir_ptr. Not needed.
locking/locking.c: First cut a blocking lock code. #ifdef'ed out for now.
locking/locking_shm.c: Removed dir_ptr. Not needed.
smbd/nttrans.c: More work on ChangeNotify - return is not an error and needs
                to be handled as a nttrans with zero params. Removed dir_ptr. Not needed.
smbd/reply.c:
smbd/server.c:
smbd/trans2.c: Removed dir_ptr. Not needed.

Hmmm. At the moment smbclient is broken - doesn't issue prompt correctly.
This needs looking at.

Jeremy.

23 years agoQuick fix for a small problem. If you run 'nmbd -?' you'd get the usage
Christopher R. Hertel [Tue, 11 Aug 1998 21:25:55 +0000 (21:25 +0000)]
Quick fix for a small problem.  If you run 'nmbd -?' you'd get the usage
message *but the daemon would start anyway*.  I've added a call to exit()
in the default: case of the option processing loop.

Chris -)-----