1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-15 02:50:27 +03:00

130638 Commits

Author SHA1 Message Date
Andreas Schneider
7b4e11f155 s3:utils: Fix NULL check
CID 1507864

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Aug 12 21:50:23 UTC 2022 on sn-devel-184

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit a38fad29803f9e2891b2264ac3258394152e8deb)
2022-08-16 18:27:13 +00:00
Andreas Schneider
b8a5f41b79 s3:util: Initialize json_object structures so we can call json_free()
CID 1507863
CID 1507865
CID 1507866
CID 1507867
CID 1507868
CID 1507869
CID 1507870

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit 4a702cddaebf7e616706e0c728685567e141b493)
2022-08-16 18:27:13 +00:00
Jeremy Allison
fc3f035e36 s3: smbd: Remove unix_convert() and associated functions.
All code now uses filename_convert_dirfsp() for race-free
filename conversion.

Best viewed with:
$ git show --patience

               ----------------
              /                \
             /       REST       \
            /         IN         \
           /         PEACE        \
          /                        \
          |                        |
          |      unix_convert      |
          |                        |
          |                        |
          |       9th August       |
          |          2022          |
          |                        |
          |                        |
         *|     *  *  *            | *
_________)/\\_//(\/(/\)/\//\/\///\/|_)_______

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

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

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Aug 12 19:18:25 UTC 2022 on sn-devel-184

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit 78e4aac76df977cea6cdbcfdf082fd3acdffbd95)
2022-08-16 18:27:13 +00:00
Jeremy Allison
0ffe593bda s3: smbd: Remove the old dfs_path_lookup() code.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15144

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

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit cc638c25e0332d366016880d174d9349940cba3f)
2022-08-16 18:27:13 +00:00
Jeremy Allison
37ce01d6ed s3: smbd: Switch get_referred_path() over to use the new dfs_path_lookup().
New function doesn't need a TWRP argument and returns NT_STATUS_OK
on successful redirect, not NT_STATUS_PATH_NOT_COVERED.

Comment out the old dfs_path_lookup().

There are now no more users of unix_convert().

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

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

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit 88e8bfec59412fdc0e83251fef60b45d2cc3a884)
2022-08-16 18:27:13 +00:00
Jeremy Allison
bd5c675558 s3: smbd: Add new version of dfs_path_lookup() that uses filename_convert_dirfsp().
Commented out as not yet used but it's easier to see the
new logic this way.

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

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

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit 22d4f62537199d9454be312a546e251f04022497)
2022-08-16 18:27:13 +00:00
Jeremy Allison
161324f575 s3: smbd: Remove dfs_redirect().
A moment of silence please.

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

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

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit 6b1224b22012b54b1ae20b682daf61c877362a7b)
2022-08-16 18:27:13 +00:00
Jeremy Allison
38740ceea8 s3: smbd: Remove call to dfs_redirect() from filename_convert_dirfsp_nosymlink().
Use dfs_filename_convert() instead. There are now no more callers of dfs_redirect().

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

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

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit d20b60c3200b5e1881cdf4b59da154d1af7e3994)
2022-08-16 18:27:13 +00:00
Jeremy Allison
66bc141ddf s3: smbd: Remove call to dfs_redirect() from filename_convert_smb1_search_path().
Use dfs_filename_convert() instead. Code is now much simpler.

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

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

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit fcf19d91c09edc6dfbf5bd7cbeedcd641030eb31)
2022-08-16 18:27:13 +00:00
Jeremy Allison
d0a9046c80 s3: smbd: In filename_convert_dirfsp_nosymlink(), cope with an MS-DFS link as the terminal component.
If the terminal component was an MSDFS link, openat_pathref_fsp_case_insensitive() will
return NT_STATUS_OBJECT_NAME_NOT_FOUND with a VALID_STAT of a symlink.

If this is the case, check if we actually found a terminal MS-DFS link
at the end of the pathname and return NT_STATUS_PATH_NOT_COVERED.

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

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

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit d80bedc3c418b6839b1bde78ba8d3db06611be2a)
2022-08-16 18:27:13 +00:00
Jeremy Allison
879b42bd6f s3: smbd: In filename_convert_dirfsp_nosymlink(), allow a NT_STATUS_PATH_NOT_COVERED error to be returned.
openat_pathref_dirfsp_nosymlink() can now return NT_STATUS_PATH_NOT_COVERED.
Don't convert this automatically into NT_STATUS_OBJECT_PATH_NOT_FOUND.

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

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

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit 07ef9e3029b8cca1b92d900d6ed684ca0ac6afe4)
2022-08-16 18:27:13 +00:00
Jeremy Allison
5f68afbd01 s3: smbd: Allow openat_pathref_dirfsp_nosymlink() to return NT_STATUS_PATH_NOT_COVERED for a DFS link on a DFS share.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15144

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

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit b5f6809593524e7e9aca1c09ff379e02a1cde61b)
2022-08-16 18:27:13 +00:00
Jeremy Allison
7e9fb8e9fb s3: smbd: In get create_junction(), make sure check_path_syntax() is called on returned reqpath.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15144

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

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit a92f4f7af0eaa035deebfb1c930ca0cc12d992d5)
2022-08-16 18:27:13 +00:00
Jeremy Allison
9a9b953a9d s3: smbd: In get referred_path(), make sure check_path_syntax() is called on returned reqpath.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15144

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit da625e4ab4bc670e44fcb6ad7456aa64d0f1f9d2)
2022-08-16 18:27:13 +00:00
Jeremy Allison
d1ba2845a2 s3: smbd: Add dfs_filename_convert(). Simple wrapper around parse_dfs_path().
Not yet used.

This is what we will use to replace dfs_redirect() in the filename
conversion code. Keep as a wrapper for now as we might want to
add some error checking around the 'hostname' and 'service'
returns.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit 245d07ab84852b829c029496618e56782d070e83)
2022-08-16 18:27:13 +00:00
Jeremy Allison
c0f9b5f41e s3: smbd: Use helper function msdfs_servicename_matches_connection() in dfs_redirect().
Replaces ugly complex logic.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit a3c9eb7931cb4da0dd5bc5d600125979dd1a7df5)
2022-08-16 18:27:13 +00:00
Jeremy Allison
74dc7cb556 s3: smbd: Use helper function msdfs_servicename_matches_connection() in parse_dfs_path().
Replaces ugly complex logic.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit c0a1d7c7a8a7f24890e60c7a371498949dec11c2)
2022-08-16 18:27:13 +00:00
Jeremy Allison
0dd880abd9 s3: smbd: Add helper function msdfs_servicename_matches_connection().
Not yet used so commented out.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit 4f5d02f8c0efc1520b2113ce656c78483deb7826)
2022-08-16 18:27:13 +00:00
Jeremy Allison
8ce26e1e4b s3: smbd: Remove definition of struct dfs_path.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15144

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit 6c83c674bab8e57ecaf6271eb3a403171bbbacca)
2022-08-16 18:27:13 +00:00
Jeremy Allison
274c8a06b4 s3: smbd: Remove use of 'struct dfs_path'. Not needed for a (hostname, servicename, path) tuple.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15144

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit f92711f000a3cb658dfb8fffe92ae6bba78b4f91)
2022-08-16 18:27:13 +00:00
Jeremy Allison
3a944329c3 s3: smbd: Add TALLOC_CTX * parameter to parse_dfs_path().
Not yet used. Preparing to remove 'struct dfs_path'.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit 2df8a8ab87a1372f2b67880be4454a0285b3104b)
2022-08-16 18:27:13 +00:00
Jeremy Allison
8031584e1e s3: smbd: Ensure smb2_file_rename_information() uses the SMB2 pathname parsers, not the SMB1 parsers.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15144

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit 0a4a27ce48bc7090aa821eea5e56f8d44c686716)
2022-08-16 18:27:13 +00:00
Jeremy Allison
8d09dc1691 s3: smbd: Make sure we have identical check_path_syntax logic in smbd_smb2_create_durable_lease_check(), as for smb2_create.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15144

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit a2a097fc3d6a89fb970c1ea3ea75fde93ddb545e)
2022-08-16 18:27:13 +00:00
Jeremy Allison
c940c9eae9 s3: smbd: In smbd_smb2_create_send() call the helper function check_path_syntax_smb2().
Previously for DFS names we were skipping this.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit 4fafc3418931de06ea2d91baca1eef8d904cc4e6)
2022-08-16 18:27:13 +00:00
Jeremy Allison
deb009404a s3: smbd: Add helper function check_path_syntax_smb2().
Not yet used, but uses check_path_syntax_smb2_msdfs()
so remove the #ifdef's around that.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit 7bd7fa0a0b46ad6826097a1987595e2ab6f83384)
2022-08-16 18:27:13 +00:00
Jeremy Allison
33d00d7e88 s3: smbd: Add new function check_path_syntax_smb2_msdfs() for SMB2 MSDFS paths.
#ifdef'ed out as static and not yet used.

We can't just call check_path_syntax() on these as
they are of the form hostname\share[\extrapath]
(where [\extrapath] is optional).

hostname here can be an IPv6 ':' separated address,
which check_path_syntax() fails on due to the streamname
processing.

NB. This also has to cope with out existing (broken)
libsmbclient libraries that sometimes set the DFS
flag and then send a local pathname. Cope by just
calling the normal check_path_syntax() on the
whole pathname in that case.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit bcba5502282eb6dcc346d7c63aa3218cda2f9bb0)
2022-08-16 18:27:13 +00:00
Jeremy Allison
496b9b45c3 s3: smbd: Fix cosmetic bug logging pathnames from Linux kernel clients using SMB1 DFS calls.
The Linux kernel SMB1 client has a bug - it sends
DFS pathnames as:

\\server\share\path

instead of:

\server\share\path

Causing us to mis-parse server,share,remaining_path here
and jump into 'goto local_path' at 'share\path' instead
of 'path'.

This doesn't cause an error as the limits on share names
are similar to those on pathnames.

parse_dfs_path() which we call before filename parsing
copes with this by calling trim_char on the leading '\'
characters before processing.

Do the same here so logging of pathnames looks better.

How did I find this ? Lots and lots of manual
testing with the Linux kernel client to make
sure all the recent changes haven't broken Linux
SMB1/2/3 DFS :-).

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit 2818fd6910201fd4a18b921933a0b7392a0a8995)
2022-08-16 18:27:13 +00:00
Stefan Metzmacher
adcf069e71 s4:torture/smb2: add smb2.bench.echo
This test calls SMB2_Echo in a loop per connection.

For 4 connections with 2 parallel loops use this:

time smbtorture //127.0.0.1/m -Uroot%test smb2.bench.echo \
	--option="torture:timelimit=600" \
	--option="torture:nprocs=1" \
	--option="torture:qdepth=2"

Sometimes the bottleneck is the smbtorture process.
In order to bring the smbd process to 100% cpu, you can use
'--option="libsmb:client_guid=6112f7d3-9528-4a2a-8861-0ca129aae6c4"'
and run multiple instances of the test at the same time,
which both talk to the same smbd process.

This is a very useful test to show how many requests are possible
at the raw SMB2 layer.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Aug 11 19:23:37 UTC 2022 on sn-devel-184

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit 23988f19e7cc2823d6c0c0f40af0195d0a3b81bf)
2022-08-16 18:27:13 +00:00
Stefan Metzmacher
76672394ba s4:torture/smb2: teach smb2.bench.path-contention-shared about --option="torture:qdepth=4"
This can now test more than one open/close loop per connection.

time smbtorture //127.0.0.1/m -Uroot%test \
	smb2.create.bench-path-contention-shared \
	--option='torture:bench_path=' \
	--option="torture:timelimit=60" \
	--option="torture:nprocs=1" \
	--option="torture:qdepth=4"

The default is still 1, but it's very useful for tests.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit 8ee783c4803d28cccc39144afa7b78c4b9e0cc2e)
2022-08-16 18:27:13 +00:00
Stefan Metzmacher
ca8fab6e92 s4:param: add --option="libsmb:client_guid=6112f7d3-9528-4a2a-8861-0ca129aae6c4" support...
We already handle this in the source3/libsmb code, but it's good to
have this also for torture tests.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit 72caffbe1115c57ad38270eaeb951f6b97bf62b3)
2022-08-16 18:27:13 +00:00
Stefan Metzmacher
691d0fad1c s3:g_lock: use TDB_VOLATILE to avoid fcntl locks
This improves 'time smbtorture3 //foo/bar -U% local-g-lock-ping-pong -o 50000000'
from ~1.400.000 to ~3.400.000 operations per second any a testsystem.

As we also use TDB_VOLATILE for locking.tdb, this is a much more
realistic test now.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit cd01f5134696f7789fbc2933629ac2606feb0b5e)
2022-08-16 18:27:13 +00:00
Stefan Metzmacher
c12a8d5083 smbd: avoid calling SMB_VFS_FGET_NT_ACL() if do_not_check_mask already covers all
This is inspired by 0d4cb5a641e1fea2d369bdc66470a580321366c2,
which avoids SMB_VFS_FGET_NT_ACL() for the root user again.

Opens with just FILE_READ_ATTRIBUTES are very common, so it's worth
optimizing for it.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15125
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit a0a97d27f7a60dbd86317b51bec0ece2476e8c8d)
2022-08-16 18:27:13 +00:00
Stefan Metzmacher
851d7768c3 s3:include: remove unused update_stat_ex_file_id() prototype
It was removed by commit 643da37fd139413651a6198fb0f6e550f7de6584

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit 8c7e8c5f80f1488456f9dd6225020d29f74458d2)
2022-08-16 18:27:13 +00:00
Volker Lendecke
f82ef74918 smbstatus: Fix the 32-bit build on FreeBSD
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): Tue Aug  9 20:04:26 UTC 2022 on sn-devel-184

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit 4d015b4b6db20235d6d821204d03b0e1fce1c681)
2022-08-16 18:27:13 +00:00
Volker Lendecke
7b338dc6f5 smbd: Use dirfsp where we have it
One reference to conn->cwd_fsp less, makes "mkdir" look less ugly in
strace.

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

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15146
(cherry picked from commit b1b513eebb0999cdfabab597927305be7d978605)
2022-08-16 18:27:13 +00:00
Jule Anger
d6c44a93f0 s3:tests: let smbstatus json tests fail if jq is not installed
Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 4b91702a6ea2c6474e635d5ae5f7acd9aebbbab7)
2022-08-16 18:27:13 +00:00
Jule Anger
fd61f48e0c manpages: add smbstatus option --json with sample output
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15147

Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

(cherry picked from commit ddbf1b29eee140b3112eb238852bfdc8285eb04f)

Autobuild-User(v4-17-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-17-test): Tue Aug 16 17:37:28 UTC 2022 on sn-devel-184
2022-08-16 17:37:28 +00:00
Jule Anger
d6afd0d941 WHATSNEW: announce new smbstatus json support
Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2022-08-16 16:31:16 +00:00
John Mulligan
a8ddc56e71 WHATSNEW: add section for new smbconf python api
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-08-16 16:31:16 +00:00
Jule Anger
4cbef001b5 VERSION: Bump version up to 4.17.0rc2...
and re-enable GIT_SNAPSHOT.

Signed-off-by: Jule Anger <janger@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2022-08-08 16:31:27 +02:00
Jule Anger
abc2296a67 VERSION: Disable GIT_SNAPSHOT for the Samba 4.17.0rc1 release.
Signed-off-by: Jule Anger <janger@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
samba-4.17.0rc1
2022-08-08 16:22:13 +02:00
Jule Anger
459107e6ef WHATSNEW: Up to Samba 4.17.0rc1.
Signed-off-by: Jule Anger <janger@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2022-08-08 16:21:26 +02:00
Jule Anger
80d069a72c s3:tests: Add a test to check json output of smbstatus profile
Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Jule Anger <janger@samba.org>
Autobuild-Date(master): Mon Aug  8 14:01:45 UTC 2022 on sn-devel-184
2022-08-08 14:01:45 +00:00
Jule Anger
803899fdc3 smbstatus: add JSON support for smbstatus --profile
Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2022-08-08 12:56:29 +00:00
Ralph Boehme
0ed54cc607 smbstatus: fix indentation in profile_separator()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jule Anger <janger@samba.org>
2022-08-08 12:56:29 +00:00
Jule Anger
03ed8d3a07 smbstatus: add a method to add profile items to json
The method changes the json item of a given traverse_state.
The root dictionary contains for each section a dictionary, which has
a dictionary for each subsection.

Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2022-08-08 12:56:29 +00:00
Jule Anger
74028253e1 s3:tests: Add a test to check json output of smbstatus
Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2022-08-08 12:56:29 +00:00
Jule Anger
5d6ed73b38 smbstatus: add JSON support for smbstatus
Adds the option --json for all informations except the profiling.
With --json sets the json_output variable to true, so that the json dictionary
can be created and printed.

Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2022-08-08 12:56:29 +00:00
Jule Anger
78c6740299 smbstatus: add machine readable creation_time to notify
Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2022-08-08 12:56:29 +00:00
Jule Anger
ed1c94be4f smbstatus: add server_id to notifies
Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2022-08-08 12:56:29 +00:00