Skip to content

Commit

Permalink
cifs.smb.client.disableSpnegoIntegrity=true for win10 guest login and…
Browse files Browse the repository at this point in the history
… solving WD MyCloud issues

See AgNO3/jcifs-ng#186 and AgNO3/jcifs-ng#226

Separate SMBv1 and SMBv2 world and do not mix options
  • Loading branch information
courville committed May 30, 2020
1 parent b23d9ab commit a8b90d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Binary file modified libs/jcifs-ng.jar
Binary file not shown.
14 changes: 8 additions & 6 deletions src/com/archos/filecorelibrary/jcifs/JcifsUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,24 +118,26 @@ private static CIFSContext createContextOnly(boolean isSmb2) {
prop.put("jcifs.smb.client.enableSMB2", "true");
// note that connectivity with smbV1 will not be working
prop.put("jcifs.smb.client.useSMB2Negotiation", "true");
// disable dfs makes win10 shares with ms account work
prop.put("jcifs.smb.client.dfs.disabled", "true");
} else {
prop.put("jcifs.smb.client.disableSMB1", "false");
prop.put("jcifs.smb.client.enableSMB2", "false");
prop.put("jcifs.smb.client.useSMB2Negotiation", "false");
// get around https://github.com/AgNO3/jcifs-ng/issues/40
prop.put("jcifs.smb.client.ipcSigningEnforced", "false");
}

// makes Guest work on Win10 https://github.com/AgNO3/jcifs-ng/issues/186 and must be true otherwise interferes with WD MyCloud cf. https://github.com/AgNO3/jcifs-ng/issues/225
prop.put("jcifs.smb.client.disableSpnegoIntegrity", "true");

// resolve in this order to avoid netbios name being also a foreign DNS entry resulting in bad resolution
// do not change resolveOrder for now
prop.put("jcifs.resolveOrder", "BCAST,DNS");

// get around https://github.com/AgNO3/jcifs-ng/issues/40
prop.put("jcifs.smb.client.ipcSigningEnforced", "false");
// allow plaintext password fallback
prop.put("jcifs.smb.client.disablePlainTextPasswords", "false");
// disable dfs makes win10 shares with ms account work
prop.put("jcifs.smb.client.dfs.disabled", "true");
// make Guest work on Win10 https://github.com/AgNO3/jcifs-ng/issues/186
prop.put("jcifs.smb.client.disableSpnegoIntegrity", "false");


PropertyConfiguration propertyConfiguration = null;
try {
Expand Down

0 comments on commit a8b90d0

Please sign in to comment.