sftkmod.c uses POSIX file IO Functions on WinCE, which doesn't have them

RESOLVED FIXED in 3.12.4

Status

P1
blocker
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: wolfe, Assigned: rrelyea)

Tracking

({mobile})

3.12.3
3.12.4
ARM
Windows Mobile 6 Professional
mobile

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: FIPS)

Attachments

(2 attachments)

(Reporter)

Description

10 years ago
Created attachment 371487 [details] [diff] [review]
v1.0 patch in HG format

In security/nss/lib/softoken/sftkmod.c - POSIX file IO operations are used.

Since WINCE has no POSIX file operations, the lfopen function needs to be replaced with a simple fopen() function call.
Attachment #371487 - Flags: review?(bugmail)
this appears to be from bug 463452
Assignee: nobody → rrelyea
Severity: normal → blocker
Priority: -- → P1
Summary: WinCE does not have POSIX file IO Functions (sftkmod.c broken) → sftkmod.c uses POSIX file IO Functions on WinCE, which doesn't have them
Whiteboard: FIPS
Target Milestone: --- → 3.12.4
Version: unspecified → 3.12.3
Attachment #371487 - Flags: superreview?(rrelyea)
Attachment #371487 - Flags: review?(bugmail) → review+
Comment on attachment 371487 [details] [diff] [review]
v1.0 patch in HG format


>-    fd = lfopen(dbname, "a+", O_CREAT|O_RDWR|O_APPEND);
>+#ifdef WINCE
>+    fd = fopen(dbname, "a+");
>+#else
>+    fd = lfopen(dbname, "a+",   O_CREAT|O_RDWR|O_APPEND);
>+#endif
>     if (fd == NULL) {
>     return SECFailure;
>     }

nit, fix ws
Comment on attachment 371487 [details] [diff] [review]
v1.0 patch in HG format

r=nelson, with whitespace of the lfopen line restored to same 
as before the patch.

>-    fd = lfopen(dbname, "a+", O_CREAT|O_RDWR|O_APPEND);
>+    fd = lfopen(dbname, "a+",   O_CREAT|O_RDWR|O_APPEND);

Now, who's going to do these commits?
Bob, Kai, me?
Attachment #371487 - Flags: superreview?(rrelyea) → superreview+
Checking in util/nssutil.h;     new revision: 1.3;  previous revision: 1.2
Checking in softoken/sdb.c;     new revision: 1.12; previous revision: 1.11
Checking in softoken/sftkmod.c; new revision: 1.5;  previous revision: 1.4
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED

Comment 5

10 years ago
Created attachment 371753 [details] [diff] [review]
Define lfopen as a macro for WINCE

This alterative patch reduces the number of ifdefs.

Updated

10 years ago
Blocks: 487712
You need to log in before you can comment on or make changes to this bug.