projects
/
petitboot
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed5737a
)
discover/file: Add sensible perms when using replace_file
author
Jeremy Kerr
<jk@ozlabs.org>
Thu, 15 Aug 2013 07:28:06 +0000
(15:28 +0800)
committer
Jeremy Kerr
<jk@ozlabs.org>
Fri, 16 Aug 2013 04:43:39 +0000
(12:43 +0800)
Rather than no access at all, use a default of 0644.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/file.c
patch
|
blob
|
history
diff --git
a/discover/file.c
b/discover/file.c
index 1ebfe43b10ba02029dbedac3b8fcf0c3a088d7de..0cee43b897cd59e9f50f0b20d528c470cf6dd642 100644
(file)
--- a/
discover/file.c
+++ b/
discover/file.c
@@
-115,6
+115,9
@@
int replace_file(const char *filename, char *buf, int len)
}
free(tempfile);
+
+ fchmod(fd, 0644);
+
close(fd);
return rc;
}