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

1923 Commits

Author SHA1 Message Date
Jeremy Allison
a4bb49b93a s3: vfs: time_audit. Add missing audit_file().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-04-05 05:26:19 +02:00
Jeremy Allison
0bb63152dc s3: vfs: time_audit: Add get/fget/set/fset dos_attributes functions.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-04-05 05:26:19 +02:00
Jeremy Allison
e2a32043d5 s3: vfs: time_audit. Add missing fsctl().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-04-05 05:26:19 +02:00
Jeremy Allison
8a92450d53 s3: vfs: time_audit. Add missing get_dfs_referrals().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-04-05 05:26:19 +02:00
Jeremy Allison
6ccd3ade93 s3: vfs: Sort vfs function entries in vfs_time_audit.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-04-05 05:26:19 +02:00
Jeremy Allison
884ad41f02 s3: vfs: full_audit. Implement missing durable_XXX functions.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-04-05 05:26:19 +02:00
Jeremy Allison
4489b4cee4 s3: vfs: full_audit. Add audit_file_fn().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-04-05 05:26:18 +02:00
Jeremy Allison
de547cad1e s3: vfs: full_audit. Add missing fsctl_fn().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-04-05 05:26:18 +02:00
Jeremy Allison
40a8a72d8f s3: vfs: full_audit. Add missing get_dfs_referrals_fn().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-04-05 05:26:18 +02:00
Jeremy Allison
70174af615 s3: vfs: full_audit. Sort vfs fn list and add comments on missing entries.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-04-05 05:26:18 +02:00
Christof Schmitt
16ef497366 vfs_gpfs: Remove xattr functions
The xattr functions intercepted only the calls from dosmode. With the
implementation of the dos_attribute interface, the xattr codepaths never
get called and can be removed.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-04-01 19:28:23 +02:00
Christof Schmitt
f20aed5c17 vfs_gpfs: Implement new dos_attributes vfs functions
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-04-01 19:28:23 +02:00
Uri Simchoni
aa81199bec vfs_glusterfs: call clock_gettime_mono() only on profile-enabled build
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Mar 29 00:12:14 CEST 2016 on sn-devel-144
2016-03-29 00:12:14 +02:00
Uri Simchoni
eb2ea0bbf2 vfs_aio_fork: call clock_gettime_mono() only on profile-enabled build
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-03-28 20:45:16 +02:00
Uri Simchoni
7616229e77 vfs_aio_linux: call clock_gettime_mono() only on profile-enabled build
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-03-28 20:45:16 +02:00
Richard Sharpe
a4e6250442 s3: vfs: Add VFS functions for setting and getting DOS attributes.
This will make it easier to support those systems and file systems that
can store DOS attributes. It should retain the original functionality if
VFS functions providing these things are not provided.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
2016-03-27 05:57:17 +02:00
Jeremy Allison
6ae59eb6d1 s3: smbd: Modify vfs_stat_smb_basename() to take a const struct smb_filename * instead of const char *.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-24 22:57:17 +01:00
Jeremy Allison
125a1b50ab s3: vfs: vfs_acl_tdb. Remove use of vfs_stat_smb_basename().
We only need a basic STAT here.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-24 22:57:17 +01:00
Jeremy Allison
f9dc02266c s3: vfs: recycle. Remove use of vfs_stat_smb_basename().
We only need a basic STAT here.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-24 22:57:17 +01:00
Jeremy Allison
ce75fbf4e3 s3: smbd: Remove many common uses of lp_posix_pathnames().
Check the smb_filename->flags field, or req->posix_pathnames
instead, depending on what is available.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-24 22:57:16 +01:00
Jeremy Allison
91c385cfd3 s3: vfs: Remove use of lp_posix_pathnames() below the VFS.
We don't have access to a struct smb_filename here and
can't get one, so simply always set AT_SYMLINK_NOFOLLOW
and remove the optimization if we ended up fstatat()'ing
a symlink, as we don't know if the caller wanted a link
stat or not.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-24 22:57:16 +01:00
Jeremy Allison
dc5dad4813 s3: Filenames: Add uint32_t flags parameter to synthetic_smb_fname().
Get it from parent/deriving smb_filename if present.
Use 0 (as usually this a Windows-style lookup) if
not.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-24 22:57:16 +01:00
Jeremy Allison
2e302d7007 s3: smbd: Add uint32_t flags field to struct smb_filename.
Only one defined flag for now, SMB_FILENAME_POSIX_PATH.
Define as the same as FSP_POSIX_FLAGS_PATHNAMES to keep
the value consistent.

Set this inside unix_convert() when a posix path parse
is selected.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-24 22:57:16 +01:00
Jeremy Allison
feb297ca73 s3: vfs: vfs_afsacl. refuse_symlink() means we can always use STAT here.
For a posix acl call on a symlink, we've already refused it.
For a Windows acl mapped call on a symlink, we want to follow
it.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-24 22:57:16 +01:00
Jeremy Allison
8d8c204d37 s3:smbd: Fix build for vfs_afsacl.c.
Missed conversion of get_nt_acl_fn from const char *
to const struct smb_filename *.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-24 22:57:16 +01:00
Douglas Bagnall
fb0ebbfcbf s3/modules/getdate: use HAVE___ATTRIBUTE__ instead of __GNUC__
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-24 15:13:15 +01:00
Uri Simchoni
765e5f1f26 vfs_acl_common: avoid setting POSIX ACLs if "ignore system acls" is set
When "ignore system acls" is set, do not mess at all with POSIX ACLS,
do not even calculate the would-be POSIX-ACL-based security descriptor
(for performance reasons).
Instead, just store a V3 blob with zero hash. This means that if we
later read the ACL without ignoring system ACLs, the NT ACL shall be
reset to the info derivable from the POSIX ACL.

File ownership is still modified as it has bearing on disk quotas.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11806

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-03-24 03:06:16 +01:00
Shyamsunder Rathi
ac4dc0c678 s3/vfs:stream_depots: Parse substitutions in streams-depot-directory path
At present, substitutions in the streams directory path are ignored. Fix it
by modifying 'stream_dir' function to call 'lp_parm_talloc_string' which
internally calls 'lp_string' on the path.

Signed-off-by: Shyamsunder Rathi <shyam.rathi@nutanix.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-03-18 21:34:30 +01:00
Jeremy Allison
e64ab0d72a s3: vfs: vfs_xattr_tdb - cleanup. Remove unneeded variable "path".
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Tue Mar 15 11:45:19 CET 2016 on sn-devel-144
2016-03-15 11:45:19 +01:00
Jeremy Allison
6b877102db s3:vfs: Change get_acl_blob() to take a const smb_filename * parameter from const char *.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-15 08:29:31 +01:00
Jeremy Allison
e7898c6d6c s3:smbd: Change get_ea_names_from_file() to take a const smb_filename * parameter from const char *.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-15 08:29:30 +01:00
Jeremy Allison
e8000923ae s3:vfs: vfs_streams_xattr.c: Change walk_xattr_streams() to const struct smb_filename * from const char *.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-15 08:29:30 +01:00
Jeremy Allison
347d3aaf96 s3:vfs: vfs_streams_xattr.c - Remove duplicate code. This is exactly vfs_stat_smb_basename().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-15 08:29:30 +01:00
Jeremy Allison
b10d3c6440 s3: vfs: vfs_solarisacl. refuse_symlink() means we can always use STAT here.
For a posix acl call on a symlink, we've already refused it.
For a Windows acl mapped call on a symlink, we want to follow
it.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-15 08:29:30 +01:00
Jeremy Allison
f690c1cfc8 s3: vfs: vfs_hpuxacl. refuse_symlink() means we can always use STAT here.
For a posix acl call on a symlink, we've already refused it.
For a Windows acl mapped call on a symlink, we want to follow
it.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-15 08:29:30 +01:00
Jeremy Allison
faf7185fe4 s3:vfs: Change smbacl4_GetFileOwner() to take const struct smb_filename * from const char *.
Preparing to remove vfs_stat_smb_basename() call.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
2016-03-14 23:02:11 +01:00
Jeremy Allison
377c7b311e s3:smbd:vfs: Change posix_get_nt_acl() from const char * to const struct smb_filename *.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
2016-03-14 23:02:11 +01:00
Jeremy Allison
cb7016594a s3:smbd:vfs: Change smb_get_nt_acl_nfs4() to take a const struct smb_filename *.
Push the struct further down closer to places that use
lp_posix_pathname() functions.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
2016-03-14 23:02:10 +01:00
Jeremy Allison
6d9e7ad3de s3:smbd: Fix build for vfs_aixacl2.c.
Missed conversion of get_nt_acl_fn from const char *
to const struct smb_filename *.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
2016-03-14 23:02:09 +01:00
Volker Lendecke
19cbdf9409 vfs_united_media: Fix CID 1355492 Uninitialized scalar variable
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-09 18:23:44 +01:00
Jeremy Allison
f4b4872982 s3: smbd: Change open_streams_for_delete() to take a struct smb_filename *.
Prepare for changing vfs_streaminfo to do the same.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Mar  7 21:12:56 CET 2016 on sn-devel-144
2016-03-07 21:12:56 +01:00
Jeremy Allison
859d9784ba s3: VFS: vfs_fruit. If we have an fsp, use it in preference to a pathname in vfs_streaminfo.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-03-07 17:58:16 +01:00
Jeremy Allison
8b4a38b4c9 VFS: Modify lchown to take a const struct smb_filename * instead of const char *
Preparing to reduce use of lp_posix_pathnames().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-03-05 09:39:18 +01:00
Jeremy Allison
d1f26bc432 VFS: Modify chown to take a const struct smb_filename * instead of const char *
Preparing to reduce use of lp_posix_pathnames().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-03-05 09:39:18 +01:00
Jeremy Allison
9678611d82 VFS: vfs_netatalk. Fix wrong VFS call used inside atalk_lchown()
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-03-05 09:39:18 +01:00
Ira Cooper
9ee4678b8d vfs_glusterfs: Fix use after free in AIO callback.
The wrapper->state pointer is not getting NULLed during free
allowing use of freed memory, causing a crash.

Thanks to Red Hat for discovering this issue.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11774

Signed-off-by: Ira Copper <ira@samba.org>
Reviewed-by: Poornima G <pgurusid@redhat.com>
Tested-by: Christopher Blum <cblum@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Mar  5 09:08:53 CET 2016 on sn-devel-144
2016-03-05 09:08:53 +01:00
Volker Lendecke
b1b70c136c vfs: Fix the vfs_gpfs build
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Mar  4 02:09:15 CET 2016 on sn-devel-144
2016-03-04 02:09:15 +01:00
Jeremy Allison
8e88b9783d VFS: Modify chmod_acl to take a const struct smb_filename * instead of const char *
Preparing to reduce use of lp_posix_pathnames().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-03-03 09:04:14 +01:00
Jeremy Allison
ac8fba6ef7 VFS: Modify chmod to take a const struct smb_filename * instead of const char *
Preparing to reduce use of lp_posix_pathnames().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-03-03 09:04:14 +01:00
Jeremy Allison
a5f441dc71 vfs:zfs fix build after get_nt_acl_fn signature change.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Wed Mar  2 10:50:58 CET 2016 on sn-devel-144
2016-03-02 10:50:58 +01:00