2 Commits
Author SHA1 Message Date
Patrick McCarty 33273c0f93 Release version 1.0.1
This release fixes a small issue with permissions on the target files
created by both bsdiff and bspatch, namely that there is no reason for
them not to be group and world readable.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2016-02-26 12:59:53 -08:00
Patrick McCarty 7525374a10 Open target files write-only and loosen their permissions
Because the target files are only written to, not read from, by either
bsdiff or bspatch, we can open them write-only.

Also, I don't see a reason for the file permissions to be 600, so loosen
the permissions to be 644.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2016-02-26 11:21:38 -08:00
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
AC_PREREQ([2.66]) AC_PREREQ([2.66])
AC_INIT([bsdiff], [1.0.0], [patrick.mccarty@intel.com]) AC_INIT([bsdiff], [1.0.1], [patrick.mccarty@intel.com])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC AC_PROG_CC
AC_PROG_CC_STDC AC_PROG_CC_STDC
+3 -3
View File
@@ -586,7 +586,7 @@ int make_bsdiff_delta(char *old_filename, char *new_filename, char *delta_filena
memset(&small_header, 0, sizeof(struct header_v21)); memset(&small_header, 0, sizeof(struct header_v21));
memcpy(&small_header.magic, BSDIFF_HDR_FULLDL, 8); memcpy(&small_header.magic, BSDIFF_HDR_FULLDL, 8);
efd = open(delta_filename, O_CREAT | O_EXCL | O_RDWR, 00600); efd = open(delta_filename, O_CREAT | O_EXCL | O_WRONLY, 00644);
if (efd < 0) { if (efd < 0) {
close(fd); close(fd);
return -1; return -1;
@@ -668,7 +668,7 @@ int make_bsdiff_delta(char *old_filename, char *new_filename, char *delta_filena
memset(&small_header, 0, sizeof(struct header_v21)); memset(&small_header, 0, sizeof(struct header_v21));
memcpy(&small_header.magic, BSDIFF_HDR_FULLDL, 8); memcpy(&small_header.magic, BSDIFF_HDR_FULLDL, 8);
efd = open(delta_filename, O_CREAT | O_EXCL | O_RDWR, 00600); efd = open(delta_filename, O_CREAT | O_EXCL | O_WRONLY, 00644);
if (efd < 0) { if (efd < 0) {
close(fd); close(fd);
munmap(old_data, oldsize); munmap(old_data, oldsize);
@@ -883,7 +883,7 @@ int make_bsdiff_delta(char *old_filename, char *new_filename, char *delta_filena
/* Create the patch file */ /* Create the patch file */
efd = open(delta_filename, O_CREAT | O_EXCL | O_RDWR, 00600); efd = open(delta_filename, O_CREAT | O_EXCL | O_WRONLY, 00644);
if (efd < 0) { if (efd < 0) {
ret = -1; ret = -1;
goto fulldl_free; goto fulldl_free;
+1 -1
View File
@@ -690,7 +690,7 @@ static int apply_delta_v2(int subver, FILE *f,
cfclose(&ef); cfclose(&ef);
/* Write the new file */ /* Write the new file */
fd = open(new_filename, O_CREAT | O_EXCL | O_WRONLY, 0600); fd = open(new_filename, O_CREAT | O_EXCL | O_WRONLY, 00644);
if (fd < 0) { if (fd < 0) {
ret = -1; ret = -1;
goto writeerror; goto writeerror;