-
Notifications
You must be signed in to change notification settings - Fork 964
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vncpasswd add password complexity rule check to enhance security
Use the library pwquality to check password complexity and improve security. Additionally, optional enable support is also set in CMake.
- Loading branch information
Showing
3 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,26 @@ | ||
# check for pwquality password check support | ||
option(ENABLE_PWQUALITY "Enable pwquality password check" ON) | ||
if(ENABLE_PWQUALITY) | ||
if(UNIX) | ||
find_package(PkgConfig) | ||
if (PKG_CONFIG_FOUND) | ||
pkg_check_modules(PWQUALITY pwquality) | ||
if(PWQUALITY_FOUND) | ||
add_definitions(-DHAVE_PWQUALITY) | ||
endif() | ||
endif() | ||
endif() | ||
endif() | ||
|
||
add_executable(vncpasswd | ||
vncpasswd.cxx) | ||
|
||
target_include_directories(vncpasswd PUBLIC ${CMAKE_SOURCE_DIR}/common) | ||
target_link_libraries(vncpasswd tx rfb os) | ||
|
||
if(PWQUALITY_FOUND) | ||
target_link_libraries(vncpasswd pwquality) | ||
endif() | ||
|
||
install(TARGETS vncpasswd DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}) | ||
install(FILES vncpasswd.man DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man1 RENAME vncpasswd.1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters