s4-winbind: Migrated winbind connection to tsocket.

Stefan (metze) Metzmacher metze at samba.org
Thu Jan 21 01:31:33 MST 2010

Hi Andrew,

>> Summary of changes:
>>  source4/winbind/wb_samba3_protocol.c |  101 +++++++++++++---------
>>  source4/winbind/wb_server.c          |  157 ++++++++++++++++++++++++++--------
>>  source4/winbind/wb_server.h          |   11 ++-
>>  3 files changed, 191 insertions(+), 78 deletions(-)
> Looking over this changeset, and the previous ones for ntp_signd and the
> KDC, it seems that the change to tsocket is still introducing a fair bit
> of boilerplate code.  Would it be possible to try and put more of this
> (I'm thinking the loop in particlar) in a helper function?

As the current loop functions are very simple,
I'd like to keep them explicitly coded.

The main advantages are:
- it relatively easy to follow the logic of the loop
  by reading it
- each loop has its own specific connection and call structure
- each loop has its own specific debug messages
- all elements (structures and functions) belonging to the loop
  start with the same prefix e.g. ntp_signd_call*,
  (we should unify wbsrv_call and wbsrv_samba3_call)
  and gdb supports wildcard break points.
- each service has its specific *_terminate_connection function
- when tevent_req_* functions are called from the custom loop function
  it records the correct info with the __location__ macro tricks
  (I'm planing to implement generic error stack infrastructure,
   where only the top level function decides if the error stack
   should be logged)

However maybe in future it makes sense to introduce common
helper functions which can be used by the custom loop functions.
I'm planing to add DoS protection to the loops, which can be implemented
with common helper functions.


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

More information about the samba-technical mailing list