Skip to content

Commit e3a9ddf

Browse files
committed
fix retry case for acquiring security descriptor
1 parent 33f2ebc commit e3a9ddf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/msf/core/post/windows/accounts.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def check_dir_perms(dir, token)
311311
if (f['return'] and f["lpnLengthNeeded"] <= buffer_size)
312312
sd = f["pSecurityDescriptor"]
313313
elsif (f['GetLastError'] == 122) # ERROR_INSUFFICIENT_BUFFER
314-
f = adv.GetFileSecurityA(dir, si, f["lpnLengthNeeded"], f["lpnLengthNeeded"], 4)
314+
sd = adv.GetFileSecurityA(dir, si, f["lpnLengthNeeded"], f["lpnLengthNeeded"], 4)
315315
elsif (f['GetLastError'] == 2)
316316
vprint_error("The system cannot find the file specified: #{dir}")
317317
return nil

0 commit comments

Comments
 (0)