Skip to content

Commit 36f79c1

Browse files
authored
Merge pull request #1436 from matejak/oscap_setcap_awareness
Fixed oscap-chrootable dependency.
2 parents 5c84dfd + 25a77db commit 36f79c1

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

utils/CMakeLists.txt

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,18 @@ if(ENABLE_OSCAP_UTIL)
3232
install(FILES "oscap.8"
3333
DESTINATION "${CMAKE_INSTALL_MANDIR}/man8"
3434
)
35-
endif()
36-
37-
add_custom_target(oscap-chrootable-nocap
38-
COMMAND cp oscap oscap-chrootable
39-
COMMENT "Copying oscap binary to a buddy binary that awaits chroot blessing by setcap"
40-
DEPENDS oscap
41-
)
4235

43-
add_custom_target(oscap-chrootable
44-
COMMAND setcap cap_sys_chroot+ep oscap-chrootable
45-
COMMENT "Generating chroot-capable oscap buddy"
46-
DEPENDS oscap-chrootable
47-
)
36+
add_custom_target(oscap-chrootable-nocap
37+
COMMAND cp oscap oscap-chrootable
38+
COMMENT "Copying oscap binary to a buddy binary that awaits chroot blessing by setcap"
39+
DEPENDS oscap
40+
)
41+
add_custom_target(oscap-chrootable
42+
COMMAND setcap cap_sys_chroot+ep oscap-chrootable
43+
COMMENT "Generating chroot-capable oscap buddy"
44+
DEPENDS oscap-chrootable-nocap
45+
)
46+
endif()
4847
endif()
4948
if(ENABLE_OSCAP_UTIL_CHROOT)
5049
install(PROGRAMS "oscap-chroot"

0 commit comments

Comments
 (0)