Print this page
3347 zonecfg(1M) is confused about selection
@@ -18,10 +18,11 @@
*
* CDDL HEADER END
*/
/*
+ * Copyright 2014 Gary Mills
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
*/
#include <libsysevent.h>
#include <pthread.h>
@@ -1765,11 +1766,11 @@
gotten_prop = xmlGetProp(cur, attr);
if (gotten_prop == NULL) /* shouldn't happen */
return (B_FALSE);
prop_result = xmlStrcmp(gotten_prop, (const xmlChar *) user_prop);
xmlFree(gotten_prop);
- return ((prop_result == 0));
+ return ((prop_result == 0)); /* empty strings will match */
}
static int
zonecfg_delete_filesystem_core(zone_dochandle_t handle,
struct zone_fstab *tabptr)
@@ -2253,11 +2254,11 @@
allowed_addr_match = match_prop(cur, DTD_ATTR_ALLOWED_ADDRESS,
tabptr->zone_nwif_allowed_address);
phys_match = match_prop(cur, DTD_ATTR_PHYSICAL,
tabptr->zone_nwif_physical);
- if ((addr_match || allowed_addr_match) && phys_match) {
+ if (addr_match && allowed_addr_match && phys_match) {
xmlUnlinkNode(cur);
xmlFreeNode(cur);
return (Z_OK);
}
}