On Fri, 26 Nov 2010, Landry Breuil wrote:

> On Fri, Nov 26, 2010 at 01:43:55PM +0100, David Coppa wrote:
> > The problem here is that we don't have libgssapi_krb5, but our 
> > libgssapi wants to be linked with -lkrb5, otherwise the following 
> > error pops up:
> > 
> > /usr/local/mozilla-firefox/firefox-bin:/usr/lib/libgssapi.so.5.0: undefined 
> > symbol 'krb5_mcc_ops'
> > 
> > gssapi authentication with firefox has been screwed up since a long time: 
> > I've found the same error reported by mbalmer into icblogs/porters/2007-02 
> > ...
> 
> I have no idea what's gssapi, but if the diff fixes it for you... does
> gssapi libs come from a pkg-config call, or we're supposed to have
> libgssapi_krb5 doing the bridge for it ?
> And yes it should be applied to other ports, if applicable, so that
> WANTLIB is fixed in moz.port.mk for all of 'em.
> 
> Landry

Hi again,

To summarize:

Our problem is that OpenBSD lacks the "glue" library libgssapi_krb5 and 
wants libgssapi to be linked with "-lkrb5 -lcrypto".

Trying to access a proxy or a mail server (in the case of Thunderbird) 
that supports Kerberos/GSSAPI authentication...

--- BEFORE ---

The following error messages appear on xterm:

/usr/local/mozilla-firefox/firefox-bin:/usr/lib/libgssapi.so.5.0: undefined 
symbol 'krb5_mcc_ops'
/usr/local/mozilla-firefox/firefox-bin:/usr/lib/libgssapi.so.5.0: undefined 
symbol 'krb5_mcc_ops'
/usr/local/mozilla-firefox/firefox-bin:/usr/lib/libgssapi.so.5.0: undefined 
symbol 'krb5_mcc_ops'
/usr/local/mozilla-firefox/firefox-bin:/usr/lib/libgssapi.so.5.0: undefined 
symbol 'krb5_mcc_ops'
/usr/local/mozilla-firefox/firefox-bin:/usr/lib/libgssapi.so.5.0: undefined 
symbol 'krb5_mcc_ops'
/usr/local/mozilla-firefox/firefox-bin:/usr/lib/libgssapi.so.5.0: undefined 
symbol 'krb5_mcc_ops'

And these into $NSPR_LOG_FILE:

2092557312[7eb93980]: nsHttpChannel::OnStartRequest [this=89c5d600 
request=88936700 status=0]
2092557312[7eb93980]: nsHttpChannel::ProcessResponse [this=89c5d600 
httpStatus=407]
2092557312[7eb93980]: nsHttpHandler::NotifyObservers [chan=89c5d62c 
event="http-on-examine-response"]
2092557312[7eb93980]: nsHttpChannel::ProcessAuthentication [this=89c5d600 
code=407]
2092557312[7eb93980]: nsHttpChannel::PrepareForAuthentication [this=89c5d600]
2092557312[7eb93980]: nsHttpChannel::GetAuthenticator [this=89c5d600]
2092557312[7eb93980]: nsHttpChannel::GetCredentialsForChallenge [this=89c5d600 
proxyAuth=1 challenges=Negotiate]
2092557312[7eb93980]: nsHttpAuthCache::GetAuthEntryForDomain 
[key=http://10.105.116.100:8080 realm=]
2092557312[7eb93980]:   service = 10.105.116.100
2092557312[7eb93980]:   using negotiate-gss
2092557312[7eb93980]: entering nsAuthGSSAPI::nsAuthGSSAPI()
2092557312[7eb93980]: Fail to load gssapi library               
<---------------------<-<-<
2092557312[7eb93980]: entering nsAuthGSSAPI::Init()
2092557312[7eb93980]: nsHttpChannel::GetAuthenticator [this=89c5d600]
2092557312[7eb93980]: nsHttpChannel::GetAuthenticator [this=89c5d600]
2092557312[7eb93980]: nsHttpChannel::GetCredentialsForChallenge [this=89c5d600 
proxyAuth=1 challenges=NTLM]
2092557312[7eb93980]: nsHttpAuthCache::GetAuthEntryForDomain 
[key=http://10.105.116.100:8080 realm=]
2092557312[7eb93980]: nsHttpNTLMAuth::ChallengeReceived [ss=0 cs=0]
2092557312[7eb93980]: Force use of generic ntlm auth module: 0
2092557312[7eb93980]: Default credentials allowed for proxy: 1
2092557312[7eb93980]: Writing to ntlm_auth: YR
2087110656[7f4c2100]:     ...returned after 19 milliseconds

--- WITH MY PATCH ---

-2061524992[7e358480]: nsHttpChannel::OnStartRequest [this=7cd31c00 
request=7cf3e780 status=0]
-2061524992[7e358480]: nsHttpChannel::ProcessResponse [this=7cd31c00 
httpStatus=407]
-2061524992[7e358480]: nsHttpHandler::NotifyObservers [chan=7cd31c2c 
event="http-on-examine-response"]
-2061524992[7e358480]: nsHttpChannel::ProcessAuthentication [this=7cd31c00 
code=407]
-2061524992[7e358480]: nsHttpChannel::PrepareForAuthentication [this=7cd31c00]
-2061524992[7e358480]: nsHttpChannel::GetAuthenticator [this=7cd31c00]
-2061524992[7e358480]: nsHttpChannel::GetCredentialsForChallenge [this=7cd31c00 
proxyAuth=1 challenges=Negotiate]
-2061524992[7e358480]: nsHttpAuthCache::GetAuthEntryForDomain 
[key=http://10.105.116.100:8080 realm=]
-2061524992[7e358480]:   service = 10.105.116.100
-2061524992[7e358480]:   using negotiate-gss
-2061524992[7e358480]: entering nsAuthGSSAPI::nsAuthGSSAPI()
-2061524992[7e358480]: Loaded library libgssapi.so (load lib)   
<---------------------<-<-<
-2061524992[7e358480]: Attempting to load gss functions
-2061524992[7e358480]: entering nsAuthGSSAPI::Init()
-2061524992[7e358480]:   identity invalid = 0
-2061524992[7e358480]: nsHttpNegotiateAuth::GenerateCredentials_1_9_2() 
[challenge=Negotiate]
-2061524992[7e358480]: entering nsAuthGSSAPI::GetNextToken()
2111655936[882a9000]:     ...returned after 25 milliseconds
2111655936[882a9000]: nsSocketTransport::OnSocketReady [this=8190e800 
outFlags=1]
2111655936[882a9000]: nsSocketInputStream::OnSocketReady [this=8190e8e0 cond=0]
2111655936[882a9000]: nsHttpConnection::OnSocketReadable [this=8b043e00]
2111655936[882a9000]: nsSocketInputStream::Read [this=8190e8e0 count=3531]
2111655936[882a9000]:   calling PR_Read [count=3531]
2111655936[882a9000]:   PR_Read returned [n=1048]
2111655936[882a9000]: nsSocketTransport::SendStatus [this=8190e800 
status=804b0006]
2111655936[882a9000]: nsHttpTransaction::OnSocketStatus [this=8a0ca400 
status=804b0006 progress=2096]
2111655936[882a9000]: nsHttpTransaction::ProcessData [this=8a0ca400 count=1048]
2111655936[882a9000]: nsHttpTransaction::HandleContent [this=8a0ca400 
count=1048]
2111655936[882a9000]: nsHttpTransaction::HandleContent [this=8a0ca400 
count=1048 read=1048 mContentRead=1613 mContentLength=4123]
2111655936[882a9000]: nsSocketInputStream::Read [this=8190e8e0 count=2483]
2111655936[882a9000]:   calling PR_Read [count=2483]
2111655936[882a9000]:   PR_Read returned [n=524]


I've done my tests with the MS ISA Proxy they have here @ work.
Here's the complete diff:

Index: devel/xulrunner/1.9/Makefile
===================================================================
RCS file: /cvs/ports/devel/xulrunner/1.9/Makefile,v
retrieving revision 1.30
diff -u -p -r1.30 Makefile
--- devel/xulrunner/1.9/Makefile        12 Nov 2010 09:08:02 -0000      1.30
+++ devel/xulrunner/1.9/Makefile        30 Nov 2010 09:54:33 -0000
@@ -5,7 +5,7 @@ FFX_VERSION =           3.6.12
 MOZILLA_BRANCH =       1.9.2
 MOZILLA_PROJECT =      xulrunner1.9
 DISTNAME =             firefox-${FFX_VERSION}.source
-REVISION-main =        0
+REVISION-main =        1
 
 
 MASTER_SITES = 
http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${FFX_VERSION}/source/
Index: mail/mozilla-thunderbird/Makefile
===================================================================
RCS file: /cvs/ports/mail/mozilla-thunderbird/Makefile,v
retrieving revision 1.110
diff -u -p -r1.110 Makefile
--- mail/mozilla-thunderbird/Makefile   19 Nov 2010 07:23:07 -0000      1.110
+++ mail/mozilla-thunderbird/Makefile   30 Nov 2010 09:54:51 -0000
@@ -12,7 +12,7 @@ MOZILLA_CODENAME =    mail
 
 MULTI_PACKAGES =       -main -lightning
 PKGNAME-main =         ${PKGNAME}
-REVISION-main =                0
+REVISION-main =                1
 PKGNAME-lightning =    lightning-1.0beta2
 EPOCH-lightning =      0
 REVISION-lightning =   8
Index: 
mail/mozilla-thunderbird/patches/patch-mozilla_toolkit_library_Makefile_in
===================================================================
RCS file: 
/cvs/ports/mail/mozilla-thunderbird/patches/patch-mozilla_toolkit_library_Makefile_in,v
retrieving revision 1.2
diff -u -p -r1.2 patch-mozilla_toolkit_library_Makefile_in
--- mail/mozilla-thunderbird/patches/patch-mozilla_toolkit_library_Makefile_in  
8 Sep 2010 14:24:36 -0000       1.2
+++ mail/mozilla-thunderbird/patches/patch-mozilla_toolkit_library_Makefile_in  
30 Nov 2010 09:54:51 -0000
@@ -1,12 +1,15 @@
 $OpenBSD: patch-mozilla_toolkit_library_Makefile_in,v 1.2 2010/09/08 14:24:36 
landry Exp $
---- mozilla/toolkit/library/Makefile.in.orig   Wed Aug 25 16:28:35 2010
-+++ mozilla/toolkit/library/Makefile.in        Wed Sep  8 09:38:32 2010
-@@ -288,6 +288,9 @@ ifdef MOZ_ENABLE_QT
+--- mozilla/toolkit/library/Makefile.in.orig   Wed Oct 27 09:05:36 2010
++++ mozilla/toolkit/library/Makefile.in        Mon Nov 29 14:32:59 2010
+@@ -288,6 +288,12 @@ ifdef MOZ_ENABLE_QT
  EXTRA_DSO_LDOPTS += $(MOZ_QT_LDFLAGS)
  endif
  
 +# GTK2 widget and Sydney audio sndio backends.
 +EXTRA_DSO_LDOPTS += -lsndio
++
++# Needed by nsAuthGSSAPI
++EXTRA_DSO_LDOPTS += -lkrb5 -lcrypto
 +
  ifdef MOZ_JAVAXPCOM
  dlldeps-javaxpcom.cpp: 
$(topsrcdir)/extensions/java/xpcom/src/dlldeps-javaxpcom.cpp
Index: productivity/sunbird/Makefile
===================================================================
RCS file: /cvs/ports/productivity/sunbird/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- productivity/sunbird/Makefile       27 Oct 2010 13:00:55 -0000      1.17
+++ productivity/sunbird/Makefile       30 Nov 2010 09:55:13 -0000
@@ -8,7 +8,7 @@ MOZILLA_BRANCH =        1.9.1
 MOZILLA_CODENAME =     calendar
 
 DISTNAME =             lightning-sunbird-1.0b1.source
-REVISION =             6
+REVISION =             7
 EPOCH =                        0
 
 CATEGORIES =   productivity mail
Index: productivity/sunbird/patches/patch-mozilla_toolkit_library_Makefile_in
===================================================================
RCS file: productivity/sunbird/patches/patch-mozilla_toolkit_library_Makefile_in
diff -N productivity/sunbird/patches/patch-mozilla_toolkit_library_Makefile_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ productivity/sunbird/patches/patch-mozilla_toolkit_library_Makefile_in      
30 Nov 2010 09:55:13 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+--- mozilla/toolkit/library/Makefile.in.orig   Mon Nov 29 10:40:14 2010
++++ mozilla/toolkit/library/Makefile.in        Mon Nov 29 10:41:49 2010
+@@ -196,6 +196,9 @@ DEFINES += -DIMPL_XREAPI
+ 
+ EXTRA_DSO_LDOPTS += $(NSPR_LIBS)
+ 
++# Needed by nsAuthGSSAPI
++EXTRA_DSO_LDOPTS += -lkrb5 -lcrypto
++
+ ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
+ CXXFLAGS      += $(TK_CFLAGS)
+ EXTRA_DSO_LDOPTS += \
Index: www/firefox35/Makefile
===================================================================
RCS file: /cvs/ports/www/firefox35/Makefile,v
retrieving revision 1.53
diff -u -p -r1.53 Makefile
--- www/firefox35/Makefile      22 Nov 2010 08:36:48 -0000      1.53
+++ www/firefox35/Makefile      30 Nov 2010 09:55:33 -0000
@@ -6,7 +6,7 @@ MOZILLA_VERSION =       3.5.15
 MOZILLA_BRANCH =       1.9.1
 MOZILLA_PROJECT =      firefox35
 MOZILLA_CODENAME =     browser
-REVISION =             0
+REVISION =             1
 
 SO_VERSION =   24.0
 # NOTE: Must bump minor version if any shlib's are removed from the
Index: www/firefox35/patches/patch-toolkit_library_Makefile_in
===================================================================
RCS file: /cvs/ports/www/firefox35/patches/patch-toolkit_library_Makefile_in,v
retrieving revision 1.2
diff -u -p -r1.2 patch-toolkit_library_Makefile_in
--- www/firefox35/patches/patch-toolkit_library_Makefile_in     12 Sep 2010 
17:56:29 -0000      1.2
+++ www/firefox35/patches/patch-toolkit_library_Makefile_in     30 Nov 2010 
09:55:33 -0000
@@ -1,12 +1,15 @@
 $OpenBSD: patch-toolkit_library_Makefile_in,v 1.2 2010/09/12 17:56:29 landry 
Exp $
---- toolkit/library/Makefile.in.orig   Tue Aug 24 19:15:21 2010
-+++ toolkit/library/Makefile.in        Wed Sep  8 22:51:00 2010
-@@ -283,6 +283,9 @@ ifdef MOZ_ENABLE_QT
+--- toolkit/library/Makefile.in.orig   Wed Oct 27 04:51:47 2010
++++ toolkit/library/Makefile.in        Mon Nov 29 15:43:10 2010
+@@ -283,6 +283,12 @@ ifdef MOZ_ENABLE_QT
  EXTRA_DSO_LDOPTS += $(MOZ_QT_LDFLAGS)
  endif
  
 +# GTK2 widget and Sydney audio sndio backends.
 +EXTRA_DSO_LDOPTS += -lsndio
++
++# Needed by nsAuthGSSAPI
++EXTRA_DSO_LDOPTS += -lkrb5 -lcrypto
 +
  ifdef MOZ_JAVAXPCOM
  dlldeps-javaxpcom.cpp: 
$(topsrcdir)/extensions/java/xpcom/src/dlldeps-javaxpcom.cpp
Index: www/mozilla/mozilla.port.mk
===================================================================
RCS file: /cvs/ports/www/mozilla/mozilla.port.mk,v
retrieving revision 1.16
diff -u -p -r1.16 mozilla.port.mk
--- www/mozilla/mozilla.port.mk 22 Nov 2010 08:36:49 -0000      1.16
+++ www/mozilla/mozilla.port.mk 30 Nov 2010 09:55:34 -0000
@@ -28,9 +28,9 @@ MODMOZ_LIB_DEPENDS =  x11/gtk+2 \
                        security/nss>=3.12.8
 
 MODMOZ_WANTLIB =       X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes Xi 
\
-               Xinerama Xrandr Xrender Xt atk-1.0 c cairo expat fontconfig \
-               freetype gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0 \
-               gmodule-2.0 gobject-2.0 gthread-2.0 gtk-x11-2.0 jpeg m \
+               Xinerama Xrandr Xrender Xt atk-1.0 c cairo crypto expat \
+               fontconfig freetype gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0 
\
+               gmodule-2.0 gobject-2.0 gthread-2.0 gtk-x11-2.0 jpeg krb5 m \
                nspr4>=21 nss3>=25 pango-1.0 pangocairo-1.0 pangoft2-1.0 \
                pixman-1 plc4>=21 plds4>=21 png pthread pthread-stubs \
                smime3>=25 sndio softokn3>=25 ssl3>=25 stdc++ xcb \
Index: www/mozilla-firefox/Makefile
===================================================================
RCS file: /cvs/ports/www/mozilla-firefox/Makefile,v
retrieving revision 1.160
diff -u -p -r1.160 Makefile
--- www/mozilla-firefox/Makefile        22 Nov 2010 08:36:49 -0000      1.160
+++ www/mozilla-firefox/Makefile        30 Nov 2010 09:55:34 -0000
@@ -7,7 +7,7 @@ MOZILLA_VERSION =       3.6.12
 MOZILLA_BRANCH =       1.9.2
 MOZILLA_PROJECT =      mozilla-firefox
 MOZILLA_CODENAME =     browser
-REVISION =             0
+REVISION =             1
 
 SO_VERSION =   22.1
 # NOTE: Must bump minor version if any shlib's are removed from the
Index: www/mozilla-firefox/patches/patch-toolkit_library_Makefile_in
===================================================================
RCS file: 
/cvs/ports/www/mozilla-firefox/patches/patch-toolkit_library_Makefile_in,v
retrieving revision 1.2
diff -u -p -r1.2 patch-toolkit_library_Makefile_in
--- www/mozilla-firefox/patches/patch-toolkit_library_Makefile_in       12 Sep 
2010 17:55:30 -0000      1.2
+++ www/mozilla-firefox/patches/patch-toolkit_library_Makefile_in       30 Nov 
2010 09:55:34 -0000
@@ -1,12 +1,15 @@
 $OpenBSD: patch-toolkit_library_Makefile_in,v 1.2 2010/09/12 17:55:30 landry 
Exp $
---- toolkit/library/Makefile.in.orig   Tue Aug 24 23:32:11 2010
-+++ toolkit/library/Makefile.in        Wed Sep  8 22:36:49 2010
-@@ -288,6 +288,9 @@ ifdef MOZ_ENABLE_QT
+--- toolkit/library/Makefile.in.orig   Fri Nov 26 12:34:02 2010
++++ toolkit/library/Makefile.in        Fri Nov 26 12:42:48 2010
+@@ -288,6 +288,12 @@ ifdef MOZ_ENABLE_QT
  EXTRA_DSO_LDOPTS += $(MOZ_QT_LDFLAGS)
  endif
  
 +# GTK2 widget and Sydney audio sndio backends.
 +EXTRA_DSO_LDOPTS += -lsndio
++
++# Needed by nsAuthGSSAPI
++EXTRA_DSO_LDOPTS += -lkrb5 -lcrypto
 +
  ifdef MOZ_JAVAXPCOM
  dlldeps-javaxpcom.cpp: 
$(topsrcdir)/extensions/java/xpcom/src/dlldeps-javaxpcom.cpp
Index: www/seamonkey/Makefile
===================================================================
RCS file: /cvs/ports/www/seamonkey/Makefile,v
retrieving revision 1.65
diff -u -p -r1.65 Makefile
--- www/seamonkey/Makefile      22 Nov 2010 08:36:54 -0000      1.65
+++ www/seamonkey/Makefile      30 Nov 2010 09:55:40 -0000
@@ -10,7 +10,7 @@ MOZILLA_CODENAME =    suite
 
 MULTI_PACKAGES =       -main -lightning
 PKGNAME-main =         ${PKGNAME}
-REVISION-main =        0
+REVISION-main =        1
 PKGNAME-lightning =    lightning-seamonkey-1.0beta1
 REVISION-lightning =   8
 EPOCH-lightning =      0
Index: www/seamonkey/patches/patch-mozilla_toolkit_library_Makefile_in
===================================================================
RCS file: www/seamonkey/patches/patch-mozilla_toolkit_library_Makefile_in
diff -N www/seamonkey/patches/patch-mozilla_toolkit_library_Makefile_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ www/seamonkey/patches/patch-mozilla_toolkit_library_Makefile_in     30 Nov 
2010 09:55:40 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+--- mozilla/toolkit/library/Makefile.in.orig   Mon Nov 29 16:26:49 2010
++++ mozilla/toolkit/library/Makefile.in        Mon Nov 29 16:27:33 2010
+@@ -283,6 +283,9 @@ ifdef MOZ_ENABLE_QT
+ EXTRA_DSO_LDOPTS += $(MOZ_QT_LDFLAGS)
+ endif
+ 
++# Needed by nsAuthGSSAPI
++EXTRA_DSO_LDOPTS += -lkrb5 -lcrypto
++
+ ifdef MOZ_JAVAXPCOM
+ dlldeps-javaxpcom.cpp: 
$(topsrcdir)/extensions/java/xpcom/src/dlldeps-javaxpcom.cpp
+       $(INSTALL) $^ .

Reply via email to