Skip to content

Commit

Permalink
Revert "Allow user information on a mount to be provided by VirtualMo…
Browse files Browse the repository at this point in the history
…untTemplate."

This reverts commit ce0dbcb.
  • Loading branch information
ludup committed May 2, 2024
1 parent 90adac2 commit d51d96c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@ public int hashCode() {
private boolean filesystemRoot;
private boolean isDefault;
protected boolean isImaginary;
protected String username = "unknown";
protected String group = "unknown";
protected int uid = 0;
protected int gid = 0;


protected AbstractMount(String mount, String path) {
this(mount, path, false, false);
}
Expand Down Expand Up @@ -125,20 +121,4 @@ public void setAttribute(String key, Object value) {
public String toString() {
return getMount() + " on " + getRoot();
}

public String getUsername() {
return username;
}

public String getGroup() {
return group;
}

public int getUid() {
return uid;
}

public int getGid() {
return gid;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ public class VirtualMount extends AbstractMount {
AbstractFile f = actualFileFactory.getFile(path);
this.path = f.getAbsolutePath();
}

this.uid = mountTemplate.getUid();
this.gid = mountTemplate.getGid();
this.username = mountTemplate.getUsername();
this.group = mountTemplate.getGroup();

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ public SftpFileAttributes getAttributes() throws FileNotFoundException,

bldr.withPermissions(builder.build());

bldr.withUid(parentMount.getUid());
bldr.withGid(parentMount.getGid());
bldr.withUsername(System.getProperty("maverick.unknownUsername", parentMount.getUsername()));
bldr.withGroup(System.getProperty("maverick.unknownUsername", parentMount.getGroup()));
bldr.withUid(0);
bldr.withGid(0);
bldr.withUsername(System.getProperty("maverick.unknownUsername", "unknown"));
bldr.withGroup(System.getProperty("maverick.unknownUsername", "unknown"));
bldr.withLastAccessTime(parentMount.lastModified());
bldr.withLastModifiedTime(parentMount.lastModified());
bldr.withCreateTime(parentMount.lastModified());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,4 @@ public boolean isChildOf(VirtualMountTemplate o2) {
public long lastModified() {
return lastModified;
}

public VirtualMountTemplate setUsername(String username) {
this.username = username;
return this;
}

public VirtualMountTemplate setGroup(String group) {
this.group = group;
return this;
}

public VirtualMountTemplate setUid(int uid) {
this.uid = uid;
return this;
}

public VirtualMountTemplate setGid(int gid) {
this.gid = gid;
return this;
}
}

0 comments on commit d51d96c

Please sign in to comment.