On Sat, Apr 09, 2016 at 03:45:58PM +0000, Héctor Luis Gimbatti wrote: > Is ok?
no, the ?chmod and ?chown calls would require "fattr" as well, but since pledge restricts these calls substantially, pledging mv is currently impossible. try moving a file between two different partitions with your mv. > Index: mv.c > =================================================================== > RCS file: /cvs/src/bin/mv/mv.c,v > retrieving revision 1.43 > diff -u -p -r1.43 mv.c > --- mv.c 17 Nov 2015 18:34:00 -0000 1.43 > +++ mv.c 9 Apr 2016 15:44:59 -0000 > @@ -72,6 +72,9 @@ main(int argc, char *argv[]) > struct stat sb; > int ch; > char path[PATH_MAX]; > + > + if (pledge("stdio rpath wpath cpath", NULL) == -1) > + err(1, "pledge"); > > while ((ch = getopt(argc, argv, "if")) != -1) > switch (ch) { > > > --- HLG > >