broadinstitute / broadinstitute/python-sudoers

double "=" signs in the command alias cause BadAliasException

Open
#19 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7
Forks
8
Avg merge
9d 22h
Merged PRs (30d)
1

Description

Hi,
Thank you for putting this library together. Very handy.
I ran into an issue with my sudoers file. I've got a command in there that uses "=" as part of command argument which conflicts with your error checking and throws an exception:
pysudoers.BadAliasException: bad alias: Cmnd_Alias CACAO_ADM=/home/cacaoadm set-param jdmk-home=/export/home/lib/private

Is it possible to adjust the error check ? I could ignore this exception in my script but it can potentially miss an analysis of the command. Thank you !

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the shown Cmnd_Alias command and trace the sudoers parsing path that raises BadAliasException. Confirm that an '=' in a command argument no longer triggers the exception while the command remains available for analysis.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python
Domain
operating-systems, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.