Bug 31619 - import_computer script does not perform basic validation of input file
import_computer script does not perform basic validation of input file
Status: CLOSED WONTFIX
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 3.1
Other Linux
: P5 normal (vote)
: UCS@school 3.x
Assigned To: UCS@school maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-03 21:03 CEST by Arvid Requate
Modified: 2023-06-12 15:39 CEST (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.046
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2017081521000315, 2017082321000112
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 Arvid Requate univentionstaff 2013-06-03 21:03:27 CEST
The import_computer script should do some basic validation on the input file. In this case a file suitable for import_user was presented as input to import_computer. 

root@master20:~# /usr/share/ucs-school-import/scripts/import_computer user_import.tsv 
infile is  : user_import.tsv
Processing line 1: A    schueler1       Mustermann      Max     school1 1A              schueler1@arucs311i3.qa     0       1       0
verify ou for school nr Max
need to create group cn=OUmax-DC-Verwaltungsnetz,cn=ucsschool,cn=groups,dc=arucs311i3,dc=qa
creating object cn=OUmax-DC-Verwaltungsnetz,cn=ucsschool,cn=groups,dc=arucs311i3,dc=qa
need to create group cn=OUmax-Member-Verwaltungsnetz,cn=ucsschool,cn=groups,dc=arucs311i3,dc=qa
creating object cn=OUmax-Member-Verwaltungsnetz,cn=ucsschool,cn=groups,dc=arucs311i3,dc=qa
need to create group cn=OUmax-DC-Edukativnetz,cn=ucsschool,cn=groups,dc=arucs311i3,dc=qa
creating object cn=OUmax-DC-Edukativnetz,cn=ucsschool,cn=groups,dc=arucs311i3,dc=qa
need to create group cn=OUmax-Member-Edukativnetz,cn=ucsschool,cn=groups,dc=arucs311i3,dc=qa
creating object cn=OUmax-Member-Edukativnetz,cn=ucsschool,cn=groups,dc=arucs311i3,dc=qa
need to create container ou=Max,dc=arucs311i3,dc=qa
creating object ou=Max,dc=arucs311i3,dc=qa
need to create container cn=printers,ou=Max,dc=arucs311i3,dc=qa
creating object cn=printers,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=users,ou=Max,dc=arucs311i3,dc=qa
creating object cn=users,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=schueler,cn=users,ou=Max,dc=arucs311i3,dc=qa
creating object cn=schueler,cn=users,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=lehrer,cn=users,ou=Max,dc=arucs311i3,dc=qa
creating object cn=lehrer,cn=users,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=admins,cn=users,ou=Max,dc=arucs311i3,dc=qa
creating object cn=admins,cn=users,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=mitarbeiter,cn=users,ou=Max,dc=arucs311i3,dc=qa
creating object cn=mitarbeiter,cn=users,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=lehrer und mitarbeiter,cn=users,ou=Max,dc=arucs311i3,dc=qa
creating object cn=lehrer und mitarbeiter,cn=users,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=computers,ou=Max,dc=arucs311i3,dc=qa
creating object cn=computers,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=server,cn=computers,ou=Max,dc=arucs311i3,dc=qa
creating object cn=server,cn=computers,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=dc,cn=server,cn=computers,ou=Max,dc=arucs311i3,dc=qa
creating object cn=dc,cn=server,cn=computers,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=networks,ou=Max,dc=arucs311i3,dc=qa
creating object cn=networks,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=groups,ou=Max,dc=arucs311i3,dc=qa
creating object cn=groups,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=schueler,cn=groups,ou=Max,dc=arucs311i3,dc=qa
creating object cn=schueler,cn=groups,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=lehrer,cn=groups,ou=Max,dc=arucs311i3,dc=qa
creating object cn=lehrer,cn=groups,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=klassen,cn=schueler,cn=groups,ou=Max,dc=arucs311i3,dc=qa
creating object cn=klassen,cn=schueler,cn=groups,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=raeume,cn=groups,ou=Max,dc=arucs311i3,dc=qa
creating object cn=raeume,cn=groups,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=mitarbeiter,cn=groups,ou=Max,dc=arucs311i3,dc=qa
creating object cn=mitarbeiter,cn=groups,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=dhcp,ou=Max,dc=arucs311i3,dc=qa
creating object cn=dhcp,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=policies,ou=Max,dc=arucs311i3,dc=qa
creating object cn=policies,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=shares,ou=Max,dc=arucs311i3,dc=qa
creating object cn=shares,ou=Max,dc=arucs311i3,dc=qa
need to create container cn=klassen,cn=shares,ou=Max,dc=arucs311i3,dc=qa
creating object cn=klassen,cn=shares,ou=Max,dc=arucs311i3,dc=qa
need to create group cn=admins-max,cn=ouadmins,cn=groups,dc=arucs311i3,dc=qa
creating object cn=admins-max,cn=ouadmins,cn=groups,dc=arucs311i3,dc=qa
need to attach policy: cn=ucsschool-umc-admins-default,cn=UMC,cn=policies,dc=arucs311i3,dc=qa
need to create group cn=schueler-max,cn=groups,ou=Max,dc=arucs311i3,dc=qa
creating object cn=schueler-max,cn=groups,ou=Max,dc=arucs311i3,dc=qa
need to attach policy: cn=ucsschool-umc-pupils-default,cn=UMC,cn=policies,dc=arucs311i3,dc=qa
need to create group cn=lehrer-max,cn=groups,ou=Max,dc=arucs311i3,dc=qa
creating object cn=lehrer-max,cn=groups,ou=Max,dc=arucs311i3,dc=qa
need to attach policy: cn=ucsschool-umc-teachers-default,cn=UMC,cn=policies,dc=arucs311i3,dc=qa
need to create group cn=mitarbeiter-max,cn=groups,ou=Max,dc=arucs311i3,dc=qa
creating object cn=mitarbeiter-max,cn=groups,ou=Max,dc=arucs311i3,dc=qa
need to attach policy: cn=ucsschool-umc-staff-default,cn=UMC,cn=policies,dc=arucs311i3,dc=qa
creating object cn=max,cn=dhcp,ou=Max,dc=arucs311i3,dc=qa
need to create dhcp service: cn=max,cn=dhcp,ou=Max,dc=arucs311i3,dc=qa
need to remove dhcp server: cn=master20,cn=school1,cn=dhcp,ou=school1,dc=arucs311i3,dc=qa
need to create dhcp server: cn=max,cn=dhcp,ou=Max,dc=arucs311i3,dc=qa
creating object cn=master20,cn=max,cn=dhcp,ou=Max,dc=arucs311i3,dc=qa
Skipping non-local subnet 10.200.32.0/24
creating object None
need to attach policy: cn=dhcp-dns-clear,cn=policies,ou=Max,dc=arucs311i3,dc=qa
Object created: cn=ou-default-ucr-policy,cn=policies,ou=max,dc=arucs311i3,dc=qa
Object modified: cn=ou-default-ucr-policy,cn=policies,ou=max,dc=arucs311i3,dc=qa
Object modified: ou=max,dc=arucs311i3,dc=qa
40dhcpsearchbase_create: added new UCR policy cn=ou-default-ucr-policy,cn=policies,ou=max,dc=arucs311i3,dc=qa to OU ou=max,dc=arucs311i3,dc=qa
Object created: cn=Marktplatz,cn=shares,ou=max,dc=arucs311i3,dc=qa
52marktplatz_create: added new share Markplatz for server dcmax-01.arucs311i3.qa
Object created: cn=examusers,ou=max,dc=arucs311i3,dc=qa
Object created: cn=OUmax-Klassenarbeit,cn=ucsschool,cn=groups,dc=arucs311i3,dc=qa
60schoolexam-master: Exam container 'cn=examusers,ou=max' and group 'OUmax-Klassenarbeit' created.
A       schueler1       Mustermann      Max     school1 1A              schueler1@arucs311i3.qa 0       1  0

school1 is not a valid ip address

After that, a whole lot of mess is created.
Comment 1 Florian Best univentionstaff 2017-08-24 18:59:43 CEST
Because no validation happens comment lines and header lines are executed. They create a school ou without displayName causing the whole UDM-UMC to crash.
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2017-09-06 17:11:12 CEST
This should apply to all subcommands of ucs-school-import like import_printer, import_computer, import_networks, import_group, import_router, ...
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2019-02-05 21:25:39 CET
This issue has been filled against UCS@school 3.2. The maintenance with
bug and security fixes for UCS@school 3.2 has ended on Dec 31, 2016.

Customers still on UCS 3.x are encouraged to update to UCS 4.3 (or later). 
Please contact your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug"
or simply reopen the issue. In this case please provide detailed information on
how this issue is affecting you.