diff options
author | Nalin Dahyabhai <nalin@redhat.com> | 2012-01-24 12:29:35 -0500 |
---|---|---|
committer | Nalin Dahyabhai <nalin@redhat.com> | 2012-01-24 12:29:35 -0500 |
commit | bad1fcd3e69d45db942873eb2a8a661b643a2776 (patch) | |
tree | a5677e9c4b04df404d4334ed6ab166d34582c247 /src/defs-nis.c | |
parent | 516eb50a45ac8debd53e14fb28dc38ecef1be2ee (diff) | |
download | slapi-nis-bad1fcd3e69d45db942873eb2a8a661b643a2776.tar.gz slapi-nis-bad1fcd3e69d45db942873eb2a8a661b643a2776.tar.xz slapi-nis-bad1fcd3e69d45db942873eb2a8a661b643a2776.zip |
- modify defaults for ethers.byname and ethers.byaddr so that they'll work properly with multiple macAddress and cn values
Diffstat (limited to 'src/defs-nis.c')
-rw-r--r-- | src/defs-nis.c | 16 |
1 files changed, 10 insertions, 6 deletions
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=*))", |