summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2026-11-03tests: add LDAPS join test cases for adcliHEADmastershridhargadekar3-0/+140
- Add LDAPS join tests covering: * Basic LDAPS join/leave with port 389 blocked * Lookup of computer properties after LDAPS join * Computer account removal over LDAPS - Move first-use check to topology_controllers using fs API - Add ruff configuration to pyproject.toml Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-16Add UsrEtc supportSamuel Cabrero2-0/+29
New configure option '--with-vendordir' to search for krb5.conf in case $(sysconfdir)/krb5.conf does not exist. Doc: https://en.opensuse.org/openSUSE:Packaging_UsrEtc Doc: https://github.com/uapi-group/specifications/blob/main/specs/configuration_files_specification.md Signed-off-by: Samuel Cabrero <scabrero@suse.com>
2026-06-30enroll: make computer-password-lifetime argument requiredSumit Bose1-1/+1
Resolves: https://gitlab.freedesktop.org/realmd/adcli/-/work_items/47
2026-05-26host-keytab at custom locationshridhargadekar1-0/+85
when joining AD domain with --host-keytab parameter. Test validates: Join succeeds with custom keytab path Keytab file is created at specified location Signed-off-by: shridhargadekar <shridhar.always@gmail.com>
2026-05-18Testcase service principal, krb delegshridhargadekar1-0/+129
1. test_adcli_join_with_service_principals - Tests setting service principals (HTTP and CIFS) on computer account during domain join 2. test_adcli_join_kerberos_delegation_enabled - Tests kerberos delegation enabled functionality (positive case) Signed-off-by: shridhargadekar <shridhar.always@gmail.com>
2026-05-06adcli CI configurationshridhargadekar7-74/+197
ci: Add GitLab CI/CD pipeline for adcli Build Stage: - build:fedora - Build on Fedora latest - build:centos10 - Build on CentOS Stream 10 - Runs autogen.sh, make, and make check - Saves build artifacts Test Stage: - lint:python - Python code quality (ruff for linting/formatting) - lint:shellcheck - Shell script linting - Auto-discovers Python files in tests/ Configuration: - tests/pyproject.toml: Ruff configuration (replaces black/isort/flake8) - Line length: 119 characters - Python linting fixes applied Runs on: merge requests, master branch commits, and tags Improvements to the CI build process: +. Use dnf builddep for automatic dependency installation - Replaces manual dependency list - Auto-syncs with spec file BuildRequires - Cleaner and more maintainable +. Force fresh Fedora latest images - Add pull_policy: always to build:fedora - Ensures CI always tests against current Fedora release - Avoids stale cached images +. Enable offline join support in CI builds - Remove --disable-offline-join-support flag - dnf builddep now installs libnetapi-devel automatically - CI should test full feature set, not reduced build
2026-04-17Testcases for adclishridhargadekar1-0/+29
Testcases: 1. Get useful error message when adcli command fails 2. Renew keytab after host has joined 3. Join pre-staged computer with deleted-user ou-location does not matter Reviewed-by: Sumit Bose <sbose@redhat.com>
2026-03-23Tests: join with different hostname variationshridhargadekar3-4/+505
Test the different variations of hostname of a client to the domain
2026-02-25Fix build with glibc 2.43Samuel Cabrero4-5/+28
From glibc 2.43 release notes: * For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr, strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return pointers into their input arrays now have definitions as macros that return a pointer to a const-qualified type when the input argument is a pointer to a const-qualified type. Signed-off-by: Samuel Cabrero <scabrero@suse.com>
2026-02-25testcase add details at adcli joinshridhargadekar1-0/+587
Test case for adding details at join: 1. os-verion 2. os-serice-pack 3. os-name 4. description Test case for set machine account password expiry
2026-02-04Refresh license textSumit Bose1-6/+5
Use the latest version of the license text from https://ftp.gnu.org/gnu/Licenses/lgpl-2.1.txt. Please note, the license is not changed only the text is refreshed.
2025-12-19enroll: fix issues if default keytab is usedSumit Bose3-17/+24
librkb5 returns the default keytab with a 'FILE:' prefix which must be removed before calling libselinux functions to operate on the keytab file. Resolves: https://issues.redhat.com/browse/RHEL-78631
2025-12-09Release version 0.9.3.10.9.3.1Sumit Bose1-1/+1
2025-12-08tests: include new tests in the tar archiveSumit Bose3-0/+22
2025-12-08configure: add enable switch for offline join supportSumit Bose1-1/+17
Resolves: https://gitlab.freedesktop.org/realmd/adcli/-/issues/44
2025-12-08configure: add enable switch for SELinux supportSumit Bose1-2/+20
Resolves: https://gitlab.freedesktop.org/realmd/adcli/-/issues/44
2025-12-08tests: fix typo in testjoin testsSumit Bose1-2/+2
2025-11-21Fix version and compiler warning0.9.3aSumit Bose2-2/+2
2025-11-18Tests: test cases lot0.9.3shridhargadekar2-219/+535
Combination of testcases related to adcli
2025-09-10Fixing typos 'Sucessfully validated join to domain' realmd/adcli#43urgemerge2-2/+2
2025-09-08enroll: check if AD accepts new passwordSumit Bose1-0/+19
There are cases where libkrb5 returns an error during a password change operation but the password change was successful on the AD side. To make sure the password change really failed adcli tries to get a TGT with the new password. If this fails it is assumed that the password change really failed. If it is successful the original error is ignored and it is assumed that the password change was successful. Resolves: https://issues.redhat.com/browse/RHEL-44580
2025-09-08conn: add explicit password parameter to _adcli_kinit_computer_creds()Sumit Bose3-4/+8
2025-09-02enroll: allow to add SPNs to manages service accountsSumit Bose2-28/+89
Currently after creating a managed service account (MSA) adcli could only refresh the related password. With this patch it is possible to add Kerberos service principals names (SPNs) as well. Resolves: https://issues.redhat.com/browse/RHEL-73686
2025-09-02enroll: add new SPNs from AD to keytab during updateSumit Bose2-15/+35
Currently new SPNs from AD are only added to the keytab if the machine account password must be updates as well or if requested explicitly on the command line. With this patch SPNs added on AD are added to the keytab automatically during the update operation. Resolves: https://gitlab.freedesktop.org/realmd/adcli/-/issues/33
2025-09-02conn: fixes for the new connect() timeoutSumit Bose1-2/+2
In case it was not possible to connect to any AD DC there might be an uninitialized variable. Resolves: https://gitlab.freedesktop.org/realmd/adcli/-/issues/32
2025-08-29Tests: Testcase for testjoinshridhargadekar1-21/+51
Test case to validate whether the join and machine/client account password is still valid of AD-server Reviewed-by: Sumit Bose <sbose@redhat.com>
2025-07-23conn: use 10s timeout for connect()Sumit Bose1-4/+62
The default system timeout for connect is typically in the order of 2 or 3 minutes which is quite high for modern networks. Especially if multiple addresses should be checked this long timeout will not help. With this patch the timeout is set to 10s. Resolves: https://gitlab.freedesktop.org/realmd/adcli/-/issues/32
2025-07-23util: fixes for issues found by static code scannersSumit Bose1-16/+18
Fix memory leaks in _adcli_call_external_program() and coding-style issues.
2025-07-15enroll: restore SELinux file context of keytab filesSumit Bose9-0/+108
If SELinux is enable in a system the file context of the keytab file might be important because it will restrict access for confined services and applications. Typically the system keytab /etc/krb5.keytab is handled by the system policy. But adcli will create e.g. /etc/krb5.keytab.domain.name for MSAs which should get the keytab specific file context as well. This patch adds a SELinux policy module for adcli which set the file context for files matching the pattern /etc/krb5.keytab.* and /etc/sssd/krb5.keytab.* . Unfortunately wildcards are not supported for automatic transitions in the kernel so that adcli has to call selinux_restorecon() manually on new or changed keytab files. Resolves: https://issues.redhat.com/browse/RHEL-78631
2025-07-11enroll: fix issue in ensure_des_not_enforcedSumit Bose1-0/+4
Resolves: https://issues.redhat.com/browse/RHEL-56353
2025-07-04enroll: remove USE_DES_KEY_ONLY during joinSumit Bose3-37/+100
If a computer object already exists and has the USE_DES_KEY_ONLY flag set in the userAccountControl attribute this attribute will be removed. DES is deprecated for encryption since quite some time and many systems do not support it anymore. Resolves: https://issues.redhat.com/browse/RHEL-56353
2025-07-04entry: check user and group names for illegal charactersSumit Bose1-0/+31
The AD sAMAccountName LDAP attribute has some restrictions about the allowed characters. With this patch adcli makes sure that only allowed characters will be used in user and group names. Resolves: https://issues.redhat.com/browse/RHEL-5050
2025-07-03tools: add --recursive option to delete-computerSumit Bose4-5/+45
With this new option the delete-computer sub-command can delete child objects of the computer object as well. Resolves: https://gitlab.freedesktop.org/realmd/adcli/-/issues/18 Resolves: https://issues.redhat.com/browse/RHEL-16141
2025-07-01tools: testjoin, use realm from keytab as domain nameSumit Bose1-0/+7
Since the DNS domain name of a client might differ from the name of the joined domain it is more reliable to use the realm name found in the keytab when testing the join. Resolves: https://issues.redhat.com/browse/RHEL-5044
2025-06-04enroll: use realm form the HOST$ entry in the keytabSumit Bose1-0/+48
Currently the realm from the first entry in the keytab was used. This might fail if the keytab has entries from other realms as well. With this patch adcli will first try to find a HOST$ entry in the keytab and take its realm because this will most probably be the principal used to authenticate against the AD DC of realm the client is joined to. If no realm can be found this way the realm of the first entry is still used as a fallback.
2025-06-03Tests: initial framework and tests for adclishridhargadekar13-0/+741
Fundamental testcases to test fundamental methods of adcli Testcases added for: 1. adcli list the domain 2. adcli join the client to domain 3. adcli delete the computer 4. adcli test the join status Reviewed-by: Scott Poore <spoore@redhat.com> Reviewed-by: Sumit Bose <sbose@redhat.com>
2024-11-20krb5: add adcli_krb5_get_error_message()Sumit Bose5-18/+36
The krb5_get_error_message() call returns an error message in an allocated string which must be freed. This makes it hard to simply use krb5_get_error_message() in a printf() argument list. adcli_krb5_get_error_message() used a static memory area to make the usage more easy.
2024-11-20Various fixes for issues found by static code scannersSumit Bose6-20/+43
2024-11-05doc: improve some Samba related doc itemsSumit Bose2-6/+13
2023-09-07enroll: Populate Samba's secrets database using offline domain joinSamuel Cabrero1-0/+146
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
2023-09-07build: Check for NetComposeOfflineDomainJoin in samba's netapi librarySamuel Cabrero1-0/+6
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
2023-09-06enroll: Add a function to convert an IP address to textSamuel Cabrero2-0/+39
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
2023-09-06enroll: Issue a warning if Samba provision was requested but failedSamuel Cabrero1-2/+2
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
2023-09-06util: Return failure if child exit status reports soSamuel Cabrero1-0/+1
Otherwise error string from stdout won't be printed. Signed-off-by: Samuel Cabrero <scabrero@suse.de>
2023-09-06util: Flag write end of pipe as invalid after closing itSamuel Cabrero1-1/+1
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
2023-09-06util: Allow to append variables to external program environmentSamuel Cabrero3-10/+64
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
2023-09-06conn: Allow to retrieve the connected LDAP addressSamuel Cabrero2-0/+9
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
2023-09-06conn: Store the address of the connected serverSamuel Cabrero1-2/+17
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
2023-09-06conn: Stop as soon as we have a valid LDAP connectionSamuel Cabrero1-0/+1
No need to test all possible addresses. Signed-off-by: Samuel Cabrero <scabrero@suse.de>
2023-09-06conn: Copy forest name from discoSamuel Cabrero2-0/+16
Signed-off-by: Samuel Cabrero <scabrero@suse.de>