This is probably not very useful for most daemons, but you can check what files are being opened by a program using lsof. For example, to find out what files are being used by the LDAP server, you can use the following command (probably not the most optimal one!):
This lists all the files read by slapd. Note that these files include not only regular files, but also network interfaces, sockets and other special files (such /dev files). Alternatively, you can also check which processes have a particular file opened:
This command shows the programs that are currently using the special device /dev/cdrom.