Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package procmail for openSUSE:Factory 
checked in at 2025-02-21 21:35:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/procmail (Old)
 and      /work/SRC/openSUSE:Factory/.procmail.new.1873 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "procmail"

Fri Feb 21 21:35:39 2025 rev:39 rq:1247640 version:3.24

Changes:
--------
--- /work/SRC/openSUSE:Factory/procmail/procmail.changes        2024-03-01 
23:35:01.724207553 +0100
+++ /work/SRC/openSUSE:Factory/.procmail.new.1873/procmail.changes      
2025-02-21 21:36:02.223412678 +0100
@@ -1,0 +2,6 @@
+Wed Feb 12 09:30:38 UTC 2025 - Dr. Werner Fink <wer...@suse.de>
+
+- Add patch procmail-o_nofollow.patch
+  * Avoid to follow symblic link below /var/spool/mail/
+
+-------------------------------------------------------------------

New:
----
  procmail-o_nofollow.patch

BETA DEBUG BEGIN:
  New:
- Add patch procmail-o_nofollow.patch
  * Avoid to follow symblic link below /var/spool/mail/
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ procmail.spec ++++++
--- /var/tmp/diff_new_pack.HC5G1g/_old  2025-02-21 21:36:02.975443990 +0100
+++ /var/tmp/diff_new_pack.HC5G1g/_new  2025-02-21 21:36:02.975443990 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package procmail
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -32,6 +32,8 @@
 Patch4:         procmail-3.22-owl-truncate.dif
 Patch5:         procmail-3.22-autoconf.dif
 Patch6:         procmail-3.22-ipv6.patch
+# PATCH-FIX-SUSE Avoid that link() follows symbolic links
+Patch7:         procmail-o_nofollow.patch
 # PATCH-FIX-SUSE bmwiedemann -- make build reproducible
 Patch8:         reproducible.patch
 Patch10:        procmail-fix-Werror=return-type.patch
@@ -59,6 +61,7 @@
 %patch -P 4
 %patch -P 5
 %patch -P 6
+%patch -P 7 -b .nofollow
 %patch -P 8 -p1
 %patch -P 10 -p1
 %patch -P 11 -p1

++++++ procmail-o_nofollow.patch ++++++
---
 src/exopen.c |    4 ++--
 src/robust.c |   14 +++++++++++++-
 2 files changed, 15 insertions(+), 3 deletions(-)

--- src/exopen.c
+++ src/exopen.c        2025-02-12 09:33:08.114189510 +0000
@@ -110,7 +110,7 @@ in: if(flags&doMAILDIR)
 #define ropen(path,type,mode)  creat(path,mode)
 #endif
   while((!i||errno!=ENOENT||         /* casually check if it already exists */
-        (0>(i=ropen(full,O_WRONLY|O_CREAT|O_EXCL,mode))&&errno==EEXIST))&&
+        
(0>(i=ropen(full,O_WRONLY|O_CREAT|O_EXCL|O_NOFOLLOW,mode))&&errno==EEXIST))&&
        (i= -1,retry--));
   if(flags&doCHOWN&&didnice)
      nice(nicediff);              /* put back the priority to the old level */
@@ -180,7 +180,7 @@ int hlink(old,newn)const char*const old,
    { int fd;
 #ifdef O_CREAT                                /* failure due to filesystem? */
      if(stbuf.st_nlink<2&&errno==EXDEV&&     /* try it by conventional means */
-       0<=(fd=ropen(newn,O_WRONLY|O_CREAT|O_EXCL,stbuf.st_mode)))
+       0<=(fd=ropen(newn,O_WRONLY|O_CREAT|O_EXCL|O_NOFOLLOW,stbuf.st_mode)))
        return fd+1;
 #endif
      return -1;
--- src/robust.c
+++ src/robust.c        2025-02-12 10:06:32.165135534 +0000
@@ -10,6 +10,7 @@
 static /*const*/char rcsid[]=
  "$Id$";
 #endif
+#include <libgen.h>
 #include "procmail.h"
 #include "robust.h"
 #include "misc.h"
@@ -121,7 +122,18 @@ void opnlog(file)const char*file;
 int opena(a)const char*const a;
 { yell("Opening",a);
 #ifdef O_CREAT
-  return ropen(a,O_WRONLY|O_APPEND|O_CREAT,NORMperm);
+  int flags = O_WRONLY|O_APPEND|O_CREAT;
+  struct stat stbuf;
+  char *d, *t = tstrdup(a);
+  d = dirname(t);
+  if (stat(d,&stbuf) < 0) {
+      free(t);
+      return -1;
+  }
+  free(t);
+  if (stbuf.st_mode & S_IWOTH)
+      flags |= O_NOFOLLOW;
+  return ropen(a,flags,NORMperm);
 #else
   ;{ int fd;
      return (fd=ropen(a,O_WRONLY,0))<0?creat(a,NORMperm):fd;

++++++ reproducible2.patch ++++++
--- /var/tmp/diff_new_pack.HC5G1g/_old  2025-02-21 21:36:03.043446821 +0100
+++ /var/tmp/diff_new_pack.HC5G1g/_new  2025-02-21 21:36:03.047446988 +0100
@@ -11,7 +11,7 @@
 index b0fef8a..f2f8351 100755
 --- a/src/autoconf
 +++ b/src/autoconf
-@@ -1302,8 +1302,7 @@ int main(argc,argv)int argc;const char*argv[];
+@@ -1303,8 +1303,7 @@ int main(argc,argv)int argc;const char*argv[];
           if(!setrgid(groups[i])&&getgid()!=groups[i])
              puts("#define setrgid_BRAIN_DAMAGE");
         }

Reply via email to