Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@ 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/
/obj-*/
src/adldap/samba/security_descriptor.c
src/adldap/samba/dom_sid.c
src/adldap/samba/dom_sid.h
src/adldap/samba/ndr_sec_helper.c
src/adldap/samba/ndr_security.c
src/adldap/samba/ndr_security.h
src/adldap/samba/libsmb_xattr.c

12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I recall correctly, the BUILD_TESTING variable is set up by CTest, which is not currently enabled in this project (see
https://cmake.org/cmake/help/latest/module/CTest.html
). Instead, we use the ADMC_BUILD_DEB variable, which is OFF by default. We need to consider one of three options: creating and setting a separate variable to explicitly enable or disable testing, setting ADMC_BUILD_DEB to ON by default, or completely refactoring the test setup.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the BUILD_TESTING not declared then the if will be ignored. This is typical usage as far I saw from other repos.

add_subdirectory(tests)
endif(NOT ADMC_BUILD_DEB)
endif(BUILD_TESTING)
add_subdirectory(share)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CHANGELOG.txt
Expand All @@ -64,10 +64,12 @@ 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 <[email protected]>")
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)
Expand Down
36 changes: 20 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Active Directory Management Center (ADMC)

# Building
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

Dependencies:
* qt (core, widgets, help, linguist tools)
Expand All @@ -10,40 +17,37 @@ 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.

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:
```sh
./admc-test
```
$ ./admc-test
```

# Screenshots

![image](https://i.imgur.com/GuRmwnq.png)
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -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 <[email protected]> Wed, 15 May 2024 00:00:00 +0000

admc (0.5.2) UNRELEASED; urgency=medium

* Initial release.
Expand Down
1 change: 0 additions & 1 deletion debian/compat

This file was deleted.

19 changes: 13 additions & 6 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
Source: admc
Maintainer: Kees van Vloten
Section: misc
Maintainer: Kees van Vloten <[email protected]>
Section: admin
Priority: optional
Rules-Requires-Root: no
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
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
Depends: libldap-2.4-2, libsasl2-2, libsmbclient (>=4.9), libuuid1 (>= 2.33), libqt5help5 (>= 5.11), libkrb5-3 (>= 1.17)
Description: Samba domain management console.
Samba domain management console.
Depends: ${misc:Depends}, ${shlibs:Depends}, libsasl2-2, libqt5help5 (>= 5.11)
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).
6 changes: 6 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -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
7 changes: 1 addition & 6 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,5 @@ export DH_VERBOSE=1
export QT_SELECT=qt5

%:
dh $@ --buildsystem=cmake

override_dh_auto_configure:
dh_auto_configure -- \
-DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) \
-DADMC_BUILD_DEB=ON
dh $@

1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (native)
4 changes: 2 additions & 2 deletions src/adldap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,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})
Expand Down
4 changes: 2 additions & 2 deletions src/admc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,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)