Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
D
dhcp
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 64
    • Issues 64
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 16
    • Merge Requests 16
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • ISC Open Source Projects
  • dhcp
  • Issues
  • #51

Closed
Open
Opened Sep 10, 2019 by Charles Hedrick@clhedrick

ldap.c won't compile under ubuntu 18

There's an error in ldap.c which Ubuntu 18 catches. srvaddr[0] is a pointer. You can't validly compare it to '\0'. Here's my fix, but it really depends upon what the author actually intended the code to do.

Here's how srvaddr is iniitialized:

  char srvaddr[2][64] = {"\0", "\0"};

I'm pretty sure this means we don't need to test for the srvaddr[0] being null, but rather for them pointing to a string containing two bytes of 0.

@@ -925,7 +926,7 @@ ldap_parse_failover (struct ldap_config_stack *item, struct parse *cfile)
     ldap_value_free_len (tempbv);
 
 
-  if (primary == -1 || srvaddr[0] == '\0' || srvaddr[1] == '\0')
+  if (primary == -1 || srvaddr[0][0] == '\0' || srvaddr[1][0] == '\0')
     {
       log_error("Could not decide if the server type is primary"
                 " or secondary for failover peering '%s'.", peername[0]->bv_val);
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: isc-projects/dhcp#51