From 841004c2e8268f29473f8eb2896d9dda4fbc2167 Mon Sep 17 00:00:00 2001 From: Yurt Page Date: Sat, 27 Jul 2024 09:33:06 +0300 Subject: [PATCH 01/17] README.md: fix formatting Use header level 2 for sections. Specify shell as language for commands. --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 62fae7922..5dd1be877 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# Building +## Building Dependencies: * qt (core, widgets, help, linguist tools) @@ -10,11 +10,11 @@ Dependencies: * uuid Once dependencies are installed, run this from the admc folder: -``` -$ mkdir build -$ cd build -$ cmake .. -$ make -j12 +```sh +mkdir build +cd build +cmake .. +make -j12 ``` If the build fails, check build output for missing dependencies. @@ -22,28 +22,28 @@ If the build fails, check build output for missing dependencies. You can also format the sources by building `clangformat` target after `cmake` is run, for example: -``` +```sh make -C build clangformat ``` -# Usage: +## Usage: This app requires a working Active Directory domain and for the client machine to be connected and logged into the domain. You can find articles about these topics on [ALTLinux wiki](https://www.altlinux.org/%D0%94%D0%BE%D0%BC%D0%B5%D0%BD). Launch admc from the build directory: -``` -$ ./admc +```sh +./admc ``` -# Testing +## Testing Tests also require a domain and a connection to the domain. Launch tests from the build directory: -``` -$ ./admc-test +```sh +./admc-test ``` -# Screenshots +## Screenshots ![image](https://i.imgur.com/GuRmwnq.png) From cef4c0f04eda69a04bed9438e3fa25a12f9bf956 Mon Sep 17 00:00:00 2001 From: Yurt Page Date: Sat, 27 Jul 2024 11:09:34 +0300 Subject: [PATCH 02/17] README.md: add the description and move the screenshot to the top --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5dd1be877..d2f8c332c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,10 @@ +# Active Directory Management Center (ADMC) + +The ADMC is an integrated complex tool that implements +User and Computers and Group Policy Manager modules of +Microsoft Remote Server Administration Tools (RSAT). + +![Screenshot](https://i.imgur.com/GuRmwnq.png) ## Building @@ -44,6 +51,3 @@ Launch tests from the build directory: ./admc-test ``` -## Screenshots - -![image](https://i.imgur.com/GuRmwnq.png) From 802f1a9781fc8e117cc066b731ef810fcd84169f Mon Sep 17 00:00:00 2001 From: Yurt Page Date: Sat, 27 Jul 2024 09:50:28 +0300 Subject: [PATCH 03/17] CMakeLists.txt: set cmake_minimum_required to 3.5 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fdc352794..7cb56455a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) From 04e94b46bee61173fa567210a932ce6cbdff74bb Mon Sep 17 00:00:00 2001 From: Yurt Page Date: Sat, 27 Jul 2024 09:44:15 +0300 Subject: [PATCH 04/17] .gitignore: ignore debian generated files --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 1e6331c96..27487041d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,8 @@ output/ *.qm src/adldap/samba/ndr_misc.c src/adldap/samba/ndr_misc.h +/debian/admc.substvars +/debian/debhelper-build-stamp +/debian/files +/debian/admc/ +/debian/.debhelper/ From ca7f992b7d479c3c16dcffa9c8ae85dbecc414f8 Mon Sep 17 00:00:00 2001 From: Yurt Page Date: Sat, 27 Jul 2024 09:46:06 +0300 Subject: [PATCH 05/17] .gitignore: ignore generated object files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 27487041d..028f3c6f3 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ src/adldap/samba/ndr_misc.h /debian/files /debian/admc/ /debian/.debhelper/ +/obj-*/ From a91d0b15ff05525f5d91239b131580bb9ffaa7f9 Mon Sep 17 00:00:00 2001 From: Yurt Page Date: Sat, 27 Jul 2024 09:57:40 +0300 Subject: [PATCH 06/17] debian: set email for debian package maintainer --- CMakeLists.txt | 2 +- debian/control | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7cb56455a..35ecbd97e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,7 +64,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CHANGELOG_ru.txt if (ADMC_BUILD_DEB) SET(CPACK_GENERATOR "DEB") - SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Kees van Vloten") + SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Kees van Vloten ") SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Samba domain management console.") diff --git a/debian/control b/debian/control index 57eb880c7..e1c631011 100644 --- a/debian/control +++ b/debian/control @@ -1,5 +1,5 @@ Source: admc -Maintainer: Kees van Vloten +Maintainer: Kees van Vloten Section: misc Priority: optional Standards-Version: 3.9.2 From c8a97886e4a3f077cc10673aef7441f45a70242a Mon Sep 17 00:00:00 2001 From: Yurt Page Date: Sat, 27 Jul 2024 09:59:18 +0300 Subject: [PATCH 07/17] debian: use ${shlibs:Depends} to automatically generate the list of dep libs Two libraries are added manually because they aren't detected by shlibs --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index e1c631011..caeea13fb 100644 --- a/debian/control +++ b/debian/control @@ -7,6 +7,6 @@ Build-Depends: debhelper (>= 9), cmake, qtbase5-dev, libqt5help5, qttools5-dev, Package: admc Architecture: any -Depends: libldap-2.4-2, libsasl2-2, libsmbclient (>=4.9), libuuid1 (>= 2.33), libqt5help5 (>= 5.11), libkrb5-3 (>= 1.17) +Depends: ${misc:Depends}, ${shlibs:Depends}, libsasl2-2, libqt5help5 (>= 5.11) Description: Samba domain management console. Samba domain management console. From a948cf37741ac1b1058c97f451f3599298ca8738 Mon Sep 17 00:00:00 2001 From: Yurt Page Date: Sat, 27 Jul 2024 10:51:01 +0300 Subject: [PATCH 08/17] debian/copyright: fix --- debian/copyright | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/copyright b/debian/copyright index e69de29bb..699dff391 100644 --- a/debian/copyright +++ b/debian/copyright @@ -0,0 +1,6 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: * +Copyright: 2020-2024 BaseALT Ltd. + 2020-2024 Dmitry Degtyarev +License: GPL-3 From fc35e3732c63591a27c712f9848aec6ead81bc81 Mon Sep 17 00:00:00 2001 From: Yurt Page Date: Sat, 27 Jul 2024 11:07:03 +0300 Subject: [PATCH 09/17] debian: use debhelper-compat level 11 instead of compat file Also replace deprecated pkg-config with pkgconf --- debian/compat | 1 - debian/control | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 debian/compat diff --git a/debian/compat b/debian/compat deleted file mode 100644 index 48082f72f..000000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/debian/control b/debian/control index caeea13fb..391fb6dea 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Maintainer: Kees van Vloten Section: misc Priority: optional Standards-Version: 3.9.2 -Build-Depends: debhelper (>= 9), cmake, qtbase5-dev, libqt5help5, qttools5-dev, libldap2-dev, pkg-config, samba-dev (>=4.9), libsmbclient-dev, libkrb5-dev, libglib2.0-dev, libsasl2-dev +Build-Depends: debhelper-compat (= 11), debhelper (>= 11), cmake, qtbase5-dev, libqt5help5, qttools5-dev, libldap2-dev, pkgconf, samba-dev (>=4.9), libsmbclient-dev, libkrb5-dev, libglib2.0-dev, libsasl2-dev Package: admc Architecture: any From 89dca1eb6a0c84c02baeb0bfe2958ea59998a0d4 Mon Sep 17 00:00:00 2001 From: Yurt Page Date: Sat, 27 Jul 2024 12:40:36 +0300 Subject: [PATCH 10/17] debian/rules: remove --buildsystem=cmake since we updated compat --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index d796f3e8f..743faaeab 100755 --- a/debian/rules +++ b/debian/rules @@ -4,7 +4,7 @@ export DH_VERBOSE=1 export QT_SELECT=qt5 %: - dh $@ --buildsystem=cmake + dh $@ override_dh_auto_configure: dh_auto_configure -- \ From d626d2bb1804495e8a544a427c23b3ae3b72c860 Mon Sep 17 00:00:00 2001 From: Yurt Page Date: Sat, 27 Jul 2024 11:07:17 +0300 Subject: [PATCH 11/17] debian: add missing source format --- debian/source/format | 1 + 1 file changed, 1 insertion(+) create mode 100755 debian/source/format diff --git a/debian/source/format b/debian/source/format new file mode 100755 index 000000000..89ae9db8f --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) From efe17979291c7dd55d6abfb4da82a40ee956dd79 Mon Sep 17 00:00:00 2001 From: Yurt Page Date: Sat, 27 Jul 2024 11:08:17 +0300 Subject: [PATCH 12/17] debian: control: set section to admin --- debian/control | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 391fb6dea..7a6db49ed 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,8 @@ Source: admc Maintainer: Kees van Vloten -Section: misc +Section: admin Priority: optional +Rules-Requires-Root: no Standards-Version: 3.9.2 Build-Depends: debhelper-compat (= 11), debhelper (>= 11), cmake, qtbase5-dev, libqt5help5, qttools5-dev, libldap2-dev, pkgconf, samba-dev (>=4.9), libsmbclient-dev, libkrb5-dev, libglib2.0-dev, libsasl2-dev From 8b82242a49d055c4f12230dd49c6c49854682c99 Mon Sep 17 00:00:00 2001 From: Yurt Page Date: Sat, 27 Jul 2024 13:19:26 +0300 Subject: [PATCH 13/17] debian: control: extend description --- CMakeLists.txt | 4 +++- debian/control | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 35ecbd97e..6da923094 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,7 +67,9 @@ if (ADMC_BUILD_DEB) SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Kees van Vloten ") SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) - SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Samba domain management console.") + SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "The ADMC is an integrated complex tool that implements + User and Computers and Group Policy Manager modules of + Microsoft Remote Server Administration Tools (RSAT).") SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/altlinux/admc") set(CPACK_STRIP_FILES "${CMAKE_INSTALL_LIBDIR}/libadldap.so;${CMAKE_INSTALL_BINDIR}/admc") INCLUDE(CPack) diff --git a/debian/control b/debian/control index 7a6db49ed..934320bbe 100644 --- a/debian/control +++ b/debian/control @@ -9,5 +9,7 @@ Build-Depends: debhelper-compat (= 11), debhelper (>= 11), cmake, qtbase5-dev, l Package: admc Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, libsasl2-2, libqt5help5 (>= 5.11) -Description: Samba domain management console. - Samba domain management console. +Description: Active Directory Management Center (ADMC) + The ADMC is an integrated complex tool that implements + User and Computers and Group Policy Manager modules of + Microsoft Remote Server Administration Tools (RSAT). From 2da5fdc10adc628bd668afdf202a0e6ebbf6d641 Mon Sep 17 00:00:00 2001 From: Yurt Page Date: Sat, 27 Jul 2024 11:30:06 +0300 Subject: [PATCH 14/17] debian/changelog: add a new release --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 71d9584d0..e3d95aede 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +admc (0.16.3) UNRELEASED; urgency=medium + + * Fix crashes after OU/user creation attempts by users with corresponding + delegated rights. + + -- Semyon Knyazev Wed, 15 May 2024 00:00:00 +0000 + admc (0.5.2) UNRELEASED; urgency=medium * Initial release. From 6dcc5248f9dbce5653883a6868976c57b781a8d6 Mon Sep 17 00:00:00 2001 From: Yurt Page Date: Sun, 28 Jul 2024 07:44:01 +0300 Subject: [PATCH 15/17] debian/control: add Vcs-Git --- debian/control | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian/control b/debian/control index 934320bbe..1b17042ab 100644 --- a/debian/control +++ b/debian/control @@ -5,6 +5,9 @@ Priority: optional Rules-Requires-Root: no Standards-Version: 3.9.2 Build-Depends: debhelper-compat (= 11), debhelper (>= 11), cmake, qtbase5-dev, libqt5help5, qttools5-dev, libldap2-dev, pkgconf, samba-dev (>=4.9), libsmbclient-dev, libkrb5-dev, libglib2.0-dev, libsasl2-dev +Homepage: https://github.com/altlinux/admc +Vcs-Browser: https://github.com/altlinux/admc +Vcs-Git: https://github.com/altlinux/admc.git Package: admc Architecture: any From 468dcc821232ead1f0c4648f4d8fbedf786dafec Mon Sep 17 00:00:00 2001 From: Yurt Page Date: Sun, 28 Jul 2024 08:39:16 +0300 Subject: [PATCH 16/17] CMakeLists.txt: Use BUILD_TESTING instead of ADMC_BUILD_DEB The CMake has a built-in variable BUILD_TESTING (default ON) to compile tests. When building a debian package, the debhelper configures the CMake with this option OFF. So now we don't need to pass the DADMC_BUILD_DEB=ON and we can simplify the debian/rules --- CMakeLists.txt | 4 ++-- debian/rules | 5 ----- src/adldap/CMakeLists.txt | 4 ++-- src/admc/CMakeLists.txt | 4 ++-- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6da923094..25609fd07 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,9 +52,9 @@ include(ClangFormat) option(ADMC_BUILD_DEB "Build the deb package of ADMC." OFF) add_subdirectory(src) -if(NOT ADMC_BUILD_DEB) +if(BUILD_TESTING) add_subdirectory(tests) -endif(NOT ADMC_BUILD_DEB) +endif(BUILD_TESTING) add_subdirectory(share) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CHANGELOG.txt diff --git a/debian/rules b/debian/rules index 743faaeab..82b16ef98 100755 --- a/debian/rules +++ b/debian/rules @@ -6,8 +6,3 @@ export QT_SELECT=qt5 %: dh $@ -override_dh_auto_configure: - dh_auto_configure -- \ - -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) \ - -DADMC_BUILD_DEB=ON - diff --git a/src/adldap/CMakeLists.txt b/src/adldap/CMakeLists.txt index bdfb908fe..8d752cb35 100644 --- a/src/adldap/CMakeLists.txt +++ b/src/adldap/CMakeLists.txt @@ -105,9 +105,9 @@ add_custom_target(adldap_ts COMMAND ${Qt5_LUPDATE_EXECUTABLE} -recursive ${CMAKE_CURRENT_SOURCE_DIR} -ts ${TS_FILES} -noobsolete ) -if(NOT ADMC_BUILD_DEB) +if(BUILD_TESTING) target_compile_definitions(adldap PRIVATE SMB_HAS_NEW_NDR_PULL_STEAL_SWITCH=1) -endif(NOT ADMC_BUILD_DEB) +endif(BUILD_TESTING) # Generate translation binaries (.qm) from sources (.ts) set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/admc/CMakeLists.txt b/src/admc/CMakeLists.txt index 0ad2a82f2..f66685401 100644 --- a/src/admc/CMakeLists.txt +++ b/src/admc/CMakeLists.txt @@ -233,7 +233,7 @@ qt5_add_translation(QM_FILES ${TS_FILES}) install(TARGETS admc DESTINATION ${CMAKE_INSTALL_BINDIR} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -if(NOT ADMC_BUILD_DEB) +if(BUILD_TESTING) install(TARGETS admctest DESTINATION ${CMAKE_INSTALL_LIBDIR} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -endif(NOT ADMC_BUILD_DEB) +endif(BUILD_TESTING) From 191a6eb2b0acf9cedbce5556b79ec364fe7a36f4 Mon Sep 17 00:00:00 2001 From: Yurt Page Date: Sun, 28 Jul 2024 17:36:44 +0300 Subject: [PATCH 17/17] debian/control: add Bugs --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index 1b17042ab..d3a59bd9f 100644 --- a/debian/control +++ b/debian/control @@ -8,6 +8,7 @@ Build-Depends: debhelper-compat (= 11), debhelper (>= 11), cmake, qtbase5-dev, l Homepage: https://github.com/altlinux/admc Vcs-Browser: https://github.com/altlinux/admc Vcs-Git: https://github.com/altlinux/admc.git +Bugs: https://github.com/altlinux/admc/issues Package: admc Architecture: any