Bug 20578 - Leergesetzte Richtlinien Attribute werden nicht berücksichtigt
Leergesetzte Richtlinien Attribute werden nicht berücksichtigt
Status: RESOLVED DUPLICATE of bug 20222
Product: UCS
Classification: Unclassified
Component: DHCP
UCS 2.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: Bugzilla Mailingliste
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-02 20:11 CET by Stefan Gohmann
Modified: 2010-11-02 20:52 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 Stefan Gohmann univentionstaff 2010-11-02 20:11:37 CET
Ein Kunde berichtet an Ticket #2010102010001762, dass ein explizit per Richtlinie leer gesetzter Router zu einem falschen DHCP Statement führt. Das ist aber vermutlich nicht nur bei Routern so:

> Könnte das die Stelle sein, (unten mit !! am Zeilenanfang gekennzeichnet),
> die den in diesem Ticket beschriebene falsche Statementzeile liefert, auch
> wenn keine Routereinträge vorhanden sind.
> 
> Es wird _immer_, auch wenn der Schleifenkörper der nachfolgenden Schleife
> nie durchlaufen wird, in den Ausgabepuffer der Inhalt der Variablen
> dhcp_name und am Ende _immer_ " ;\n" angefÃŒgt. Dann ist klar, warum
> falsche Statements wie unten gezeigt, zusammengesetzt werden, die den
> DHCP-Server am Starten hindern ("option routers ;").
>
> Auszug aus ldap.c des Softwarepakets
>
> static void
> univention_parse_policy(univention_policy_handle_t* phandle, const char*
> attribute_name, const char* dhcp_name, const char* insert, int quotes, int
> type, char* buf, size_t bufsize)
> {
>   int i, set=0, n=0;
>   univention_policy_result_t* presult;
>   char *policy_types [10]={"univentionPolicyDhcpBoot",
> "univentionPolicyDhcpDns", "univentionPolicyDhcpDnsUpdate",
> "univentionPolicyDhcpLeaseTime", "univentionPolicyDhcpNetbios",
> "univentionPolicyDhcpRouting", "univentionPolicyDhcpScope",
> "univentionPolicyDhcpStatements", "univentionPolicyDhcpSunAuth", NULL};
> 
>   for (n=0; NULL != policy_types[n]; n++) {
>     if ((presult=univention_policy_get(phandle, policy_types[n], (char*)
> attribute_name)) != NULL) {
>
>      if (0 == strcmp(attribute_name, "univentionDhcpSunAuth")) {
>          strncat(buf, dhcp_name, bufsize);
>    strncat(buf, " ", bufsize);
>    strncat(buf, presult->values[0], bufsize);
>    strncat(buf, "; ", bufsize);
>      }
>
>      switch (type)
>        {
>  case STATEMENT_NORMAL:
>  /* Add comma separated list of attribute values after statement name */
>!!    strncat(buf, dhcp_name, bufsize);
>!!    strncat(buf, " ", bufsize);
>
>    for (i=0; presult->values[i] != NULL; i++) {
>      if (i > 0)
>        strncat(buf, ", ", bufsize);
>      if (quotes)
>        strncat(buf, "\"", bufsize);
>      strncat(buf, presult->values[i], bufsize);
>      if (quotes)
>        strncat(buf, "\"", bufsize);
>    }
>!            strncat(buf, ";\n", bufsize);
>    break;
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2010-11-02 20:52:30 CET

*** This bug has been marked as a duplicate of bug 20222 ***