1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-11 19:17:08 +03:00

425 Commits

Author SHA1 Message Date
Andrew Bartlett
8b48212245 NT4 is particularly fussy about getting this right.
Andrew Bartlett
(This used to be commit 055a499afb0cab87529f3f991765af95f11cc364)
2003-03-31 02:30:49 +00:00
Gerald Carter
0995fb1eef fix up IPC/LPT:/A: devicetype in tcon_and_X
(This used to be commit a9ccae314fdb4b96115d31083f1a4b26209d597c)
2003-03-28 02:00:19 +00:00
Jeremy Allison
1556b9b53c Fix DOS del command with widelinks = False.
Jeremy.
(This used to be commit ae754e9355c78c22ff5ca5a7f3276e61b4a8fcb7)
2003-03-26 22:15:37 +00:00
Gerald Carter
b7c4fa4cc6 win9x was suffered a case of the blues during a domain logon.
For some reason, explicitly setting the service type during the
tcon&X fixes this.
(This used to be commit c458179d21465165705e6c035776698cb824baf5)
2003-03-25 04:19:04 +00:00
Volker Lendecke
afcb58ac9e NT4 as well as W2k respond with IPC regardless of what service
type the client requested in the TCONX when connecting to IPC$.

It is very well possible that this also applies to the DISK and PRINTER
share types, not only IPC.

Found this while trying to join a HEAD domain from NT4SP6.

Volker
(This used to be commit d42eb2116df4bb82c4199a688a057cd0a9f435ed)
2003-03-20 16:53:07 +00:00
Andrew Bartlett
0273df0bf7 Fix const warnings.
Andrew Bartlett
(This used to be commit fc1408d5d1a8b64dfd20268ab6f4a5f2a007614b)
2003-03-17 09:18:06 +00:00
Andrew Bartlett
7b18c5d164 Make sure we mark the assumption of a fstring parameter for 'devicetype'
in the function prototype, and change callers to respect this.

Andrew Bartlett
(This used to be commit 9f3d3c380120f16d76d68f346799282d61eec892)
2003-03-16 13:24:36 +00:00
Andrew Bartlett
c3221b8377 Found by my new checking code (yet to be commited):
Allow a service longer than 4 characters in CORE tcon.

Andrew Bartlett
(This used to be commit b56613c1cc13ebd5c9ba11a35d2f96c4c3eb0628)
2003-03-15 06:34:32 +00:00
Andrew Bartlett
01289b14a7 Make sure that the 'remote' machine name can only be set once. For some weird
reason, during a Win2003 installation, when you select 'domain join' it sends
one machine name in the name exchange, and litraly 'machinename' during the
NTLMSSP login.

Also fix up winbindd's logfile handling, so that it matches smbd and nmbd.

(This helps me, by seperating the logs by pid).

Andrew Bartlett
(This used to be commit afe5a3832f79131fb74461577f1db0e5e8bf4b6d)
2003-03-08 10:22:50 +00:00
Jeremy Allison
f6f76ad5ed Fix to allow blocking lock notification to be done rapidly (no wait
for smb -> smb lock release). Adds new PENDING_LOCK type to lockdb
(does not interfere with existing locks).
Jeremy.
(This used to be commit 22fc0d48ff2052b4274c65f85050c58b235bf4e4)
2003-02-27 00:43:23 +00:00
Andrew Bartlett
ebb60c0302 Make the 'service' in make_connection() use an fstrcpy(), and an fstring,
becouse that is what it's input (reply_tcon_and_x) uses, and becouse we really
don't want supprises for service names.

Also remove a legacy #define, in favor of the lp_ equiv.

Andrew Bartlett
(This used to be commit 7854a439ac601d3c23703b115cd5a8d4257c7717)
2003-01-12 11:29:02 +00:00
Jeremy Allison
619fcbdb68 Ensure we return disk full by default on short writes.
Jeremy.
(This used to be commit 6a2b7fd82c868d517301f8566cd86e9e4b31546f)
2003-01-08 23:49:37 +00:00
Andrew Bartlett
6d66fb308a BIG patch...
This patch makes Samba compile cleanly with -Wwrite-strings.
 - That is, all string literals are marked as 'const'.  These strings are
always read only, this just marks them as such for passing to other functions.

What is most supprising is that I didn't need to change more than a few lines of code (all
in 'net', which got a small cleanup of net.h and extern variables).  The rest
is just adding a lot of 'const'.

As far as I can tell, I have not added any new warnings - apart from making all
of tdbutil.c's function const (so they warn for adding that const string to
struct).

Andrew Bartlett
(This used to be commit 92a777d0eaa4fb3a1c7835816f93c6bdd456816d)
2003-01-02 09:07:17 +00:00
Simo Sorce
2eb7a80a46 fix for bad check spotted by Ray Simard <ray@sylvan-glade.com>
(This used to be commit 63a669475b0ea319da12a87ee4635b1d071ff29f)
2002-12-31 10:23:37 +00:00
Jeremy Allison
72e16f233d Fix for old DOS client when veto files is set to /.*/
Jeremy.
(This used to be commit 636ab292db8816663c507dd8dbf85078392af5f8)
2002-12-13 19:07:25 +00:00
Jeremy Allison
76e685e628 The element in fsp->print_job should be a RAP jobid, not a uint32 RPC
jobid. This was causing Win9x client "set name" calls to fail.
Still need one cleanup fix to finish.
Jeremy.
(This used to be commit 15f0bad1fc72ff44cd195d34fd530c25a739f42d)
2002-12-05 03:59:56 +00:00
Jeremy Allison
39734e2be8 Added Volker's directory fix - save the attributes
from the first call.
Jeremy.
(This used to be commit 2fe7504a08b692ec791c853e7a260a06142b7595)
2002-12-04 22:48:25 +00:00
Jeremy Allison
e7f2ae9c7f Reformat of reply.c before Volker's patch.
Jeremy.
(This used to be commit d41858b9e6a21f6e01305c33d107d16f2b587d37)
2002-12-03 23:57:55 +00:00
Jeremy Allison
9a0b6a2273 Fixed nasty bug where file writes with start offsets in the range
0x80000000 -> 0xFFFFFFFF would fail as they were being cast
from IVAL (uint32) to SMB_OFF_T (off_t or off64_t, both *signed* types).
The sign extension would cause the offset to be treated as negative.
Thanks to Herb for helping me track this one down (IRIX is good for large
file tests :-).
Jeremy.
PS. That horrid EXEXIST thing has broken configure.....
(This used to be commit fc7d3faed798e7496f2991ec7d795c3b1a3758f5)
2002-12-03 08:02:21 +00:00
Andrew Bartlett
a65dc990f8 As per Jeremy's request back this out, so as to re-gain the implicit length
check.

Andrew Bartlett
(This used to be commit 323088259f19f59008160d56fbcb9df6a6cd0d98)
2002-12-01 19:52:09 +00:00
Andrew Bartlett
3924f97eac No need for fstring manipulation here (Tcon&X), just use string pointers.
Andrew Bartlett
(This used to be commit b072bb9c8469799734507bcdffd4be29211e2610)
2002-12-01 03:16:59 +00:00
Jeremy Allison
250c980119 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
(This used to be commit 82b8f749a36b42e22186297482aad2abb04fab8a)
2002-11-12 23:15:52 +00:00
Jeremy Allison
29546f160c Ensure can_delete returns correct error code.
Jeremy.
(This used to be commit 44db20f9f63d72c2e6e1f4ffedf72d75563369fb)
2002-11-05 22:49:54 +00:00
Jeremy Allison
a5df564e05 Use sendfile in readbraw.
Jeremy.
(This used to be commit a77966645a976d6ae08581c2e92465c48a8e961d)
2002-09-19 18:20:38 +00:00
Jeremy Allison
7af9901fdb Added "use sendfile" per share option.
Jeremy.
(This used to be commit 28466ff42c3328e49d46f7cddfc4bb2fe462d871)
2002-09-18 20:36:50 +00:00
Jeremy Allison
9bab1d0c1a Actually use sendfile if selected.
Jeremy.
(This used to be commit 5881f0a22633ed9fb73e6cd788d0751c4db6cd32)
2002-09-17 19:48:19 +00:00
Jeremy Allison
f74086ccf0 Attempt to make broken Linux sendfile work.... Still in progress.
Jeremy.
(This used to be commit f956a4d29d0d88cd92fac0f0c9f636fc152afe0a)
2002-09-17 01:00:03 +00:00
Jeremy Allison
febd3f929b Added fix for broken Linux (no sendfile64). When offset + count > 2GB
then return ENOSYS and let the upper layer handle it.
Jeremy
(This used to be commit 872dfd87cda585c33c3823b06580cb301567a9b9)
2002-09-14 00:34:46 +00:00
Jeremy Allison
4f613ac61e First cut at portable sendfile code. Only used in readX at the moment
and doesn't actually call sendfile. Needs to be vectored through the
VFS and tested on all supported platforms (Solaris/HPUX/FreeBSD/Linux).
Linux doesn't actually work (2.4.19 kernel) at the moment because it
doesn't have a 64-bit clean sendfile.
Jeremy.
(This used to be commit fd772ca7b16cd86e0d50c7ed8d537c202976a6d2)
2002-09-12 02:12:52 +00:00
Jeremy Allison
36c50870f1 Formatting tidyups before I look at implementing the sendfile in READX.
Jeremy.
(This used to be commit 640f061ab2c0fa772c0b181a5492aaf94b21fd3e)
2002-09-11 01:44:32 +00:00
Jeremy Allison
99928976ea Ensure we've failed a lock with a lock denied message before automatically
pushing it onto the blocking queue.
Jeremy.
(This used to be commit 237e36124cedf0485deaff81f34688fa862c3317)
2002-09-11 01:05:22 +00:00
Jeremy Allison
6b956c8c1e Fix missing braces around push lock call.
Jeremy.
(This used to be commit c93b40f43d5f5027f26c9b6bb906011a9075db2d)
2002-09-11 00:50:13 +00:00
Jeremy Allison
df920a60b5 Added final Steve French patch for "required" attributes with old
dir listings. Added regression test in smbtorture (in HEAD) also.
Jeremy.
(This used to be commit 3c9d24d7c3bad2beb641880a97f0eda5cd3e4ec7)
2002-09-10 01:58:51 +00:00
Jeremy Allison
19a7d460e4 We shouldn't add printing flag here.
Jeremy.
(This used to be commit f00102ba77d752bdf714fa83ac7fdc679e8d7f17)
2002-09-05 04:33:52 +00:00
Jeremy Allison
a1aafce4dc Add bcast_msg_flags to connection struct. Allows sender to filter when
sending broadcast messages. Also initial cut-down of printing notify
messages (not yet finished).
Jeremy.
(This used to be commit aca333719695b278843c59e1c6eb07d6655fd59c)
2002-09-04 19:13:06 +00:00
Andrew Tridgell
c0f37b336b round lock timeouts in lockingX upwards to multiples of 1 second, so a
half second timout rounds to 1 not 0
(This used to be commit 282a64b085162a58560175d14e7ceaef3d6cc9cc)
2002-08-18 20:13:09 +00:00
Shirish Kalele
341e3009a0 Add RESOLVE_DFSPATH to mkdir operations in HEAD.
(This used to be commit cbb6e2fbdb42964107cf033c787a32cedd46e5d8)
2002-08-12 13:35:17 +00:00
Andrew Bartlett
dd5615c042 Make 'remote_machine' private to lib/substitute.c, and fix all the user to use
the new accessor functions.

Andrew Bartlett
(This used to be commit f393de2310e997d05674eb7f1268655373e03647)
2002-08-11 02:30:35 +00:00
Andrew Bartlett
6ddba1e99b Fix the %m security bug again - and try to make it harder to reintroduce in
future.

This moves us from fstrcpy() and global variables to 'get' and 'set' functions.

In particular, the 'set' function sainity-checks the input, in the same way as
we always have.

Andrew Bartlett
(This used to be commit e57a896f06b16fe7e336e1ae63a0c9e4cc75fd36)
2002-08-10 23:20:04 +00:00
Andrew Bartlett
750a1f9e58 Make it clear that the 'service' isn't to be touched. (Make it const).
Andrew Bartlett
(This used to be commit 6465c6727be15cd2e915710bdc3e2f4244ad2083)
2002-07-20 10:17:02 +00:00
Andrew Bartlett
17fc19fe31 Update the smbd reply code a little:
I don't like the idea of muliple netprots - becouse I see potential problems
with people being able to maniplate internal samba variables.

This applies in particular to remote names, so don't allow muliple session
requests either.

Also remove a pstrcpy() from the tcon code, we really don't need it.

Andrew Bartlett
(This used to be commit 2afa291404cfd8dae11120e5e470c38ba067c4b2)
2002-07-20 10:07:47 +00:00
Jeremy Allison
29426b4a50 Gone back to explicit queue number passing as snum - removed encoding of
queueid in job number. This means we must have an internal tdb to store
mapping from 16 bit RAP jobid's to 32 bit RPC jobids.
Jeremy.
(This used to be commit 4ff64f69706cc94d5dba7762754d00790c476963)
2002-07-17 19:12:17 +00:00
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
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
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
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
Jeremy Allison
8f9d7ebb35 Removed unused variable.
Jeremy.
(This used to be commit 4eb29ac559faf29b348a4097a33f9cbf4cf9d057)
2002-03-26 03:07:51 +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