Skip to content

Commit

Permalink
lkl tools: cptofs: reset umask
Browse files Browse the repository at this point in the history
We need to reset umask so that open and mkdir preserves the mode of
the source file.

Fixes torvalds#364.

Signed-off-by: Octavian Purdila <tavi@cs.pub.ro>
  • Loading branch information
tavip committed Aug 9, 2017
1 parent 214eb08 commit 083cdee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/lkl/cptofs.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,8 @@ int main(int argc, char **argv)
goto out_close;
}

lkl_sys_umask(0);

for (i = 0; i < cla.npaths - 1; i++) {
ret = copy_one(cla.paths[i], mpoint, cla.paths[cla.npaths - 1]);
if (ret)
Expand Down

0 comments on commit 083cdee

Please sign in to comment.