File created by mkstemp() gives permissions only for user,
that's why msg-service could not read from file and body of message was empty.
[Verification] 100% passrate on TM1
Change-Id: I290277294459ca96392b9a97adccded1664a426d
Signed-off-by: Rafal Walczyna <r.walczyna@partner.samsung.com>
if (-1 == file_descriptor) {
return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, "Temp file creation failed");
}
+ // Change permision of file to -rw-r--r--
+ int ret_fchmod = fchmod(file_descriptor, 0644);
+ if (-1 == ret_fchmod) {
+ return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, "Permission changing failed");
+ }
std::string tmp_name = buf;