Hello,

I just found that mdeliver -M (and mrefile) needs the `fattr' pledge
promise too since they use utimes(2).  I've mailed the same diff
upstream too.

To reproduce try to import an mbox (can be generated with mexport, in
my case was generated by someone else) with

        $ mdeliver -M maildir < mbox


ok?

i can backport it for stable too eventually.

Index: Makefile
===================================================================
RCS file: /home/cvs/ports/mail/mblaze/Makefile,v
retrieving revision 1.15
diff -u -p -r1.15 Makefile
--- Makefile    11 Mar 2022 19:34:40 -0000      1.15
+++ Makefile    26 Aug 2022 09:10:26 -0000
@@ -1,6 +1,7 @@
 COMMENT =      set of Maildir utilities
 
 DISTNAME =     mblaze-1.2
+REVISION =     0
 CATEGORIES =   mail
 
 HOMEPAGE =     https://git.vuxu.org/mblaze/
Index: patches/patch-mdeliver_c
===================================================================
RCS file: patches/patch-mdeliver_c
diff -N patches/patch-mdeliver_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-mdeliver_c    26 Aug 2022 09:17:44 -0000
@@ -0,0 +1,18 @@
+mrefile or mdeliver -M needs fattr for utimes(2)
+
+Index: mdeliver.c
+--- mdeliver.c.orig
++++ mdeliver.c
+@@ -355,7 +355,11 @@ usage2:
+       if (argc != optind+1)
+               goto usage2;
+ 
+-      xpledge("stdio rpath wpath cpath", "");
++      xpledge("stdio rpath wpath cpath fattr", "");
++      if (!preserve_mtime && !Mflag) {
++              /* drop fattr */
++              xpledge("stdio rpath wpath cpath", "");
++      }
+ 
+       targetdir = argv[optind];
+ 

Reply via email to