summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorphaniram rampura krishnamurthy - Sun Microsystems - Bangalore India <Phaniram.Krishnamurthy@Sun.COM>2010-06-28 16:45:37 +0530
committerphaniram rampura krishnamurthy - Sun Microsystems - Bangalore India <Phaniram.Krishnamurthy@Sun.COM>2010-06-28 16:45:37 +0530
commit810f07c5ea9d8255be30b6c10d336583bfc84a76 (patch)
treec13a9a2fc809d9635d87380dfa2e7cf450329067 /usr/src
parent2eb07f5e03e6bf6a25f9305ffda328fdb94f1425 (diff)
downloadillumos-gate-810f07c5ea9d8255be30b6c10d336583bfc84a76.tar.gz
6804076 zonecfg -z global updates index file, changes global state to 'configured'
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/lib/libzonecfg/common/getzoneent.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/usr/src/lib/libzonecfg/common/getzoneent.c b/usr/src/lib/libzonecfg/common/getzoneent.c
index c623152933..8155f7272a 100644
--- a/usr/src/lib/libzonecfg/common/getzoneent.c
+++ b/usr/src/lib/libzonecfg/common/getzoneent.c
@@ -19,11 +19,9 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
/*
* This module contains functions used for reading and writing the index file.
@@ -281,6 +279,16 @@ putzoneent(struct zoneent *ze, zoneent_op_t operation)
const char *zone_name, *zone_state, *zone_path, *zone_uuid;
assert(ze != NULL);
+
+ /*
+ * Don't allow modification of Global Zone entry
+ * in index file
+ */
+ if ((operation == PZE_MODIFY) &&
+ (strcmp(ze->zone_name, GLOBAL_ZONENAME) == 0)) {
+ return (Z_OK);
+ }
+
if (operation == PZE_ADD &&
(ze->zone_state < 0 || strlen(ze->zone_path) == 0))
return (Z_INVAL);