Bug 46985 - univention-run-join-scripts doesn't check options
univention-run-join-scripts doesn't check options
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Join (univention-join)
UCS 4.3
Other Linux
: P5 normal (vote)
: UCS 4.4-6-errata
Assigned To: Julia Bremer
Felix Botner
https://git.knut.univention.de/univen...
:
: 52396 (view as bug list)
Depends on:
Blocks: 52396
  Show dependency treegraph
 
Reported: 2018-05-09 15:21 CEST by Timo Denissen
Modified: 2020-11-19 12:57 CET (History)
8 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timo Denissen univentionstaff 2018-05-09 15:21:38 CEST
Title says it all. When running univention-run-join-scripts with any argument other than the one specified in --help, the script starts like called without an argument.

I expect that any argument other than the ones specified in --help triggers the help to be printed and not the join scripts to be run.
Comment 1 Arvid Requate univentionstaff 2019-06-26 12:00:41 CEST
That's really ugly, you have a typo and it runs all scripts:


root@master10:~# univention-run-join-scripts --force \
                                             --script 96univention-samba4.inst
univention-run-join-scripts: runs all join scripts existing on local computer.
copyright (c) 2001-2019 Univention GmbH, Germany

Running 01univention-ldap-server-init.inst                 done
Running 02univention-directory-notifier.inst               done
Running 03univention-directory-listener.inst               done
Running 04univention-ldap-client.inst                      done
Running 05univention-bind.inst^C
Comment 3 Christian Castens univentionstaff 2020-10-22 13:32:39 CEST
Successful build
Package: univention-join
Version: 11.0.1-32A~4.4.0.202010221227
Branch: ucs_4.4-0
Scope: errata4.4-6

Command line arguments for the script are now being validated and should no longer cause unwanted behaviour.. 

commits 4.4-6:
590f0ab3d40ac9ff7e6d55e520f3adbc64fd938e (yaml)
e1af247124ffd38952c58d811a456075f4bffbd2 (changes + changelog)
Comment 4 Christian Castens univentionstaff 2020-10-22 15:54:56 CEST
Successful build
Package: univention-join
Version: 11.0.1-33A~4.4.0.202010221547
Branch: ucs_4.4-0
Scope: errata4.4-6

commits 4.4-6:
18222982ff68e9afff32e4ef8183848ec755ff8d
76feb71681b1f4dfcc14bc1ab9abd364140d6642
f94d95edf2d6a4e12032c3d3f3a75ff365c46d6d
f28c26b8f70c3aebda79d04fa723881d209e30a0 (yaml update)
Comment 5 Felix Botner univentionstaff 2020-10-26 13:16:57 CET
FAIL - univention-run-join-scripts --run-scripts
       univention-run-join-scripts: runs all join scripts existing on local computer.
       copyright (c) 2001-2020 Univention GmbH, Germany

       Running pre-joinscripts hook(s):                           done
       Running post-joinscripts hook(s):                          done

 if no script is given, the tool should show the help or an error

OK - univention-run-join-scripts
OK - univention-run-join-scripts  aaa
     Unknown argument: aaa ...
OK - univention-run-join-scripts  --run-scripts aaa
     The given joinscript '/usr/lib/univention-install/aaa' does not exists
OK - univention-run-join-scripts --run-scripts  33univention-portal.inst
OK - univention-run-join-scripts --force --run-scripts 33univention-portal.inst
OK - univention-run-join-scripts --force --script 33univention-portal.inst
     Unknown argument: --script
Comment 6 Julia Bremer univentionstaff 2020-10-28 12:12:20 CET
0ba7076183 Bug #46985: update yaml
82c63adf7b Bug #46985: if no script is provided when using --run-scripts, show a


Successful build
Package: univention-join
Version: 11.0.1-34A~4.4.0.202010281155
Branch: ucs_4.4-0
Scope: errata4.4-6

I added a check whether any scripts were provided with --run-scripts.
If none were provided, the help and an error is shown.
Comment 7 Florian Best univentionstaff 2020-10-28 12:20:09 CET
REOPEN: You did not upgrade the 5.0 merge request.
Comment 10 Felix Botner univentionstaff 2020-10-28 15:55:06 CET
OK -  univention-run-join-scripts --run-scripts
univention-run-join-scripts: runs all join scripts existing on local computer.
copyright (c) 2001-2020 Univention GmbH, Germany

univention-run-join-scripts: runs all join scripts existing on local computer.
copyright (c) 2001-2020 Univention GmbH, Germany

Syntax:
  univention-run-join-scripts [options] [script, ...]

Options:
  -dcaccount <account>:    name of DC master account
  -dcpwd <password file>:  file with DC master password
  --ask-pass            :  ask for DC master account and password
  --run-scripts         :  run only the scripts given as parameters
  --force               :  force execution of joinscripts which are already executed

  -h | --help | -?:        print this usage message and exit program
  --version:               print version information and exit program

Description:
  univention-run-join-scripts runs all join scripts existing on local computer.



**************************************************************************
* Running join scripts failed!                                           *
**************************************************************************
* Message:  The option --run-scripts was used, but no scripts were provided
**************************************************************************


OK - yaml
OK - merge request
Comment 12 Florian Best univentionstaff 2020-11-18 19:27:12 CET
(In reply to Florian Best from comment #7)
> REOPEN: You did not upgrade the 5.0 merge request.

Please fix the UCS 5.0 merge request!
Comment 13 Erik Damrose univentionstaff 2020-11-19 09:09:44 CET
We should not do this on a closed bug. I created bug 52396
Comment 14 Julia Bremer univentionstaff 2020-11-19 12:57:43 CET
*** Bug 52396 has been marked as a duplicate of this bug. ***