1
0
mirror of https://github.com/samba-team/samba.git synced 2025-04-07 10:50:24 +03:00

140000 Commits

Author SHA1 Message Date
Jule Anger
70a8c7a89a tdb: version 1.4.13
* Add LGPLv3 LICENSE file

Signed-off-by: Jule Anger <janger@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
tdb-1.4.13
2025-02-06 11:24:42 +00:00
Christof Schmitt
8f27da18b5 vfs_gpfs: Remove one whitespace
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2025-02-06 11:24:42 +00:00
Christof Schmitt
edfd45a8f8 gpfswrap: Remove unused gpfs_set_winattrs_path
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2025-02-06 11:24:42 +00:00
Christof Schmitt
35538c408c gpfswrap: Remove unused gpfs_fstat_x
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2025-02-06 11:24:42 +00:00
Christof Schmitt
dd4c331bd2 gpfswrap: Remove unused gpfs_stat_x wrapper
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2025-02-06 11:24:42 +00:00
Christof Schmitt
2f114d0d11 vfs_gpfs: Remove winattr calls from vfs_gpfs_fntimes
The call to the default function for fntimes already calls back into
fset_dos_attributes to set the create time. It is not necessary to
repeat the code in vfs_gpfs_fntimes.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2025-02-06 11:24:41 +00:00
Christof Schmitt
fb8138275f vfs_gpfs: Set creation time from vfs_gpfs_fset_dos_attributes
This matches the default behavior of fset_dos_attributes and allows
removing the fallback case from vfs_gpfs_fntimes.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2025-02-06 11:24:41 +00:00
Christof Schmitt
d3543e0b77 vfs_gpfs: Simplify vfs_gpfs_fset_dos_attributes
The gpfs_set_winattrs API call accepts O_PATH descriptors since GPFS
5.1.2, so switch to fsp_get_pathref_fd and remove the fallback logic.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2025-02-06 11:24:41 +00:00
Christof Schmitt
dd7cc4da0f vfs_gpfs: Use gpfs_get_winattrs instead of gpfs_fstat_x
gpfs_fstat_x had been introduced for querying additional inode
attributes for fileids. With the fileid code being removed, the simpler
gpfs_get_winattrs call can be used. gpfs_get_winattrs also accepts
O_PATH descriptors since GPFS 5.1.2.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2025-02-06 11:24:41 +00:00
Christof Schmitt
4787c737ec vfs_gpfs: Remove pathref test
The gpfs_stat_x call O_PATH descriptors since GPFS 5.1.2.0 and will also
be replaced with a simpler API call that also accepts O_PATH
descriptors. Remove the pathref test that is no longer needed.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2025-02-06 11:24:41 +00:00
Christof Schmitt
d86986da39 vfs_gpfs: Remove gpfs_stat_x fallback
Since GPFS 5.1.2 gpfs_stat_x accepts O_PATH descriptors so the fallback
case is no longer used and can be removed.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2025-02-06 11:24:41 +00:00
Stefan Metzmacher
30b7181d0a librpc/ndr: apply some const to ndr_push_union_blob()
Keep libndr at 6.0.0, this has not been released yet.

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): Thu Feb  6 10:45:52 UTC 2025 on atb-devel-224
2025-02-06 10:45:51 +00:00
Ralph Boehme
0a48167044 vfs_gpfs: add gpfs:clamp_invalid_times
The timestamp validation added as part of the fix for bug 15151 causes hard
failures for certain clients that seem to use a temporary timestamp initially
when creating files, changing in a later step.

Clamp invalid timestamps to the allowed range 0..UINT32_MAX if
"gpfs:clamp_invalid_times = yes" is set.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>

Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Wed Feb  5 23:42:15 UTC 2025 on atb-devel-224
2025-02-05 23:42:15 +00:00
Volker Lendecke
9bf92bd9fe ntvfs: Simplify rap_netshareenum()
I know, unused. But the whole point of strlcpy is that we don't need
this kind of calculation, and we should not leave this as a bad
example code in our tree.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Feb  5 01:05:08 UTC 2025 on atb-devel-224
2025-02-05 01:05:07 +00:00
Volker Lendecke
52bf8ef459 talloc: Add a comment explaining talloc_asprintf_addbuf()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2025-02-05 00:07:30 +00:00
Volker Lendecke
a5177ef393 smbd: Remove an unnecessary call to SMB_VFS_STAT()
smb_fname came out of filename_convert_dirfsp(), which already stat'ed
if the file exists. !VALID_STAT means new file.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2025-02-05 00:07:30 +00:00
Volker Lendecke
e24c9b99db lib: Shrink .text a bit
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2025-02-05 00:07:30 +00:00
Volker Lendecke
835c66ca7f vfs: Slightly simplify ad_get_meta_fsp()
Use cp_smb_filename_nostream()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2025-02-05 00:07:30 +00:00
Volker Lendecke
637cf49c30 vfs: Add some const
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2025-02-05 00:07:30 +00:00
Volker Lendecke
8368548636 vfs: Align a few integer types
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2025-02-05 00:07:30 +00:00
Volker Lendecke
97d483f175 smbd: Remove vfs_file_exist()
Both callers followed this with SMB_VFS_CREATE_FILE which can be given
FILE_NON_DIRECTORY_FILE as an option to achieve the same.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2025-02-05 00:07:30 +00:00
Volker Lendecke
b223d5da88 lib: Remove a pointer from R/W .data
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2025-02-05 00:07:30 +00:00
Volker Lendecke
5dcb086cf5 lib: Move a pointer from .data to stack
Why was this declared static? ...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2025-02-05 00:07:30 +00:00
Volker Lendecke
cf43234b73 vfs: Remove a few calls to map_errno_from_nt_status()
That call always "feels" lossy to me, the other way around is better
defined.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2025-02-05 00:07:30 +00:00
Volker Lendecke
12ea196359 vfs: Slightly simplify catia_translate_name()
We have returned if !NT_STATUS_OK(status) a few lines above.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2025-02-05 00:07:30 +00:00
Volker Lendecke
c8293a0b4f lib: Convert string_replace_allocate() to return 0/errno
This is only used in the VFS, which is still in large parts
errno-based.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2025-02-05 00:07:30 +00:00
Volker Lendecke
6c94364388 vfs: Fix some whitespace
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2025-02-05 00:07:30 +00:00
Volker Lendecke
e7fb3d3e94 vfs: Fix some error path memleaks
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2025-02-05 00:07:30 +00:00
Volker Lendecke
1f0be0edd7 libsmb: Save some bytes in .text code
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2025-02-05 00:07:30 +00:00
Volker Lendecke
0d39a8d83d lib: Fix typos
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2025-02-05 00:07:30 +00:00
Volker Lendecke
0d83502fbb lib: Move 968 bytes from R/W data to R/O text
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2025-02-05 00:07:30 +00:00
Volker Lendecke
2a6209966d lib: Simplify ad_get_internal()
Remove an unnecessary variable

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2025-02-05 00:07:30 +00:00
Douglas Bagnall
e705dbbc67 provision: always use a large transaction index cache
A larger cache costs more per transaction, but makes a large number
of operations within a transaction faster. We expect to be dealing
with the latter case here, regardless of the batch_mode parameter
and the database size. 200000 is chosen because it is also used in
join and schemaupgrade, and should be sufficient in most cases.

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Tue Feb  4 22:47:35 UTC 2025 on atb-devel-224
2025-02-04 22:47:35 +00:00
Andréas Leroux
5092d7f46b netcmd: Increase the transaction_index_cache_size to 200k for schemaupgrade
Increasing this value greatly improve the performances of schema
upgrade for large domains (>200k entries).

The value 200000 is chosen because it is already used in join.py, and
should be sufficient for known domains.

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

Signed-off-by: Andréas Leroux <aleroux@tranquil.it>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2025-02-04 21:48:40 +00:00
Pavel Filipenský
51f38ac7f3 s3:utils: Fix 'Usage:' for 'net ads enctypes'
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Tue Feb  4 09:35:58 UTC 2025 on atb-devel-224
2025-02-04 09:35:58 +00:00
Pavel Filipenský
445a8f2592 s3:utils: Fix 'Usage:' for 'net ads setspn'
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2025-02-04 08:35:33 +00:00
Pavel Filipenský
1ad19c2db4 docs-xml:manpages: Fix doc for 'net ads setspn'
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2025-02-04 08:35:33 +00:00
Pavel Filipenský
0cb2cb8137 docs-xml:manpages: Fix doc for 'net ads enctypes'
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2025-02-04 08:35:33 +00:00
Pavel Filipenský
579aae2b18 docs-xml:manpages: Add missing ')' to ADS KEYTAB
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2025-02-04 08:35:33 +00:00
Pavel Filipenský
c4377a987e s3,s4: Make case spelling of sAMAccountName consistent
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2025-02-04 08:35:33 +00:00
Günther Deschner
062dc07e9b s3-libnet: avoid using lp_dns_hostname() in join code
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15777

This codepath is also used for provisiong non-local machines into AD
during offlinejoin operations. When creating accounts for non-local
machines we certainly need to be able to use arbitrary hostname other
than lp_netbios_name() (which is used internally by lp_dns_hostname()).
This partly reverts 0e96092c1895ecb41d4064111566b4ada71fe457.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jan 30 07:35:05 UTC 2025 on atb-devel-224
2025-01-30 07:35:05 +00:00
Günther Deschner
6d4ad4d682 selfest: add test for non-local offlinejoin provision
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15777

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2025-01-30 06:32:37 +00:00
Günther Deschner
f02a4002d5 s3-libads: dump ADS_MODSLIST before attempting the LDAP modify
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15777

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2025-01-30 06:32:37 +00:00
Stefan Metzmacher
1260fcb61c s3:rpc_server: Handle an np_read_send with len==0 correctly
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14430

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 29 12:17:47 UTC 2025 on atb-devel-224
2025-01-29 12:17:47 +00:00
Andreas Schneider
cbadfaaf3d s3:smbd: Allow cancel of SMB2 read on ipc handles
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14430

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
2025-01-29 11:20:33 +00:00
Andreas Schneider
bb26e104d6 s3:smbd: let aio_add_req_to_fsp() return the pointer to the link
This allows the caller to free the link before the request.

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

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
2025-01-29 11:20:33 +00:00
Stefan Metzmacher
2a90b06679 s3:smbd: Use nt_status_np_pipe() in smbd_smb2_ioctl_pipe_{read,write}_done()
We should return NT_STATUS_PIPE_DISCONNECTED or
NT_STATUS_PIPE_BROKEN in the same way SMB2 read/write do it.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2025-01-29 11:20:33 +00:00
Andreas Schneider
ae2a9cb75d s4:torture: Implement ipc test with len=0
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14430

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2025-01-29 11:20:33 +00:00
Andreas Schneider
adbacb8574 s4:torture: Add notify test with multichannel for 'smb2 max async credits'
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14430

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2025-01-29 11:20:33 +00:00
Andreas Schneider
b0f287c4df s4:torture: Add notify test with two connection for 'smb2 max async credits'
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14430

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
2025-01-29 11:20:33 +00:00