Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbcb3a04

Browse files
committed
bugfix: enforce permission mask from backup_content.control when copying non-data file
1 parent513bc48 commitbcb3a04

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

‎src/data.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,6 @@ copy_file(fio_location from_location, const char *to_root,
955955
size_tread_len=0;
956956
interrno_tmp;
957957
charbuf[BLCKSZ];
958-
structstatst;
959958
pg_crc32crc;
960959

961960
INIT_FILE_CRC32(true,crc);
@@ -999,15 +998,6 @@ copy_file(fio_location from_location, const char *to_root,
999998
to_path,strerror(errno_tmp));
1000999
}
10011000

1002-
/* stat source file to change mode of destination file */
1003-
if (fio_ffstat(in,&st)==-1)
1004-
{
1005-
fio_fclose(in);
1006-
fio_fclose(out);
1007-
elog(ERROR,"cannot stat \"%s\": %s",file->path,
1008-
strerror(errno));
1009-
}
1010-
10111001
/* copy content and calc CRC */
10121002
for (;;)
10131003
{
@@ -1064,7 +1054,7 @@ copy_file(fio_location from_location, const char *to_root,
10641054
file->crc=crc;
10651055

10661056
/* update file permission */
1067-
if (fio_chmod(to_path,st.st_mode,to_location)==-1)
1057+
if (fio_chmod(to_path,file->mode,to_location)==-1)
10681058
{
10691059
errno_tmp=errno;
10701060
fio_fclose(in);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp