videolabs / libdsm

Defective SMb: A minimalist implementation of a client library for SMBv1 using Plain'Ol C

Home Page:http://videolabs.github.io/libdsm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What means a DSM_ERROR_NT ?

maximilianpreisinger opened this issue · comments

Hey guys,

I just found this amazing library and I wanted to try it on an Windows XP Embedded. (I mean: I am using this library on Ubuntu, to connect via smb to the Windows machine).

I can connect to the server quite fine. However, the function smb_tree_connect returns the error DSM_ERROR_NT. Could somebody explain, what exactly this NT status is and what it means? How could I fix the problem? I checked the names of the available shares with smbclient -L windows_ip -U username, and I set the appropriate share name in this function call.

Any advice or references to literature, which could help me, are appreciated.

Hello,

cf. include/bdsm/smb_defs.h
#define DSM_ERROR_NT (-2) /* see smb_session_get_nt_status */

cf. include/bdsm/smb_session.h

 * @brief Get the last NT_STATUS
 * @details Valid only if a smb_ function returned the DSM_ERROR_NT error.
 *
 * @param s The session object
 */
uint32_t        smb_session_get_nt_status(smb_session *s);

So, when the lib return DSM_ERROR_NT, you could get the NT error code via smb_session_get_nt_status()