Closed Bug 1784521 Opened 3 years ago Closed 1 year ago

Replace the use of PR_CreateProcess in the Samba NTLM auth code

Categories

(Core :: IPC, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox132 --- fixed

People

(Reporter: jld, Assigned: jld)

References

Details

Attachments

(1 file)

See bug 1658072 and bug 227246; PR_CreateProcess doesn't cooperate with other code that handles child processes, and nsAuthSambaNTLM.cpp is one of the few remaining users (and in particular this case is causing an assertion failure with the patch for bug 1658072).

It looks like all the code is using is redirecting stdin/stdout to pipes, and it's not used on Windows so it should be safe to just use Unix-specific APIs; this can all be done with IPC (LaunchApp and ProcessWatcher).

It looks like I called this out 5 years ago in bug 1406971 and then forgot about it.

Blocks: 1406971

Martin, do you have any idea of whether anyone might still be using this NTLM auth backend with Firefox? I noticed RHBZ 1173156 (in which it apparently had at least one user, 9 years ago), and it occurs to me that if anyone is still using it then they're likely to be on RHEL.

Specifically, I'd like to either remove this code entirely if it's not being used, or else replace the use of PR_CreateProcess in which case it would help to know how to test any changes to it.

Mozilla has telemetry which covers this, and the last time we checked it there were no users of this code, but it's opt-in so we don't have data from most release/ESR users.

Flags: needinfo?(stransky)

Hello, AFAIK ntlm_auth is still shipped and used.

Flags: needinfo?(stransky)

The NSPR process launching backend appears to attach its own SIGCHLD
handler, which can cause problems with our own SIGCHLD handling under
the hood.

This patch changes the behaviour to instead use base::LaunchProcess to
start the child process for nsAuthSambaNTLM, which is more aligned with
other places we launch code in Gecko.

This code is posix-specific, so we don't need to handle Windows or macOS
process launching.

Pushed by nlayzell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f6b7e5789f25 Stop using PR_CreateProcess in nsAuthSambaNTLM, r=mccr8
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: