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

1666 Commits

Author SHA1 Message Date
Jeremy Allison
b935fc0862 Fixed bug introduced by the recent changes where the chain_fnum
could be overwritten in oplock processing code.
Jeremy.
(This used to be commit 908a583b48)
1998-08-17 22:59:53 +00:00
Andrew Tridgell
28788ca46c removed some of the rough edges from the splitup
(This used to be commit 722312c326)
1998-08-17 14:11:44 +00:00
Andrew Tridgell
dd2e202e5c move soem variables from server.c that don't belong there.
(This used to be commit f92475aa3c)
1998-08-17 13:44:05 +00:00
Andrew Tridgell
c3effa8b59 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.
(This used to be commit a6d194886a)
1998-08-17 13:11:34 +00:00
Andrew Tridgell
0922615405 more splitting of server.c
created dosmode.c and filename.c
(This used to be commit 534a90ca44)
1998-08-17 07:40:06 +00:00
Andrew Tridgell
4c5c26b1ef 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.
(This used to be commit b3d7014643)
1998-08-17 07:15:54 +00:00
Andrew Tridgell
72ed7049d8 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)
(This used to be commit 1eb9ae2996)
1998-08-17 06:47:53 +00:00
Andrew Tridgell
69c6f1624d reduced the memory footprint a bit by changing some large static int
arrays to uchar
(This used to be commit 01b642a379)
1998-08-17 06:14:52 +00:00
Andrew Tridgell
983dc71c98 moved connection_struct handling code into smbd/conn.c and changed it
to a linked list with bitmap format.
(This used to be commit b7aaab1b6b)
1998-08-17 06:13:32 +00:00
Andrew Tridgell
4a68715c25 converted the policy code to use a linked list and bitmap. This saves
us a bit of memory.
(This used to be commit 27da84b90d)
1998-08-17 04:54:06 +00:00
Andrew Tridgell
8978aae696 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.
(This used to be commit 068a862982)
1998-08-17 03:52:05 +00:00
Andrew Tridgell
f2d538a105 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.
(This used to be commit 8bc2627ff2)
1998-08-17 03:06:20 +00:00
Andrew Tridgell
c5e2c883c0 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".
(This used to be commit f1c67a00b8)
1998-08-16 13:02:35 +00:00
Andrew Tridgell
b590b27b45 - 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).
(This used to be commit b3dd378575)
1998-08-16 06:20:18 +00:00
Andrew Tridgell
6daa579e0f 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.
(This used to be commit 16228c185a)
1998-08-16 05:23:54 +00:00
Andrew Tridgell
23294e6fc1 added include of sys/resource.h
(This used to be commit bf136b4fa8)
1998-08-16 05:22:01 +00:00
Andrew Tridgell
739d0b1ddc 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.
(This used to be commit 79755ce970)
1998-08-16 04:08:47 +00:00
Andrew Tridgell
a7acf10566 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
(This used to be commit f573a65b67)
1998-08-16 03:04:06 +00:00
Andrew Tridgell
6a6e8958ad changed find_free_file() to file_new().
(This used to be commit 3daee29636)
1998-08-16 02:32:55 +00:00
Andrew Tridgell
127655cc88 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.
(This used to be commit b088c804f9)
1998-08-15 07:27:34 +00:00
Andrew Tridgell
37d5ba8eae use user instead of this_user to prevent global shadowing
(This used to be commit 76e523907c)
1998-08-15 03:31:57 +00:00
Andrew Tridgell
c4a202e72e some more dummy files to ignore
(This used to be commit 571b522bec)
1998-08-15 03:28:30 +00:00
Andrew Tridgell
570f8e9a77 moved the printing related files to a separate printing/ directory.
(This used to be commit d933a47be6)
1998-08-15 03:26:52 +00:00
Jeremy Allison
e13aeea928 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.
(This used to be commit 1b9cbcd02e)
1998-08-15 01:19:26 +00:00
Andrew Tridgell
b9623ab59e 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.
(This used to be commit c7ee025ead)
1998-08-14 17:38:29 +00:00
Andrew Tridgell
58fb3c31c0 remove an unused variable
(This used to be commit 6f9228b011)
1998-08-14 06:26:31 +00:00
Andrew Tridgell
2bb8f8ce43 define INADDR_NONE if not already defined
(This used to be commit 7446540017)
1998-08-14 06:25:26 +00:00
Jeremy Allison
3cf6cc6134 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.
(This used to be commit b68e756ff5)
1998-08-14 02:02:40 +00:00
John Blair
2ad339b6ff Added the '--with-netatalk' option to turn Netatalk support on at
compile-time.
(This used to be commit 2ba4b66a74)
1998-08-13 19:00:04 +00:00
John Blair
c629b4c53f Added the APPLEDOUBLE macro for the name of the directory containing
a file's Macintosh resource fork (normally .AppleDouble under Netatalk).
(This used to be commit 1313451f21)
1998-08-13 18:56:09 +00:00
John Blair
d0cd2fca4f 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.
(This used to be commit 05a5243d84)
1998-08-13 18:46:35 +00:00
Herb Lewis
510bcdc0a0 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 ???
(This used to be commit 3eff609b7a)
1998-08-13 17:38:26 +00:00
Herb Lewis
b6808ed8b2 return to old behaviour of dumping ALL parameters
(This used to be commit aa5648ce83)
1998-08-13 16:32:20 +00:00
Jeremy Allison
5a5b4258ed HAVE_STATVFS should be STAT_STAVFS (caused printing to break on IRIX).
Jeremy.
(This used to be commit 83c54b01ba)
1998-08-13 16:20:37 +00:00
Jeremy Allison
ce333b25db More blocking lock code - still #ifdef'ed out - under development.
Jeremy.
(This used to be commit c9695bdf2e)
1998-08-13 02:10:45 +00:00
Christopher R. Hertel
b067f0e2b9 Debug output formatting change. I'm trying to combine log lines that
really should be together.  Chris -)-----
(This used to be commit 8880fc58fa)
1998-08-13 00:01:02 +00:00
Christopher R. Hertel
5032122753 Changed a call to fflush(dbg) to dbgflush().
(This used to be commit c626828471)
1998-08-12 15:27:13 +00:00
Christopher R. Hertel
08feb74221 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 -)-----
(This used to be commit a97460869f)
1998-08-12 14:51:17 +00:00
Andrew Tridgell
fcb5437da6 fixed the nested comment - Jeremy, do you want that unbecome_user() or
not?
(This used to be commit 638ee7d265)
1998-08-12 10:09:41 +00:00
Jeremy Allison
b1778b6b57 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.
(This used to be commit ddfbcc0581)
1998-08-11 23:28:35 +00:00
Christopher R. Hertel
ea8631d249 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 -)-----
(This used to be commit c69727bd29)
1998-08-11 21:25:55 +00:00
Christopher R. Hertel
a0082c340a I've come up with a different scheme for doing the DEBUG() and DEBUGADD()
macros that meets the RVALUE requirement and doesn't use the (a?b:c) format
that Andrew called "ugly".  I've added the new macros but kept the old
macros within a #if 0..#else..#endif block in case I've missed somthing.

Basically, I've used

  (void)( (a) && (b) )

or

  (void)( (a) && (b) && (c) )

instead of

  ( (a) ? (void)(b) : (void)(c) )

or similar.  I have this compiled and running now.

Here's the diff:

$ cvs diff smb.h
Enter passphrase for RSA key 'crh@Ruby':
Index: smb.h
===================================================================
RCS file: /data/cvs/samba/source/include/smb.h,v
retrieving revision 1.172
diff -r1.172 smb.h
143a144,145
> #if 0
>
150a153,164
>
> #else
>
> #define DEBUG( level, body ) \
>   (void)( (DEBUGLEVEL >= (level)) \
>        && (dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) )) \
>        && (dbgtext body) )
>
> #define DEBUGADD( level, body ) \
>   (void)( (DEBUGLEVEL >= (level)) && (dbgtext body) )
>
> #endif

Chris -)-----
(This used to be commit 53b433e6ab)
1998-08-11 18:56:03 +00:00
Christopher R. Hertel
e1b12729f6 Cleaned up some lint warnings (functions with return values that were
ignored).
(This used to be commit 8fedcfc48d)
1998-08-11 18:07:18 +00:00
Herb Lewis
392a9f7225 strip out extra spaces from smbclient output that were added recently
(This used to be commit 5f5562ff60)
1998-08-11 17:34:00 +00:00
Christopher R. Hertel
7938e492ba Removed a stray semicolon in the DEBUGADD() macro.
(This used to be commit efa67d6b2b)
1998-08-11 15:54:15 +00:00
Christopher R. Hertel
6a9170b1ae I've added a test for lp_loaded() so that timestamps *will* be output
before the config file has been loaded.  Otherwise the default is no
timestamp.

Chris -)-----
(This used to be commit fd7eaed59e)
1998-08-11 15:47:26 +00:00
Andrew Tridgell
ab1bfe5b0d fixed a nasty bug in debug.c
Debug1() was being called like this:

      Debug1( format_bufr );

but if format_bufr contains any %s or other % arguments (such as when
processing a smb.conf file containing % macros) then smbd dies a
horrible death.

The quick fix is to use:

	Debug1( "%s", format_bufr);
(This used to be commit 5ae0401281)
1998-08-11 14:09:05 +00:00
Andrew Tridgell
e107f73082 make sure that a fault cannot occur twice. The new Debug1() code is
causing seg faults on my machine and because the fault code calls
DEBUG() it is looping!

now to find the bug in the Debug1() code ...
(This used to be commit 83122bae22)
1998-08-11 13:55:16 +00:00
Jeremy Allison
9042aa41c3 Makefile.in: Added CHECK target back in (at Herb's request). Added
manpath in (although we don't currently use it).
client/client.c: Added John Blair's fixes for "put -".
include/nterr.h: Added NT_STATUS_NOTIFY_ENUM_DIR error code.
smbd/nttrans.c: Added in devious fix for one-shot NT change notify bug.
Jeremy.
(This used to be commit 4ac3091e57)
1998-08-11 02:13:01 +00:00
Herb Lewis
cd9bfc6310 update for new directory structure
(This used to be commit 5fc8b4a1d5)
1998-08-10 22:36:11 +00:00