]> mop.ddnsfree.com - git repositories - brisk.git/commit
sql/builder.sh: sudo instead of su
authorMatteo Nastasi <nastasi@alternativeoutput.it>
Sun, 13 Sep 2026 10:37:07 +0000 (12:37 +0200)
committerMatteo Nastasi <nastasi@alternativeoutput.it>
Sun, 13 Sep 2026 10:37:07 +0000 (12:37 +0200)
commitd70e12db7513eeca1cfea692978e04c4e2f0da01
treea2e0385d2f0a466d1d76a0001aa05019e20895d1
parent8042e9ad14933f3af69fe61a32a6e0b8c2815ca4
sql/builder.sh: sudo instead of su

"su root -c" asks for the root password, which on a freshly installed debian
does not even exist: the first user administers with sudo. The two commands
were also nested (su root calling su postgres) with three levels of quoting
to get through, and the variables ended up in the string unprotected.

Now it goes straight to "sudo -u postgres" and the arguments are quoted.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014M1jiEq9cHdE5SE5j6vFuE
sql/builder.sh