Skip to content

Commit 5553477

Browse files
committed
Fix bug with uid and uid autodetection
1 parent f95b935 commit 5553477

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

nxc/protocols/nfs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def process_entries(entries, path, uid, recurse):
9696
attrs = self.nfs3.getattr(file_handle, auth=self.auth)
9797
file_size = attrs["attributes"]["size"]
9898
file_size = convert_size(file_size)
99+
uid = attrs["attributes"]["uid"]
99100
read_perm, write_perm, exec_perm = self.get_permissions(entry["name_handle"]["handle"]["data"])
100101
contents.append({"path": item_path, "read": read_perm, "write": write_perm, "execute": exec_perm, "filesize": file_size, "uid": uid})
101102

@@ -112,7 +113,7 @@ def process_entries(entries, path, uid, recurse):
112113

113114
if recurse == 0:
114115
read_perm, write_perm, exec_perm = self.get_permissions(file_handle)
115-
return [{"path": f"{path}/", "read": read_perm, "write": write_perm, "execute": exec_perm, "filesize": "-"}]
116+
return [{"path": f"{path}/", "read": read_perm, "write": write_perm, "execute": exec_perm, "filesize": "-", "uid": self.auth["uid"]}]
116117

117118
items = self.nfs3.readdirplus(file_handle, auth=self.auth)
118119
if "resfail" in items:

0 commit comments

Comments
 (0)