On Sat, Nov 21, 2015 at 01:23:09PM +0100, Pascal Stumpf wrote:
> > if (doall) {
> > - if (pledge("stdio rpath tmppath fattr id proc exec", NULL)
> > + if (pledge("stdio rpath tmppath fattr getpw id proc exec", NULL)
> > == -1)
> > err(1, "pledge");
> > } else {
> > - if (pledge("stdio rpath proc exec", NULL) == -1)
> > + if (pledge("stdio rpath getpw proc exec", NULL) == -1)
>
> The getpwent() call is below if (doall), so I think this is not needed.
>
> > err(1, "pledge");
> > }
> >
yes, you are right. matthieu@ said the same... my bad.
--
Sebastien Marie
Index: calendar.c
===================================================================
RCS file: /cvs/src/usr.bin/calendar/calendar.c,v
retrieving revision 1.33
diff -u -p -r1.33 calendar.c
--- calendar.c 16 Nov 2015 17:49:35 -0000 1.33
+++ calendar.c 21 Nov 2015 12:35:46 -0000
@@ -119,7 +119,7 @@ main(int argc, char *argv[])
usage();
if (doall) {
- if (pledge("stdio rpath tmppath fattr id proc exec", NULL)
+ if (pledge("stdio rpath tmppath fattr getpw id proc exec", NULL)
== -1)
err(1, "pledge");
} else {