diff options
-rw-r--r-- | UPDATING | 11 | ||||
-rw-r--r-- | www/chpasswd/Makefile | 1 | ||||
-rw-r--r-- | www/chpasswd/files/patch-Makefile.in | 14 | ||||
-rw-r--r-- | www/chpasswd/files/patch-chpasswd.c | 108 | ||||
-rw-r--r-- | www/chpasswd/pkg-plist | 4 |
5 files changed, 134 insertions, 4 deletions
@@ -5,6 +5,17 @@ they are unavoidable. You should get into the habit of checking this file for changes each time you update your ports collection, before attempting any port upgrades. +20120418: + AFFECTS: users of www/chpasswd + AUTHOR: madpilot@FreeBSD.org + + Previous version of the chpasswd port put the configuration file + in the pkg-plist, causing it to be removed on deinstall. + + Users are advised to make a backup copy of the configuration file + before upgrading. This has been fixed and will not happen anymore + in future updates. + 20120415: AFFECTS: users of irc/ircd-ratbox AUTHOR: scheidell@FreeBSD.org diff --git a/www/chpasswd/Makefile b/www/chpasswd/Makefile index 374f7f63a85c..bfb68d6165e4 100644 --- a/www/chpasswd/Makefile +++ b/www/chpasswd/Makefile @@ -7,6 +7,7 @@ PORTNAME= chpasswd PORTVERSION= 2.2.4 +PORTREVISION= 1 CATEGORIES= www #MASTER_SITES= SF/orsochpasswd/orsochpasswd/chpasswd-2.2.4/ MASTER_SITES= SF/orso${PORTNAME}/orso${PORTNAME}/${PORTNAME}-${PORTVERSION}/ diff --git a/www/chpasswd/files/patch-Makefile.in b/www/chpasswd/files/patch-Makefile.in index 3db8991b957a..8680caec9ebc 100644 --- a/www/chpasswd/files/patch-Makefile.in +++ b/www/chpasswd/files/patch-Makefile.in @@ -1,5 +1,5 @@ ---- Makefile.in.orig Wed Feb 11 14:56:26 2004 -+++ Makefile.in Wed Feb 11 14:57:15 2004 +--- Makefile.in.orig 2009-02-16 18:04:20.000000000 +0100 ++++ Makefile.in 2012-04-04 11:40:46.773080089 +0200 @@ -1,13 +1,13 @@ # Makefile.in for chpasswd.cgi @@ -16,7 +16,15 @@ PREFIX = @prefix@ DEFS = -I. @DEFS@ -DPREFIX=\"@prefix@\" -@@ -43,7 +43,7 @@ +@@ -37,13 +37,13 @@ + echo "cp $(PREFIX)/chpasswd.conf"; \ + cp chpasswd.conf $(PREFIX)/chpasswd.conf; \ + chmod 755 $(PREFIX)/chpasswd.conf; \ +- else \ +- cp chpasswd.conf $(PREFIX)/chpasswd.conf.orig; \ + fi ++ @echo "cp $(PREFIX)/chpasswd.conf.sample" ++ @cp chpasswd.conf $(PREFIX)/chpasswd.conf.sample @if test ! -f $(PREFIX)/chpasswd.log; then \ echo "touch $(PREFIX)/chpasswd.log"; \ touch $(PREFIX)/chpasswd.log; \ diff --git a/www/chpasswd/files/patch-chpasswd.c b/www/chpasswd/files/patch-chpasswd.c new file mode 100644 index 000000000000..1bc13a09813f --- /dev/null +++ b/www/chpasswd/files/patch-chpasswd.c @@ -0,0 +1,108 @@ +--- chpasswd.c.orig 2012-04-03 23:09:02.516342475 +0200 ++++ chpasswd.c 2012-04-03 23:09:54.396341248 +0200 +@@ -804,7 +804,7 @@ + + if (strcmp(getenv("REQUEST_METHOD"), "GET") == 0) { + UserForm(PwdMinLen,PwdMaxLen,PwdMinChar,PwdMinNum,PwdMinSpec,BgColor,TxColor,TiColor,RuColor,Logo,Width,Height,Header,BgImage,ShowInfo); +- return; ++ return 0; + } + + pContentLength = getenv("CONTENT_LENGTH"); +@@ -852,7 +852,7 @@ + if(strlen(PwdLogFile) > 0) + log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject); + Herror(Msg); +- return; ++ return 0; + } + + if (strlen(New_pw1) < atoi(PwdMinLen)) { +@@ -860,7 +860,7 @@ + if(strlen(PwdLogFile) > 0) + log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject); + Herror(Msg); +- return; ++ return 0; + } + + if (strlen(New_pw1) > atoi(PwdMaxLen)) { +@@ -868,7 +868,7 @@ + if(strlen(PwdLogFile) > 0) + log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject); + Herror(Msg); +- return; ++ return 0; + } + + if (strcmp(Old_pw, New_pw1) == 0) { +@@ -876,7 +876,7 @@ + if(strlen(PwdLogFile) > 0) + log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject); + Herror(Msg); +- return; ++ return 0; + } + + if (strcmp(New_pw1, New_pw2) != 0) { +@@ -884,13 +884,13 @@ + if(strlen(PwdLogFile) > 0) + log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject); + Herror(Msg); +- return; ++ return 0; + } + + if ((fpw = fopen(PwdFile, "r")) == NULL) { + sprintf(Msg, "%s %s",msg07, PwdFile); + Herror(Msg); +- return; ++ return 0; + } + + fd = mkstemp(template); +@@ -898,7 +898,7 @@ + ((tmp = fdopen (fd, "w+" )) == NULL) ) { /* failure, bail out */ + sprintf(Msg, "%s",msg08); + Herror(Msg); +- return; ++ return 0; + } + while (fgets(buf, MAXLEN, fpw) != NULL) { + if (!ok) { +@@ -918,7 +918,7 @@ + if(strlen(PwdLogFile) > 0) + log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject); + Herror(Msg); +- return; ++ return 0; + } + + (void) srand((int) time((time_t *) NULL)); +@@ -943,13 +943,13 @@ + if ((tmp = fopen(template, "r")) == NULL) { + sprintf(Msg, "%s",msg08); + Herror(Msg); +- return; ++ return 0; + } + + if ((fpw = fopen(PwdFile, "w")) == NULL) { + sprintf(Msg, "%s",msg07); + Herror(Msg); +- return; ++ return 0; + } + + while (fgets(buf, MAXLEN, tmp) != NULL) +@@ -970,8 +970,8 @@ + if(strlen(PwdLogFile) > 0) + log(PwdLogFile,User,New_pw1,ShowPwd,Msg,PwdFile,SmtpUser,SmtpSubject); + Herror(Msg); +- return; ++ return 0; + } + } +- return; ++ return 0; + } diff --git a/www/chpasswd/pkg-plist b/www/chpasswd/pkg-plist index 793ea1b5e221..5bd5bee9445e 100644 --- a/www/chpasswd/pkg-plist +++ b/www/chpasswd/pkg-plist @@ -1,4 +1,6 @@ -etc/chpasswd/chpasswd.conf +@unexec if cmp -s %D/etc/chpasswd/chpasswd.conf.sample %D/etc/chpasswd/chpasswd.conf; then rm -f %D/etc/chpasswd/chpasswd.conf; fi +etc/chpasswd/chpasswd.conf.sample +@exec if [ ! -f %D/etc/chpasswd/chpasswd.conf ] ; then cp -p %D/%F %B/chpasswd/chpasswd.conf; fi etc/chpasswd/chpasswd.log www/cgi-bin/chpasswd.cgi @dirrm etc/chpasswd |