4 Unix SMB/Netbios implementation.
6 SMB parameters and setup
7 Copyright (C) Jeremy Allison 1995
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 unsigned char *smb_passwd
; /* Null if no password */
28 unsigned char *smb_nt_passwd
; /* Null if no password */
29 /* Other fields / flags may be added later */
32 /* Return a smb_passwd struct given a user name, 0 if fails. */
33 struct smb_passwd
*get_smbpwnam(char *user
);
36 #define uchar unsigned char
39 /* SMB Encryption functions. */
40 void str_to_key(unsigned char *str
,unsigned char *key
);
41 void E_P16(uchar
*p14
,uchar
*p16
);
42 void E_P24(unsigned char *p21
, unsigned char *c8
, unsigned char *p24
);
43 void E_md4hash(uchar
*passwd
,uchar
*p16
);
44 void SMBencrypt(unsigned char *passwd
, unsigned char *c8
, unsigned char *p24
);
45 void SMB_nt_encrypt(unsigned char *passwd
, unsigned char *c8
, unsigned char *p24
);
47 /* Password file lock/unlock routines */
48 int pw_file_lock(char *name
, int type
, int secs
);
49 int pw_file_unlock(int fd
);