Bug 42701

Summary: Enable compiler checks and fix thus detected issues
Product: UCS Reporter: Philipp Hahn <hahn>
Component: Listener (univention-directory-listener)Assignee: Philipp Hahn <hahn>
Status: CLOSED FIXED QA Contact: Stefan Gohmann <gohmann>
Severity: normal    
Priority: P5 CC: gohmann
Version: UCS 4.1   
Target Milestone: UCS 4.1-3-errata   
Hardware: Other   
OS: Linux   
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): Cleanup
Max CVSS v3 score:
Attachments: udl-clanup.diff

Description Philipp Hahn univentionstaff 2016-10-17 15:15:43 CEST
Created attachment 8124 [details]
udl-clanup.diff

0e162ef Bug #41842 listener: Convert handler state to enum
 This helps debugging as now gdb shows the symbolic name instead of some obscure value.

29aff98 Bug #41842 listener: Remove unused macros
 They are unused and UDL still compiles.

54ec8f0 Bug #42573 listener: Remove unused dump functions
 They are unused and UDL still compiles.

588fe44 Bug #42573 listener: Mark functions static
 It doesn't pollute the name space and also helps the reader, as he then knows, that he must search for users only in the same compilation unit.
 Trivial QA: it still compiles

b3967c1 Bug #26039 UDL: Fix compilation error
 This was cherry-picked from UCS-4.2 as I already fixed the same issue there.

01d96f8 Bug #42573 listener: Allow compiler flags
 Our pbuilder .tgz are inconsistent: some report "dpkg-vendor=Debian", other "Univention". Depending on that different arguments get passed when compiling C binaries. Especially i386 and amd64 are currently compiled with different compiler flags. This cleans up passing through the used compiler $(CC) and $(CFLAGS).
 Enabling this shows a lot of cases, were UDL did NOT check for failures, especially in disk-full conditions and similar IO problems! This leads to hard-to-debug failure cases, which now should be a lot easier to detect.
 Now UDL logs an error message and/or terminates.
Comment 1 Stefan Gohmann univentionstaff 2016-10-20 06:56:44 CEST
Code review is OK. Merge to UCS 4.2 is OK as well.

Please add it to the YAML file.
Comment 2 Philipp Hahn univentionstaff 2016-10-20 07:27:55 CEST
(In reply to Stefan Gohmann from comment #1)
> Please add it to the YAML file.

r73377
Comment 3 Stefan Gohmann univentionstaff 2016-10-20 09:43:20 CEST
(In reply to Philipp Hahn from comment #2)
> (In reply to Stefan Gohmann from comment #1)
> > Please add it to the YAML file.
> 
> r73377

OK, thanks. Minor update: r73379
Comment 4 Janek Walkenhorst univentionstaff 2016-10-20 12:40:57 CEST
<http://errata.software-univention.de/ucs/4.1/311.html>