Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 62ddc57fb7 |
@@ -4,8 +4,8 @@ This directory contains pre-compiled binaries for the DB Backup Tool across mult
|
|||||||
|
|
||||||
## Build Information
|
## Build Information
|
||||||
- **Version**: 3.42.34
|
- **Version**: 3.42.34
|
||||||
- **Build Time**: 2026-01-16_08:42:47_UTC
|
- **Build Time**: 2026-01-16_12:38:18_UTC
|
||||||
- **Git Commit**: a85ad0c
|
- **Git Commit**: 510175f
|
||||||
|
|
||||||
## Recent Updates (v1.1.0)
|
## Recent Updates (v1.1.0)
|
||||||
- ✅ Fixed TUI progress display with line-by-line output
|
- ✅ Fixed TUI progress display with line-by-line output
|
||||||
|
|||||||
@@ -84,19 +84,13 @@ func findHbaFileViaPostgres() string {
|
|||||||
|
|
||||||
// parsePgHbaConf parses pg_hba.conf and returns the authentication method
|
// parsePgHbaConf parses pg_hba.conf and returns the authentication method
|
||||||
func parsePgHbaConf(path string, user string) AuthMethod {
|
func parsePgHbaConf(path string, user string) AuthMethod {
|
||||||
// Try with sudo if we can't read directly
|
// Try to read the file directly - do NOT use sudo as it triggers password prompts
|
||||||
|
// If we can't read pg_hba.conf, we'll rely on connection attempts to determine auth
|
||||||
file, err := os.Open(path)
|
file, err := os.Open(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Try with sudo (with timeout)
|
// If we can't read the file, return unknown and let the connection determine auth
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
// This avoids sudo password prompts when running as postgres via su
|
||||||
defer cancel()
|
return AuthUnknown
|
||||||
|
|
||||||
cmd := exec.CommandContext(ctx, "sudo", "cat", path)
|
|
||||||
output, err := cmd.Output()
|
|
||||||
if err != nil {
|
|
||||||
return AuthUnknown
|
|
||||||
}
|
|
||||||
return parseHbaContent(string(output), user)
|
|
||||||
}
|
}
|
||||||
defer file.Close()
|
defer file.Close()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user