I found a working solution, replying here to confirm it's the proper way of
doing it and in case others might need the same
setting the value in passdb:
auth_request_set_field(request, "authlocation", dec2str(9),NULL);
reading the value in userdb:
auth_fields_find(auth_request->extra_fields,
Thanks. If I do that in my passdb-test.c file, it core dumps. I did something
simple like:
auth_request_set_userdb_field(auth_request, "customFlag", dec2str(50));
However, auth_request_set_field() used like this:
auth_request_set_field(auth_request, "customFlag", dec2str(50), NULL); doesn't