1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-23 09:57:40 +03:00

1772 Commits

Author SHA1 Message Date
Andrew Tridgell
e7b729e0d9 make sure we don't walk past the end of the current SMB buffer when
pulling a string
this might explain a serious filename corruption bug that Quantum QA spotted
(This used to be commit a877eae24becad9e0cd5b33ffe0916a20d5ba227)
2002-04-16 06:15:28 +00:00
Andrew Tridgell
a95d731fa4 make sure that we leave the tree unused after disconnecting
(This used to be commit e75e4ad7d3af5beee48b3001fd904eede8df033f)
2002-04-15 23:48:39 +00:00
Gerald Carter
4d917cd8f5 merge from SAMBA_2_2
(This used to be commit fedc11cab16dbecfdae858fc48d629b9172c0fb8)
2002-04-15 13:35:18 +00:00
Andrew Tridgell
3fca495f8c this fixes the displaying of free disk space for DOS6 clients. Win2000
changes its behaviour based on the negotiated protocol for the
SMBdskattr SMB
(This used to be commit b693917530d649e22a677bd3bb1adedbfdd89bba)
2002-04-15 06:57:17 +00:00
Andrew Tridgell
a99e810bda it looks like it is possible for a w2k client to send a spnego auth without sending the negotiate - try to cope
(This used to be commit 95278aa41f654108d9d20cd0096a34caf175d32b)
2002-04-14 09:00:05 +00:00
Andrew Tridgell
24065c0bf5 win2000 does not check the permissions on the share directory on
tconx, so win2000 clients don't expect a permissions error in
tconx. We now match this behaviour, by only checking that the
directory exists during tconx and relying on the permissions on other
calls to protect directories
(This used to be commit 4fc476686476da31cc2b45badb05cb0765259f98)
2002-04-14 06:24:17 +00:00
Andrew Tridgell
7897bf7367 two time handling bugfixes
- the pending mtime overrides the current file time in setfileinfo

- a later wtime can override a mtime on setfileinfo

this fixes the date of file copies in win2000
(This used to be commit 79630bb2c0a99c961a0a1c67223899e39685ee2c)
2002-04-13 13:30:06 +00:00
Andrew Bartlett
163a855d26 Better handling of uid/gid -> RID and RID -> uid/gid code.
All uids and gids must create valid RIDs, becouse other code expects this, and
can't handle the failure case. (ACL code in particular)

Allow admins to adjust the base of the RID algorithm, so avoid clashes with
users brought in from NT (for example).

Put all the algorithm code back in one place, so that this change is global.

Better coping with NULL sid pointers - but it still breaks a lot of stuff.

BONUS: manpage entry for new paramater :-)

counter based rids for normal users in tdbsam is disabled for the timebeing,
idra and I will work out some things here soon I hope.

Andrew Bartlett
(This used to be commit 5275c94cdf0c64f347d4282f47088d084b1a7ea5)
2002-04-13 09:35:52 +00:00
Jeremy Allison
5c2dfd959c Tidy up winbindd debug. Added Bill Moran's hide unreadable fix.
Jeremy.
(This used to be commit a9895fcb30cdcb572cd254b0d370d79f95c7214d)
2002-04-13 02:24:07 +00:00
Andrew Tridgell
d621bf11ea fixed the display of the 'size on disk' property of files from w2k.
(This used to be commit 699a1d9f46fcc9d6aad56ed1b44d1295ee828b2b)
2002-04-12 12:52:18 +00:00
Andrew Tridgell
3067ec21fb - added a mangling test suite that measures the collision rate on
randomised filenames

- fixed several mangling bugs that the test suite pointed out
(This used to be commit 858fa7efc34f6e7cdf8500900aed3f7943c91348)
2002-04-12 03:26:19 +00:00
Andrew Bartlett
4c0399915c Much better support for both non-algorithic RIDs (where the RID is stored in
the passdb) and RIDs not in the passdb, due to being NIS users etc.

The main fix here is to add become_root()/unbecome_root() at critical places.

This (finally) fixes the bug where you could not see local users's names
in a file's security properties as non-root.  Tested.

The similar bug in uid_to_sid is also fixed, but is not (yet) Tested.

Andrew Bartlett
(This used to be commit 79327a305e20d78ab5ca21d01c39b5f49dc0d632)
2002-04-11 23:43:40 +00:00
Andrew Tridgell
41b8137169 don't try to return a void
(This used to be commit 51b4de0ae3b05c4f34a645ae9c6e395bc37226e6)
2002-04-11 14:59:27 +00:00
Andrew Tridgell
5c0e682c4a - the 36^6 hash space gives 31 bits, not 32 bits. We need to mask the
hash to suit
- the prefix ends at the last dot, not the first
(This used to be commit 91a3ccd3e790f980421c1ee93388e19e87026b29)
2002-04-11 14:20:18 +00:00
Andrew Tridgell
1ed0c5ea70 a few debug statements (disabled)
(This used to be commit 582f753eac7a111a93a8d6c049398a0998af848f)
2002-04-11 14:03:30 +00:00
Andrew Tridgell
4c889cb8b6 don't treat '.' as FLAG_ASCII, instead handle it separately
(This used to be commit ecdddd674f2ffad16eaa01a68c9c91ff3b355b3f)
2002-04-11 13:35:28 +00:00
Andrew Tridgell
bf9cb3c5f3 - tidier flag checking code
- finished the is_mangled() function
(This used to be commit 128bec2071d640c775b58322256ac6bb03363741)
2002-04-11 12:14:55 +00:00
Andrew Tridgell
ef88357403 added some more comments
(This used to be commit 8d6f2e239940cbac44f6f0e9d584a47553acbc56)
2002-04-11 11:46:42 +00:00
Andrew Tridgell
b1f04740ad some optimisations to the new mangling system
(This used to be commit 30b35d0c1f41f72ebe230905f76db8807802a6cc)
2002-04-11 10:52:59 +00:00
Andrew Tridgell
714518e550 this adds a completely new hash based mangling scheme
the hash for this scheme is *much* larger (approximately 31 bits) and
the code is written to be very fast, correctly handling multibyte
while not doing any actual multi-byte conversions in the vast majority
of cases

you can select this scheme using "mangling method = hash2", although I
may make it the default if it works out well.
(This used to be commit bb173c1a7e2408ced967ebac40b5e3f852ccd3a1)
2002-04-11 09:56:38 +00:00
Andrew Tridgell
9cd0306baa This split the mangling code up to allow for the possibility of multiple
mangling implementation, selectable using "mangling method = " in smb.conf

It also tidies the interface a little, although it is still nasty.
(This used to be commit be23d87a178e7d0691e7d942adf89bb3d2d533c2)
2002-04-11 02:20:56 +00:00
Jeremy Allison
4ad0ff29bf Added Shirish's client side caching policy change.
Jeremy.
(This used to be commit 16015c07eab2e57fa3771051e3e08fde21757cfa)
2002-04-10 01:04:13 +00:00
Jeremy Allison
c36b31783e Shirish pointed out more areas we should be doing roundups for allocation size.
Jeremy.
(This used to be commit cda9fccd629d084039af642d9177865d88553be6)
2002-04-09 18:10:09 +00:00
Simo Sorce
9c1665b299 a fix yet committed to 2.2 sometimes ago and reintroduced here!
(This used to be commit aff7073dabb6253fea4729f52240a25f90206699)
2002-04-08 09:29:28 +00:00
Andrew Bartlett
c21ff8f762 Reintroduce the 2.2 name mangling code, until we get are more flexible solution.
Even for a hash/cache setup, this code needs some more work, in particular
it needs to use mangle_get_prefix() etc and to move to unicode internals.

Andrew Bartlett
(This used to be commit ad8aa470575c39fcbc7f1440bf1081d7ea31c0aa)
2002-04-08 01:58:44 +00:00
Jeremy Allison
2a664807c5 Fixed the error bad path for recursive mkdir so mkdir \a\b\c\d works.
Forward ported some of the code tidyups from 2.2.
Jeremy.
(This used to be commit 2475c09b354cc7b5f4ce384e4497207d30f619bb)
2002-04-02 19:34:36 +00:00
Jean-François Micouleau
14f0beb21c added shutdown to smbd
J.F.
(This used to be commit 51a5bbfee71e064c73283a090e9e922a31b1e21b)
2002-03-29 14:28:38 +00:00
Jeremy Allison
906d3bda26 Ensure that setting file length can return disk full on failure.
Jeremy.
(This used to be commit 14e2beca9b8fa1c8d893013f52f42b2721a82758)
2002-03-28 01:00:31 +00:00
Jeremy Allison
7d7c594644 Removed HAVE_LIBDL from most places (except system.c). Added checks for
dlopen & friends into configure.in. This should help building on *BSD
where dl*** calls are in libc.
Jeremy
(This used to be commit ac1baba35d7a399bf800ced49a4384e39955e3eb)
2002-03-27 03:00:39 +00:00
Jeremy Allison
8f9d7ebb35 Removed unused variable.
Jeremy.
(This used to be commit 4eb29ac559faf29b348a4097a33f9cbf4cf9d057)
2002-03-26 03:07:51 +00:00
Jeremy Allison
81a0d5b5e9 Matched W2K *insane* open semantics....
Jeremy.
(This used to be commit 6819e81da490914d2db91c4d2419d408b8d4c818)
2002-03-26 00:38:12 +00:00
Andrew Bartlett
1c92b99c80 Correctly store the hostname of the remote machine if so configured. If the
reverse DNS fails, then store the IP.
(This used to be commit d97771aa80b48fbdb9cae3e9712e35fcc895b148)
2002-03-23 09:00:27 +00:00
Jeremy Allison
c90cd26e94 Fix the mp3 rename bug - also tidy up our open code and remove the special
cases for rename and unlink. Had to add desired_access into the share mode record.
Jeremy.
(This used to be commit 3b1b8ac43535fb0839c5474fa55bf7150f6cde31)
2002-03-23 02:57:44 +00:00
Jeremy Allison
bffc69a877 Fix stupid typo !
Jeremy.
(This used to be commit d0b58f66edeac516bde2dff79ab5cf529c37954b)
2002-03-21 21:23:22 +00:00
Herb Lewis
1783dcd2f1 return . and .. first in readdir - this fixes masktest on IRIX which
returns . then single letter files then .. then all other files.
(This used to be commit d4d9361eec11f50c780ed4c79bc9775ac24d8c0e)
2002-03-21 14:00:13 +00:00
Jeremy Allison
2eab97160b HEAD only fix for truncate from Alexander Bokovoy <a.bokovoy@sam-solutions.net>.
This code needs replacing with the trans2.c from 2.2.x.
Jeremy.
(This used to be commit bc8d4b98807ece734db3e1c3a2baabf4b28e7b4f)
2002-03-20 19:29:06 +00:00
Jeremy Allison
418d5684a2 Ensure we get a real fd when opening for set file allocation.
Jeremy.
(This used to be commit 00cabb2346fb11c5568b6c7a038c313ae293a0c2)
2002-03-20 00:58:23 +00:00
Jeremy Allison
b9e91d2a8e Remove the "stat open" code - make it inline. This should fix the
bugs with opening and renaming mp3 files, also the word rename
problems that people have had for a while.
Needs a make clean :-) make.
Also added JohnR's printing fix.
Jeremy.
(This used to be commit 504e5ef0494c54efbd0357e334cb2aa5a9eb9c14)
2002-03-20 00:46:53 +00:00
Jeremy Allison
ffadd471b9 Sync up vfs changes from 2.2.x.
Jeremy.
(This used to be commit ad1e858d8e72adf924ff435eab8da3e60842e2e6)
2002-03-19 02:32:39 +00:00
Tim Potter
ab13654dc9 Renamed get_nt_error_msg() to nt_errstr().
(This used to be commit 1f007d3ed41c1b71a89fa6be7d173e67e927c302)
2002-03-17 04:36:35 +00:00
Gerald Carter
65c007b583 syncing up printing code with SAMBA_2_2 (already done some merges
in the reverse).

  * add in new printer change notify code from SAMBA_2_2

  * add in se_map_standard() from 2.2 in _spoolss_open_printer_ex()

  * sync up the _print_queue_struct in smb.h (why did someone change the
    user/file names in fs_user/fs_file (or vice-versa) ? )

  * sync up some cli_spoolss_XXX functions
(This used to be commit 5760315c1de4033fdc22684c940f18010010924f)
2002-03-15 08:14:10 +00:00
Andrew Bartlett
d19e06c0c6 Actually include some *information* in the mangle debug messages.
In particular this shows the filename, prefix and counters involved.

The unicode -> unix converion only occours for the error case.

Andrew Bartlett
(This used to be commit 9c8de8c6cf44ead0719efa48a34c9c9d54402ac6)
2002-03-14 22:52:19 +00:00
Jeremy Allison
840279f342 Now we have reliable signals take SIGTERM inband.
Jeremy.
(This used to be commit cad82926a8baf7605cef81f0e0d4daa8e527e6ee)
2002-03-14 02:15:08 +00:00
Jeremy Allison
47c2477233 Get the current directory after becoming root.
Jeremy.
(This used to be commit f032c6f710cb0edcf02f25db81c83478b9a8ab1e)
2002-03-14 00:58:53 +00:00
Tim Potter
2ba1950c79 Fixed bodgy printf arguments in debug statment.
Who would have guessed it - we now use floating point maths in Samba.
(This used to be commit 6a053fa770b69f21fef52966a0b577b7ac9e817e)
2002-03-13 22:55:47 +00:00
Jeremy Allison
5e3b923124 include/smb_macros.h: Don't round up an allocation if the size is zero.
"One of these locks is not like the others... One of these locks is not
quite the same" :-). When is a zero timeout lock not zero ? When it's
being processed by Windows 2000 of course.. This code change, ugly though
it is - completely fixes the foxpro/access multi-user file system database
problems that people have been having. I used a *wonderful* test program
donated by "Gerald Drouillard" <gerald@drouillard.ca> which allowed me
to completely reproduce this problem, and to finally determine the correct
fix. This also explains why Windows 2000 is *so slow* when responding to
the smbtorture lock tests. I *love* it when all these things come together
and finally make sense :-).
Jeremy.
(This used to be commit 8aa9860ea2ea7f5aed4b6aa12794fffdfa81b0d0)
2002-03-13 20:28:19 +00:00
Andrew Tridgell
8fe1df84e1 if we know that the SID is local then don't try via winbindd
(This used to be commit 1a8f3ba3ab7717c481e3fb4f1ea8938461160d09)
2002-03-13 00:30:26 +00:00
Andrew Tridgell
85d7e70d1f fixed mapping of SIDs for local users
(This used to be commit df9e345366078ccaa94df7c2f2e33b292605e88a)
2002-03-13 00:19:40 +00:00
Jim McDonough
b9377e811e Missing comma from systems that have ACLs.
(This used to be commit 96e4282dca757e8621d23a54fb7203c93d2d41fc)
2002-03-12 16:32:25 +00:00
Jeremy Allison
3bb219161a Added POSIX ACL layer into the vfs.
Jeremy.
(This used to be commit 7d59445b6962547a8938928a9371651a09e26516)
2002-03-12 00:08:08 +00:00