--------------------- PatchSet 3613 Date: 2002/01/24 00:25:03 Author: kinkie Branch: ntlm Tag: (none) Log: Added winbind protocol version "negotiation". Members: src/auth/ntlm/helpers/winbind/wb_ntlm_auth.c:1.1.2.13->1.1.2.14 Index: squid/src/auth/ntlm/helpers/winbind/wb_ntlm_auth.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/auth/ntlm/helpers/winbind/Attic/wb_ntlm_auth.c,v retrieving revision 1.1.2.13 retrieving revision 1.1.2.14 diff -u -r1.1.2.13 -r1.1.2.14 --- squid/src/auth/ntlm/helpers/winbind/wb_ntlm_auth.c 23 Jan 2002 23:36:40 -0000 1.1.2.13 +++ squid/src/auth/ntlm/helpers/winbind/wb_ntlm_auth.c 24 Jan 2002 00:25:03 -0000 1.1.2.14 @@ -318,6 +318,19 @@ return; } +void check_winbindd() { + NSS_STATUS r; + r=winbindd_request(WINBINDD_INTERFACE_VERSION,&request,&response); + if (r!=WINBINDD_OK) { + warn("Can't contact winbindd. Dying\n"); + exit(1); + } + if (response.data.interface_version!=WINBIND_INTERFACE_VERSION) { + warn("Winbind protocol mismatch. Align squid and samba. Dying\n"); + exit(1); + } +} + int main (int argc, char ** argv) { if (argc > 0) { /* should always be true */ myname=strrchr(argv[0],'/'); @@ -332,6 +345,7 @@ process_options(argc,argv); debug("ntlm winbindd auth helper build " __DATE__ ", " __TIME__ " starting up...\n"); + check_winbindd(); /* initialize FDescs */ setbuf(stdout, NULL); setbuf(stderr, NULL);