News for hackers. Stuff that matters.
Re:The PostgreSQL community debates ALTER SYSTEM by camgunz on Sunday April 21, 2024 @07:30PM (#40110115)
Oh all I'm saying is you can set the conf file to read-only. Basically this entire feature is "we want a nice error message".
Re:The PostgreSQL community debates ALTER SYSTEM by kidbomb on Sunday April 21, 2024 @08:55PM (#40110601)
That's how I see it too. Not security, but developer experience. You set the file as readonly, but provide a message to PostgreSQL superuser that this is as intended
Re:The PostgreSQL community debates ALTER SYSTEM by int_19h on Sunday April 21, 2024 @10:37PM (#40111013)
This is discussed in LWN comments, in fact. But the problem there is that the protocol used to communicate the fact that the file is read-only to the application (errno==EACCESS or equivalent on other platforms) does not provide any useful way for the system administrator who makes the file read-only to add a notice explaining why permission is denied, in a way that it is also communicated to the app - so that it could display it to the user.

So the proper solution to this whole thing would be for the OS to provide such a facility: "permission X is denied to Y because Z". This seems like a useful facility in general, come to think of it. But it would have taken more time and effort, and would require buy-in from more parties, some of whom might be very hostile to this notion (e.g. I don't think it would be an easy thing on Linux). No wonder that this isn't an option that is even contemplated as realistic.

And so instead we got yet another easy-to-make crutch in the tower of crutches and duck tape that is modern software.