sqlippool log messages to stdout

Alan DeKok aland at deployingradius.com
Mon Mar 14 17:05:36 UTC 2022


On Mar 14, 2022, at 12:47 PM, Matteo Sgalaberni <sgala at 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_linelog/rlm_linelog.c#L666
> https://github.com/FreeRADIUS/freeradius-server/blob/bef190c8da06716b871e2fbc4bdf5377b85bfc4b/src/lib/server/exfile.c#L438
> 
> 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.



More information about the Freeradius-Users mailing list