Mercurial > illumos > illumos-gate
changeset 3172:303483377c70
6494678 Zone attach dry-run fails with 'missing or invalid brand'
author | gjelinek |
---|---|
date | Mon, 27 Nov 2006 06:25:37 -0800 |
parents | 6a9918e92494 |
children | bf81e386aeef |
files | usr/src/cmd/zoneadm/zoneadm.c |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/cmd/zoneadm/zoneadm.c Mon Nov 27 05:48:20 2006 -0800 +++ b/usr/src/cmd/zoneadm/zoneadm.c Mon Nov 27 06:25:37 2006 -0800 @@ -4437,6 +4437,17 @@ goto done; } + /* + * Retrieve remote handle brand type and determine whether it is + * native or not. + */ + if (zonecfg_get_brand(rem_handle, target_brand, sizeof (target_brand)) + != Z_OK) { + zerror(gettext("missing or invalid brand")); + exit(Z_ERR); + } + is_native_zone = (strcmp(target_brand, NATIVE_BRAND_NAME) == 0); + res = verify_handle(CMD_ATTACH, local_handle); /* Get the detach information for the locally defined zone. */