[Samba] nitwit's attempt to edit samba source

Garming Sam garming at catalyst.net.nz
Sun Nov 29 21:23:14 UTC 2015


Hi,

As Viktor has picked up on, remote_host is a struct of type 
tsocket_address. It's not very typical to be able to directly access 
this kind of information and there'll usually be some function that 
looks helpful. In the tsocket guide that he's posted, there seems to be 
a function that you want, which takes your remote_host and converts it 
to what looks to be a proper (ipv4 or ipv6) string.

char *tsocket_address_inet_addr_string(const struct tsocket_address 
*addr, TALLOC_CTX *mem_ctx);

Give it a go. There might be a few other functions you might find useful 
in there.


Cheers,

Garming

On 28/11/15 04:12, mourik jan heupink wrote:
> Hi Viktor!
>
> Thanks for your try at this, I am already doing what you suggest: the 
> iptables - timestaps. But that is rather troublesome, and I would very 
> much samba to log this vital info.
>
> Anyway, I tried what you suggested, and now it stopped compiling. :-)
>
> Does this error perhaps tell you something, or are you just as 
> clueless as I am now:
>
>> [1955/4033] Compiling source4/auth/ntlm/auth.c
>> In file included from ../source4/include/includes.h:62:0,
>>                  from ../source4/auth/ntlm/auth.c:21:
>> ../source4/auth/ntlm/auth.c: In function ‘auth_check_password_recv’:
>> ../source4/auth/ntlm/auth.c:429:34: error: dereferencing pointer to 
>> incomplete type
>>      state->user_info->remote_host->addr,
>>                                   ^
>> ../source4/../lib/util/debug.h:185:20: note: in definition of macro 
>> ‘DEBUG’
>>         && (dbgtext body) )
>>                     ^
>> Waf: Leaving directory `/root/samba-4.3.1/bin'
>> Build failed:  -> task failed (err #1):
>>     {task: cc auth.c -> auth_6.o}
>> Makefile:8: recipe for target 'all' failed
>> make: *** [all] Error 1
>
> Or anyone?
>




More information about the samba mailing list