From bad1fcd3e69d45db942873eb2a8a661b643a2776 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Tue, 24 Jan 2012 12:29:35 -0500 Subject: - modify defaults for ethers.byname and ethers.byaddr so that they'll work properly with multiple macAddress and cn values --- src/defs-nis.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/defs-nis.c b/src/defs-nis.c index 2c1e935..b4a7d33 100644 --- a/src/defs-nis.c +++ b/src/defs-nis.c @@ -80,14 +80,18 @@ static struct configuration { NULL}, {"ethers.byaddr", config_exact, FALSE, NULL, - "(&(ipHostNumber=*)(macAddress=*))", - NULL, "%{macAddress}", - NULL, "%{macAddress} %{ipHostNumber}", + "(&(macAddress=*)(cn=*)(objectclass=ieee802device))", + NULL, + "%mregsub(\"%{macaddress} %{cn}\",\"(..:..:..:..:..:..) (.*)\",\"%2\")", + NULL, + "%{macaddress} %{cn}", NULL}, {"ethers.byname", config_exact, FALSE, NULL, - "(&(ipHostNumber=*)(macAddress=*))", - NULL, "%{ipHostNumber}", - NULL, "%{macAddress} %{ipHostNumber}", + "(&(macAddress=*)(cn=*)(objectclass=ieee802device))", + NULL, + "%mregsub(\"%{macaddress} %{cn}\",\"(..:..:..:..:..:..) (.*)\",\"%1\")", + NULL, + "%{macaddress} %{cn}", NULL}, {"hosts.byaddr", config_exact, FALSE, NULL, "(&(ipHostNumber=*)(cn=*))", -- cgit