Lines Matching defs:cur
447 fetchprop(xmlNodePtr cur, const xmlChar *propname, char *dst, size_t dstsize)
452 if ((property = xmlGetProp(cur, propname)) == NULL)
462 fetch_alloc_prop(xmlNodePtr cur, const xmlChar *propname, char **dst)
466 if ((property = xmlGetProp(cur, propname)) == NULL)
1602 xmlNodePtr cur;
1607 cur = xmlDocGetRootElement(handle->zone_dh_doc);
1608 if (cur == NULL) {
1612 if (xmlStrcmp(cur->name, DTD_ELEM_ZONE) != 0) {
1625 (void) xmlUnsetProp(cur, DTD_ATTR_IPTYPE);
1628 if (xmlSetProp(cur, DTD_ATTR_IPTYPE,
1653 xmlNodePtr newnode, cur = handle->zone_dh_cur, options_node;
1657 newnode = xmlNewTextChild(cur, NULL, DTD_ELEM_FS, NULL);
1762 match_prop(xmlNodePtr cur, const xmlChar *attr, char *user_prop)
1767 gotten_prop = xmlGetProp(cur, attr);
1779 xmlNodePtr cur = handle->zone_dh_cur;
1782 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
1783 if (xmlStrcmp(cur->name, DTD_ELEM_FS))
1785 dir_match = match_prop(cur, DTD_ATTR_DIR, tabptr->zone_fs_dir);
1786 spec_match = match_prop(cur, DTD_ATTR_SPECIAL,
1788 raw_match = match_prop(cur, DTD_ATTR_RAW,
1790 type_match = match_prop(cur, DTD_ATTR_TYPE,
1793 xmlUnlinkNode(cur);
1794 xmlFreeNode(cur);
1846 xmlNodePtr cur, options, firstmatch;
1864 cur = handle->zone_dh_cur;
1866 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
1867 if (xmlStrcmp(cur->name, DTD_ELEM_FS))
1870 if ((fetchprop(cur, DTD_ATTR_DIR, dirname,
1874 firstmatch = cur;
1880 if ((fetchprop(cur, DTD_ATTR_SPECIAL, special,
1885 firstmatch = cur;
1886 else if (firstmatch != cur)
1893 if (firstmatch == cur)
1899 if ((fetchprop(cur, DTD_ATTR_RAW, raw,
1903 firstmatch = cur;
1904 else if (firstmatch != cur)
1911 if (firstmatch == cur)
1917 if ((fetchprop(cur, DTD_ATTR_TYPE, type,
1921 firstmatch = cur;
1922 else if (firstmatch != cur)
1929 if (firstmatch == cur)
1939 cur = firstmatch;
1941 if ((err = fetchprop(cur, DTD_ATTR_DIR, tabptr->zone_fs_dir,
1945 if ((err = fetchprop(cur, DTD_ATTR_SPECIAL, tabptr->zone_fs_special,
1949 if ((err = fetchprop(cur, DTD_ATTR_RAW, tabptr->zone_fs_raw,
1953 if ((err = fetchprop(cur, DTD_ATTR_TYPE, tabptr->zone_fs_type,
1959 for (options = cur->xmlChildrenNode; options != NULL;
2087 xmlNodePtr cur;
2128 cur = handle->zone_dh_cur;
2129 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
2131 if (xmlStrcmp(cur->name, DTD_ELEM_NET))
2138 if (physspec != 0 && (fetchprop(cur, DTD_ATTR_PHYSICAL,
2143 (fetchprop(cur, DTD_ATTR_ADDRESS, address,
2149 (fetchprop(cur, DTD_ATTR_ALLOWED_ADDRESS, address,
2154 if (defrouterspec != 0 && (fetchprop(cur, DTD_ATTR_DEFROUTER,
2165 firstmatch = cur;
2172 cur = firstmatch;
2174 if ((err = fetchprop(cur, DTD_ATTR_PHYSICAL, tabptr->zone_nwif_physical,
2179 (err = fetchprop(cur, DTD_ATTR_ADDRESS, tabptr->zone_nwif_address,
2184 (err = fetchprop(cur, DTD_ATTR_ALLOWED_ADDRESS,
2189 if ((err = fetchprop(cur, DTD_ATTR_DEFROUTER,
2200 xmlNodePtr newnode, cur = handle->zone_dh_cur;
2203 newnode = xmlNewTextChild(cur, NULL, DTD_ELEM_NET, NULL);
2246 xmlNodePtr cur = handle->zone_dh_cur;
2249 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
2250 if (xmlStrcmp(cur->name, DTD_ELEM_NET))
2253 addr_match = match_prop(cur, DTD_ATTR_ADDRESS,
2255 allowed_addr_match = match_prop(cur, DTD_ATTR_ALLOWED_ADDRESS,
2257 phys_match = match_prop(cur, DTD_ATTR_PHYSICAL,
2261 xmlUnlinkNode(cur);
2262 xmlFreeNode(cur);
2458 xmlNodePtr cur, firstmatch;
2468 cur = handle->zone_dh_cur;
2470 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
2471 if (xmlStrcmp(cur->name, DTD_ELEM_DEVICE))
2476 if ((fetchprop(cur, DTD_ATTR_MATCH, match,
2481 firstmatch = cur;
2482 else if (firstmatch != cur)
2489 if (firstmatch == cur)
2497 cur = firstmatch;
2499 if ((err = fetchprop(cur, DTD_ATTR_MATCH, tabptr->zone_dev_match,
2509 xmlNodePtr newnode, cur = handle->zone_dh_cur;
2512 newnode = xmlNewTextChild(cur, NULL, DTD_ELEM_DEVICE, NULL);
2541 xmlNodePtr cur = handle->zone_dh_cur;
2544 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
2545 if (xmlStrcmp(cur->name, DTD_ELEM_DEVICE))
2548 match_match = match_prop(cur, DTD_ATTR_MATCH,
2552 xmlUnlinkNode(cur);
2553 xmlFreeNode(cur);
2604 xmlNodePtr newnode, cur = handle->zone_dh_cur;
2607 newnode = xmlNewTextChild(cur, NULL, DTD_ELEM_ADMIN, NULL);
2642 xmlNodePtr cur = handle->zone_dh_cur;
2646 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
2647 if (xmlStrcmp(cur->name, DTD_ELEM_ADMIN))
2649 auth_match = match_prop(cur, DTD_ATTR_USER,
2656 xmlUnlinkNode(cur);
2657 xmlFreeNode(cur);
2708 xmlNodePtr cur, firstmatch;
2718 cur = handle->zone_dh_cur;
2720 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
2721 if (xmlStrcmp(cur->name, DTD_ELEM_ADMIN))
2724 if ((fetchprop(cur, DTD_ATTR_USER, user,
2728 firstmatch = cur;
2737 cur = firstmatch;
2739 if ((err = fetchprop(cur, DTD_ATTR_USER, tabptr->zone_admin_user,
2743 if ((err = fetchprop(cur, DTD_ATTR_AUTHS, tabptr->zone_admin_auths,
2775 xmlNodePtr cur;
2782 cur = handle->zone_dh_cur;
2783 newnode = xmlNewTextChild(cur, NULL, DTD_ELEM_DEV_PERM, NULL);
2982 xmlNodePtr cur, firstmatch;
2992 cur = handle->zone_dh_cur;
2994 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
2995 if (xmlStrcmp(cur->name, DTD_ELEM_ATTR))
2998 if ((fetchprop(cur, DTD_ATTR_NAME, name,
3002 firstmatch = cur;
3008 if ((fetchprop(cur, DTD_ATTR_TYPE, type,
3012 firstmatch = cur;
3013 else if (firstmatch != cur)
3020 if (firstmatch == cur)
3026 if ((fetchprop(cur, DTD_ATTR_VALUE, value,
3031 firstmatch = cur;
3032 else if (firstmatch != cur)
3039 if (firstmatch == cur)
3048 cur = firstmatch;
3050 if ((err = fetchprop(cur, DTD_ATTR_NAME, tabptr->zone_attr_name,
3054 if ((err = fetchprop(cur, DTD_ATTR_TYPE, tabptr->zone_attr_type,
3058 if ((err = fetchprop(cur, DTD_ATTR_VALUE, tabptr->zone_attr_value,
3068 xmlNodePtr newnode, cur = handle->zone_dh_cur;
3071 newnode = xmlNewTextChild(cur, NULL, DTD_ELEM_ATTR, NULL);
3104 xmlNodePtr cur = handle->zone_dh_cur;
3107 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
3108 if (xmlStrcmp(cur->name, DTD_ELEM_ATTR))
3111 name_match = match_prop(cur, DTD_ATTR_NAME,
3113 type_match = match_prop(cur, DTD_ATTR_TYPE,
3115 value_match = match_prop(cur, DTD_ATTR_VALUE,
3119 xmlUnlinkNode(cur);
3120 xmlFreeNode(cur);
3255 xmlNodePtr cur, val;
3266 cur = handle->zone_dh_cur;
3267 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
3268 if (xmlStrcmp(cur->name, DTD_ELEM_RCTL))
3270 if ((fetchprop(cur, DTD_ATTR_NAME, savedname,
3274 for (val = cur->xmlChildrenNode; val != NULL;
3308 xmlNodePtr newnode, cur = handle->zone_dh_cur, valnode;
3312 newnode = xmlNewTextChild(cur, NULL, DTD_ELEM_RCTL, NULL);
3356 xmlNodePtr cur = handle->zone_dh_cur;
3360 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
3361 if (xmlStrcmp(cur->name, DTD_ELEM_RCTL))
3364 savedname = xmlGetProp(cur, DTD_ATTR_NAME);
3372 xmlUnlinkNode(cur);
3373 xmlFreeNode(cur);
3485 xmlNodePtr cur;
3491 cur = handle->zone_dh_cur;
3492 newnode = xmlNewTextChild(cur, NULL, DTD_ELEM_PACKAGE, NULL);
3626 xmlNodePtr cur;
3636 cur = handle->zone_dh_cur;
3637 cur = cur->xmlChildrenNode;
3638 handle->zone_dh_cur = cur;
3858 xmlNodePtr cur;
3866 for (cur = handle->zone_dh_cur; cur != NULL; cur = cur->next)
3867 if (xmlStrcmp(cur->name, dtd) == 0)
3880 xmlNodePtr cur;
3888 cur = handle->zone_dh_cur;
3889 while (cur != NULL) {
3892 if (xmlStrcmp(cur->name, dtd)) {
3893 cur = cur->next;
3897 tmp = cur->next;
3898 xmlUnlinkNode(cur);
3899 xmlFreeNode(cur);
3900 cur = tmp;
4643 xmlNodePtr cur, options;
4650 if ((cur = handle->zone_dh_cur) == NULL)
4653 for (; cur != NULL; cur = cur->next)
4654 if (!xmlStrcmp(cur->name, DTD_ELEM_FS))
4656 if (cur == NULL) {
4661 if ((err = fetchprop(cur, DTD_ATTR_SPECIAL, tabptr->zone_fs_special,
4667 if ((err = fetchprop(cur, DTD_ATTR_RAW, tabptr->zone_fs_raw,
4673 if ((err = fetchprop(cur, DTD_ATTR_DIR, tabptr->zone_fs_dir,
4679 if ((err = fetchprop(cur, DTD_ATTR_TYPE, tabptr->zone_fs_type,
4687 for (options = cur->xmlChildrenNode; options != NULL;
4696 handle->zone_dh_cur = cur->next;
4715 xmlNodePtr cur;
4721 if ((cur = handle->zone_dh_cur) == NULL)
4724 for (; cur != NULL; cur = cur->next)
4725 if (!xmlStrcmp(cur->name, DTD_ELEM_NET))
4727 if (cur == NULL) {
4732 if ((err = fetchprop(cur, DTD_ATTR_ADDRESS, tabptr->zone_nwif_address,
4738 if ((err = fetchprop(cur, DTD_ATTR_ALLOWED_ADDRESS,
4745 if ((err = fetchprop(cur, DTD_ATTR_PHYSICAL, tabptr->zone_nwif_physical,
4751 if ((err = fetchprop(cur, DTD_ATTR_DEFROUTER,
4758 handle->zone_dh_cur = cur->next;
4777 xmlNodePtr cur;
4783 if ((cur = handle->zone_dh_cur) == NULL)
4786 for (; cur != NULL; cur = cur->next)
4787 if (!xmlStrcmp(cur->name, DTD_ELEM_DEVICE))
4789 if (cur == NULL) {
4794 if ((err = fetchprop(cur, DTD_ATTR_MATCH, tabptr->zone_dev_match,
4800 handle->zone_dh_cur = cur->next;
4819 xmlNodePtr cur, val;
4826 if ((cur = handle->zone_dh_cur) == NULL)
4829 for (; cur != NULL; cur = cur->next)
4830 if (!xmlStrcmp(cur->name, DTD_ELEM_RCTL))
4832 if (cur == NULL) {
4837 if ((err = fetchprop(cur, DTD_ATTR_NAME, tabptr->zone_rctl_name,
4844 for (val = cur->xmlChildrenNode; val != NULL; val = val->next) {
4862 handle->zone_dh_cur = cur->next;
4881 xmlNodePtr cur;
4887 if ((cur = handle->zone_dh_cur) == NULL)
4890 for (; cur != NULL; cur = cur->next)
4891 if (!xmlStrcmp(cur->name, DTD_ELEM_ATTR))
4893 if (cur == NULL) {
4898 if ((err = fetchprop(cur, DTD_ATTR_NAME, tabptr->zone_attr_name,
4904 if ((err = fetchprop(cur, DTD_ATTR_TYPE, tabptr->zone_attr_type,
4910 if ((err = fetchprop(cur, DTD_ATTR_VALUE, tabptr->zone_attr_value,
4916 handle->zone_dh_cur = cur->next;
4935 xmlNodePtr cur;
4941 if ((cur = handle->zone_dh_cur) == NULL)
4944 for (; cur != NULL; cur = cur->next)
4945 if (!xmlStrcmp(cur->name, DTD_ELEM_ADMIN))
4947 if (cur == NULL) {
4952 if ((err = fetchprop(cur, DTD_ATTR_USER, tabptr->zone_admin_user,
4959 if ((err = fetchprop(cur, DTD_ATTR_AUTHS, tabptr->zone_admin_auths,
4965 handle->zone_dh_cur = cur->next;
6296 xmlNodePtr newnode, cur = handle->zone_dh_cur;
6299 newnode = xmlNewTextChild(cur, NULL, DTD_ELEM_DATASET, NULL);
6326 xmlNodePtr cur = handle->zone_dh_cur;
6328 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
6329 if (xmlStrcmp(cur->name, DTD_ELEM_DATASET))
6332 if (match_prop(cur, DTD_ATTR_NAME,
6334 xmlUnlinkNode(cur);
6335 xmlFreeNode(cur);
6385 xmlNodePtr cur, firstmatch;
6395 cur = handle->zone_dh_cur;
6397 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
6398 if (xmlStrcmp(cur->name, DTD_ELEM_DATASET))
6401 if ((fetchprop(cur, DTD_ATTR_NAME, dataset,
6406 firstmatch = cur;
6415 cur = firstmatch;
6417 if ((err = fetchprop(cur, DTD_ATTR_NAME, tabptr->zone_dataset_name,
6433 xmlNodePtr cur;
6439 if ((cur = handle->zone_dh_cur) == NULL)
6442 for (; cur != NULL; cur = cur->next)
6443 if (!xmlStrcmp(cur->name, DTD_ELEM_DATASET))
6445 if (cur == NULL) {
6450 if ((err = fetchprop(cur, DTD_ATTR_NAME, tabptr->zone_dataset_name,
6456 handle->zone_dh_cur = cur->next;
6487 xmlNodePtr cur, val;
6503 cur = handle->zone_dh_cur;
6504 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
6505 if (xmlStrcmp(cur->name, DTD_ELEM_RCTL) != 0)
6507 if ((fetchprop(cur, DTD_ATTR_NAME, savedname,
6519 for (val = cur->xmlChildrenNode; val != NULL;
6655 xmlNodePtr cur = handle->zone_dh_cur;
6660 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
6661 if (xmlStrcmp(cur->name, DTD_ELEM_TMPPOOL) == 0) {
6662 xmlUnlinkNode(cur);
6663 xmlFreeNode(cur);
6675 xmlNodePtr cur = handle->zone_dh_cur;
6686 newnode = xmlNewTextChild(cur, NULL, DTD_ELEM_TMPPOOL, NULL);
6698 xmlNodePtr newnode, cur = handle->zone_dh_cur;
6701 newnode = xmlNewTextChild(cur, NULL, DTD_ELEM_PSET, NULL);
6737 xmlNodePtr cur = handle->zone_dh_cur;
6742 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
6743 if (xmlStrcmp(cur->name, DTD_ELEM_PSET) == 0) {
6744 xmlUnlinkNode(cur);
6745 xmlFreeNode(cur);
6782 xmlNodePtr cur;
6795 cur = handle->zone_dh_cur;
6796 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
6797 if (xmlStrcmp(cur->name, DTD_ELEM_PSET) == 0) {
6798 if ((err = fetchprop(cur, DTD_ATTR_NCPU_MIN,
6805 if ((err = fetchprop(cur, DTD_ATTR_NCPU_MAX,
6814 } else if (xmlStrcmp(cur->name, DTD_ELEM_TMPPOOL) == 0) {
6815 if ((err = fetchprop(cur, DTD_ATTR_IMPORTANCE,
6845 xmlNodePtr newnode, cur = handle->zone_dh_cur;
6848 newnode = xmlNewTextChild(cur, NULL, DTD_ELEM_MCAP, NULL);
6860 xmlNodePtr cur = handle->zone_dh_cur;
6865 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
6866 if (xmlStrcmp(cur->name, DTD_ELEM_MCAP) != 0)
6869 xmlUnlinkNode(cur);
6870 xmlFreeNode(cur);
6898 xmlNodePtr cur;
6907 cur = handle->zone_dh_cur;
6908 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
6909 if (xmlStrcmp(cur->name, DTD_ELEM_MCAP) != 0)
6911 if ((err = fetchprop(cur, DTD_ATTR_PHYSCAP,
6927 xmlNodePtr cur;
6933 if ((cur = handle->zone_dh_cur) == NULL)
6936 for (; cur != NULL; cur = cur->next)
6937 if (xmlStrcmp(cur->name, DTD_ELEM_MCAP) == 0)
6939 if (cur == NULL) {
6944 if ((err = fetchprop(cur, DTD_ATTR_PHYSCAP, tabptr->zone_physmem_cap,
6950 handle->zone_dh_cur = cur->next;
6979 xmlNodePtr cur;
6991 if ((cur = handle->zone_dh_cur) == NULL) {
6996 for (; cur != NULL; cur = cur->next) {
6997 if (xmlStrcmp(cur->name, DTD_ELEM_PACKAGE) == 0) {
7000 if ((res = fetchprop(cur, DTD_ATTR_NAME, name,
7004 if ((res = fetchprop(cur, DTD_ATTR_VERSION, version,
7052 xmlNodePtr cur;
7061 if ((cur = handle->zone_dh_cur) == NULL)
7064 for (; cur != NULL; cur = cur->next)
7065 if (!xmlStrcmp(cur->name, DTD_ELEM_DEV_PERM))
7067 if (cur == NULL) {
7072 if ((err = fetchprop(cur, DTD_ATTR_NAME, tabptr->zone_devperm_name,
7078 if ((err = fetchprop(cur, DTD_ATTR_UID, buf, sizeof (buf))) != Z_OK) {
7084 if ((err = fetchprop(cur, DTD_ATTR_GID, buf, sizeof (buf))) != Z_OK) {
7090 if ((err = fetchprop(cur, DTD_ATTR_MODE, buf, sizeof (buf))) != Z_OK) {
7096 if ((err = fetch_alloc_prop(cur, DTD_ATTR_ACL,
7102 handle->zone_dh_cur = cur->next;
7950 xmlNodePtr cur;
7958 cur = handle->zone_dh_cur;
7959 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
7960 if (xmlStrcmp(cur->name, DTD_ELEM_ADMIN))
7962 if (fetchprop(cur, DTD_ATTR_USER, user,
7965 if (fetchprop(cur, DTD_ATTR_AUTHS, auths,
7986 xmlNodePtr cur;
7993 cur = handle->zone_dh_cur;
7994 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
7995 if (xmlStrcmp(cur->name, DTD_ELEM_ADMIN))
7997 if (fetchprop(cur, DTD_ATTR_USER, user,