openwall / openwall/john

Config option override

Open
#4,480 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement RFC / discussion
Dominant language
C
Stars
13.6k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Just brainstorming again, on the subject of options flags starvation and other things.

How about adding an option --config-option=[[SECTION:]OPTION=VALUE[, ...]] that itself doesn't need any flag (we'd use FLG_ZERO which is actually 0, because we handle OPT_REQ_PARAM cleverly in Jumbo).

options.c would just prepare a struct list_main *cfg-cli with any options given. config.c would process that list after all and any files, and they'd override any config file settings.

We could then do things like --config-option=SingleRetestGuessed=no,SinglePrioResume=yes or --config-option=Opencl:ResumeWS=y and it would be just like putting those values in the config file.

Any existing features that use cfg_get_bool/int/param)() will now turn into possible command-line options and several existing command-line options could be deprecated (although they'd often be less easy to write).

Contributor guide

Open the contributing guide

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

Start by reading options.c and config.c, focusing on how command-line options and configuration files are currently processed. Trace the existing cfg_get_bool/int/param() uses and the OPT_REQ_PARAM handling in Jumbo. Done would mean a defined --config-option behavior that applies supplied values after configuration files and has tests or documented verification for the examples in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.