Skip to content

[par.py] Fix opnum 39 response class in OPNUMS - #2310

Merged
alexisbalbachan merged 1 commit into
fortra:masterfrom
lupingQAQ:fix-par-opnums-39
Nov 4, 2026
Merged

alexisbalbachan merged 1 commit into
fortra:masterfrom
lupingQAQ:fix-par-opnums-39

Conversation

@lupingQAQ

Copy link
Copy Markdown
Contributor

Hi,

Small fix in impacket/dcerpc/v5/par.py: the OPNUMS entry for opnum 39
(RpcAsyncAddPrinterDriver) currently lists the request class as its own
response class:

39 : (RpcAsyncAddPrinterDriver, RpcAsyncAddPrinterDriver),

while RpcAsyncAddPrinterDriverResponse is defined right above it and is
otherwise never referenced. Every other entry in the table follows the
(request, response) convention, so this looks like a copy-paste slip
present since the initial MS-PAR implementation (29ad579, 2021) rather
than intentional.

Proposed change (one line):

  • 39 : (RpcAsyncAddPrinterDriver, RpcAsyncAddPrinterDriver),
  • 39 : (RpcAsyncAddPrinterDriver, RpcAsyncAddPrinterDriverResponse),

Notes:

  • No runtime behavior change: response unmarshalling (rpcrt.py) resolves the
    response class by name convention (<RequestClass>Response), so the table
    is not consulted by the request path today. The change keeps the declared
    opnum -> (request, response) mapping consistent for readers and tooling.
  • No test updates needed ((h)RpcAsyncAddPrinterDriver is listed under
    "Not yet" in tests/dcerpc/test_par.py).

Happy to adjust the approach if you'd prefer these tables handled differently.

Thanks!

@alexisbalbachan

Copy link
Copy Markdown
Collaborator

Hi, thank you for this PR, everything looks good, im merging it now

@alexisbalbachan
alexisbalbachan merged commit e26afea into fortra:master Nov 4, 2026
@anadrianmanrique

Copy link
Copy Markdown
Collaborator

followed up at #2367. [MS-PAR] Add RpcAsyncDeletePrinterDriver call and tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

medium Medium priority item

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants