pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/news/nntpclnt Use more safely the various buffers in p...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/45c2c4d082cc
branches:  trunk
changeset: 472276:45c2c4d082cc
user:      cube <cube%pkgsrc.org@localhost>
date:      Wed Apr 07 13:56:43 2004 +0000

description:
Use more safely the various buffers in postauth.c so that at least it
doesn't crash on common configuration.  Fixes PR 24982 by Gary Duzan.

Also, silently try to delete the configuration directory not to wipe the
user's configuration when updating the package.

Finally, mark this package as NetBSD and SunOS only, since it will fail
on other platforms by lack of default configuration.

Bump PKGREVISION.

diffstat:

 news/nntpclnt/Makefile               |  13 +++++++++----
 news/nntpclnt/PLIST                  |  11 ++++-------
 news/nntpclnt/distinfo               |   3 ++-
 news/nntpclnt/files/config.NetBSD.sh |   8 ++++----
 news/nntpclnt/files/config.SunOS.sh  |   8 ++++----
 5 files changed, 23 insertions(+), 20 deletions(-)

diffs (139 lines):

diff -r b38ea588f5a8 -r 45c2c4d082cc news/nntpclnt/Makefile
--- a/news/nntpclnt/Makefile    Wed Apr 07 13:31:54 2004 +0000
+++ b/news/nntpclnt/Makefile    Wed Apr 07 13:56:43 2004 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.20 2003/07/17 22:52:09 grant Exp $
+# $NetBSD: Makefile,v 1.21 2004/04/07 13:56:43 cube Exp $
 
 DISTNAME=      nntpclnt-1.6.1
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    news
 MASTER_SITES=  ftp://ftp.uu.net/networking/news/nntp/
 
@@ -18,13 +18,18 @@
 ALL_TARGET=    inews
 PKG_GROUPS=    news
 USE_PKGINSTALL=        yes
+PKG_SYSCONFSUBDIR=     nntp
+
+PLIST_SUBST+=  PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
 
 .include "../../mk/bsd.prefs.mk"
 
 CONFIG_SH=     ${FILESDIR}/config.${OPSYS}.sh
+ONLY_FOR_PLATFORM=     NetBSD-*-* SunOS-*-*
 
 do-configure:
-       ${SED} -e s,@PREFIX@,${PREFIX}, ${CONFIG_SH} >${WRKSRC}/config.sh
+       ${SED} -e s,@PREFIX@,${PREFIX}, -e s,@PKGSYSCONFDIR@,${PKG_SYSCONFDIR}, \
+               ${CONFIG_SH} >${WRKSRC}/config.sh
        @cd ${WRKSRC} && ${SH} Makefile.SH && ${SH} config.h.SH
 
 post-build:
@@ -37,6 +42,6 @@
        ${INSTALL_DATA} ${WRKSRC}/nntp.h ${PREFIX}/include/
        ${INSTALL_DATA} ${WRKSRC}/libnntpclnt.a ${PREFIX}/lib/
        ${INSTALL_DATA} ${WRKSRC}/nntpclnt.3 ${PREFIX}/man/man3/
-       ${INSTALL_DATA_DIR} ${PREFIX}/etc/nntp
+       ${INSTALL_DATA_DIR} ${PKG_SYSCONFDIR}
 
 .include "../../mk/bsd.pkg.mk"
diff -r b38ea588f5a8 -r 45c2c4d082cc news/nntpclnt/PLIST
--- a/news/nntpclnt/PLIST       Wed Apr 07 13:31:54 2004 +0000
+++ b/news/nntpclnt/PLIST       Wed Apr 07 13:56:43 2004 +0000
@@ -1,10 +1,7 @@
-@comment $NetBSD: PLIST,v 1.3 2002/06/26 10:29:53 seb Exp $
+@comment $NetBSD: PLIST,v 1.4 2004/04/07 13:56:43 cube Exp $
 bin/inews
 include/nntp.h
 lib/libnntpclnt.a
-@exec ${MKDIR} %D/etc/nntp
-@unexec ${RM} -f %D/etc/nntp/domainname
-@unexec ${RM} -f %D/etc/nntp/server
-@unexec ${RM} -f %D/etc/nntp/server.auth
-@dirrm etc/nntp
-man/man3/nntpclnt.3.gz
+man/man3/nntpclnt.3
+@exec ${MKDIR} ${PKG_SYSCONFDIR} 2>/dev/null || ${TRUE}
+@unexec ${RMDIR} ${PKG_SYSCONFDIR} 2>/dev/null || ${TRUE}
diff -r b38ea588f5a8 -r 45c2c4d082cc news/nntpclnt/distinfo
--- a/news/nntpclnt/distinfo    Wed Apr 07 13:31:54 2004 +0000
+++ b/news/nntpclnt/distinfo    Wed Apr 07 13:56:43 2004 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.3 2002/09/18 06:28:05 tron Exp $
+$NetBSD: distinfo,v 1.4 2004/04/07 13:56:43 cube Exp $
 
 SHA1 (nntpclnt-1.6.1.tar.gz) = df24e9083185680d85bdc016e9e4ba54f4071f80
 Size (nntpclnt-1.6.1.tar.gz) = 34369 bytes
 SHA1 (patch-aa) = 62bcf11bb2cb0b39baf8188816a039165e9e6338
 SHA1 (patch-ab) = 2cffb1a1eb68c7520bef6b81d41c924e5aa5be2c
+SHA1 (patch-ac) = ed067e2f2c6c22e32ca388dc6f990aa720d762aa
diff -r b38ea588f5a8 -r 45c2c4d082cc news/nntpclnt/files/config.NetBSD.sh
--- a/news/nntpclnt/files/config.NetBSD.sh      Wed Apr 07 13:31:54 2004 +0000
+++ b/news/nntpclnt/files/config.NetBSD.sh      Wed Apr 07 13:56:43 2004 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: config.NetBSD.sh,v 1.3 1999/09/20 18:52:06 kim Exp $
+# $NetBSD: config.NetBSD.sh,v 1.4 2004/04/07 13:56:43 cube Exp $
 #
 # config.sh
 # This file was produced by running the Configure script
@@ -49,7 +49,7 @@
 strcasecmp='define'
 seteuid='define'
 sitename=''
-hostfile='@PREFIX@/etc/nntp/domainname'
+hostfile='@PKGSYSCONFDIR@/domainname'
 domain=''
 isadmin='undef'
 newsadmin='root'
@@ -71,11 +71,11 @@
 douname='undef'
 phostname='undef'
 hostcmd=''
-serverfile='@PREFIX@/etc/nntp/server'
+serverfile='@PKGSYSCONFDIR@/server'
 auth='define'
 authsimple='define'
 authold='define'
-passfile='@PREFIX@/etc/nntp/server.auth'
+passfile='@PKGSYSCONFDIR@/server.auth'
 decnet='undef'
 datakit='undef'
 CONFIG=true
diff -r b38ea588f5a8 -r 45c2c4d082cc news/nntpclnt/files/config.SunOS.sh
--- a/news/nntpclnt/files/config.SunOS.sh       Wed Apr 07 13:31:54 2004 +0000
+++ b/news/nntpclnt/files/config.SunOS.sh       Wed Apr 07 13:56:43 2004 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: config.SunOS.sh,v 1.2 1999/09/20 19:23:16 kim Exp $
+# $NetBSD: config.SunOS.sh,v 1.3 2004/04/07 13:56:43 cube Exp $
 #
 # config.sh
 # This file was produced by running the Configure script.
@@ -49,7 +49,7 @@
 strcasecmp='define'
 seteuid='define'
 sitename=''
-hostfile='@PREFIX@/etc/nntp/domainname'
+hostfile='@PKGSYSCONFDIR@/domainname'
 domain=''
 isadmin='undef'
 newsadmin='root'
@@ -71,11 +71,11 @@
 douname='undef'
 phostname='undef'
 hostcmd=''
-serverfile='@PREFIX@/etc/nntp/server'
+serverfile='@PKGSYSCONFDIR@/etc/nntp/server'
 auth='define'
 authsimple='define'
 authold='define'
-passfile='@PREFIX@/etc/nntp/server.auth'
+passfile='@PKGSYSCONFDIR@/etc/nntp/server.auth'
 decnet='undef'
 datakit='undef'
 CONFIG=true



Home | Main Index | Thread Index | Old Index