Bug 40442 - Need for 'dhcpd/authoritative=yes' in ucs-school-webproxy.postinst?
Need for 'dhcpd/authoritative=yes' in ucs-school-webproxy.postinst?
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Proxy services
unspecified
Other Linux
: P5 normal (vote)
: UCS@school 4.2 v1
Assigned To: Daniel Tröder
Sönke Schwardt-Krummrich
:
Depends on:
Blocks: 50690
  Show dependency treegraph
 
Reported: 2016-01-15 13:56 CET by Timo Denissen
Modified: 2020-01-07 13:03 CET (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very 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.034
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 2016-01-15 13:56:47 CET
I updated from UCS@school 4.1v1 to UCS@school 4.1v3 and the UCR variable was reset during the update.

It is not clear to me why the UCR variable "dhcpd/authoritative" is set to "yes" in the postinst script of ucs-school-webproxy.

Going from the name, dhcpd should not be in direct connection to the proxy system.

What wonders me most is that the variable is set to yes, regardless of former configuration.

During the update, extract from /var/log/univention/config-registry.replog:
2016-01-15 12:19:21: set dhcpd/authoritative=yes old:no
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2017-02-17 11:10:38 CET
In the past Windows used the wpad/proxy settings only from authoritative DHCP servers. I don't known if this is still the case.

At least, the variable should only be set to "yes" during a fresh installation.
Since the variable default is "no", setting it via "?yes" is no option.

Next question ist:
do we still need the authoritative flag?
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2017-02-28 10:57:08 CET
ucs-school-webproxy automatically configures the DHCP server to provide option 252 for setting an URL for proxy config. In the past, "dhcpd/authoritative=yes" was required, otherwise the option was ignored. 

Please check if windows IE requires the "dhcpd/authoritative=yes" to accept the proxy config URL from DHCP server. Please test with windows 8 and 10.
Comment 3 Daniel Tröder univentionstaff 2017-03-07 17:31:44 CET
I just confirmed that Windows 7 definitively needs dhcpd/authoritative=yes to use the DHCP provided wpad configuration.

It reacts quiet fast to it: After changing the server from authoritative to non-authoritative and then doing a
-------------------------
ipconfig /release
ipconfig /renew
-------------------------
Win7 pulls the proxy.pac directly after the DHCPACK, like it does with authoritative. Like 20 seconds later the server receives a DHCPINFORM from Win7 telling it "btw: you are not authoritative". In that moment Win7 stops using the proxy.pac.

To check results read Apaches access.log, syslog, try IE and in Chrome open
chrome://net-internals/#proxy

Will try with Win8 and Win10 next.
Comment 4 Daniel Tröder univentionstaff 2017-03-08 16:27:10 CET
Both Win8) and Win10 (and probably Win8.1 do NOT need the DHCP server to be the authoritative one for their network, to accept the wpad DHCP-option.

After receiving a DHCPACK both do a HTTP-request to the proxy.pac with an agent-string "WinHTTP-Autoproxy-Service/5.1". (Win7 didn't send an agent-string.)

Result:
* If you have Win < 8 in your network, you'll need dhcpd/authoritative=yes if using that method.
* If all Win >= 8 or using DNS for Win<8, you don't.

What now?
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2017-03-08 17:02:49 CET
Ok, since Win 7 is still supported, UCS@school should work out of the box. Therefore we have to keep the authoritative flag for now.

→ The variable should only be set to "yes" during a fresh installation.
Since the variable default is "no", setting it via "?yes" is no option.
→ The variable should NOT be updated during package updates.
Comment 6 Daniel Tröder univentionstaff 2017-03-09 10:51:24 CET
r77497: set dhcpd/authoritative=yes only for fresh installations, remove unnecessary init dependecies of univention-reload-service

Package: ucs-school-webproxy
Version: 13.0.0-4A~4.2.0.201703091049
Branch: ucs_4.2-0
Scope: ucs-school-4.2

No changelog entry, as nothing changed for the user.
Comment 7 Sönke Schwardt-Krummrich univentionstaff 2017-03-23 15:30:18 CET
(In reply to Daniel Tröder from comment #6)
> r77497: set dhcpd/authoritative=yes only for fresh installations, remove
> unnecessary init dependecies of univention-reload-service

→ OK
 
> Package: ucs-school-webproxy
> Version: 13.0.0-4A~4.2.0.201703091049
> Branch: ucs_4.2-0
> Scope: ucs-school-4.2

→ OK, package built

> No changelog entry, as nothing changed for the user.

→ OK
Comment 8 Sönke Schwardt-Krummrich univentionstaff 2017-04-11 17:45:41 CEST
UCS@school 4.2 v1 has been released.

http://docs.software-univention.de/release-notes-ucsschool-4.2v1-de.html

If this error occurs again, please clone this bug.