diff --git a/security/cops/Makefile b/security/cops/Makefile index 6671a944a655..1b661dd334fd 100644 --- a/security/cops/Makefile +++ b/security/cops/Makefile @@ -1,47 +1,46 @@ PORTNAME= cops PORTVERSION= 1.04 PORTREVISION= 1 CATEGORIES= security MASTER_SITES= https://cschubert.com/distfiles/ DISTNAME= ${PORTNAME}${PORTVERSION:S/.//g}+ MAINTAINER= cy@FreeBSD.org COMMENT= System secureness checker WWW= http://www.fish2.com/cops/ USES= groff perl5 shebangfix USE_PERL5= run WRKSRC= ${WRKDIR}/${PORTNAME}_${PORTVERSION:S/.//g}+ HAS_CONFIGURE= yes CONFIGURE_SCRIPT= reconfig -CFLAGS= -Wno-format-security -Wno-int-conversion MAKEFILE= makefile MAKE_ARGS= EXECUTABLE="${EXECUTABLE}" C_SRC="${C_SRC}" MAKE_JOBS_UNSAFE= yes EXECUTABLE= home.chk user.chk is_writable crc crc_check \ addto clearfiles filewriters members tilde is_able C_SRC= home.chk.c user.chk.c is_able.c is_something.c \ addto.c clearfiles.c filewriters.c members.c tilde.c \ crc.c crc_check.c post-patch: @${REINPLACE_CMD} -i '' -e 's|/usr/bin/perl|${perl_CMD}|' \ ${WRKSRC}/perl/cops pre-build: ${SED} \ -e 's,^SECURE=/usr/foo/bar,SECURE=${PREFIX}/cops,g' \ -e '/^$$SECURE\/passwd\.chk.*/d' \ -e 's,SECURE_USERS="foo@bar\.edu",SECURE_USERS="root@localhost",g' \ -e 's/passwd\.chk pass.chk //g' \ ${WRKSRC}/cops > ${WRKSRC}/cops.out ${MV} ${WRKSRC}/cops.out ${WRKSRC}/cops do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/cops ${TAR} -C ${WRKSRC} --exclude "*.old" -cf - . | \ ${TAR} -C ${STAGEDIR}${PREFIX}/cops --unlink -xf - ${CHMOD} -R go-rwx ${STAGEDIR}${PREFIX}/cops .include diff --git a/security/cops/files/patch-src_addto.c b/security/cops/files/patch-src_addto.c new file mode 100644 index 000000000000..bfc47966a323 --- /dev/null +++ b/security/cops/files/patch-src_addto.c @@ -0,0 +1,54 @@ +--- src/addto.c.orig 1992-03-26 16:14:28.000000000 -0800 ++++ src/addto.c 2023-02-14 21:35:27.391968000 -0800 +@@ -26,6 +26,8 @@ + #define LINELEN 600 /* Max chars in a line. */ + #define SUCCESS "Success" /* Filename to put success messages. */ + ++#define NUL '\0' ++ + main(argc, argv) + int argc; + char *argv[]; +@@ -45,13 +47,13 @@ + + tmpfile = NULL; + +- keypending[0] = NULL; ++ keypending[0] = NUL; + strcat(keypending, key); + strcat(keypending, " "); + /* + * If the uid is known, print out the comments and exit. + */ +- filename[0] = NULL; ++ filename[0] = NUL; + strcat(filename, type); + strcat(filename, ".k"); + if ((tmpfile = fopen(filename, "r")) == NULL) { +@@ -82,7 +84,7 @@ + /* + * If a duplicate, don't add it. + */ +- filename[0] = NULL; ++ filename[0] = NUL; + strcat(filename, type); + strcat(filename, ".p"); + if (freopen(filename, "r", tmpfile) == NULL) { +@@ -97,7 +99,7 @@ + /* + * Add the goal to the pending file. + */ +- filename[0] = NULL; ++ filename[0] = NUL; + strcat(filename, type); + strcat(filename, ".p"); + if (freopen(filename, "a", tmpfile) == NULL) { +@@ -109,7 +111,7 @@ + /* + * Add the goal to the next goal (type) file. + */ +- filename[0] = NULL; ++ filename[0] = NUL; + strcat(filename, type); + strcat(filename, ".n"); + if (freopen(filename, "a", tmpfile) == NULL) {