Closed Bug 489010 Opened 11 years ago Closed 11 years ago
stop exporting mktemp and dbopen (again)
From the beginning of nss3.dll on windows, until we moved the dbm code into a separate shared library in NSS 3.4 (I think), nss3.dll exported the functions dbopen and mktemp (the latter being a libc function). When we moved that function to libsoftoken, we discovered that lots of programs depended on that function coming from nss3.dll, and we found it necessary to continue to provide the mktemp entry point in nss3.dll for backwards binary compatibility. But we never did anything to prevent those symbols from being exported from softokn3.dll, so they were exported from it. And later when we moved dbm again into nssdbm3.dll, those symbols also became exported from that DLL. So, I want us to Finally stop exporting those symbols from DLLs from which we do not intend to support them. The attached patch does that. I've verified that these libraries now build without exporting those symbols. This has no effect on libnss3, which continues to export the symbol mktemp, but forwards it on to the mktemp in msvcrt, not the one in dbm. Wan-Teh, since you've been involved in this issue for a long time, I'm asking you to please review this small patch.
Attachment #373502 - Flags: review?(wtc)
Comment on attachment 373502 [details] [diff] [review] patch v1, don't export dbopen, and don't even build mktemp r=wtc. You should just delete mktemp for all platforms. This LXR query shows that mktemp is not being used: http://mxr.mozilla.org/mozilla-central/search?string=mktemp mktemp is a Unix/POSIX function as opposed to a libc function, so the ifdef would need to be more than WINCE. dbm is in the FIPS boundary. Isn't it already frozen now?
Attachment #373502 - Flags: review?(wtc) → review+
Thanks, Wan-Teh. I know that mktemp is present on all platforms that offer a full libc. But I know that WinCE does not offer a full libc, and I just don't know if it offers mktemp or not. However, the file mktemp.c also contains come other related functions, such as mkstemp, which are used in dbm. So the file itself can't be deleted. Yes, this file is among the frozen. This patch is now the first in the queue waiting for the day whe softoken sources thaw.
Whiteboard: Awaiting Softoken's Thaw
I mean deleting the mktemp() function, not the mktemp.c file. The mktemp() function is dead code and should be removed for all platforms.
Priority: -- → P2
Whiteboard: Awaiting Softoken's Thaw → FIPS [Awaiting Softoken's Thaw]
Checking in include/mcom_db.h; new revision: 3.44; previous revision: 3.43 Checking in src/db.c; new revision: 3.6; previous revision: 3.5 Checking in src/mktemp.c; new revision: 3.9; previous revision: 3.8
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: FIPS [Awaiting Softoken's Thaw] → FIPS
You need to log in before you can comment on or make changes to this bug.