1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

29518 Commits

Author SHA1 Message Date
Jeremy Allison
2000421c59 Remove reply_unixerror() - no longer needed. Should make Metze's refactoring a lot easier.
Jeremy.
2009-07-10 18:23:00 -07:00
Jeremy Allison
361aa19e69 Add hash values to the xattr ACLS to determine when
an underlying POSIX ACL is changed out from under us.
Passes RAW-ACL test up to "invalid owner" problem when
trying to create a file owned by Everyone. Now needs
porting to modules/vfs_acl_tdb.c
Jeremy.
2009-07-10 15:50:40 -07:00
Volker Lendecke
afc6f607d5 Return 0 domains from enum_trusteddoms 2009-07-10 22:01:56 +02:00
Volker Lendecke
d8556bbf13 Quieten events and tldap debug messages 2009-07-10 22:01:56 +02:00
Tim Prouty
4e516fb191 s3 smb2: Remove unused variable 2009-07-10 12:04:38 -07:00
Volker Lendecke
3969f65aaa Fix&Run local-gencache 2009-07-10 18:16:46 +02:00
Volker Lendecke
0a0bff353e Fix our base64 implementation for blobs of length 4....
The additional length check bit us exactly at 4, removing it. The
torture test survives valgrind up to 2000 bytes :-)
2009-07-10 18:16:46 +02:00
Stefan Metzmacher
67c7b7f90b s3:smbd: add support for SMB2 Lock
metze
2009-07-10 12:24:25 +02:00
Stefan Metzmacher
8d534d45a5 s3:smbd: make smbd_do_locking() non static
metze
2009-07-10 12:24:24 +02:00
Stefan Metzmacher
598a9892bc s3:smbd: abstract the main locking logic from the LockingAndX parsing
This prepares SMB2 Lock support.

metze
2009-07-10 12:24:24 +02:00
Stefan Metzmacher
be1e5493c5 s3:smbd: pass down the client pid to smbd_smb2_lock_send()
metze
2009-07-10 12:24:24 +02:00
Stefan Metzmacher
24c8e786bc s3:smbd: fix parsing of SMB2 Lock requests with lock_count > 1
We should not reuse the variable 'i'.

metze
2009-07-10 12:24:23 +02:00
Stefan Metzmacher
12ed9ca36a s3:smbd: fix parsing of invalid SMB2 requests.
Because of 0 - 2 => 0xFFFFFFFE, we got EMSGSIZE
from the tstream layer. And terminate the transport
connection. Instead we should let the caller deal with
the invalid parameter, when checking the body size.
So the caller always gets at least a 2 byte body.

metze
2009-07-10 12:24:23 +02:00
Tim Prouty
f1fad2efe4 s3: Fix two arguments that broke when plumbing smb_filneame through dos_mode() 2009-07-09 15:56:53 -07:00
Volker Lendecke
c624a704be Make escape_ldap_string take a talloc context 2009-07-09 22:25:29 +02:00
Tim Prouty
fbaa8497a5 s3: Repace a char * with an smb_filename struct in reply_rmdir 2009-07-08 21:36:04 -07:00
Tim Prouty
02aad05e0e s3: Prepare open.c to switch fsp_name to an smb_filename struct 2009-07-08 21:36:04 -07:00
Tim Prouty
dcc97c5ad7 s3 plumb smb_filename through smb_set_file_allocation_info() 2009-07-08 21:36:04 -07:00
Tim Prouty
3a7d372e2e s3: Change the share_mode_lock struct to store a base_name and stream_name 2009-07-08 21:36:04 -07:00
Tim Prouty
83e5ac5695 s3: Make some arguments to (parse|unparse)_share_modes() const 2009-07-08 21:36:04 -07:00
Tim Prouty
161e182b65 s3: Remove is_ntfs_stream_name() and split_ntfs_stream_name()
Actually I moved split_ntfs_stream_name into torture.c which is the one
consumer of it.  This could probably be changed at some point.
2009-07-08 21:36:04 -07:00
Tim Prouty
1a1d10d22f s3: Plumb smb_filename through dos_mode() and related funtions 2009-07-08 21:36:03 -07:00
Tim Prouty
69c8795b67 s3: convert unix_mode to take an smb_filename 2009-07-08 21:36:03 -07:00
Jeremy Allison
400c18a8c4 Rename update_stat_ex_writetime() -> update_stat_ex_mtime()
to better describe what we're doing here.
Jeremy
2009-07-08 18:05:30 -07:00
Jeremy Allison
c9c3d4312d The migration to struct stat_ex broke the calculation of
create time from the existing timestamps (for systems
that need to do this). Once the write time is changed
via a sticky write, the create time might need to be
recalculated. To do this I needed to add a bool into
struct stat_ex to remember if the st_ex_btime field
was calculated, or read from the OS. Also fixed the
returning of modified write timestamps in the return
from NTCreateX, SMBattr and SMBattrE (which weren't
taking into account the modified timestamp stored
in the open file table). Attempting to fix an issue
with Excel 2003 and offline files. Volker and Metze,
please review.
Jeremy
2009-07-08 17:51:35 -07:00
Jeremy Allison
58daaa3d1e When faking a create time, use the full timespec values, not time_t.
Jeremy.
2009-07-08 12:28:01 -07:00
Jim McDonough
7fd42d51c8 Fix make test_shlibs for libnss_wins and libnetapi (zlib) 2009-07-08 13:12:26 -04:00
Jim McDonough
6f64937ab8 Fix cifs.upcall builds on some platforms (zlib) 2009-07-08 08:02:04 -04:00
Tim Prouty
dad9131183 s3 onefs: Fix a few bugs from the smb_filename migration 2009-07-07 21:33:48 -07:00
Tim Prouty
7ca59ffe5a s3: Migrate a few functions in open.c to take smb_filename 2009-07-07 18:02:53 -07:00
Tim Prouty
0d9b204882 s3: Remove unnecessary const qualifiers 2009-07-07 18:02:53 -07:00
Björn Jacke
a28596964b s3: QNX doesn't know uint - replace with uint_t 2009-07-07 22:15:16 +02:00
Volker Lendecke
5ab0677b45 Attempt to fix the build of vfs_catia.c -- Tim, please check! 2009-07-07 20:43:21 +02:00
Stefan Metzmacher
a830a3f9e2 s3:smbd: cancel all locks that are made before the first failure
s3:smbd: cancel all locks that are made before the first failure

We never reached the cleanup code and directly returned the error.

metze
2009-07-07 11:14:27 -07:00
Tim Prouty
431e63cd8b s3: Update streaminfo implementations now that only base names are passed through the vfs 2009-07-06 15:38:47 -07:00
Tim Prouty
38b081f852 s3 smb2: Fix unused variable warning 2009-07-06 15:38:47 -07:00
Tim Prouty
fd73ab5782 s3 audit: Fix a memory leak 2009-07-06 15:38:47 -07:00
Tim Prouty
3cb0e521e1 s3: Plumb smb_filename through SMB_VFS_NTIMES 2009-07-06 15:38:42 -07:00
Tim Prouty
f39232a8fb s3 catia: Remove pointless VOPs from catia 2009-07-06 15:38:41 -07:00
Tim Prouty
18a27a8df2 s3 sticky write time: Removed unused args and tighten up a function by making an arg const 2009-07-06 15:38:41 -07:00
Tim Prouty
99bd4fda0c s3: Plumb smb_filename around SMB_VFS_CHFLAGS
SMB_VFS_CHFLAGS isn't actually getting the smb_filename struct for now
since it only operates on the basefile.  This is the strategy for all
path-based operations that will never actually operate on a stream.

By clarifying the meaning of path based operations that don't take an
smb_filename struct, modules that implement streams such as vfs_onefs
no longer need to implement SMB_VFS_CHFLAGS to ensure it's only called
on the base_name.
2009-07-06 15:38:41 -07:00
Tim Prouty
0f6e10886f s3: Change some filename_convert to pass in NULL for char **fname argument 2009-07-06 15:38:41 -07:00
Tim Prouty
de3246eae2 s3: Add ability to pass NULL to filename_convert for the char *fname
The goal is to eventually remove the need for the char **fname argument
once all callers have standardized on smb_filename.
2009-07-06 15:38:40 -07:00
Tim Prouty
258952aa85 s3: Plumb smb_filename through SMB_VFS_UNLINK 2009-07-06 15:38:36 -07:00
Tim Prouty
133e915a81 s3 audit: Remove some recently introduced memory leaks in the audit modules 2009-07-06 15:38:36 -07:00
Tim Prouty
1b8ffb36b1 s3 audit: Remove the usesless static function declarations from the audit modules 2009-07-06 15:38:35 -07:00
Tim Prouty
e4a85da570 s3 onefs: Fix failure in POSIX smbtorture test
The return value of readlink was a bool instead of an int,
which caused the length of the returned value to never be
>1.
2009-07-06 15:38:35 -07:00
Tim Prouty
5a09ba460c s3: Plumb smb_filename through SMB_VFS_RENAME 2009-07-06 15:38:29 -07:00
Christian Ambach
5e7da42f6e do not merge ACEs with different SMB_ACE4_INHERIT_ONLY_ACE flag, this leads to wrong inheritance flags in the ACL e.g. (on GPFS) user:10000036:rwxc:allow (X)READ/LIST (X)WRITE/CREATE (X)MKDIR (X)SYNCHRONIZE (X)READ_ACL (X)READ_ATTR (X)READ_NAMED (X)DELETE (X)DELETE_CHILD (X)CHOWN (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED
user:10000036:rwxc:allow:FileInherit:DirInherit:InheritOnly
 (X)READ/LIST (X)WRITE/CREATE (X)MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (X)DELETE    (X)DELETE_CHILD (X)CHOWN (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED

group:10000005:rwxc:allow
 (X)READ/LIST (X)WRITE/CREATE (X)MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (X)DELETE    (X)DELETE_CHILD (X)CHOWN (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED

group:10000005:rwxc:allow:FileInherit:DirInherit:InheritOnly
 (X)READ/LIST (X)WRITE/CREATE (X)MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (X)DELETE    (X)DELETE_CHILD (X)CHOWN (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED

would be merged to

user:10000036:rwxc:allow:FileInherit:DirInherit:InheritOnly
 (X)READ/LIST (X)WRITE/CREATE (X)MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (X)DELETE    (X)DELETE_CHILD (X)CHOWN (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED

group:10000005:rwxc:allow:FileInherit:DirInherit:InheritOnly
 (X)READ/LIST (X)WRITE/CREATE (X)MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (X)DELETE    (X)DELETE_CHILD (X)CHOWN (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED

so the explicit right for the user on the parent directory will be gone (the InheritOnly flag only accounts to subdirectories)
thus leaving the user without access to the directory itself

Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
2009-07-06 12:28:52 +02:00
Volker Lendecke
880c286bc9 Use null_ndr_syntax_id instead of zeroing null_interface manually 2009-07-05 23:50:12 +02:00