sbsign: Make sure output file mode respects umask
This commit is contained in:
@@ -254,6 +254,10 @@ static int verb_sign(int argc, char *argv[], void *userdata) {
|
||||
if (dstfd < 0)
|
||||
return log_error_errno(r, "Failed to open temporary file: %m");
|
||||
|
||||
r = fchmod_umask(dstfd, 0666);
|
||||
if (r < 0)
|
||||
log_debug_errno(r, "Failed to change temporary file mode: %m");
|
||||
|
||||
r = copy_bytes(srcfd, dstfd, UINT64_MAX, COPY_REFLINK);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to copy %s to %s: %m", argv[1], tmp);
|
||||
|
||||
Reference in New Issue
Block a user