Code to replace the unexpected.tdb file

Stefan (metze) Metzmacher metze at samba.org
Wed Jan 5 05:05:11 MST 2011


Hi Volker,

> http://git.samba.org/?p=vl/samba.git/.git;a=shortlog;h=refs/heads/unexpected
> 
> has code to replace the unexpected.tdb file. It replaces it
> with a unix domain socket /tmp/.nmbd/unexpected where nmbd
> delivers specific packets requested by for example nmblookup
> and winbind.
> 
> For patch clarity it leaves around the old code so far,
> removing it is trivial. And, it does not yet have DoS
> protection in nmbd. That should also be pretty easy to do
> (drop old clients when there are too many and drop packets
> to indiviual clients when the queue is too long).
> 
> Comments?

I like the concept!

s3: Basic infrastructure for /tmp/.nmbd/unexpected

I think this is wrong:
+       do {
+               sock = accept(server->listen_sock,
+                             (struct sockaddr *)(void *)&sunaddr, &len);
+       } while (sock == -1 && errno == EINTR);
+
+       if (sock == -1) {
+               return;
+       }

when we got a signal we should return instead of looping,
so that signal events can be processed.

we'll get a read event again and can retry accept() then.

s3: Add nbt_getdc
 I'd split this commit in adding the new code and using it,
 but I'd be also fine if you keep it that way.

> Is this 3.6 material?

I'd say it depends on when we'll really release 3.6.0.

I'd like to have it in, but we should give it some time in master.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110105/6f5568c6/attachment.pgp>


More information about the samba-technical mailing list