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

673 Commits

Author SHA1 Message Date
Volker Lendecke
9dae2501f1 s3:vfs_modules: Fix Coverity ID 946: OVERRUN_STATIC
Tim, please check!
2009-09-14 22:48:45 +02:00
Volker Lendecke
0f65d33502 s3: Test short reads in the build farm 2009-09-14 07:13:22 +02:00
Jeremy Allison
f20c2e0fd4 Fix compile in a usually non-selected define.
Jeremy.
2009-09-09 13:54:47 -07:00
Aravind Srinivasan
ad88284038 s3: Major revamp for catia vfs module
This patch builds out catia to allow fully configurable mappings,
including mappings from single byte to multi-byte characters.
Additionally, a much more complete list of vfs operations are now
covered.

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-08-28 16:38:57 -07:00
Aravind Srinivasan
e046b382f2 s3: Add a new VFS op called SMB_VFS_TRANSLATE_NAME
This vop is designed to work in tandem with SMB_VFS_READDIR to allow
vfs modules to make modifications to arbitrary filenames before
they're consumed by callers.  Subsequently the core directory
enumeration code in smbd is now changed to free the memory that may be
allocated in a module.  This vop enables the new version of catia in
the following patch.

Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-08-28 16:38:57 -07:00
Stefan Metzmacher
09fe57923a s3:streams: check for :$DATA only in the backend (fix bug #6642)
We need to allow "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION" to pass
check_path(), so that the Quota Dialog works.

metze
2009-08-27 16:45:40 +02:00
tprouty
17829cbc82 s3 onefs: Canonicalize the ACL in the correct order 2009-08-26 10:41:55 -07:00
tprouty
3ad9d108a7 s3: Allow full_audit to play nice with smbd if it's using syslog
Explictly pass the facility from both smbd and full_audit to syslog.
Really the only major change is to not call openlog() in full_audit if
WITH_SYSLOG is defined, which implies that smbd is already using
syslog.  This allows full audit to piggy-back on the same ident as
smbd, while still differentiating the logging via the facility.
2009-08-26 10:41:54 -07:00
tprouty
22ee1cd7db s3 audit: Change create_file in full_audit to print whether a directory or file was requested
full_audit will now print out whether the createfile was requested for
a file or directory.  The create disposition is also printed out.
2009-08-26 10:41:54 -07:00
Jeremy Allison
c69f92d16d Second attempt at fix for bug 6529 - Offline files conflict with Vista and Office 2003.
Confirmation from reporter that this fixes the issue in master on ext3/ext4.
Back-ports to follow.
Jeremy.
2009-08-24 20:57:37 -07:00
Volker Lendecke
c54a8db006 Make refusal of SEC_DESC_DACL_PROTECTED configurable
This adds a parameter "gpfs:refuse_dacl_protected" that defaults to false.

GPFS has no place to store the SEC_DESC_DACL_PROTECTED ACL bit. With this
parameter we give customers an option to either ignore this bit or refuse
setting an ACL with it.
2009-08-19 11:39:44 +02:00
Jeremy Allison
a023b6c64b Use defined names rather than numeric constants to make code
clearer.
Jeremy.
2009-08-14 15:06:11 -07:00
Michael Adam
12864ffd51 gpfs.so: map the file_inherit and dir_inherit flags away for files
GPFS sets inherits dir_inhert and file_inherit flags
to files, too, which confuses windows, and seems to
be wrong anyways.

So when mapping a nfs4 acl to a windows acl, we map these
flags away for files.

Michael
2009-08-14 23:23:20 +02:00
Jeremy Allison
d91edeaa94 When mapping EA's into a TDB, don't remove the EA
until the last link to the file is gone (fixes the
build farm RAW-RENAME test with xattr's in tdb's).
Jeremy.
2009-08-12 16:27:17 -07:00
Jeremy Allison
d6270df748 Add "store create time" parameter (docs to follow)
that stores the create time in the user.DosTimestamps EA.
Jeremy.
2009-08-12 13:00:54 -07:00
Jeremy Allison
1ddd10b56a Fix some warnings in the AIX ACL code.
Jeremy.
2009-08-12 10:58:00 -07:00
Jeremy Allison
d296c774c5 Move the checks for null timestamps down below the VFS_NTIMES
layer (as it's done in onefs). This simplifies greatly the
code in smb_set_file_time() w.r.t. changenotify messages.
Jeremy.
2009-08-07 12:38:31 -07:00
Alexander Bokovoy
20d93b5b60 Fix breakage for connect function after API change (connect -> connect_fn) 2009-08-02 20:31:19 +03:00
Tim Prouty
9b461ad7eb s3: Attempt to fix hpuxacl module 2009-07-29 10:12:23 -07:00
Volker Lendecke
94a139afe5 shadow_copy2: The system getrealfilename() can't deal with a 0-length fname
This fixes viewing the content of snapshots in the share root directory. We
have to treat the filename that *just* consists of "@GMT-YYYY.MM.DD-HH.MM.SS"
like the share root, which is the current working directory.
2009-07-29 06:28:50 -04:00
Jeremy Allison
9297b975f5 Fix the build breakage by #including modules/vfs_acl_common.c
into acl_tdb and acl_xattr. Duplicates the code size, but keeps
the code in common so I don't have to do bug fixes in two places
(which is what I really cared about).
Jeremy.
2009-07-27 12:09:40 -07:00
Volker Lendecke
b9756de20a Cleanup patch after "new VFS" 2009-07-25 13:12:08 -04:00
Volker Lendecke
db5d3465ab Cleanup patch after "struct stat_ex" 2009-07-25 13:12:06 -04:00
Tim Prouty
247a77a422 s3 onefs: Fix the onefs modules after the big refactoring 2009-07-24 18:46:07 -07:00
Jeremy Allison
ff547a23ae Factor out common code into vfs_acl_common.c.
Jeremy.
2009-07-24 17:06:41 -07:00
Jeremy Allison
c472bca42c Make acl_tdb match acl_xattr. Large duplication of
code here needs tidying up. Compiles but not yet tested.
Jeremy.
2009-07-24 14:47:52 -07:00
Jeremy Allison
1bab4fdaaf Fix hash function in acl_xattr to be SHA256, make
the hash function selectable. Upgrade version.
Compiles but not fully tested yet (coming). Make
vfs_acl_tdb.c compile - this needs updating to
match acl_xattr (also coming soon).
Jeremy.
2009-07-24 14:09:42 -07:00
Volker Lendecke
d2403dc231 Move the "enum _vfs_op_type" to full_audit
It's only used there now. Someone should now go in and simplify full_audit...
:-)
2009-07-24 11:42:05 -04:00
Volker Lendecke
033185e2a1 Make the smbd VFS typesafe 2009-07-24 11:42:05 -04:00
Volker Lendecke
68028a73b6 Some more VFS type errors 2009-07-24 02:16:17 +02:00
Volker Lendecke
19245509fc Fix some C++ warnings 2009-07-24 02:15:28 +02:00
Tim Prouty
23c703a01e s3: Remove unnecessary callers of get_full_smb_filename
This often times means explicitly denying certain operations on a stream
as they are not supported or don't make sense at a particular level.  At
some point in the future these can be enabled, but for now it's better to
remove ambiguity
2009-07-21 12:04:59 -07:00
Tim Prouty
c9b8a01714 s3: Finish plumbing the fsp->fsp_name smb_fname conversion through the modules. 2009-07-20 17:26:57 -07:00
Volker Lendecke
ce378e7c51 Fix a few type errors in VFS modules 2009-07-19 02:36:59 +02:00
Christian Ambach
bd58a14617 reject ACLs with DESC_DACL_PROTECTED on GPFS
as GPFS does not support the ACE4_FLAG_NO_PROPAGATE NFSv4 flag (which would be the mapping for the DESC_DACL_PROTECTED flag), the status of this flag is currently silently ignored by Samba. That means that if you deselect the "Allow inheritable permissions..." checkbox in Windows' ACL dialog and then apply the ACL, the flag will be back immediately.

To make sure that automatic migration with e.g. robocopy does not lead to ACLs silently (and unintentionally) changed, this patch adds an explicit check for this flag and if set, it will return NT_STATUS_NOT_SUPPORTED so errors are shown up on the Windows side and the Administrator is aware of the ACLs not being settable like intended

Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
2009-07-14 09:21:26 +02: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
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
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
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
Tim Prouty
dad9131183 s3 onefs: Fix a few bugs from the smb_filename migration 2009-07-07 21:33:48 -07:00
Volker Lendecke
5ab0677b45 Attempt to fix the build of vfs_catia.c -- Tim, please check! 2009-07-07 20:43:21 +02: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
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
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
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