[PATCH] s3/script/findsmb.in: rewrite in modern perl

Aurélien Aptel aaptel at suse.com
Wed Feb 1 16:10:37 UTC 2017


Andreas Schneider <asn at samba.org> writes:
> you probably want to add the following patch:
>
> https://git.samba.org/?p=asn/
> samba.git;a=commitdiff;h=a9c831cd2ad47c77484c072538a0267afbeef130

This is already in master.

> Someone also sent a patch some time ago:
>
> https://git.samba.org/?p=asn/
> samba.git;a=commitdiff;h=fed597191fd2ca6263d4124410bee0e66ffb6603

This actually gets rid of the -r option, leaving only -d (debug output).

> I've never looked into the details, perl is horror to me ;-)
>
>
> Did you check if the options (-d, -r) are working?

As I said, -d is just the developer debug output (print commands run
thru system() and their output).

As for -r, I just do the exact same thing the script was doing previously i.e.
pass it along to nmblookup. From nmblookup(1):

 -r|--root-port
   Try and bind to UDP port 137 to send and receive UDP datagrams. The
   reason for this option is a bug in Windows 95 where it ignores the
   source port of the requesting packet and only replies to UDP port
   137.  Unfortunately, on most UNIX systems root privilege is needed to
   bind to this port, and in addition, if the nmbd(8) daemon is running
   on this machine it also binds to this port.

-- 
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)



More information about the samba-technical mailing list