diff options
author | Sunmin Lee <sunm.lee@samsung.com> | 2019-02-18 10:52:49 +0900 |
---|---|---|
committer | Sunmin Lee <sunm.lee@samsung.com> | 2019-02-19 10:35:09 +0900 |
commit | 74c7df6703b6cd65952908e41f512c9d51bac407 (patch) | |
tree | 832d48252a24a3bdeedf7209fecde10de667f66c | |
parent | df1d60dbe5103abaeb74bd2c23dd112cf3eb4e24 (diff) | |
download | libtota-accepted/tizen_5.0_unified.tar.gz libtota-accepted/tizen_5.0_unified.tar.bz2 libtota-accepted/tizen_5.0_unified.zip |
Narrowing permission of extracted filesubmit/tizen_5.0/20190219.014427submit/tizen/20190219.014414accepted/tizen/unified/20190219.154045accepted/tizen/5.0/unified/20190226.075154accepted/tizen_5.0_unified
Change-Id: I45fc34c8aa3c3582e4f75aaa590cf6036a1e75a9
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
-rwxr-xr-x | packaging/libtota.spec | 2 | ||||
-rwxr-xr-x | ss_engine/fota_tar.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/packaging/libtota.spec b/packaging/libtota.spec index 7699ea2..9e8abcd 100755 --- a/packaging/libtota.spec +++ b/packaging/libtota.spec @@ -1,6 +1,6 @@ Name: libtota Summary: fota update library -Version: 1.2.5 +Version: 1.2.6 Release: 0 Group: System License: Apache-2.0 and BSD-2-Clause and BSD-3-Clause and PD diff --git a/ss_engine/fota_tar.c b/ss_engine/fota_tar.c index 3d073d2..d5a7a99 100755 --- a/ss_engine/fota_tar.c +++ b/ss_engine/fota_tar.c @@ -1027,7 +1027,7 @@ int fast_tar_extract_file(char *tar, char *item, char *pathname, int size, int o close(fd); return -1; } - fd2 = open(pathname, O_CREAT | O_WRONLY, 0777); // Directory where file is required should be created already. + fd2 = open(pathname, O_CREAT | O_WRONLY, S_IRWXU); // Directory where file is required should be created already. if (fd2 < 0) { LOG("can't open file(%s).\n", pathname); SS_Free(buf); @@ -1095,7 +1095,7 @@ int tar_extract_file(char *tar, char *item, char *pathname) close(fd); return -1; } - fd2 = open(pathname, O_CREAT | O_WRONLY, 0777); // Directory where file is required should be created already. + fd2 = open(pathname, O_CREAT | O_WRONLY, S_IRWXU); // Directory where file is required should be created already. if (fd2 < 0) { LOG("can't open file(%s).\n", pathname); SS_Free(buf); |