Skip to content

Commit d86df0e

Browse files
committed
Update auth values for every sub dir
1 parent a3d4216 commit d86df0e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

nxc/protocols/nfs.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -645,15 +645,14 @@ def ls(self):
645645
self.logger.fail("No root escape possible, please specify a share")
646646
return
647647

648-
# Update UID and GID for the share
649-
self.update_auth(mount_fh)
650-
651648
# We got a path to look up
652649
curr_fh = mount_fh
653650
is_file = False # If the last path is a file
654651

655652
# If ls is "" or "/" without filter we would get one item with [""]
656653
for sub_path in list(filter(None, self.args.ls.split("/"))):
654+
# Update UID and GID for the path
655+
self.update_auth(curr_fh)
657656
res = self.nfs3.lookup(curr_fh, sub_path, auth=self.auth)
658657

659658
if "resfail" in res and res["status"] == NFS3ERR_NOENT:

0 commit comments

Comments
 (0)