From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98) BuildID: 0.7 If you attempt to do a psm build of 0.7, it does compile, but this section of code always fails (from security/psm/server/servutil.c's SSM_OpenPort()): /* Bind to PSM port on loopback address: connections from non-localhosts * will be disallowed */ status = PR_InitializeNetAddr(PR_IpAddrLoopback, 0, &servaddr); if (status != PR_SUCCESS) goto loser; status = PR_Bind(datasocket, &servaddr); if (status != PR_SUCCESS) goto loser; #if 0 on this section results in a psm that works correctly (albiet insecurely). Reproducible: Always Steps to Reproduce: 1. gmake -f client.mk BUILD_MODULES=psm 2. cd dist/bin && ./mozilla 3. fetch any https:// url Actual Results: fails unless that code snippet is chopped out. Then it works. Expected Results: Duh.
sending over to PSM. I'm not sure PSM is supposed to even compile on BSD.
I think this is a duplicate of 54796 or 58869.
Looking at the other bugs was instructive. This patch fixes the problem(s): --- prnetdb.c.orig Tue Jan 16 21:43:04 2001 +++ prnetdb.c Tue Jan 16 21:40:52 2001 @@ -924,6 +924,7 @@ PRStatus rv = PR_SUCCESS; if (!_pr_initialized) _PR_ImplicitInitialization(); + bzero(&(addr->inet),sizeof(addr->inet)); addr->inet.family = AF_INET; addr->inet.port = htons(port); switch (val)
Does psm worked with this patch? I tried same patch before, but psm didn't work. Maybe it is good when called by servutil.c, but break something called by other part.
I will take this bug.
Yes, I tried building psm with this last patch and without the #if 0 stuff and it does work.
I have successfully built psm from source as of 20010115 on FreeBSD-current, marking FIXED
Verified per Eric's comments.
Reopening. Comments emailed to me from email@example.com: I think Eric may be mistaken. 0.7 is able to compile, but the resulting executable doesn't work without the patch that is in this bug. In fact, Terry Lambert has commented elsewhere that a failure to bzero() sockaddr_in structures is something that frequently comes up when porting Linux software over to *BSD. From our combined perspective, this patch is a very important one for our platform that does no other platforms any *harm*. I traded some mail with Eric and think he may have been confused about the nature of the problem -- I think he may have thought that my patching was addressed at getting psm to build properly rather than work properly after it's built. While some of the things I posted in the mozilla crypto newsgroup were about building psm on *BSD, this patch explicitely is required to get it to work once it does compile. All I am saying is that if the patch in 65549 is not committed, psm won't work on *BSD. With that in mind, I think it is important that that code gets committed. Until it is, *BSD users will have to add that patch by hand in order to have any chance of getting the psm (and God knows what other portions of mozilla) to work correctly. Anything that calls PR_InitializeNetAddr() on a non-bzero()ed struct is suspect until then.
Sorry for all this spam, I made a mistake when reading the summary and assumed this was about PSM not compiling on FreeBSD. One of us should upload the appropriate patch for this though... Confirming
Only the person to whom to bug is assigned can mark the bug fixed.
I have turned the patch from nsayer's comments into an attachment, and building with this attachment gets PSM to work on FreeBSD-current with a CVS build from the night of 20010121. Adding patch keyword
The fix for this bug has been checked in. *** This bug has been marked as a duplicate of 54796 ***