# Where is the function "gsskrb5_register_acceptor_identity" in FreeBSD 8.0 amd64?



## zhongyb (Jun 1, 2010)

why can i not find the function gsskrb5_register_acceptor_identity in /usr/lib/libgssapi.so in my freebsd 8.0 amd64 installation? but it can be found in /usr/lib/libgssapi.so in freebsd 7.3. How can i change the compiling directives?


----------



## SirDice (Jun 1, 2010)

It's not part of the base OS. It's part of security/heimdal.

Did you perhaps install that replacing the base kerberos?


----------



## zhongyb (Jun 1, 2010)

No. I just updated the source code using command `csup standard-supfile`, and built the world using `make buildworld`, then installed it using `make installworld`. After that I used command `elfdump -s /usr/lib/libgssapi.so | grep gsskrb5`, but I got nothing.


----------



## zhongyb (Jun 1, 2010)

File /usr/lib/libgssapi.so is one of files of kerberos 5 implementation of heimdal, and /usr/lib/libgssapi_krb5.so is one of files of kerberos 5 implementation of mit, isn't it?


----------



## SirDice (Jun 1, 2010)

If I search for that API in the man pages I only get a hit on heimdal. Not when I restrict the search to the base OS.

gsskrb5_register_acceptor_identity(3)


----------



## zhongyb (Jun 1, 2010)

But my point is that I got error message 
	
	



```
Undefined symbol "gsskrb5_register_acceptor_identity"
```
 when I started a program which I just compiled. I want to know what's the problem. Is the function moved to another place or is it a bug in freebsd 8.0?


----------



## zhongyb (Jun 1, 2010)

*what's the problem of mod_auth_kerb2?*

I got the message 





> Undefined symbol "gsskrb5_register_acceptor_identity"


 when I started apache22 after installation of mod_auth_kerb2 in freebsd 8.0 amd64. But everything is fine in freebsd 7.3. Is it a bug of freebsd 8.0 amd64 of mod_auth_kerb2?x(x(


----------



## DutchDaemon (Jun 1, 2010)

That function appears to be in /usr/lib/libgssapi_krb5.so (origin: /usr/src/kerberos5/lib/libgssapi_krb5).


```
[/usr/src/kerberos5/lib/libgssapi_krb5] # grep acceptor gss_krb5.c                                                                                 
gsskrb5_register_acceptor_identity(const char *identity)
```


----------



## expl (Jun 2, 2010)

You get this error because your mod in building stage is not linked with libgssapi_krb5.a. Taking a peek at its port I got impression that adding "KRB5_HOME=/usr" to /etc/make.conf should fix this if you rebuild your mod.


----------



## zhongyb (Jun 2, 2010)

expl said:
			
		

> You get this error because your mod in building stage is not linked with libgssapi_krb5.a. Taking a peek at its port I got impression that adding "KRB5_HOME=/usr" to /etc/make.conf should fix this if you rebuild your mod.



but I got the same message when I rebuilt it after added "KRB5_HOME=/usr" to /etc/make.conf.

Actually. the function gsskrb5_register_acceptor_idendity is exported by libgssapi_krb5.so. Does anyone tell me how to link to libgssapi_krb5.so at building stage.


----------



## expl (Jun 2, 2010)

zhongyb said:
			
		

> but I got the same message when I rebuilt it after added "KRB5_HOME=/usr" to /etc/make.conf.
> 
> Actually. the function gsskrb5_register_acceptor_idendity is exported by libgssapi_krb5.so. Does anyone tell me how to link to libgssapi_krb5.so at building stage.



You do not link with dynamic library file, you link with static library that has instructions to load symbols from dynamic one. Static being .a and dynamic .so.


----------



## dougs (Mar 16, 2011)

> You do not link with dynamic library file, you link with static library that has instructions to load symbols from dynamic one. Static being .a and dynamic .so.



Okay, so how do I actually link to the static library? I've just run into this issue this afternoon and am using the base Heimdal running on FreeBSD 8.1-RELEASE. I'm not a coder and a step-by-step set of instructions would be helpful here. I'm not seeing any other resolution among the many Google hits I've come across thus far.

~Doug


----------



## expl (Mar 17, 2011)

dougs said:
			
		

> Okay, so how do I actually link to the static library? I've just run into this issue this afternoon and am using the base Heimdal running on FreeBSD 8.1-RELEASE. I'm not a coder and a step-by-step set of instructions would be helpful here. I'm not seeing any other resolution among the many Google hits I've come across thus far.
> 
> ~Doug



Add -lgssapi_krb5 when you are linking the executable. This will tell linker to lookup and link libgssapi_krb5.a static library.


----------



## dougs (Mar 17, 2011)

> Add -lgssapi_krb5 when you are linking the executable. This will tell linker to lookup and link libgssapi_krb5.a static library.



I'm sorry but that went over my head. Which executable? "Make install -lgssapi_krb5"?

~Doug


----------



## dougs (Mar 18, 2011)

I tried the security/heimdal port and added the HEIMDAL_HOME variable to /etc/.make.conf - no dice. Apache22 complained about missing function "gsskrb5_register_acceptor_identity". I then uninstalled the Heimdal port and tried the MIT security/krb5 port. The mod_auth_kerb5 port installed cleanly after that. Apache22 started without errors.

Looks like there's an issue with the base Heimdal and/or the Heimdal port?

In reference to:


> Add -lgssapi_krb5 when you are linking the executable. This will tell linker to lookup and link libgssapi_krb5.a static library.



Is the libtool the linker in question?

~Doug


----------



## ohauer (Apr 16, 2011)

If it is not too late grab the patch you can find here: http://lists.freebsd.org/pipermail/freebsd-apache/2011-April/002207.html

If you build an unmodified heimdal from source everything is in one lib. However in FreeBSD the lib was split into several libs and /usr/bin/krb5-config was not adjusted.


----------

