Re: merge file_exists_in_directory and _fileExistsInDirectory functions and move into common file dumputils.c
От | Álvaro Herrera |
---|---|
Тема | Re: merge file_exists_in_directory and _fileExistsInDirectory functions and move into common file dumputils.c |
Дата | |
Msg-id | 202504110938.4kx73ylnv6p4@alvherre.pgsql обсуждение исходный текст |
Ответ на | Re: merge file_exists_in_directory and _fileExistsInDirectory functions and move into common file dumputils.c (Michael Paquier <michael@paquier.xyz>) |
Ответы |
Re: merge file_exists_in_directory and _fileExistsInDirectory functions and move into common file dumputils.c
|
Список | pgsql-hackers |
On 2025-Apr-11, Michael Paquier wrote: > Perhaps we should just use a more centralized place, like file_utils.c > so as all frontends could benefit of it? I'm not sure about that. This code looks to be making too many assumptions that aren't acceptable for a general routine, such as complaining only that the directory name is long without the possibility that the culprit is the file name. It's more or less okay in current uses because they're all using harcoded short names, but that would not hold in general. At the same time, isn't every call of this routine a potential TOCTTOU bug? Again it's probably fine for the current code, but I wouldn't be too sure about making this generally available as-is. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Oh, great altar of passive entertainment, bestow upon me thy discordant images at such speed as to render linear thought impossible" (Calvin a la TV)
В списке pgsql-hackers по дате отправления: