Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smb_share_get_list always returns -2 #127

Open
leonsg opened this issue Mar 9, 2018 · 5 comments
Open

smb_share_get_list always returns -2 #127

leonsg opened this issue Mar 9, 2018 · 5 comments
Labels

Comments

@leonsg
Copy link

leonsg commented Mar 9, 2018

I have the following code:

smb_share_list list;
size_t shareCount = 0;
result = smb_share_get_list(session, &list, &shareCount);

The result is always -2.
I have checked to ensure that "smb_session_login" and "smb_session_is_guest" both returns 0. So it means I am connected to the file server correctly. But I cannot seem to get the share list.

Can anyone point me in the right direction to solving this issue? Help is much appreciated.

@jbkempf
Copy link
Contributor

jbkempf commented Mar 9, 2018

You should debug and step-in to see why the value is -2.

Is it SMBv2 server?

@leonsg
Copy link
Author

leonsg commented Mar 13, 2018

@jbkempf thank for your reply. The server is running Windows Server 2008, so it should be using SMBv2.

Is there something that can be done to the server to make this library work?

@jbkempf
Copy link
Contributor

jbkempf commented Mar 14, 2018

I don't know. Maybe libdsm only works with SMBv1, but that would be strange, for detection.

@satashi2009
Copy link

I have got same issue, but my case is not the issue with the signing. You may double check your WORKGROUP name

smb_session_connect(session, WORKGROUP_NAME, ...)
smb_session_set_creds(session, WORKGROUP_NAME, ...)

if WORKGROUP is right, then smb_share_get_list will work

@jbkempf jbkempf added the bug label Aug 9, 2023
@jbkempf
Copy link
Contributor

jbkempf commented Aug 9, 2023

See #122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants