> If only rename(2)'ing then it only needs "stdio rpath cpath",
> nevertheless if we need to copy to a different partition it also needs
> "wpath fattr" for writing and chmod/chown operations, and finally "proc
> exec" are needed due to (extracted directly from mv(1)'s man page) ->
> "Should the rename(2) call fail because the source and destination are
> on different file systems, mv will use cp(1) and rm(1) to accomplish the
> move.".
> 
> PS: It's not possible to reduce only to "stdio rpath cpath" since
> rename(2) happens way before copy() or fastcopy() functions and if it
> fails it will call copy() anyway which needs further permissions.

We are going to skip doing mv, until other refactorings get done:

mv.c:           execl(_PATH_CP, "cp", "-PRp", "--", from, to, (char *)NULL);
mv.c:           execl(_PATH_RM, "rm", "-rf", "--", from, (char *)NULL);

It is quite horrible...

  • pledge mv(1) Ricardo Mestre
    • Re: pledge mv(1) Theo de Raadt

Reply via email to