Print this page
1784 zone configuration passes zonecfg but not zoneadm for limitpriv property

*** 5727,5736 **** --- 5727,5738 ---- char zonepath[MAXPATHLEN]; char sched[MAXNAMELEN]; char brand[MAXNAMELEN]; char hostidp[HW_HOSTID_LEN]; char fsallowedp[ZONE_FS_ALLOWED_MAX]; + priv_set_t *privs; + char *privname = NULL; int err, ret_val = Z_OK, arg; int pset_res; boolean_t save = B_FALSE; boolean_t arg_err = B_FALSE; zone_iptype_t iptype;
*** 5794,5803 **** --- 5796,5817 ---- zerr("%s %s", gettext("cannot get"), pt_to_str(PT_IPTYPE)); ret_val = Z_REQD_RESOURCE_MISSING; saw_error = B_TRUE; } + if ((privs = priv_allocset()) == NULL) { + zerr(gettext("%s: priv_allocset failed"), zone); + return; + } + if (zonecfg_get_privset(handle, privs, &privname) != Z_OK) { + zerr(gettext("%s: invalid privilege: %s"), zone, privname); + priv_freeset(privs); + free(privname); + return; + } + priv_freeset(privs); + if (zonecfg_get_hostid(handle, hostidp, sizeof (hostidp)) == Z_INVALID_PROPERTY) { zerr(gettext("%s: invalid hostid: %s"), zone, hostidp); return;