1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-05 12:23:50 +03:00
Commit Graph

800 Commits

Author SHA1 Message Date
Volker Lendecke
8e64107b78 Convert OpenDir to talloc, use talloc_tos()
This cuts some mallocs on NtCreate&X
2008-01-12 21:04:06 +01:00
Michael Adam
a52cfb7d77 Combine fsp and fromfd to fromfsp in SMB_VFS_SENDFILE().
Michael
2008-01-11 01:27:05 +01:00
Volker Lendecke
65dd869bea use talloc_tos in a few more places 2008-01-10 13:19:58 +01:00
Jeremy Allison
acfb233acc Fix resource leak found by coverity (CID 521).
Jeremy.
2008-01-08 18:44:19 -08:00
Michael Adam
0b86c420be Remove redundant parameter fd from SMB_VFS_FSTAT().
Michael
2008-01-07 15:59:01 +01:00
Michael Adam
df929796f2 Remove redundant parameter fd from SMB_VFS_LSEEK().
Michael
2008-01-07 15:59:01 +01:00
Jeremy Allison
8f36def18e Now conn is part of smb_request, we don't need it as
an extra parameter. This cleans up quite a few places
we were passing it around without needing it.
Jeremy.
2008-01-04 15:37:24 -08:00
Jeremy Allison
c4e5a50504 Refactor the crypto code after a very helpful conversation
with Volker. Mostly making sure we have data on the incoming
packet type, not stored in the smb header.
Jeremy.
2008-01-04 12:56:23 -08:00
Volker Lendecke
1b1cea9ef0 Convert reply_mknew to create_file 2008-01-02 13:32:23 +01:00
Volker Lendecke
fa09b9ab26 Convert reply_open_and_X to create_file 2008-01-02 13:32:12 +01:00
Volker Lendecke
209c696ab8 Convert reply_open to create_file 2008-01-02 13:32:07 +01:00
Jeremy Allison
d78045601a Add SMB encryption. Still fixing client decrypt but
negotiation works.
Jeremy.
2007-12-26 17:12:36 -08:00
Volker Lendecke
5ab82d4f57 Some C++ warnings 2007-12-21 09:58:20 +01:00
Jeremy Allison
6bf053a6a1 Constrain "min receivefile size" to max of BUFFER_SIZE
(128k). Add debug error messages so we can see why
writeX large is denied. Ensure we don't allow recvfile
writes on IPC$.
Jeremy.
2007-11-07 21:47:00 -08:00
Jeremy Allison
255c2adf7b Remove the horror that was the global smb_rw_error.
Each cli struct has it's own local copy of this variable,
so use that in client code. In the smbd server, add one
static to smbd/proccess.c and use that inside smbd. Fix
a bunch of places where smb_rw_error could be set by
calling read_data() in places where we weren't reading
from the SMB client socket (ie. winbindd).
Jeremy.
2007-11-05 11:12:56 -08:00
Jeremy Allison
81ca5853b2 Change the client library to write directly out of
the incoming buffer in the non-signed case. Speeds
up writes by over 10% or so. Complete the server
recvfile implementation.
Jeremy.
2007-11-02 12:21:34 -07:00
Jeremy Allison
c3de44b6b0 Argggh. smblen doesn't include the +4, so my smb_doff calculations
shouldn't either :-).
Jeremy.
2007-11-02 10:35:10 -07:00
Jeremy Allison
84d22f7747 Ensure we can't accidently do a pipe write with
unread bytes in the socket buffer.
Jeremy
2007-11-01 22:42:21 -07:00
Jeremy Allison
2d3ff9c502 Be careful and take care of the correct lengths in large
writeX calls.
Jeremy.
2007-11-01 22:24:39 -07:00
Jeremy Allison
1c71546b61 Ensure we detect a large writeX when using recvfile.
More changes needed to make the UNIX_LARGE_WRITEX_CAP
writes work (I'll add these tomorrow).
Jeremy.
2007-11-01 21:51:45 -07:00
Jeremy Allison
39d265375c Fix some cases where file_set_dosmode was being passed
False instead of NULL. Fix more of the notifications to
be correct for Samba4 RAW-NOTIFY torture (we had missed
one when calling set_ea_dos_attribute().
Jeremy.
2007-10-31 15:45:45 -07:00
Jeremy Allison
b7088bb9c2 Handle the disk full error case correctly.
Jeremy.
2007-10-30 18:18:40 -07:00
Jeremy Allison
11c03b75dd Add new parameter, "min receivefile size" (by default set
to zero). If non-zero, writeX calls greater than this
value will be left in the socket buffer for later handling
with recvfile (or userspace equivalent). Definition of
recvfile for your system is left as an exercise for
the reader (I'm working on getting splice working :-).
Jeremy.
2007-10-30 16:22:24 -07:00
Jeremy Allison
f35a266b3c RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
2007-10-18 17:40:25 -07:00
Gerald (Jerry) Carter
5c6c8e1fe9 [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch. 2007-10-10 15:34:30 -05:00
Volker Lendecke
492977016f r25502: Fix bug 5006
Thanks to Joerg.Bernau at web.de
2007-10-10 12:31:10 -05:00
Jeremy Allison
39c211a702 r25138: More pstring elimination. Add a TALLOC_CTX parameter
to unix_convert().
Jeremy.
2007-10-10 12:30:44 -05:00
Jeremy Allison
7f0db75fb0 r25117: The mega-patch Jerry was waiting for. Remove all pstrings from
the main server code paths. We should now be able to cope with
paths up to PATH_MAX length now.
Final job will be to add the TALLOC_CTX * parameter to
unix_convert to make it explicit (for Volker).
Jeremy.
2007-10-10 12:30:41 -05:00
Jeremy Allison
0c9a8c4dff r25111: Move to talloced pathnames on most code paths.
There are now ony 17 pstrings left in reply.c,
and these will be easy to remove (and I'll be
doing that shortly). Had to fix an interesting
bug in pull_ucs2_base_talloc() when a source
string is not null terminated :-).
Jeremy.
2007-10-10 12:30:41 -05:00
Jeremy Allison
cf6b6f9c3a r25102: Rewrite msdfs code to use talloced filenames. Passes make test
and make valgrindtest. Final step will be to change srvstr_get_path()
to return talloced memory in the major codepaths.
Jeremy.
2007-10-10 12:30:40 -05:00
Volker Lendecke
638c848c9a r25055: Add file_id_string_tos
This removes file_id_string_static and file_id_string_static2
2007-10-10 12:30:36 -05:00
Jeremy Allison
dee8beba7a r25009: Large patch discussed with Volker. Move unix_convert to a talloc-based
interface. More development will come on top of this. Remove the
"mangled map" parameter.
Jeremy.
2007-10-10 12:30:32 -05:00
Volker Lendecke
17df313db4 r24702: Remove the old API pointers 2007-10-10 12:30:14 -05:00
Volker Lendecke
c5caea43af r24659: Some formatting changes helping to minimize the 3_2_0 diff 2007-10-10 12:30:13 -05:00
Volker Lendecke
fddc9db911 r24548: Fix the case-changing renames
This was broken when I changed reply_mv to wrap in a open_file_ntcreate
call, unix_convert on the destination was called twice
2007-10-10 12:29:56 -05:00
Jeremy Allison
9d9ed41f21 r24501: Added bcc test for reply_tcon & removed Vl's comment :-).
Jeremy.
2007-10-10 12:29:53 -05:00
Jeremy Allison
43ddfb8c91 r24498: More extra code into a function, reply_openerror.
Jeremy.
2007-10-10 12:29:52 -05:00
Jeremy Allison
74d10b09a6 r24476: Fix the mappings in reply_opeXXX calls. Now to test renames.
Jeremy.
2007-10-10 12:29:51 -05:00
Volker Lendecke
0fecd8a0c3 r24461: Fix Bug 4852, thank to anto <sistemac@prosoft.ba> for reporting it. 2007-10-10 12:29:49 -05:00
Volker Lendecke
1e08fddafd r24457: Convert reply_tcon to the new API
Jeremy, I really apologize for doing this, but I just wanted to enjoy
converting the last SMB call :-)

I've left one little task for you there, I'm not certain that checking
the inbuf length is correct here.

Volker
2007-10-10 12:29:49 -05:00
Volker Lendecke
d941aae2df r24453: Remove the read and write bmpx calls
Talked to both Tridge and Jeremy about this, Tridge said that there is a
special error message persuading OS/2 to fall back to other methods.
The calls now checked in always return the error message we used to
return when "read bmpx = False" was set (the default): ERRSRV, ERRuseSTD.

If someone has a reproducable test case where this is really needed, we
can always dig it up from version control and convert it to the new API.
But that time without that silly parameter, and with a torture test case
for "make test" please :-)

Volker
2007-10-10 12:29:49 -05:00
Jeremy Allison
edc17dfcbd r24445: Convert SMBwritebraw. No test suite unfortunately.... I need to write one for this.
Jeremy
2007-10-10 12:29:48 -05:00
Volker Lendecke
a8a33c377e r24443: Convert reply_search/fclose to the new API 2007-10-10 12:29:48 -05:00
Volker Lendecke
0cb00c5475 r24442: Convert reply_copy to the new API 2007-10-10 12:29:48 -05:00
Volker Lendecke
a5af7ebb7f r24441: Convert reply_ioctl to the new API 2007-10-10 12:29:48 -05:00
Volker Lendecke
6b0ad071d8 r24439: Convert reply_get/setattrE to the new API 2007-10-10 12:29:47 -05:00
Volker Lendecke
1b6add251c r24436: Convert reply_lockread/writeunlock to the new API 2007-10-10 12:29:47 -05:00
Volker Lendecke
e528479f56 r24431: Convert the reply_printXX calls to the new API 2007-10-10 12:29:46 -05:00
Volker Lendecke
6def2ee03b r24430: Convert reply_writeclose to the new API 2007-10-10 12:29:46 -05:00
Volker Lendecke
ca27a718b0 r24429: reply_setdir is not used... 2007-10-10 12:29:46 -05:00