Pipe facility for logging modules. #2005

Open
arr2036 opened this Issue Jun 9, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@arr2036
Member

arr2036 commented Jun 9, 2017

Issue type

  • Questions about the server or its usage should be posted to the users mailing list.
  • Remote security exploits MUST be sent to security@freeradius.org.
  • Defect - Crash or memory corruption.
  • Defect - Non compliance with a standards document, or incorrect API usage.
  • Defect - Unexpected behaviour (obvious or verified by project member).
  • Feature request.

Defect/Feature description

@jimdigriz had a fun idea.

For rlm_detail, rlm_linelog, rlm_logtee, it'd be nice to be able to pipe the output through other utilities for preprocessing/compression.

The idea would be to take an 'exec' xlat expansion, expand it, and use that as a key into a tree of fork()/execve() processes. The log message would then be written to the stdin fd of the process.

Processes would be created if the xlat didn't match a pre-existing process, and cleaned up/closed after a period of inactivity.

Only unsolved problem would be what to do in a threaded environment, I guess have all threads write to the same process? Something like xv probably doesn't implement file locking natively.

@arr2036

This comment has been minimized.

Show comment
Hide comment
@arr2036

arr2036 Jun 12, 2017

Member

@alandekok mentioned that popen() is probably a better fit than execve() as it runs everything in a shell (more pipes).

Member

arr2036 commented Jun 12, 2017

@alandekok mentioned that popen() is probably a better fit than execve() as it runs everything in a shell (more pipes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment