summaryrefslogtreecommitdiffstats
path: root/src/defs-nis.c
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@redhat.com>2012-01-24 12:29:35 -0500
committerNalin Dahyabhai <nalin@redhat.com>2012-01-24 12:29:35 -0500
commitbad1fcd3e69d45db942873eb2a8a661b643a2776 (patch)
treea5677e9c4b04df404d4334ed6ab166d34582c247 /src/defs-nis.c
parent516eb50a45ac8debd53e14fb28dc38ecef1be2ee (diff)
downloadslapi-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.c16
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=*))",