# build freebsd-8-RC1's heimdal with openldap backend?



## mamalos (Sep 23, 2009)

Hi all,

I want to build the heimdal server on my fbsd-8-rc1 to support ldap backend (of course this is not fbsd-8-rc1 specific question). I tried WITH_OPENLDAP='YES' in /etc/make.conf, and -DWITH_OPENLDAP when I was building world. Then, after issuing the command:


```
$ strings /usr/libexec/kdc | grep -i ldap
libldap-2.4.so.7
```

I saw that libldap was present, but when I issued:


```
$ kdc --builtin-hdb
builtin hdb backends: db:, ndbm:
```

I saw that no ldap backend was present. 

Which is the way to build heimdal so as to support ldap backend?

Tnaks all in advance.


----------



## DutchDaemon (Sep 23, 2009)

[cmd=]cd /usr/ports/security/heimdal && make config[/cmd]


```
[X] LDAP      Use OpenLDAP as the KDC backend
```

Shouldn't take more than that.


----------



## mamalos (Sep 23, 2009)

DutchDaemon,

thanks for your hint, but I was wondering how I could achieve the same thing using the base system heimdal, not the one of the ports. 

I can see in /usr/src/crypto/heimdal/configure that ldap is supported (obviously, since the heimdal sources support it), hence I am trying to understand which flag I could use in order to activate it.

(not to mention, that at least until now, the base version of heimdal is newer than the one of the ports)

Any more ideas?


----------



## DutchDaemon (Sep 23, 2009)

make.conf shouldn't be used for the base system anymore. Use /etc/src.conf (see src.conf(5)) to manipulate variables of the OS build process. Though I see no options specific to Heimdal + LDAP in there right now.

/usr/src/crypto/heimdal/configure and /usr/src/crypto/heimdal/configure.in contain a lot of references to openldap. Maybe there are pointers in there, like these:


```
--enable-hdb-openldap-module
  --with-openldap=dir
  --with-openldap-lib=dir
  --with-openldap-include=dir
  --with-openldap-config=path
```


----------



## mamalos (Sep 23, 2009)

Thanks once more,

I had also checked src.conf(5) and make.conf(5), but I hadn't seen anything regarding ldap. My question could have been a bit more generic: apart from the options used in src.conf and make.conf, is there a way to build parts of the base system with different arguments? And apart from that, is there a specific way based on which somebody could build (and install) *only* a subtree of /usr/src?

As far as base system's heimdal, I will forward my question to some freebsd list, and if I get any results from there I will inform this thread.

Thanks again.


----------

