5 #include "smblib-priv.h"
9 int Valid_User(char *USERNAME,char *PASSWORD,char *SERVER,char *BACKUP, char *DOMAIN)
11 char *SMB_Prots[] = {"PC NETWORK PROGRAM 1.0",
12 "MICROSOFT NETWORKS 1.03",
13 "MICROSOFT NETWORKS 3.0",
23 con = SMB_Connect_Server(NULL, SERVER, DOMAIN);
24 if (con == NULL) { /* Error ... */
25 con = SMB_Connect_Server(NULL, BACKUP, DOMAIN);
27 return(NTV_SERVER_ERROR);
30 if (SMB_Negotiate(con, SMB_Prots) < 0) { /* An error */
32 return(NTV_PROTOCOL_ERROR);
34 /* Test for a server in share level mode do not authenticate against it */
35 if (con -> Security == 0)
38 return(NTV_PROTOCOL_ERROR);
41 if (SMB_Logon_Server(con, USERNAME, PASSWORD) < 0) {
43 return(NTV_LOGON_ERROR);