[gentoo-commits] repo/gentoo:master commit in: net-mail/vpopmail/, net-mail/vpopmail/files/

2023-03-19 Thread Sam James
commit: 8b4861aa18c6c0bd2860bbb859ae9238416b243b
Author: Rolf Eike Beer  sf-mail  de>
AuthorDate: Sat Dec 24 13:18:19 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Mar 20 05:31:58 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b4861aa

net-mail/vpopmail: add missing headers in configure tests

Closes: https://bugs.gentoo.org/885873
Closes: https://bugs.gentoo.org/900192
Signed-off-by: Rolf Eike Beer  sf-mail.de>
Closes: https://github.com/gentoo/gentoo/pull/30231
Signed-off-by: Sam James  gentoo.org>

 ...33-add-missing-headers-in-configure-tests.patch | 40 ++
 net-mail/vpopmail/vpopmail-5.4.33-r9.ebuild|  1 +
 2 files changed, 41 insertions(+)

diff --git 
a/net-mail/vpopmail/files/vpopmail-5.4.33-add-missing-headers-in-configure-tests.patch
 
b/net-mail/vpopmail/files/vpopmail-5.4.33-add-missing-headers-in-configure-tests.patch
new file mode 100644
index ..1fa1fbaf3af4
--- /dev/null
+++ 
b/net-mail/vpopmail/files/vpopmail-5.4.33-add-missing-headers-in-configure-tests.patch
@@ -0,0 +1,40 @@
+From 6a2bc617c8ca8368697e971b6456b5b07a1c8b18 Mon Sep 17 00:00:00 2001
+From: Rolf Eike Beer 
+Date: Thu, 15 Dec 2022 21:34:18 +0100
+Subject: [PATCH 1/5] add missing headers in configure tests
+
+See: https://bugs.gentoo.org/885873
+---
+ configure| 2 ++
+ configure.in | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/configure b/configure
+index 43030d8..a4b0d54 100755
+--- a/configure
 b/configure
+@@ -5686,6 +5686,8 @@ else
+   #include 
+   #include 
+   #include 
++  #include 
++  #include 
+ 
+   int main() {
+ struct passwd *pw;
+diff --git a/configure.in b/configure.in
+index c4e32d4..f557f26 100644
+--- a/configure.in
 b/configure.in
+@@ -423,6 +423,8 @@ AC_TRY_RUN( [
+   #include 
+   #include 
+   #include 
++  #include 
++  #include 
+ 
+   int main() {
+ struct passwd *pw;
+-- 
+2.35.3
+

diff --git a/net-mail/vpopmail/vpopmail-5.4.33-r9.ebuild 
b/net-mail/vpopmail/vpopmail-5.4.33-r9.ebuild
index d186cf1de43e..ee9f8d6f2750 100644
--- a/net-mail/vpopmail/vpopmail-5.4.33-r9.ebuild
+++ b/net-mail/vpopmail/vpopmail-5.4.33-r9.ebuild
@@ -42,6 +42,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-5.4.33-use-proper-printf-format-strings.patch
"${FILESDIR}"/${PN}-5.4.33-vpgsql-onchange.patch

"${FILESDIR}"/${PN}-5.4.33-avoid-duplicate-definitions-of-MYSQL_READ_-and-MYSQL.patch
+   "${FILESDIR}"/${PN}-5.4.33-add-missing-headers-in-configure-tests.patch
 )
 DOCS=(
ChangeLog



[gentoo-commits] repo/gentoo:master commit in: net-mail/vpopmail/, net-mail/vpopmail/files/

2020-07-31 Thread Sergei Trofimovich
commit: aabed522aad1d11f21f585fec92c13355fdfac95
Author: Rolf Eike Beer  sf-mail  de>
AuthorDate: Fri Jul 31 20:15:01 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Fri Jul 31 20:42:08 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aabed522

net-mail/vpopmail: fix build with PostgreSQL and onchange script

Closes: https://bugs.gentoo.org/734884
Signed-off-by: Rolf Eike Beer  sf-mail.de>
Signed-off-by: Sergei Trofimovich  gentoo.org>

 .../files/vpopmail-5.4.33-vpgsql-onchange.patch| 26 ++
 net-mail/vpopmail/vpopmail-5.4.33-r7.ebuild|  1 +
 2 files changed, 27 insertions(+)

diff --git a/net-mail/vpopmail/files/vpopmail-5.4.33-vpgsql-onchange.patch 
b/net-mail/vpopmail/files/vpopmail-5.4.33-vpgsql-onchange.patch
new file mode 100644
index 000..4fcd3a51a0b
--- /dev/null
+++ b/net-mail/vpopmail/files/vpopmail-5.4.33-vpgsql-onchange.patch
@@ -0,0 +1,26 @@
+From c317829c750438fbb16867cbadb196328f3ba567 Mon Sep 17 00:00:00 2001
+From: Rolf Eike Beer 
+Date: Fri, 31 Jul 2020 22:09:50 +0200
+Subject: [PATCH] fix build when using PostgreSQL and --enable-onchange-script
+
+This obviously has never worked.
+---
+ vpgsql.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vpgsql.c b/vpgsql.c
+index b5dd40b..7d8e5c0 100644
+--- a/vpgsql.c
 b/vpgsql.c
+@@ -1456,7 +1456,7 @@ int valias_delete_domain( char *domain)
+ #ifdef ONCHANGE_SCRIPT
+   if( allow_onchange ) {
+  /* tell other programs that data has changed */
+- snprintf ( onchange_buf, MAX_BUFF, "%s@%s - %s", alias, domain, 
alias_line);
++ snprintf ( onchange_buf, MAX_BUFF, "%s", domain );
+  call_onchange ( "valias_delete_domain" );
+  }
+ #endif
+-- 
+2.26.2
+

diff --git a/net-mail/vpopmail/vpopmail-5.4.33-r7.ebuild 
b/net-mail/vpopmail/vpopmail-5.4.33-r7.ebuild
index face2fb6b99..ce3584c722a 100644
--- a/net-mail/vpopmail/vpopmail-5.4.33-r7.ebuild
+++ b/net-mail/vpopmail/vpopmail-5.4.33-r7.ebuild
@@ -39,6 +39,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-5.4.33-unistd.patch
"${FILESDIR}"/${PN}-5.4.33-check-crypt-return-value-for-NULL.patch
"${FILESDIR}"/${PN}-5.4.33-use-proper-printf-format-strings.patch
+   "${FILESDIR}"/${PN}-5.4.33-vpgsql-onchange.patch
 )
 DOCS=(
ChangeLog



[gentoo-commits] repo/gentoo:master commit in: net-mail/vpopmail/, net-mail/vpopmail/files/

2019-11-17 Thread Michał Górny
commit: 6248c40cc4b4411223a9a4f1bf98204c4c05f147
Author: Rolf Eike Beer  sf-mail  de>
AuthorDate: Sat Oct 26 17:30:11 2019 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sun Nov 17 09:30:35 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6248c40c

net-mail/vpopmail: add 2 more patches

Things I hit during testing.

Signed-off-by: Rolf Eike Beer  sf-mail.de>
Signed-off-by: Michał Górny  gentoo.org>

 ...-5.4.33-check-crypt-return-value-for-NULL.patch | 146 
 ...l-5.4.33-use-proper-printf-format-strings.patch | 217 ++
 net-mail/vpopmail/vpopmail-5.4.33-r5.ebuild| 249 +
 3 files changed, 612 insertions(+)

diff --git 
a/net-mail/vpopmail/files/vpopmail-5.4.33-check-crypt-return-value-for-NULL.patch
 
b/net-mail/vpopmail/files/vpopmail-5.4.33-check-crypt-return-value-for-NULL.patch
new file mode 100644
index 000..cfe5ce90e07
--- /dev/null
+++ 
b/net-mail/vpopmail/files/vpopmail-5.4.33-check-crypt-return-value-for-NULL.patch
@@ -0,0 +1,146 @@
+From b3a21a4a6d7af3dc14417c89ec2ef2732a24939b Mon Sep 17 00:00:00 2001
+From: Rolf Eike Beer 
+Date: Sat, 26 Oct 2019 18:14:13 +0200
+Subject: [PATCH 1/2] check crypt() return value for NULL
+
+Passing NULL to strcmp() would lead to a crash otherwise.
+---
+ vcdb.c|  7 ++-
+ vchkpw.c  | 11 +--
+ vldap.c   |  8 +++-
+ vmysql.c  |  8 +++-
+ vpgsql.c  |  8 +++-
+ vsybase.c |  8 +++-
+ 6 files changed, 43 insertions(+), 7 deletions(-)
+
+diff --git a/vcdb.c b/vcdb.c
+index 55c1cb5..1bf9cd8 100644
+--- a/vcdb.c
 b/vcdb.c
+@@ -1160,7 +1160,12 @@ void vcdb_strip_char( char *instr )
+ 
+ int vauth_crypt(char *user,char *domain,char *clear_pass,struct vqpasswd *vpw)
+ {
++  const char *c;
+   if ( vpw == NULL ) return(-1);
+ 
+-  return(strcmp(crypt(clear_pass,vpw->pw_passwd),vpw->pw_passwd));
++  c = crypt(clear_pass,vpw->pw_passwd);
++
++  if ( c == NULL ) return(-1);
++
++  return(strcmp(c,vpw->pw_passwd));
+ }
+diff --git a/vchkpw.c b/vchkpw.c
+index d7d4351..a7c4b9e 100644
+--- a/vchkpw.c
 b/vchkpw.c
+@@ -607,6 +607,7 @@ void login_system_user()
+  struct spwd *spw;
+ #endif
+  struct passwd *pw;
++ const char *c;
+ 
+   if ((pw=getpwnam(TheUser)) == NULL ) {
+ snprintf(LogLine, sizeof(LogLine), "%s: system user not found %s:%s", 
+@@ -626,9 +627,15 @@ void login_system_user()
+ vchkpw_exit(22);
+   }
+ 
+-  if ( strcmp(crypt(ThePass,spw->sp_pwdp),spw->sp_pwdp) != 0 ) {
++  c = crypt(ThePass,spw->sp_pwdp);
++
++  if ( c == NULL ) vchkpw_exit(24);
++  if ( strcmp(c,spw->sp_pwdp) != 0 ) {
+ #else
+-  if ( strcmp(crypt(ThePass,pw->pw_passwd),pw->pw_passwd) != 0 ) {
++  c = crypt(ThePass,pw->pw_passwd);
++
++  if ( c == NULL ) vchkpw_exit(24);
++  if ( strcmp(c,pw->pw_passwd) != 0 ) {
+ #endif
+ if (ENABLE_LOGGING==1||ENABLE_LOGGING==2) {
+   snprintf(LogLine, sizeof(LogLine), "%s: system password fail %s:%s", 
+diff --git a/vldap.c b/vldap.c
+index 75329ef..5fcce99 100644
+--- a/vldap.c
 b/vldap.c
+@@ -1495,10 +1495,16 @@ void *safe_malloc (size_t siz) {
+ /***/
+ 
+ int vauth_crypt(char *user,char *domain,char *clear_pass,struct vqpasswd 
*vpw) {
++const char *c;
++
+ if ( vpw == NULL )
+ return(-1);
+ 
+-return(strcmp(crypt(clear_pass,vpw->pw_passwd),vpw->pw_passwd));
++c = crypt(clear_pass,vpw->pw_passwd);
++
++if ( c == NULL ) return(-1);
++
++return(strcmp(c,vpw->pw_passwd));
+ }
+ 
+ /***/
+diff --git a/vmysql.c b/vmysql.c
+index 4215a39..c5173d9 100644
+--- a/vmysql.c
 b/vmysql.c
+@@ -1862,7 +1862,13 @@ int vdel_limits(const char *domain)
+ //
+ int vauth_crypt(char *user,char *domain,char *clear_pass,struct vqpasswd *vpw)
+ {
++  const char *c;
++
+   if ( vpw == NULL ) return(-1);
+ 
+-  return(strcmp(crypt(clear_pass,vpw->pw_passwd),vpw->pw_passwd));
++  c = crypt(clear_pass,vpw->pw_passwd);
++
++  if ( c == NULL ) return(-1);
++
++  return(strcmp(c,vpw->pw_passwd));
+ }
+diff --git a/vpgsql.c b/vpgsql.c
+index c55b9e2..b5dd40b 100644
+--- a/vpgsql.c
 b/vpgsql.c
+@@ -1667,8 +1667,14 @@ void vcreate_vlog_table()
+ 
+ int vauth_crypt(char *user,char *domain,char *clear_pass,struct vqpasswd *vpw)
+ {
++  const char *c;
++
+ if ( vpw == NULL ) return(-1);
+ 
+-  return(strcmp(crypt(clear_pass,vpw->pw_passwd),vpw->pw_passwd));
++  c = crypt(clear_pass,vpw->pw_passwd);
++
++  if ( c == NULL ) return(-1);
++
++  return(strcmp(c,vpw->pw_passwd));
+ }
+ 
+diff --git a/vsybase.c b/vsybase.c
+index c6d7234..26f7447 100644
+--- a/vsybase.c
 b/vsybase.c
+@@ -640,7 +640,13 @@ int vshow_ip_map( int first, char *ip, char *domain);
+ 
+ int vauth_crypt(char *user,char *domain,char *clear_pass,struct vqpasswd *vpw)
+ {
++  const