Closed Bug 126928 Opened 23 years ago Closed 20 years ago

PR_SetFDInheritable not supported on OS/2

Categories

(NSPR :: NSPR, defect, P3)

x86
OS/2
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: julien.pierre, Assigned: wtc)

References

Details

Attachments

(1 file)

This is one of many NSPR functions that fail on OS/2 today.

This function returns -5994 on OS/2. This was found when running selfserv from
NSS. This function is just a stub and not implemented.
I believe that there is no permission context in OS/2 for sockets and that all
sockets are automatically in the inheritable state, and that any fd can be open
by any process (I know, that's not secure) by socket number. I think that was
true of the 16-bit TCP/IP stacks that IBM had in Warp 4.0, but I'm not sure
about the new 32-bit TCP/IP stacks in Warp Server for e-business. Mike, it would
be nice to have  an opinion on the right implementation. Maybe we don't need to
do anything and just return success.
Priority: -- → P3
Target Milestone: --- → 4.2
Blocks: 126923
Achim, do you or does anyone on your team have an idea on this one?
switch (fd->methods->file_type) { case PR_DESC_SOCKET_TCP: case
PR_DESC_SOCKET_UDP: return PR_SUCCESS; default: <old code> }
This is entirely broken.
DosSetFHState is called with wrong flags (you have to mask off part of the query
result).
Attached patch Suggested fix.Splinter Review
Comment on attachment 128173 [details] [diff] [review]
Suggested fix.

> +            /* Mask off flags DosSetFHState don't want. */
don't => doesn't
Attachment #128173 - Flags: review?(mkaply)
Comment on attachment 128173 [details] [diff] [review]
Suggested fix.

Please use APIRET rc instead of int rv and use NO_ERROR instead of 0.

Thanks!
Attachment #128173 - Flags: review?(mkaply) → review+
wtc, I've checked this in on the branch. Please check in on NSPR trunk or give
me authority :)
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Patch checked in on NSPR trunk (NSPR 4.5).
Target Milestone: 4.2 → 4.5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: