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 v. 2 / 3 integration based on SMBJ #26

Open
wants to merge 21 commits into
base: trunk
Choose a base branch
from
Open

Conversation

ahbonsu
Copy link

@ahbonsu ahbonsu commented Nov 15, 2017

Hi,

based on this issue: https://issues.apache.org/jira/browse/VFS-635 I created an implementation of https://github.com/hierynomus/smbj into vfs 2.2

I named the provider SMB2, so the scheme I used is also smb2. I dont know if it's better to rename the existing smb to cifs and use smb for the smb v2+ implementation.

All the tests from the ProviderTests pass (except known issues with classLoader ans sealedClass).

Thanks for any feedback or further advice how to proceed with this pr,
André

André Hauenstein and others added 21 commits November 5, 2017 21:29
Fixed: getParent() when share root is reached
go through cached files to check whether parent is already resolved
Removed RandomAccess from capabilities
Added getLastModifiedTime

Tests: testLoadClass & testSealing are not working on linux (it seems to be an known issue)
Added Exceptions in Resources.properties and replaced all exceptions
with the correct ressource
@markt-asf markt-asf closed this May 1, 2019
@ilang
Copy link

ilang commented Sep 18, 2019

@markt-asf , can I ask why did you close it ? was it integrated in some other way to this repository ?

@markt-asf
Copy link

It was closed automatically when the trunk branch was removed. I've re-opened the PR. Please re-base it against master.

@markt-asf markt-asf reopened this Sep 18, 2019
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.5.11</version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just no.

<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just no.

See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You completely broke formatting.

@@ -0,0 +1 @@
/SMB3FileNameParser.java
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

sb.append("://");
sb.append(getUserName());
sb.append(':');
sb.append(getPassword());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seriously?

StringBuilder sb = new StringBuilder();
sb.append(getScheme());
sb.append("://");
sb.append(getUserName());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if this is null?


private static final SMB2FileNameParser INSTANCE = new SMB2FileNameParser();

private static final int PORT = 443;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since when does SMB use HTTPS?

{
if(shareName == null || shareName.length() == 0)
{
throw new Exception("No path provided!");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NullPointerException and IllegalArgumentException

String tmp = path.startsWith("/") ? path.substring(1) : path;

if(!tmp.substring(0, shareName.length()).equals(shareName)) {
throw new Exception("Share does not match the provided path!");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IllegalArgumentException

@vadimd02
Copy link

vadimd02 commented Oct 7, 2020

@ahbonsu @markt-asf - can you please advise if this planned to be merged ?

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

Successfully merging this pull request may close these issues.

5 participants