Index | Thread | Search

From:
Alexander Bluhm <bluhm@openbsd.org>
Subject:
Re: fix calendar -a
To:
Theo de Raadt <deraadt@openbsd.org>
Cc:
tech <tech@openbsd.org>
Date:
Mon, 16 Mar 2026 18:11:55 +0100

Download raw body.

Thread
  • Alexander Bluhm:

    fix calendar -a

  • On Mon, Mar 16, 2026 at 10:45:32AM -0600, Theo de Raadt wrote:
    > I doubt you need "rx".
    > 
    > Does "x" not work?
    
    I have tested it and with "x" calendar sent me a mail.
    
    Index: usr.bin/calendar/calendar.c
    ===================================================================
    RCS file: /data/mirror/openbsd/cvs/src/usr.bin/calendar/calendar.c,v
    diff -u -p -r1.39 calendar.c
    --- usr.bin/calendar/calendar.c	18 Feb 2026 21:40:55 -0000	1.39
    +++ usr.bin/calendar/calendar.c	16 Mar 2026 17:03:29 -0000
    @@ -128,6 +128,12 @@ main(int argc, char *argv[])
     	if (doall) {
     		if (unveil("/tmp", "rwc") == -1)
     			err(1, "unveil /tmp");
    +		if (unveil("/dev/null", "rw") == -1)
    +			err(1, "unveil /dev/null");
    +		if (unveil(_PATH_SENDMAIL, "x") == -1)
    +			err(1, "unveil sendmail");
    +		if (unveil(_PATH_CPP, "x") == -1)
    +			err(1, "unveil cpp");
     		if (unveil("/", "r") == -1)
     			err(1, "unveil /");
     		if (pledge("stdio rpath wpath cpath fattr getpw id proc exec",
    
    
  • Alexander Bluhm:

    fix calendar -a