File 0021-dhcp-4.2.4-P2-bnc878846-conf-to-ldap.patch of Package dhcp.1901

Index: dhcp-4.2.4-P2/contrib/ldap/dhcpd-conf-to-ldap
===================================================================
--- dhcp-4.2.4-P2/contrib/ldap/dhcpd-conf-to-ldap
+++ dhcp-4.2.4-P2/contrib/ldap/dhcpd-conf-to-ldap
@@ -486,14 +486,23 @@ sub parse_subclass
   $subclass = next_token (0);
   parse_error () if !defined ($subclass);
 
-  $tmp = next_token (0);
-  parse_error () if !defined ($tmp);
-  parse_error () if !($tmp eq '{');
-
+  if (substr($subclass,-1) eq ';') {
+    $tmp = ";";
+    $subclass = substr($subclass,0,-1);
+  } else {
+    $tmp = next_token (0); 
+    parse_error () if !defined ($tmp);
+  }
+  parse_error () if !($tmp eq '{' or $tmp eq ';');
   add_dn_to_stack ("cn=$subclass");
   $curentry{'type'} = 'subclass';
   $curentry{'class'} = $class;
   $curentry{'subclass'} = $subclass;
+
+  if ($tmp eq ';') {
+    print_entry () if %curentry;
+    remove_dn_from_stack ();
+  }
 }
openSUSE Build Service is sponsored by