Open Bug 1744751 Opened 4 years ago Updated 1 year ago

Allow socket process to create MOZ_LOG_FILE and write logs

Categories

(Core :: Security: Process Sandboxing, task, P3)

task

Tracking

()

People

(Reporter: kershaw, Unassigned)

References

(Blocks 2 open bugs)

Details

Only tested on macOS, bug maybe other platforms have the same issue.
STR:

  1. Enable networking over socket process (network.process.enabled and network.http.network_access_on_socket_process.enabled both be true).
  2. Go to about:networking#logging and start logging.

Expected result:
The log file from socket process should be created in the temp folder.

Actual result:
No log file created.

I can think of two possible solutions:

  1. Allow MOZ_LOG_FILE in sandbox policy rules.
    This seems to be already done on windows. However, this solution doesn't work if MOZ_LOG_FILE is changed in about:networking.
  2. Open the fd for log file in the parent process and send it to socket process for writing.
    This is the generic solution for all platforms, but this requires more work. The reason is that we use fopen to open the log file, but OpenANSIFileDesc is not implemented for FileDescriptorFile.
Severity: N/A → S4
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.