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

1697 Commits

Author SHA1 Message Date
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
Andrew Tridgell
038e3433d3 added new smb.conf option "panic action". see my samba-technical
explanation.
(This used to be commit c6899df44c)
1998-08-21 11:37:40 +00:00
Andrew Tridgell
57f1129cdc use ZERO_STRUCT() to initialise lots of structures.
Luke, you need to do something similar in the rest of the rpc code.
Have fun!
(This used to be commit bdd8aaa544)
1998-08-21 09:44:30 +00:00
Andrew Tridgell
7d657984bb added a macro ZERO_STRUCT() which is useful for initialising
structures declared on the stack.
(This used to be commit f323af8fce)
1998-08-21 09:43:21 +00:00
Richard Sharpe
04c4ca1b24 Submitting the smbtar changes to the main branch as well.
Regards
Richard Sharpe
(This used to be commit 749ec1e0a7)
1998-08-21 09:01:30 +00:00
John Terpstra
2aa4ae7311 Fix "make clean" to also delete SPROGS.
(This used to be commit 268cbede0f)
1998-08-21 08:21:08 +00:00
Andrew Tridgell
1a5a571b41 and get the message right ...
(This used to be commit 0d641d0ceb)
1998-08-21 07:29:42 +00:00
Andrew Tridgell
cc32fc2af0 silly me.
perms on lock dir should be 755 not 644.
(This used to be commit 930a4292e9)
1998-08-21 07:25:57 +00:00
Andrew Tridgell
60cf7ad5cf fixed a bug in trans2_qfilepathinfo() where we used the length of the
basename of a file but the whole file name. silly error.
(This used to be commit 6e00de7a1d)
1998-08-21 05:58:57 +00:00
Jeremy Allison
81b580fd22 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.
(This used to be commit 193cb53824)
1998-08-21 01:30:29 +00:00
Jeremy Allison
dc76502cd8 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.
(This used to be commit e1dd03ecda)
1998-08-20 19:28:37 +00:00
Andrew Tridgell
852519282d testparm now prints a warning if the lock directory doesn't have 0644
permissions.
(This used to be commit 10303a78d4)
1998-08-20 03:11:46 +00:00
Andrew Tridgell
8487f959d1 added a test for a working setresuid
(This used to be commit dbe333b590)
1998-08-19 15:01:03 +00:00
Jeremy Allison
3f153e592b Blocking lock code split out...
Jeremy.
(This used to be commit 9cdb148ef5)
1998-08-19 01:49:57 +00:00
Jeremy Allison
12de4034c7 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.
(This used to be commit 148eaba3da)
1998-08-19 01:49:34 +00:00
Jeremy Allison
1e6837837a smbd/nttrans.c: Fixed bug in split off pipe code.
locking/locking.c: More blocking lock changes.
Jeremy.
(This used to be commit 2ca4fc95a4)
1998-08-17 23:39:59 +00:00
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