Bug 427 - Netbios name is used in CUPS IPP originating host attribute
Summary: Netbios name is used in CUPS IPP originating host attribute
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Printing (show other bugs)
Version: 3.0.0preX
Hardware: All All
: P3 minor
Target Milestone: 3.0.1
Assignee: Gerald (Jerry) Carter (dead mail address)
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-10 00:46 UTC by Matthias Hilbig
Modified: 2005-08-24 10:26 UTC (History)
2 users (show)

See Also:


Attachments
Patch to fill ip or dns address into cups IPP originating-host attribute (1.10 KB, patch)
2003-09-10 00:51 UTC, Matthias Hilbig
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Hilbig 2003-09-10 00:46:13 UTC
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.
Comment 1 Matthias Hilbig 2003-09-10 00:51:45 UTC
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?
Comment 2 Tim Potter 2003-09-10 19:07:16 UTC
You don't need to free the result of client_addr() as it returns a static buffer.

Jerry, what do you think?
Comment 3 Tim Potter 2003-09-15 21:00:59 UTC
cc me
Comment 4 Gerald (Jerry) Carter (dead mail address) 2003-11-24 10:34:56 UTC
Looks right to me.  Checking it in for 3.0.1.
Comment 5 Gerald (Jerry) Carter (dead mail address) 2005-02-07 09:05:39 UTC
originally reported against one of the 3.0.0rc[1-4] releases.
Cleaning up non-production versions.
Comment 6 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:26:33 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.