diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-mail/vpopmail/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-mail/vpopmail/files')
-rw-r--r-- | net-mail/vpopmail/files/99vpopmail | 2 | ||||
-rw-r--r-- | net-mail/vpopmail/files/vpopmail-5.4.9-access.violation.patch | 27 | ||||
-rw-r--r-- | net-mail/vpopmail/files/vpopmail-Maildir-dotmaildir-fix.sh | 42 | ||||
-rw-r--r-- | net-mail/vpopmail/files/vpopmail-double-free.patch | 13 | ||||
-rw-r--r-- | net-mail/vpopmail/files/vpopmail-lazy.patch | 10 | ||||
-rw-r--r-- | net-mail/vpopmail/files/vpopmail-vpgsql.patch | 94 |
6 files changed, 188 insertions, 0 deletions
diff --git a/net-mail/vpopmail/files/99vpopmail b/net-mail/vpopmail/files/99vpopmail new file mode 100644 index 000000000000..02d0a9c4d35a --- /dev/null +++ b/net-mail/vpopmail/files/99vpopmail @@ -0,0 +1,2 @@ +ROOTPATH="/var/vpopmail/bin" +CONFIG_PROTECT="/var/vpopmail/etc" diff --git a/net-mail/vpopmail/files/vpopmail-5.4.9-access.violation.patch b/net-mail/vpopmail/files/vpopmail-5.4.9-access.violation.patch new file mode 100644 index 000000000000..7a31fa9a3d3e --- /dev/null +++ b/net-mail/vpopmail/files/vpopmail-5.4.9-access.violation.patch @@ -0,0 +1,27 @@ +--- configure.in.org 2004-06-30 22:11:08.000000000 -0700 ++++ configure.in 2004-08-22 16:45:36.279473008 -0700 +@@ -463,16 +463,16 @@ + if test ! -d $vpopmaildir + then + AC_MSG_WARN( creating $vpopmaildir ) +- mkdir -p $vpopmaildir +- chown $vpopmailuid $vpopmaildir +- chgrp $vpopmailgid $vpopmaildir +- chmod 755 $vpopmaildir ++ mkdir -p ${D}/$vpopmaildir ++ chown $vpopmailuid ${D}/$vpopmaildir ++ chgrp $vpopmailgid ${D}/$vpopmaildir ++ chmod 755 ${D}/$vpopmaildir + fi + AC_MSG_WARN( making a vpopmail etc directory ) +- mkdir $vpopmaildir/etc +- chown $vpopmailuid "$vpopmaildir"/etc +- chgrp $vpopmailgid "$vpopmaildir"/etc +- chmod 755 "$vpopmaildir"/etc ++ mkdir ${D}/$vpopmaildir/etc ++ chown $vpopmailuid ${D}/$vpopmaildir/etc ++ chgrp $vpopmailgid ${D}/$vpopmaildir/etc ++ chmod 755 ${D}/$vpopmaildir/etc + fi + + #---------------------------------------------------------------------- diff --git a/net-mail/vpopmail/files/vpopmail-Maildir-dotmaildir-fix.sh b/net-mail/vpopmail/files/vpopmail-Maildir-dotmaildir-fix.sh new file mode 100644 index 000000000000..758cced2d885 --- /dev/null +++ b/net-mail/vpopmail/files/vpopmail-Maildir-dotmaildir-fix.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# Written by Robin H. Johnson, robbat2@gentoo.org + +OLDNAME='Maildir' +NEWNAME='.maildir' +SEARCHPATH=/var/vpopmail/domains/ +MINDEPTH=3 +# If you have a very large vpopmail deployment, you may need to increase MAXDEPTH. +MAXDEPTH=6 + +if [ "${1}" == '--revert' ]; then + SEARCHNAME="${NEWNAME}" + REPLACENAME="${OLDNAME}" +else + SEARCHNAME="${OLDNAME}" + REPLACENAME="${NEWNAME}" +fi + +echo "Doing '${SEARCHNAME}' '${REPLACENAME}' changeover" +echo find ${SEARCHPATH} -name "${SEARCHNAME}" -maxdepth $MAXDEPTH -mindepth $MINDEPTH -type d +for i in `find ${SEARCHPATH} -name "${SEARCHNAME}" -maxdepth $MAXDEPTH -mindepth $MINDEPTH -type d`; do + foundname=${i/${SEARCHNAME}*}${SEARCHNAME} + base="`dirname $i`" + todoname=${base}/${REPLACENAME} + #echo "$foundname -> $todoname" + echo "Fixing `echo $base | sed -e "s|${SEARCHPATH}||g"`" + chmod +t $base + if [ -L ${todoname} ]; then + echo Removing symlink "${todoname}" + rm ${todoname} + fi + if [ -e ${todoname} ]; then + echo "Error! Cannot move ${i} as destination exists!" + continue + fi + mv "${foundname}" "${todoname}" + ln -s "${todoname}" "${foundname}" + chown vpopmail:vpopmail "${foundname}" + chmod -t $base +done; diff --git a/net-mail/vpopmail/files/vpopmail-double-free.patch b/net-mail/vpopmail/files/vpopmail-double-free.patch new file mode 100644 index 000000000000..d7d118578d73 --- /dev/null +++ b/net-mail/vpopmail/files/vpopmail-double-free.patch @@ -0,0 +1,13 @@ +diff --git a/trunk/vpalias.c b/trunk/vpalias.c +index 9853f14..e9bd81f 100644 +--- a/trunk/vpalias.c ++++ b/trunk/vpalias.c +@@ -369,7 +369,7 @@ char *valias_select_names( char *domain ) + } + } + } +- if (num_names < max_names) { ++ if (num_names < max_names && num_names > 0) { + new_names = realloc( names, num_names * sizeof(char *) ); + if (new_names != NULL) + names = new_names; diff --git a/net-mail/vpopmail/files/vpopmail-lazy.patch b/net-mail/vpopmail/files/vpopmail-lazy.patch new file mode 100644 index 000000000000..e47bbaa9d4ba --- /dev/null +++ b/net-mail/vpopmail/files/vpopmail-lazy.patch @@ -0,0 +1,10 @@ +--- Makefile.am.orig 2005-11-18 03:19:43.000000000 +0100 ++++ Makefile.am 2005-11-18 03:20:18.000000000 +0100 +@@ -33,6 +33,7 @@ + + vchkpw_SOURCES = vchkpw.c md5.c hmac_md5.c + vchkpw_LDADD = libvpopmail.a @auth_libs@ ++vchkpw_LDFLAGS = -Wl,-z,now + + vchangepw_SOURCES = vchangepw.c + vchangepw_LDADD = libvpopmail.a @auth_libs@ diff --git a/net-mail/vpopmail/files/vpopmail-vpgsql.patch b/net-mail/vpopmail/files/vpopmail-vpgsql.patch new file mode 100644 index 000000000000..1d387e43f59d --- /dev/null +++ b/net-mail/vpopmail/files/vpopmail-vpgsql.patch @@ -0,0 +1,94 @@ +--- vpgsql.c.2 2011-02-28 18:00:45.000000000 +0100 ++++ vpgsql.c 2011-08-06 05:46:49.959717911 +0200 +@@ -392,10 +392,10 @@ + #endif + + #ifdef ENABLE_SQL_LOGGING +- qnprintf( sqlBufUpdate, SQL_BUF_SIZE, ++ qnprintf( SqlBufUpdate, SQL_BUF_SIZE, + "delete from vlog where domain = '%s'", domain ); + pgres=PQexec(pgc, SqlBufUpdate); +- if( !pgres || PGresultStatus(pgres)!=PGRES_COMMAND_OK) { ++ if( !pgres || PQresultStatus(pgres)!=PGRES_COMMAND_OK) { + return(-1); + } + #endif +@@ -445,11 +445,11 @@ + #endif + + #ifdef ENABLE_SQL_LOGGING +- qnprintf( sqlBufUpdate, SQL_BUF_SIZE, ++ qnprintf( SqlBufUpdate, SQL_BUF_SIZE, + "delete from vlog where domain = '%s' and user='%s'", + domain, user ); + pgres=PQexec(pgc, SqlBufUpdate); +- if( !pgres || PGresultStatus(pgres)!=PGRES_COMMAND_OK) { ++ if( !pgres || PQresultStatus(pgres)!=PGRES_COMMAND_OK) { + err = -1; + } + #endif +@@ -1555,6 +1555,64 @@ + return valias_current->data; + } + } ++ ++char *valias_select_names( char *alias, char *domain ) ++{ ++ PGresult *pgres; ++ int err; ++ unsigned ntuples, ctuple; ++ struct linklist *temp_entry = NULL; ++ ++ /* remove old entries as necessary */ ++ while (valias_current != NULL) ++ valias_current = linklist_del (valias_current); ++ ++ if ( (err =vauth_open(0)) != 0 ) return (NULL); ++ ++ qnprintf( SqlBufRead, SQL_BUF_SIZE, ++ "select distinct alias from valias where domain = '%s' order by alias", domain); ++ if ( ! (pgres=PQexec(pgc, SqlBufRead)) ++ || PQresultStatus(pgres) != PGRES_TUPLES_OK ) { ++ if(pgres) PQclear(pgres); ++ vcreate_valias_table(); ++ if ( ! (pgres=PQexec(pgc, SqlBufRead)) ++ || PQresultStatus(pgres) != PGRES_TUPLES_OK ) { ++ fprintf(stderr,"vpgsql: sql error[o]: %s\n", ++ PQerrorMessage(pgc)); ++ if (pgres) PQclear (pgres); ++ return(NULL); ++ } ++ } ++ ntuples = PQntuples (pgres); ++ for (ctuple = 0; ctuple < ntuples; ctuple++) { ++ temp_entry = linklist_add (temp_entry, PQgetvalue (pgres, ctuple, 1), PQgetvalue (pgres, ctuple, 0)); ++ if (valias_current == NULL) valias_current = temp_entry; ++ } ++ PQclear (pgres); ++ pgres = NULL; ++ ++ if (valias_current == NULL) return NULL; /* no results */ ++ else { ++ strcpy (alias, valias_current->d2); ++ return(valias_current->data); ++ } ++} ++ ++char *valias_select_names_next(char *alias) ++{ ++ if (valias_current == NULL) return NULL; ++ valias_current = linklist_del (valias_current); ++ ++ if (valias_current == NULL) return NULL; /* no results */ ++ else { ++ strcpy(alias, valias_current->d2); ++ return(valias_current->data); ++ } ++} ++ ++void valias_select_names_end() { ++ // not needed with PostgreSQL ++} + #endif + + #ifdef ENABLE_SQL_LOGGING |