Closed Bug 243259 Opened 20 years ago Closed 20 years ago

modutil does not work on OS/2

Categories

(NSS :: Tools, defect, P3)

3.9.1
x86
OS/2
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: julien.pierre, Assigned: julien.pierre)

Details

This was first discussed in bug 240784 . modutil calls PR_Access and tries to find if the directory for secmod.db is readable or writable. On OS/2 that's never the case, so modutil always aborts. PR_Access always return SECFailure when asked about read/write status for directory. I was doing this on a local drive, without any permissions. The only test that I founed worked with directories is "exists". PR_Access just calls the C RTL "access" function . I got the same behavior under both gcc and VACPP runtimes. We should investigate why that's the case. This might be a bug in PR_Access. In the meantime, I have provided a patch to modutil to work around the PR_Access problem in attachment 146343 [details] [diff] [review] .
My opinion is that PR_Access for a directory should return success. What is other peoples?
The Innotek LIBC is only checking against the DOS attributes, which means that anything which exists is readable and executable. Whether or not it's writable depends on the readonly attribute. Testing access(".", R_OK | W_OK) results in return value 0, as expected. LIBC is not at fault as far as I can tell. Looking at the OS/2 part of the PR_Access code, I can't immediatly spot anthing wrong only that one could bother do use F_OK, W_OK and R_OK instead of hardcoding the constants...
Priority: -- → P3
Target Milestone: --- → 3.10
Version: 3.9.3 → 3.9.1
modutil appears to work now, with the tip of NSPR. Not sure when it got fixed. Marking WORKSFORME.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.