You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Go program that's being used for some queue management functions for Postfix. I'm getting the queue_directory value from postconf and then passing it into filepath.Clean() to return a valid path. Unfortunately, when I stat this it fails because it ends in a newline character. My understanding is that since a newline character is not a valid path character it should be stripped via filepath.Clean().
[pid 17402] stat("/var/spool/postfix\n", 0xc208060240) = -1 ENOENT (No such file or directory)
[pid 17402] write(1, "UNKNOWN: Process Terminated: The"..., 105UNKNOWN: Process Terminated: The queue directory configured for Postfix is either missing or unreadable.
) = 105
I can get around this in the interim by passing the string through strings.TrimSuffix()
The text was updated successfully, but these errors were encountered:
I have a Go program that's being used for some queue management functions for Postfix. I'm getting the queue_directory value from postconf and then passing it into filepath.Clean() to return a valid path. Unfortunately, when I stat this it fails because it ends in a newline character. My understanding is that since a newline character is not a valid path character it should be stripped via filepath.Clean().
getQueueDir()
util.Exists()
strace
shows the issue:I can get around this in the interim by passing the string through
strings.TrimSuffix()
The text was updated successfully, but these errors were encountered: