diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/security/apg')
-rw-r--r-- | nixpkgs/pkgs/tools/security/apg/apg.patch | 44 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/security/apg/default.nix | 72 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/security/apg/phony-install-target.patch | 11 |
3 files changed, 127 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/security/apg/apg.patch b/nixpkgs/pkgs/tools/security/apg/apg.patch new file mode 100644 index 000000000000..abc22647d52f --- /dev/null +++ b/nixpkgs/pkgs/tools/security/apg/apg.patch @@ -0,0 +1,44 @@ +diff -rc apg-2.2.3/Makefile apg-2.2.3-new/Makefile +*** apg-2.2.3/Makefile 2003-08-07 17:40:30.000000000 +0200 +--- apg-2.2.3-new/Makefile 2013-07-24 12:25:31.159938436 +0200 +*************** +*** 113,131 **** + if test -x ./apg; then \ + ./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \ + ./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \ +! ./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apg ${INSTALL_PREFIX}${APG_BIN_DIR}; \ + ./install-sh -c -m 0444 ./doc/man/apg.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \ + fi + if test -x ./apgd; then \ + ./mkinstalldirs ${INSTALL_PREFIX}${APGD_BIN_DIR}; \ + ./mkinstalldirs ${INSTALL_PREFIX}${APGD_MAN_DIR}; \ +! ./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apgd ${INSTALL_PREFIX}${APGD_BIN_DIR}; \ + ./install-sh -c -m 0444 ./doc/man/apgd.8 ${INSTALL_PREFIX}${APGD_MAN_DIR}; \ + fi + if test -x ./apgbfm; then \ + ./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \ + ./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \ +! ./install-sh -c -m 0755 -o root -g ${FIND_GROUP} ./apgbfm ${INSTALL_PREFIX}${APG_BIN_DIR}; \ + ./install-sh -c -m 0444 ./doc/man/apgbfm.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \ + fi + +--- 113,131 ---- + if test -x ./apg; then \ + ./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \ + ./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \ +! ./install-sh -c -m 0755 ./apg ${INSTALL_PREFIX}${APG_BIN_DIR}; \ + ./install-sh -c -m 0444 ./doc/man/apg.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \ + fi + if test -x ./apgd; then \ + ./mkinstalldirs ${INSTALL_PREFIX}${APGD_BIN_DIR}; \ + ./mkinstalldirs ${INSTALL_PREFIX}${APGD_MAN_DIR}; \ +! ./install-sh -c -m 0755 ./apgd ${INSTALL_PREFIX}${APGD_BIN_DIR}; \ + ./install-sh -c -m 0444 ./doc/man/apgd.8 ${INSTALL_PREFIX}${APGD_MAN_DIR}; \ + fi + if test -x ./apgbfm; then \ + ./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \ + ./mkinstalldirs ${INSTALL_PREFIX}${APG_MAN_DIR}; \ +! ./install-sh -c -m 0755 ./apgbfm ${INSTALL_PREFIX}${APG_BIN_DIR}; \ + ./install-sh -c -m 0444 ./doc/man/apgbfm.1 ${INSTALL_PREFIX}${APG_MAN_DIR}; \ + fi + diff --git a/nixpkgs/pkgs/tools/security/apg/default.nix b/nixpkgs/pkgs/tools/security/apg/default.nix new file mode 100644 index 000000000000..db490c7822f8 --- /dev/null +++ b/nixpkgs/pkgs/tools/security/apg/default.nix @@ -0,0 +1,72 @@ +{ stdenv, fetchurl, openssl }: +stdenv.mkDerivation rec { + name = "apg-2.3.0b"; + src = fetchurl { + url = "http://www.adel.nursat.kz/apg/download/${name}.tar.gz"; + sha256 = "14lbq81xrcsmpk1b9qmqyz7n6ypf08zcxvcvp6f7ybcyf0lj1rfi"; + }; + configurePhase = '' + substituteInPlace Makefile --replace /usr/local "$out" + ''; + makeFlags = stdenv.lib.optionals stdenv.isDarwin ["CC=cc"]; + + patches = [ + ./apg.patch + ./phony-install-target.patch + ]; + + postPatch = stdenv.lib.optionalString stdenv.isDarwin '' + sed -i -e 's|APG_CLIBS += -lcrypt|APG_CLIBS += -L${openssl.out}/lib -lcrypto|' Makefile + ''; + + meta = { + description = "Tools for random password generation"; + longDescription = '' + APG (Automated Password Generator) is the tool set for random + password generation. + + Standalone version + + Generates some random words of required type and prints them + to standard output. + + Network version + + APG server: When client's request is arrived generates some + random words of predefined type and send them to client over + the network (according to RFC0972). + + APG client: Sends the password generation request to the APG + server, wait for generated Passwords arrival and then prints + them to the standard output. + + Advantages + + * Built-in ANSI X9.17 RNG (Random Number Generator) (CAST/SHA1) + * Built-in password quality checking system (it has support for + Bloom filter for faster access) + * Two Password Generation Algorithms: + 1. Pronounceable Password Generation Algorithm (according to + NIST FIPS 181) + 2. Random Character Password Generation Algorithm with 35 + configurable modes of operation + * Configurable password length parameters + * Configurable amount of generated passwords + * Ability to initialize RNG with user string + * Support for /dev/random + * Ability to crypt() generated passwords and print them as + additional output + * Special parameters to use APG in script + * Ability to log password generation requests for network version + * Ability to control APG service access using tcpd + * Ability to use password generation service from any type of box + (Mac, WinXX, etc.) that connected to network + * Ability to enforce remote users to use only allowed type of + password generation + ''; + homepage = http://www.adel.nursat.kz/apg/; + license = stdenv.lib.licenses.bsd3; + maintainers = with stdenv.lib.maintainers; [ astsmtl ]; + platforms = stdenv.lib.platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/tools/security/apg/phony-install-target.patch b/nixpkgs/pkgs/tools/security/apg/phony-install-target.patch new file mode 100644 index 000000000000..9edf50b4b599 --- /dev/null +++ b/nixpkgs/pkgs/tools/security/apg/phony-install-target.patch @@ -0,0 +1,11 @@ +diff -ur a/Makefile b/Makefile +--- a/Makefile 2003-08-08 00:40:39.000000000 +0900 ++++ b/Makefile 2018-04-05 22:29:39.284191020 +0900 +@@ -142,6 +142,7 @@ + strip ${CS_PROGNAME} + strip ${BFM_PROGNAME} + ++.PHONY: install + install: + if test -x ./apg; then \ + ./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \ |