1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
Commit Graph

139133 Commits

Author SHA1 Message Date
David Mulder
f5048e3d98 autobuild: Configure samba-o3 for himmelblau testing
The 'samba' build excludes the 'none' tests,
which is where the Rust tests are located.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
a18c6ff20b Fix usage test broken by rust vendor sources
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
24710a5f4e autobuild: Only enable rust build if cargo exists
We need to do this to prevent CI systems which
are missing cargo (Debian) from attempting to
configure with Rust.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
549f67a9e6 Add configure checks for glibc and openssl versions
Add configure checks to determine if rust or
specifically himmelblau sources can be compiled.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
221447d5ba glibc needs to be at least vers 2.32 for rust
The libc crate won't build on versions older than
2.32.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
882a761a50 autobuild: Only configure himmelblau if openssl >= 3
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
986e398887 Add pyglue for Rust for disabling tests
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
910a331f3e Disable the rust build by default
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
0998686355 Fix Rocky8 build for utf8proc-devel
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
8a75cb0e20 Fix pam echo not displayed via ssh
Necessary because of OpenSSH bug
https://bugzilla.mindrot.org/show_bug.cgi?id=2876 -
PAM_TEXT_INFO and PAM_ERROR_MSG conversation not
honoured during PAM authentication

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
a8491e83b4 Add the user's primary group to the cache
We create a fake primary group which simply
matches the user's upn. This is because Entra ID
does not have primary groups, but we can fake it
with a primary group which is a member of all the
users groups.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
d100aaf4bf Fetch the target join os via std::env::consts
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
0bcc209d94 Properly handle read/write from the client socket
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
6907508cdb Ensure clients can write to the himmelblau pipe
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
cb23d6a15e Remove the existing socket if present
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
066576e7c8 Use the s4 param functions to access idmap values
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
6a60174c04 Always print a newline at the end of debug msgs
Otherwise the message doesn't flush to the log
and could be lost when the program terminates.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
bb55fa100e Add talloc stackframe handling
This appeases errors from libsmbconf that no
talloc stackframe was created.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
8f8943547b Fix display of function names in debug
Rust adds some odd `{{closure}}` bits to the
function name that need to be removed, otherwise
the debug is unreadable.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
a72146c4ef Add warnings for missing directories at runtime
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
c33fb4bfd5 Only set the debug logfile if not stdout
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
ff0cf5eda1 Add tests for rust himmelblaud build
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
89db2e536c Always normalize cache inputs to lowercase
This prevents mixed case issues when storing/
retrieving data from the cache.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
9bd37a450d Add tests for rust dbg crate
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
8298cf4376 Improve cargo test output
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
7140c506ee Add USING_SYSTEM_TDB test for rust config
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
518854e29b Add tests for rust chelps crate
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
4ac7e56bca Debian cargo is far to old for building
Debian ships a very old version of cargo, and
none of our rust code can build with it.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
43971bbada Vendor the rust sources for CI tests
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
5a8b8a7799 Rust WAF detect dependant files from crates
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:34 +00:00
David Mulder
4a4304ecf7 Modify rust build to share target dir w/ cargo test
The build needs to share the target directory
with the cargo test command to prevent duplicate
dependency downloads.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00
David Mulder
33bdebb7c8 Enable rust cargo test in Samba make test
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00
David Mulder
7273cc7d89 Adding Cargo.lock file for Rust build
This ensures that all builds of this particular
version of Samba will use the same Rust
dependency versions.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00
David Mulder
57353b8650 A Rust 'crate' is not a misspelling of 'create'
Also fix a misspelling in himmelblaud main.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00
David Mulder
2824ed2605 utf8proc-devel is missing from CentOS 8 Stream
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00
David Mulder
58fbba3897 Introduce build option to enable Himmelblau
The build for Himmelblau will be disabled by
default.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00
David Mulder
9ffac29435 Add clang and openssl deps
Ensure CI images are generated with the necessary
clang and openssl packages for building.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00
David Mulder
35b34e8e42 Add build config for proper TDB build linkage
The tdb build needs to know whether Samba is
building with TDB bundled or not, otherwise
linking will fail.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00
David Mulder
dc445490cc Update libhimmelblau
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00
David Mulder
e3715ba548 Pam prompt for Pin if hello enrolled and enabled
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00
David Mulder
948d0fcfe1 Isolate hsm auth value from the cache
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00
David Mulder
abcf7644a9 Reorganize rust file tree
Place all rust code under samba/rust, similar to
how we organize python code in the samba tree.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00
David Mulder
3f6254a670 Add pam_open_session stub to the himmelblau daemon
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00
David Mulder
5350b31a78 Add pam_acct_mgmt to the himmelblau daemon
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00
David Mulder
426c43963a Add nss getgrgid to the himmelblau daemon
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00
David Mulder
3c55599e99 Add nss getgrnam to the himmelblau daemon
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00
David Mulder
a5e330ee90 Add nss getgrent to the himmelblau daemon
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00
David Mulder
71b96f78df Add nss getpwuid to the himmelblau daemon
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00
David Mulder
94e4d005b5 Add nss getpwnam to the himmelblau daemon
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00
David Mulder
82d7208a85 Add nss getpwent to the himmelblau daemon
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-10-23 14:21:33 +00:00