1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

124688 Commits

Author SHA1 Message Date
Ralph Boehme
d9f95b8cef smbd: add synthetic_pathref()
Similar to synthetic_smb_fname(), but also opens a pathref fsp.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Ralph Boehme
da8d14097b vfs_streams_depot: support real dirfsps in streams_depot_unlinkat()
Now that our callees support real dirfsps, remove the assert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Ralph Boehme
070778011e vfs_streams_depot: support real dirfsps in streams_depot_rmdir_internal()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Ralph Boehme
d5ca1246dc vfs_streams_depot: support real dirfsps in streams_depot_unlink_internal()
Also remove the smb_fname_base variable, just use full_fname. If
is_named_stream(full_fname)) returns false, full_fname->stream_name will be
NULL.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Ralph Boehme
e3e1170dcd vfs_streams_depot: remove indentation
Makes the code easier to read.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Ralph Boehme
65b0a01746 vfs_recycle: support real dirfsps in recycle_unlinkat()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Ralph Boehme
469ff4ad0e vfs_posix_eadb: support real dirfsps in posix_eadb_unlinkat()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Ralph Boehme
304e7955f1 vfs_posix_eadb: support real dirfsps in posix_eadb_rmdir_internal()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Ralph Boehme
f7a3eb36f1 vfs_posix_eadb: support real dirfsps in posix_eadb_unlink_internal()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Ralph Boehme
0e8137480e vfs_media_harmony: support real dirfsps in mh_unlinkat()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Ralph Boehme
613ca5a7ee vfs_glusterfs: support real dirfsps in vfs_gluster_unlinkat()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Ralph Boehme
1e5c760e82 vfs_full_audit: support real dirfsps in smb_full_audit_unlinkat()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Ralph Boehme
f82e89c26e vfs_extd_audit.c: support real dirfsps in audit_unlinkat()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Ralph Boehme
2a51ed753e vfs_default: support real dirfsps in vfswrap_unlinkat()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Ralph Boehme
fa058d166e vfs_ceph: support real dirfsps in cephwrap_unlinkat()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Ralph Boehme
a1c9782d23 vfs_catia: support real dirfsps in catia_unlinkat()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Ralph Boehme
85878f71d8 vfs_catia: forward pathref fsp in catia_unlinkat()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Ralph Boehme
b6e6594ce4 vfs_cap: support real dirfsps in cap_unlinkat()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Ralph Boehme
9838dd21a1 vfs_audit: support real dirfsps in audit_unlinkat()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Ralph Boehme
c454697eb3 vfs: make fsp arg of vfs_[memctx|fetch]_fsp_extension const
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-28 08:11:49 +00:00
Jeremy Allison
b324626a3c VFS: unityed_media: Fixup um_symlinkat() to correctly use the dirfsp path.
Missed in my original fixes.

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): Thu Jan 28 08:10:18 UTC 2021 on sn-devel-184
2021-01-28 08:10:18 +00:00
Jeremy Allison
4e9bb2d760 VFS: time_audit: Fixup smb_time_audit_symlinkat() to log the dirfsp path.
Missed in my original fixes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-01-28 07:03:30 +00:00
Jeremy Allison
1ede5601a3 VFS: syncops: SMB_VFS_SYMLINKAT only changes one directory so we can use the SYNCOPS_NEXT_SMB_FNAME macro directly.
Missed in my original fixes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-01-28 07:03:30 +00:00
Jeremy Allison
ec27c4c44d VFS: shadow_copy2: Fixup shadow_copy2_symlinkat() to correctly use the dirfsp path.
Missed in my original fixes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-01-28 07:03:30 +00:00
Jeremy Allison
e4a3633694 VFS: media_harmony: Fixup mh_symlinkat() to correctly use the dirfsp path.
Missed in my original fixes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-01-28 07:03:30 +00:00
Jeremy Allison
50205189d8 VFS: full_audit: Fixup smb_full_audit_symlinkat() to log the dirfsp path.
Missed in my original fixes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-01-28 07:03:30 +00:00
Jeremy Allison
bc6aa4ed40 VFS: cap: Fixup cap_symlinkat() to cope with translating dirfsp path.
Missed in my original fixes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-01-28 07:03:30 +00:00
Jeremy Allison
e4c8cd0781 smbd: In conn_force_tdis_done() when forcing a connection closed force a full reload of services.
Prevents reload_services() caching the fact it might be
called multiple times in a row.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-01-28 07:03:30 +00:00
Steven Price
1e47c04aad clitar: restore mtime on files
The documentation for smbclient states that when extracting a tar
archive:

  Restored files have their creation times (mtime) set to the
  date saved in the tar file.

However this behaviour was lost in commit 2945596011 ("clitar.c: fresh
new compilable file.").

Add a call to cli_setatr() to set both the mtime and the mode of files
after they have been extracted.

Signed-off-by: Steven Price <steven@ecrips.co.uk>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Jan 27 19:26:03 UTC 2021 on sn-devel-184
2021-01-27 19:26:03 +00:00
Stefan Metzmacher
9883ac4593 script/autobuild.py: let cleanup() ignore errors from rmdir_force() by default
It's not useful to generate a python backtrace from within the cleanup code.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jan 27 18:17:17 UTC 2021 on sn-devel-184
2021-01-27 18:17:17 +00:00
Stefan Metzmacher
7a5df2deaa script/autobuild.py: split out a rmdir_force() helper function
That also tries to re-add write permissions before removing.
In future we'll have jobs changing there directory to read-only.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-01-27 17:07:09 +00:00
Stefan Metzmacher
86343125a5 selftest: make/use a copy of GNUPGHOME
That makes it possible to run tests from a read only source tree.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2021-01-27 17:07:09 +00:00
Stefan Metzmacher
d06f2c22d7 s4:selftest: use plansmbtorture4testsuite() for 'rpc.echo'
This makes sure "--basedir=$SELFTEST_TMPDIR" is passed to smbtorture.

Tests should not create files in the build nor the source directory!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jan 27 11:01:32 UTC 2021 on sn-devel-184
2021-01-27 11:01:32 +00:00
Stefan Metzmacher
e0d9b65645 s3:selftest: run test_smbclient_tarmode.pl with a fixed subdirectory name
$PREFIX is the the value from --with-selftest-prefix.

The result of the test should not depend on --with-selftest-prefix,
the 'long_path' test in particular.

If the path is to long smbclient (via libarchive) will only
put the full path into a PAX HEADER as 'path' keyword,
that's fine in general, modern tools handle it just fine.
But Perl's Archive::Tar don't handle it and only seems
truncated file names.

I have a fix for Archive::Tar, see:
https://git.samba.org/?p=metze/samba/wip.git;a=shortlog;h=c75037d0a06a96cdaca3f3b20a6d237e768b075b

But finishing that is a task for another day, for now I just want to remove
the dependency to --with-selftest-prefix.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2021-01-27 09:56:29 +00:00
Stefan Metzmacher
568c7d38de selftest/Samba4: allow get_cmd_env_vars() to take an overwrite dictionary
This way we can use it on even in some special cases, where we combine
variables from multiple environments.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2021-01-27 09:56:29 +00:00
Stefan Metzmacher
dce0bdc39e selftest/Samba4: correctly pass KRB5CCNAME to provision
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2021-01-27 09:56:29 +00:00
Stefan Metzmacher
15b3916040 selftest/Samba4: make more use of get_cmd_env_vars()
This simplifies the code a lot and makes it much easier to
add new environment variables in future.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2021-01-27 09:56:29 +00:00
Stefan Metzmacher
719eccd445 selftest:Samba4: avoid File::Path 'make_path' in setup_dns_hub_internal()
While spliting the build and test stages I hit strange permission
problems, when a parent directory is missing,
which can be avoided by using plain mkdir() on each level.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2021-01-27 09:56:29 +00:00
Stefan Metzmacher
0230122238 selftest: allow a prefix under /m/username/
We only want to match/replace only a '.' pathname component
not any single character pathname compoment!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2021-01-27 09:56:29 +00:00
Stefan Metzmacher
1e47149402 Makefile: add support for 'make testonly'
That skips any attempt to recompile before running the tests.
Some times that's useful for debugging and we'll
use it to split the build and test stages in autobuild and gitlab-ci
later.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2021-01-27 09:56:29 +00:00
David Mulder
709a6d6491 samba-tool: Add a gpo command for removing VGP Symbolic Link Group Policy
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan 27 07:32:03 UTC 2021 on sn-devel-184
2021-01-27 07:32:03 +00:00
David Mulder
5794c670ff samba-tool: Test gpo manage symlink remove command
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-27 06:30:31 +00:00
David Mulder
3fc89829a9 samba-tool: Add a gpo command for adding VGP Symbolic Link Group Policy
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-27 06:30:31 +00:00
David Mulder
7b2ecefd55 samba-tool: Test gpo manage symlink add command
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-27 06:30:31 +00:00
David Mulder
7e70d72d97 samba-tool: Add a gpo command for listing VGP Symbolic Link Group Policy
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-27 06:30:31 +00:00
David Mulder
b9cba18528 samba-tool: Test gpo manage symlink list command
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-27 06:30:31 +00:00
David Mulder
7ac29c8eeb gpo: Apply Group Policy Symlink Policy from VGP
This adds a Group Policy extension which applies
symlink policies set by Vintela Group Policy in the
SYSVOL.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-27 06:30:31 +00:00
David Mulder
33d2071b99 gpo: Test Group Policy VGP Symlink Policy
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-27 06:30:31 +00:00
Ralph Boehme
7114150f43 vfs_aixacl: fix regression from f4c2f867f0
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14620

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Jan 26 20:05:39 UTC 2021 on sn-devel-184
2021-01-26 20:05:39 +00:00
Ralph Boehme
e06f86bbd9 smbd: use fsp->conn->session_info for the initial delete-on-close token
There's a correctly set up session_info at fsp->conn->session_info, we can just
use that.

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

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

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jan 26 04:04:14 UTC 2021 on sn-devel-184
2021-01-26 04:04:14 +00:00