On Mar 14, 2022, at 12:47 PM, Matteo Sgalaberni <sgala@sgala.com> wrote:
Hi Alan, already tried ;(
With filename = /dev/stdout
- On a debian server vanilla: Mon Mar 14 17:32:55 2022 : Error: rlm_linelog: Failed to open /dev/stdout: Bad file descriptor
- On a container (https://hub.docker.com/r/freeradius/freeradius-server/): Mon Mar 14 14:53:45 2022 : Error: rlm_linelog: Failed to open /dev/stdout: Permission denied
I tried to find the in the source code the root cause: https://github.com/FreeRADIUS/freeradius-server/blob/master/src/modules/rlm_... https://github.com/FreeRADIUS/freeradius-server/blob/bef190c8da06716b871e2fb...
I'm not a C expert and I didn't debugged it well. I suppose that the open() used in that way is not compatible with stdout or named pipes (tried also), It works only with regular files.
The code in exfile.c is trying to create /dev/stdout, and I guess that's not allowed. Or the C library is too dumb to notice. I've pushed a fix to the v3.0.x branch on GitHub. Alan DeKok.