mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-16 15:44:04 +01:00
Try copy if rename of temporary catpage fails.
This commit is contained in:
parent
08ac278533
commit
f67b5cb1cb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=566
@ -1087,7 +1087,12 @@ make_cat_file (path, man_file, cat_file)
|
||||
}
|
||||
else {
|
||||
if (rename(temp, cat_file) == -1) {
|
||||
perror("rename");
|
||||
/* FS might be sticky */
|
||||
sprintf(command, "cp %s %s", temp, cat_file);
|
||||
if (system(command))
|
||||
fprintf(stderr,
|
||||
"\nHmm! Can't seem to rename %s to %s, check permissions on man dir!\n",
|
||||
temp, cat_file);
|
||||
unlink(temp);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user