From 083cdeece0577635d523244dcf0da86074e23e4e Mon Sep 17 00:00:00 2001 From: Octavian Purdila Date: Wed, 9 Aug 2017 15:07:50 +0300 Subject: [PATCH] lkl tools: cptofs: reset umask We need to reset umask so that open and mkdir preserves the mode of the source file. Fixes #364. Signed-off-by: Octavian Purdila --- tools/lkl/cptofs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/lkl/cptofs.c b/tools/lkl/cptofs.c index 2e73f51e28f989..a6aa2a22c5f6b5 100644 --- a/tools/lkl/cptofs.c +++ b/tools/lkl/cptofs.c @@ -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)