I looked at the source of samba 2.2.8a and 3.0rc1, both fill the job-originating-host attribute with get_remote_machine_name(). So the orininating-host attribute contains the netbios name. Better would be if the originating host attribute contained the dnsname or at least the ip address of the remote host. I already programmed a little patch and sent it to the mailinglist, which uses clientname = client_name(); if (strcmp(clientname, "UNKNOWN") == 0) { clientname = client_addr(); } to fill in the originating host attribute. Additional idea: To have the netbios name somewhere in the cups attributes you could use an attribute like samba-originating-netbios-host.
Created attachment 131 [details] Patch to fill ip or dns address into cups IPP originating-host attribute do I have to free(clientname) to avoid memory leaks?
You don't need to free the result of client_addr() as it returns a static buffer. Jerry, what do you think?
cc me
Looks right to me. Checking it in for 3.0.1.
originally reported against one of the 3.0.0rc[1-4] releases. Cleaning up non-production versions.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.