struct type declarations in dns_server

David Disseldorp ddiss at
Tue Aug 1 16:15:36 UTC 2017

Hi Dimitris,

On Tue, 1 Aug 2017 18:50:42 +0300, Dimitris Gravanis via samba-technical wrote:

> Hi,
> I'm working on the gss-tsig crypto test on client_crypto.c and I have to 
> declare and assign initial values to the parameters of the functions 
> that are going to be tested.
> For example (in dns_server.h):
> |struct dns_server {||
> ||    struct task_server *task;||
> ||    struct ldb_context *samdb;||
> ||    struct dns_server_zone *zones;||
> ||    struct dns_server_tkey_store *tkeys;||
> ||    struct cli_credentials *server_credentials;||
> ||    uint16_t max_payload;||
> ||};|
> on the above struct, I need to find where task_server, ldb_context are 
> defined. Same goes for other structs that are not defined in dns.idl or 
> header files I've come across. Therefore, I declare them as variables in 
> their respective tests, but I don't assign values to them, as seen below 
> (in cli_crypto_test.c):

struct task_server is defined in source4/smbd/service_task.h, but
shouldn't be needed for your implementation. Likewise, ldb_context is
opaque, so internals shouldn't be of concern to your code - it can be
initialised via ldb_init(), and free'd via talloc_free() (see ldb.h).
This will hopefully become clearer when you're working out of the main
Samba source tree, rather than your standalone repo.

> You can check my code in full on my temporary repo 
> <>.
> I also forked samba-team/samba mirror on GitHub. To which branch should 
> I make a pull request to add my code to the mirror in the near future?

Please publish your changes as a fork of the samba master branch, then
send through a link to your repository URL via email. The samba-team
mirror on github is read-only, so samba-technical submissions are always

Cheers, David

More information about the samba-technical mailing list