1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-29 11:21:54 +03:00
samba-mirror/source3/include
Jeremy Allison 6259f51dd9 This is a *big* checkin that may break some things, but implements the
new open mechanism Andrew & I discussed.

config.sub:
configure: Included the QNX patch.

include/vfs.h:
smbd/vfs-wrap.c:
smbd/vfs.c: Added ftruncate vfs call (needed).

Note that we will also need locking calls in the vfs (to be added).

lib/util_unistr.c:
nmbd/nmbd_processlogon.c: Fix for NT domain logons causing nmbd to core dump.
                          Also fix for sidsize DOS bug.

locking/locking.c: Check value of ret before using it for memdup.

printing/printing.c: Convert print_fsp_open to return an allocated fsp.

rpc_server/srv_lsa.c: Fix for NT domain logons.

I have removed all use of lp_share_modes() from the code (although I
left the parameter in the table for backwards compatibility). It no longer makes
sense for this to exist.

smbd/close.c: Removed lp_share_modes().
smbd/fileio.c: Fixed parameters to unlock_share_entry call in panic code.
smbd/files.c: Correctly set the unix_ERR_code to ERRnofids on fsp allocation fail.

smbd/nttrans.c:
smbd/reply.c:
smbd/trans2.c: Changed all occurrences of open_file_shared/open_directory/
               open_file_stat to return an fsp from the call.

smbd/open.c: Changed all occurrences of open_file_shared/open_directory/
             open_file_stat to return an fsp from the call.

In addition I have fixed a long standing race condition in the deny mode
processing w.r.t. two smbd's creating a file. Andrew, please note that
your original idea of using open with O_EXCL in this case would not work
(I went over the races very carefully) and so we must re-check deny modes
*after* the open() call returns. This is because there is a race between
the open with O_EXCL and the lock of the share mode entry. Imagine the
case where the first smbd does the open with O_EXCL and a deny mode of DENY_ALL,
but is pre-empted before it locks the share modes and creates the deny
mode entry for DENY_ALL. A second smbd could then come in with O_RDONLY
and a deny mode of DENY_NONE and the two opens would be allowed.

The *only* way to fix this race is to lock the share modes after the
open and then do the deny mode checks *after* this lock in the case
where the file did not originally exist.

This code will need extensive testing but seems to initially work.

Jeremy.
(This used to be commit ab0ecc39d6)
2000-04-22 00:33:16 +00:00
..
.cvsignore added stamp-h 1998-09-29 17:09:44 +00:00
byteorder.h Andrew made it faster :-). 2000-04-11 23:58:53 +00:00
charset.h first pass at updating head branch to be to be the same as the SAMBA_2_0 branch 1999-12-13 13:27:58 +00:00
client.h simple mods to add msrpc pipe redirection. default behaviour: fall back 2000-01-03 19:19:48 +00:00
clitar.h Initial version imported to CVS 1996-05-04 07:50:46 +00:00
config.h.in got rid of some more old configure tests and includes 2000-04-17 06:11:08 +00:00
debug.h Busting up of source/include/smb.h into smaller pieces which can be 2000-02-03 04:47:50 +00:00
dlinklist.h nttrans.c: 1998-09-23 21:49:09 +00:00
hash.h Added hash-based stat cache code from Ying Chen. 2000-01-26 21:25:35 +00:00
includes.h got rid of some more old configure tests and includes 2000-04-17 06:11:08 +00:00
interfaces.h interfaces.h from 2.0.6 1999-12-17 01:44:30 +00:00
kanji.h include/kanji.h include/proto.h lib/kanji.c: Added const parameters in string wrappers. 1998-11-12 19:40:33 +00:00
local.h got rid of some more old configure tests and includes 2000-04-17 06:11:08 +00:00
MacExtensions.h Adding George's Mac extension include files. 1998-12-08 02:22:56 +00:00
msdfs.h Big update moving the multi-pdu support from 2.0.x into HEAD for JF 2000-03-09 21:45:16 +00:00
nameserv.h the final part of the nmbd merge between head and tng - this gets the 2000-03-27 12:19:58 +00:00
nt_printing.h getprinter level 0: was to short, found most of the fields, undocumented, 2000-03-10 17:12:24 +00:00
ntdomain.h Removed unused parameter vuid from rpc_server api_* calls. For the very few 2000-04-04 00:35:34 +00:00
nterr.h getprinter level 0: was to short, found most of the fields, undocumented, 2000-03-10 17:12:24 +00:00
profile.h first pass at updating head branch to be to be the same as the SAMBA_2_0 branch 1999-12-13 13:27:58 +00:00
proto.h This is a *big* checkin that may break some things, but implements the 2000-04-22 00:33:16 +00:00
rpc_creds.h made cvs main up-to-date with samba_tng, with addition of process id to 2000-01-21 02:33:21 +00:00
rpc_dce.h Fixes from Luke, back-ported from TNG to Win2k. Correctly return FAULT_PDU on 2000-02-29 21:39:54 +00:00
rpc_lsa.h first pass at updating head branch to be to be the same as the SAMBA_2_0 branch 1999-12-13 13:27:58 +00:00
rpc_misc.h spoolss include definitions 2000-02-07 16:27:03 +00:00
rpc_netlogon.h first pass at updating head branch to be to be the same as the SAMBA_2_0 branch 1999-12-13 13:27:58 +00:00
rpc_reg.h first pass at updating head branch to be to be the same as the SAMBA_2_0 branch 1999-12-13 13:27:58 +00:00
rpc_samr.h SAMR_R_UNKNOWN_38 is 3 uint16 params (4-byte aligned) followed by status code. 2000-01-17 23:01:23 +00:00
rpc_secdes.h Fixes for strange Win2K attempts to auto-inherit ACLs. 2000-02-29 18:46:45 +00:00
rpc_spoolss.h rewrote getprinterdriver level 3, now correctly handle the dependent 2000-03-29 12:36:44 +00:00
rpc_srvsvc.h first pass at updating head branch to be to be the same as the SAMBA_2_0 branch 1999-12-13 13:27:58 +00:00
rpc_wkssvc.h "For I have laboured mightily on Luke's code, and hath broken 1998-03-11 21:11:04 +00:00
rpcclient.h first pass at updating head branch to be to be the same as the SAMBA_2_0 branch 1999-12-13 13:27:58 +00:00
safe_string.h Busting up of source/include/smb.h into smaller pieces which can be 2000-02-03 04:47:50 +00:00
smb_macros.h Ensure that CHECK_FNUM rejects fd == -1 correctly. 2000-04-12 01:25:10 +00:00
smb.h added fdprintf() 2000-04-16 09:40:02 +00:00
stamp-h.in Make sure that the stamp file is newer than configure.in 1999-07-18 20:34:50 +00:00
talloc.h implemented talloc() as described on samba-technical. This fixes the 2000-01-05 06:36:36 +00:00
trans2.h first pass at updating head branch to be to be the same as the SAMBA_2_0 branch 1999-12-13 13:27:58 +00:00
unicode_map_table1.h a quick hack to reduce the size of the unicode map table headers from 2000-04-15 07:14:40 +00:00
unicode_map_table2.h a quick hack to reduce the size of the unicode map table headers from 2000-04-15 07:14:40 +00:00
version.h update version to pre-3.0.0 1999-12-17 01:51:33 +00:00
vfs.h This is a *big* checkin that may break some things, but implements the 2000-04-22 00:33:16 +00:00
vt_mode.h Initial version imported to CVS 1996-05-04 07:50:46 +00:00