Skip to contentSkip to conversation

smbinfo: remove invalid arguments to ioctl method

PATCH In review Ronnie Sahlberg 2 participants 2 messages Dec 20, 2019 – Dec 23, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 smbinfo: remove invalid arguments to ioctl method

---
 smbinfo | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
smbinfo +2 -2
index 1be82c7..ee774d3 100755
@@ -443,7 +443,7 @@ def cmd_filefsfullsizeinfo(args):
     qi = QueryInfoStruct(info_type=0x2, file_info_class=7, input_buffer_length=32)
     try:
         fd = os.open(args.file, os.O_RDONLY)
-        total, caller_avail, actual_avail, sec_per_unit, byte_per_sec = qi.ioctl(fd, CIFS_QUERY_INFO, '<QQQII')
+        total, caller_avail, actual_avail, sec_per_unit, byte_per_sec = qi.ioctl(fd, '<QQQII')
     except Exception as e:
         print("syscall failed: %s"%e)
         return False
@@ -540,7 +540,7 @@ def cmd_getcompression(args):
     qi = QueryInfoStruct(info_type=0x9003c, flags=PASSTHRU_FSCTL, input_buffer_length=2)
     try:
         fd = os.open(args.file, os.O_RDONLY)
-        ctype = qi.ioctl(fd, CIFS_QUERY_INFO, '<H')[0]
+        ctype = qi.ioctl(fd, '<H')[0]
     except Exception as e:
         print("syscall failed: %s"%e)
         return False
Signature · 1 line
2.13.6
#1 lore raw

Merged. Thanks!
--
Best regards,
Pavel Shilovsky

чт, 19 дек. 2019 г. в 16:59, Ronnie Sahlberg <[email protected]>:

Quoted 31 lines
---
 smbinfo | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
smbinfo +2 -3
index 1be82c7..ee774d3 100755
@@ -443,7 +443,7 @@ def cmd_filefsfullsizeinfo(args):
     qi = QueryInfoStruct(info_type=0x2, file_info_class=7, input_buffer_length=32)
     try:
         fd = os.open(args.file, os.O_RDONLY)
-        total, caller_avail, actual_avail, sec_per_unit, byte_per_sec = qi.ioctl(fd, CIFS_QUERY_INFO, '<QQQII')
+        total, caller_avail, actual_avail, sec_per_unit, byte_per_sec = qi.ioctl(fd, '<QQQII')
     except Exception as e:
         print("syscall failed: %s"%e)
         return False
@@ -540,7 +540,7 @@ def cmd_getcompression(args):
     qi = QueryInfoStruct(info_type=0x9003c, flags=PASSTHRU_FSCTL, input_buffer_length=2)
     try:
         fd = os.open(args.file, os.O_RDONLY)
-        ctype = qi.ioctl(fd, CIFS_QUERY_INFO, '<H')[0]
+        ctype = qi.ioctl(fd, '<H')[0]
     except Exception as e:
         print("syscall failed: %s"%e)
         return False
--

2.13.6