]>
git.ipfire.org Git - thirdparty/squid.git/blob - helpers/ntlm_auth/smb_lm/ntlm_smb_lm_auth.h
2 * (C) 2000 Francesco Chemolli <kinkie@kame.usr.dsi.unimi.it>,
3 * inspired by previous work by Andrew Doran <ad@interlude.eu.org>
5 * Distributed freely under the terms of the GNU General Public License,
6 * version 2. See the file COPYING for licensing details
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
32 /************* CONFIGURATION ***************/
34 * define this if you want debugging
40 #define DEAD_DC_RETRY_INTERVAL 30
42 /************* END CONFIGURATION ***************/
45 /* A couple of harmless helper macros */
46 #define SEND(X) debug("sending '%s' to squid\n",X); printf(X "\n");
48 #define SEND2(X,Y...) debug("sending '" X "' to squid\n",Y); printf(X "\n",Y);
50 /* no gcc, no debugging. varargs macros are a gcc extension */
54 extern int ntlm_errno
;
55 #define NTLM_NO_ERROR 0
56 #define NTLM_SERVER_ERROR 1
57 #define NTLM_PROTOCOL_ERROR 2
58 #define NTLM_LOGON_ERROR 3
59 #define NTLM_UNTRUSTED_DOMAIN 4
60 #define NTLM_BAD_PROTOCOL -1
61 #define NTLM_NOT_CONNECTED 10
64 const char *make_challenge(char *domain
, char *controller
);
65 extern char *ntlm_check_auth(ntlm_authenticate
* auth
, int auth_length
);
66 extern char *fetch_credentials(ntlm_authenticate
* auth
, int auth_length
);
67 void dc_disconnect(void);
69 int is_dc_ok(char *domain
, char *domain_controller
);
71 typedef struct _dc dc
;
75 time_t dead
; /* 0 if it's alive, otherwise time of death */