|
|
@ -1383,8 +1383,10 @@ static int link_temp_to_file(const char *tmpfile, const char *filename) |
|
|
|
if (dir) { |
|
|
|
if (dir) { |
|
|
|
*dir = 0; |
|
|
|
*dir = 0; |
|
|
|
mkdir(filename, 0777); |
|
|
|
mkdir(filename, 0777); |
|
|
|
if (adjust_shared_perm(filename)) |
|
|
|
if (adjust_shared_perm(filename)) { |
|
|
|
|
|
|
|
*dir = '/'; |
|
|
|
return -2; |
|
|
|
return -2; |
|
|
|
|
|
|
|
} |
|
|
|
*dir = '/'; |
|
|
|
*dir = '/'; |
|
|
|
if (!link(tmpfile, filename)) |
|
|
|
if (!link(tmpfile, filename)) |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|