Go to the source code of this file.
Functions | |
SMB_Handle_Type | SMB_Create_Con_Handle (void) |
SMB_Handle_Type | SMB_Connect_Server (SMB_Handle_Type Con_Handle, const char *server, const char *NTdomain) |
SMB_Handle_Type | SMB_Connect (SMB_Handle_Type Con_Handle, SMB_Tree_Handle *tree, char *service, char *username, char *password) |
int | SMB_Init (void) |
int | SMB_Logon_Server (SMB_Handle_Type Con_Handle, char *UserName, char *PassWord, const char *NtDomain, int PreCrypted) |
int | SMB_Negotiate (SMB_Handle_Type Con_Handle, const char *Prots[]) |
SMB_Tree_Handle | SMB_TreeConnect (SMB_Handle_Type con, SMB_Tree_Handle tree, const char *path, const char *password, const char *dev) |
int | SMB_TreeDisconect (void *tree_handle) |
void * | SMB_Open (void *tree_handle, void *file_handle, char *file_name, unsigned short mode, unsigned short search) |
int | SMB_Close (void *file_handle) |
int | SMB_Discon (SMB_Handle_Type Con_Handle, BOOL KeepHandle) |
void * | SMB_Create (void *Tree_Handle, void *File_Handle, char *file_name, short search) |
int | SMB_Delete (void *tree, char *file_name, short search) |
int | SMB_Create_Dir (void *tree, char *dir_name) |
int | SMB_Delete_Dir (void *tree, char *dir_name) |
int | SMB_Check_Dir (void *tree, char *dir_name) |
int | SMB_Get_Last_Error (void) |
int | SMB_Get_Last_SMB_Err (void) |
void | SMB_Get_Error_Msg (int msg, char *msgbuf, int len) |
void * | SMB_Logon_And_TCon (void *con, void *tree, char *user, char *pass, char *service, char *st) |
Function Documentation
◆ SMB_Check_Dir()
int SMB_Check_Dir | ( | void * | tree, |
char * | dir_name | ||
) |
◆ SMB_Close()
int SMB_Close | ( | void * | file_handle | ) |
◆ SMB_Connect()
SMB_Handle_Type SMB_Connect | ( | SMB_Handle_Type | Con_Handle, |
SMB_Tree_Handle * | tree, | ||
char * | service, | ||
char * | username, | ||
char * | password | ||
) |
Definition at line 197 of file smblib.c.
References SMB_Connect_Def::desthost, NULL, pid, port, RFCNB_Call(), SMB_Get_My_Name(), SMB_Negotiate(), SMB_Prots_Restrict, SMB_TreeConnect(), SMBLIB_DEFAULT_DOMAIN, SMBLIB_DEFAULT_LMTYPE, SMBLIB_DEFAULT_OSNAME, SMBlib_errno, SMBlibE_BAD, SMBlibE_CallFailed, SMBlibE_NegNoProt, SMBlibE_NoSpace, and xtoupper.
◆ SMB_Connect_Server()
SMB_Handle_Type SMB_Connect_Server | ( | SMB_Handle_Type | Con_Handle, |
const char * | server, | ||
const char * | NTdomain | ||
) |
Definition at line 101 of file smblib.c.
References SMB_Connect_Def::desthost, NULL, SMB_Connect_Def::PDomain, pid, port, RFCNB_Call(), server, SMB_Get_My_Name(), SMBLIB_DEFAULT_LMTYPE, SMBLIB_DEFAULT_OSNAME, SMBlib_errno, SMBlibE_CallFailed, SMBlibE_NoSpace, and xtoupper.
Referenced by init_challenge(), is_dc_ok(), main(), and Valid_User().
◆ SMB_Create()
void * SMB_Create | ( | void * | Tree_Handle, |
void * | File_Handle, | ||
char * | file_name, | ||
short | search | ||
) |
◆ SMB_Create_Con_Handle()
SMB_Handle_Type SMB_Create_Con_Handle | ( | void | ) |
Definition at line 89 of file smblib.c.
References NULL, SMBlib_errno, and SMBlibE_NotImpl.
◆ SMB_Create_Dir()
int SMB_Create_Dir | ( | void * | tree, |
char * | dir_name | ||
) |
◆ SMB_Delete()
int SMB_Delete | ( | void * | tree, |
char * | file_name, | ||
short | search | ||
) |
◆ SMB_Delete_Dir()
int SMB_Delete_Dir | ( | void * | tree, |
char * | dir_name | ||
) |
◆ SMB_Discon()
int SMB_Discon | ( | SMB_Handle_Type | Con_Handle, |
BOOL | KeepHandle | ||
) |
Definition at line 577 of file smblib.c.
References RFCNB_Hangup().
Referenced by dc_disconnect(), init_challenge(), is_dc_ok(), and Valid_User().
◆ SMB_Get_Error_Msg()
Definition at line 798 of file smblib-util.c.
References RFCNB_Pkt::len, RFCNB_Get_Error(), SMBlib_Error_Messages, and SMBlibE_NoSuchMsg.
Referenced by init_challenge(), and main().
◆ SMB_Get_Last_Error()
int SMB_Get_Last_Error | ( | void | ) |
Definition at line 755 of file smblib-util.c.
References SMBlib_errno.
Referenced by init_challenge(), main(), and manage_request().
◆ SMB_Get_Last_SMB_Err()
int SMB_Get_Last_SMB_Err | ( | void | ) |
Definition at line 766 of file smblib-util.c.
References SMBlib_SMB_Error.
Referenced by main(), and manage_request().
◆ SMB_Init()
int SMB_Init | ( | void | ) |
Definition at line 67 of file smblib.c.
References SMB_State_Started, and SMBlib_State.
Referenced by main(), and Valid_User().
◆ SMB_Logon_And_TCon()
void * SMB_Logon_And_TCon | ( | void * | con, |
void * | tree, | ||
char * | user, | ||
char * | pass, | ||
char * | service, | ||
char * | st | ||
) |
◆ SMB_Logon_Server()
int SMB_Logon_Server | ( | SMB_Handle_Type | Con_Handle, |
char * | UserName, | ||
char * | PassWord, | ||
const char * | NtDomain, | ||
int | PreCrypted | ||
) |
@@ mdz: check for guest login {
@@ mdz: }
Definition at line 332 of file smblib.c.
References CVAL, SMB_Connect_Def::Encrypt_Key, SMB_Connect_Def::encrypt_passwords, IVAL, NULL, SMB_Connect_Def::PDomain, pid, RFCNB_Alloc_Pkt(), RFCNB_Free_Pkt(), RFCNB_Recv(), RFCNB_Send(), SIVAL, SMB_DEF_IDF, SMB_Hdr, SMB_hdr_axc_offset, SMB_hdr_axo_offset, SMB_hdr_com_offset, SMB_hdr_err_offset, SMB_hdr_idf_offset, SMB_hdr_mid_offset, SMB_hdr_pid_offset, SMB_hdr_rcls_offset, SMB_hdr_tid_offset, SMB_hdr_uid_offset, SMB_hdr_wct_offset, SMB_P_LanMan1, SMB_P_NT1, SMB_ssetpLM_bcc_offset, SMB_ssetpLM_buf_offset, SMB_ssetpLM_len, SMB_ssetpLM_mbs_offset, SMB_ssetpLM_mmc_offset, SMB_ssetpLM_pwl_offset, SMB_ssetpLM_res_offset, SMB_ssetpLM_snk_offset, SMB_ssetpLM_vcn_offset, SMB_ssetpNTLM_bcc_offset, SMB_ssetpNTLM_buf_offset, SMB_ssetpNTLM_cap_offset, SMB_ssetpNTLM_cipl_offset, SMB_ssetpNTLM_cspl_offset, SMB_ssetpNTLM_len, SMB_ssetpNTLM_mbs_offset, SMB_ssetpNTLM_mmc_offset, SMB_ssetpNTLM_res_offset, SMB_ssetpNTLM_snk_offset, SMB_ssetpNTLM_vcn_offset, SMB_ssetpr_act_offset, SMBC_SUCCESS, SMBencrypt(), SMBlib_errno, SMBLIB_MAX_XMIT, SMBlib_SMB_Error, SMBlibE_BAD, SMBlibE_NoSpace, SMBlibE_ProtLow, SMBlibE_RecvFailed, SMBlibE_Remote, SMBlibE_SendFailed, SMBsesssetupX, SSVAL, SVAL, and uchar.
Referenced by ntlm_check_auth(), and Valid_User().
◆ SMB_Negotiate()
int SMB_Negotiate | ( | SMB_Handle_Type | Con_Handle, |
const char * | Prots[] | ||
) |
Definition at line 239 of file smblib-util.c.
References CVAL, SMB_Connect_Def::Encrypt_Key, IVAL, NULL, pid, RFCNB_Alloc_Pkt(), RFCNB_Free_Pkt(), RFCNB_Recv(), RFCNB_Send(), SIVAL, SMB_DEF_IDF, SMB_Figure_Protocol(), SMB_Hdr, SMB_hdr_com_offset, SMB_hdr_err_offset, SMB_hdr_idf_offset, SMB_hdr_mid_offset, SMB_hdr_pid_offset, SMB_hdr_rcls_offset, SMB_hdr_tid_offset, SMB_hdr_uid_offset, SMB_hdr_wct_offset, SMB_negp_bcc_offset, SMB_negp_buf_offset, SMB_negp_len, SMB_negrCP_idx_offset, SMB_negrLM_buf_offset, SMB_negrLM_ekl_offset, SMB_negrLM_mbs_offset, SMB_negrLM_mmc_offset, SMB_negrLM_mnv_offset, SMB_negrLM_rm_offset, SMB_negrLM_sec_offset, SMB_negrLM_sk_offset, SMB_negrLM_stz_offset, SMB_negrNTLM_buf_offset, SMB_negrNTLM_ekl_offset, SMB_negrNTLM_mbs_offset, SMB_negrNTLM_mmc_offset, SMB_negrNTLM_mnv_offset, SMB_negrNTLM_mrs_offset, SMB_negrNTLM_sec_offset, SMB_negrNTLM_sk_offset, SMB_negrNTLM_stz_offset, SMB_P_Unknown, SMB_sec_encrypt_mask, SMB_sec_user_mask, SMBC_SUCCESS, SMBdialectID, SMBlib_errno, SMBlib_SMB_Error, SMBlibE_BAD, SMBlibE_NegNoProt, SMBlibE_NoSpace, SMBlibE_ProtUnknown, SMBlibE_RecvFailed, SMBlibE_Remote, SMBlibE_SendFailed, SMBnegprot, SSVAL, SVAL, and xstrncpy().
Referenced by init_challenge(), main(), SMB_Connect(), and Valid_User().
◆ SMB_Open()
void * SMB_Open | ( | void * | tree_handle, |
void * | file_handle, | ||
char * | file_name, | ||
unsigned short | mode, | ||
unsigned short | search | ||
) |
◆ SMB_TreeConnect()
SMB_Tree_Handle SMB_TreeConnect | ( | SMB_Handle_Type | con, |
SMB_Tree_Handle | tree, | ||
const char * | path, | ||
const char * | password, | ||
const char * | dev | ||
) |
Definition at line 477 of file smblib-util.c.
References CVAL, IVAL, RFCNB_Pkt::next, NULL, pid, RFCNB_Alloc_Pkt(), RFCNB_Free_Pkt(), RFCNB_Recv(), RFCNB_Send(), SIVAL, SMB_DEF_IDF, SMB_Hdr, SMB_hdr_com_offset, SMB_hdr_err_offset, SMB_hdr_idf_offset, SMB_hdr_mid_offset, SMB_hdr_pid_offset, SMB_hdr_rcls_offset, SMB_hdr_tid_offset, SMB_hdr_uid_offset, SMB_hdr_wct_offset, SMB_tcon_bcc_offset, SMB_tcon_buf_offset, SMB_tcon_len, SMB_tconr_mbs_offset, SMB_tconr_tid_offset, SMBasciiID, SMBC_SUCCESS, SMBlib_errno, SMBlib_SMB_Error, SMBlibE_BadParam, SMBlibE_NoSpace, SMBlibE_RecvFailed, SMBlibE_Remote, SMBlibE_SendFailed, SMBtcon, SSVAL, SVAL, and xstrncpy().
Referenced by SMB_Connect().
◆ SMB_TreeDisconect()
int SMB_TreeDisconect | ( | void * | tree_handle | ) |