Bug 39475 - ucs_registerLDAPExtension does exit when unkown arguments are passed
ucs_registerLDAPExtension does exit when unkown arguments are passed
Status: CLOSED WORKSFORME
Product: UCS
Classification: Unclassified
Component: univention-lib
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.1
Assigned To: Arvid Requate
Dirk Wiesenthal
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-05 14:04 CEST by Dirk Wiesenthal
Modified: 2015-11-17 12:11 CET (History)
1 user (show)

See Also:
What kind of report is it?: ---
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 Dirk Wiesenthal univentionstaff 2015-10-05 14:04:48 CEST
When calling ucs_registerLDAPExtension with options it does not know, it just exits. But it needs to work on, because of the following pattern:

  ucs_registerLDAPExtension "$@" ...

This fails when running in univention-run-joinscripts

  ucs_registerLDAPExtension: error: no such option: --run-scripts
Comment 1 Florian Best univentionstaff 2015-10-05 14:09:40 CEST
hmm. We should strip out '--run-scripts' from $@.
Comment 2 Arvid Requate univentionstaff 2015-10-05 14:51:15 CEST
Or support (ignore) that option in ucs_registerLDAPExtension (python).

Or use use something like this http://stackoverflow.com/questions/1885161/how-can-i-get-optparses-optionparser-to-ignore-invalid-options to fix this once and for all future options.
Comment 3 Florian Best univentionstaff 2015-10-05 15:15:13 CEST
But this is a bug in univention-run-join-scripts, not in ucs_registerLDAPExtension. "$@" is used in a lot calls (or will be in future). If we fix it only in ucs_registerLDAPExtension we will have to fix it somewhere else somewhen, too.
Comment 4 Arvid Requate univentionstaff 2015-10-08 13:23:10 CEST
Good theory, but reality disagrees. univention-run-join-scripts doesn't pass "$@" to the joinscripts, only the filtered -binddn and -bindpwd.

As it turns out, the App Center called the join script directly. Dirk will avoid the --run-scripts Option there.
Comment 5 Dirk Wiesenthal univentionstaff 2015-11-03 13:49:14 CET
OK, r65126 removed the parameter when calling the join script
Comment 6 Stefan Gohmann univentionstaff 2015-11-17 12:11:34 CET
UCS 4.1 has been released:
 https://docs.software-univention.de/release-notes-4.1-0-en.html
 https://docs.software-univention.de/release-notes-4.1-0-de.html

If this error occurs again, please use "Clone This Bug".