diff options
author | Patrick Mooney <patrick.f.mooney@gmail.com> | 2015-05-04 21:33:11 +0000 |
---|---|---|
committer | Patrick Mooney <patrick.f.mooney@gmail.com> | 2015-05-06 19:33:13 +0000 |
commit | 0941f488fb83174c432e971052aaf0eba929bdf7 (patch) | |
tree | 820e2b035feecb55a3f7e062518f8ad1ea9387c8 | |
parent | 1ddda39d4e294d54f141fd3d95ff9d0ebcdd9b20 (diff) | |
download | illumos-joyent-0941f488fb83174c432e971052aaf0eba929bdf7.tar.gz |
OS-4254 libbrand token substitution incomplete for mount entries
-rw-r--r-- | usr/src/cmd/zoneadmd/vplat.c | 2 | ||||
-rw-r--r-- | usr/src/lib/libbrand/common/libbrand.c | 24 | ||||
-rw-r--r-- | usr/src/lib/libbrand/common/libbrand.h | 6 |
3 files changed, 16 insertions, 16 deletions
diff --git a/usr/src/cmd/zoneadmd/vplat.c b/usr/src/cmd/zoneadmd/vplat.c index 522de5b779..7b36c6de5b 100644 --- a/usr/src/cmd/zoneadmd/vplat.c +++ b/usr/src/cmd/zoneadmd/vplat.c @@ -1754,7 +1754,7 @@ mount_filesystems(zlog_t *zlogp, zone_mnt_t mount_cmd) cb.pgcd_zlogp = zlogp; cb.pgcd_fs_tab = &fs_ptr; cb.pgcd_num_fs = &num_fs; - if (brand_platform_iter_gmounts(bh, zonepath, + if (brand_platform_iter_gmounts(bh, zone_name, zonepath, plat_gmount_cb, &cb) != 0) { zerror(zlogp, B_FALSE, "unable to mount filesystems"); brand_close(bh); diff --git a/usr/src/lib/libbrand/common/libbrand.c b/usr/src/lib/libbrand/common/libbrand.c index b865a43ca2..a000813225 100644 --- a/usr/src/lib/libbrand/common/libbrand.c +++ b/usr/src/lib/libbrand/common/libbrand.c @@ -21,7 +21,7 @@ /* * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, Joyent, Inc. All rights reserved. + * Copyright (c) 2015, Joyent, Inc. * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ @@ -818,9 +818,9 @@ brand_config_iter_privilege(brand_handle_t bh, } static int -i_brand_platform_iter_mounts(struct brand_handle *bhp, const char *zonepath, - int (*func)(void *, const char *, const char *, const char *, - const char *), void *data, const xmlChar *mount_type) +i_brand_platform_iter_mounts(struct brand_handle *bhp, const char *zonename, + const char *zonepath, int (*func)(void *, const char *, const char *, + const char *, const char *), void *data, const xmlChar *mount_type) { xmlNodePtr node; xmlChar *special, *dir, *type, *opt; @@ -849,7 +849,7 @@ i_brand_platform_iter_mounts(struct brand_handle *bhp, const char *zonepath, /* Substitute token values as needed. */ if ((ret = i_substitute_tokens((char *)special, special_exp, sizeof (special_exp), - NULL, zonepath, NULL, NULL)) != 0) + zonename, zonepath, NULL, NULL)) != 0) goto next; /* opt might not be defined */ @@ -859,7 +859,7 @@ i_brand_platform_iter_mounts(struct brand_handle *bhp, const char *zonepath, } else { if ((ret = i_substitute_tokens((char *)opt, opt_exp, sizeof (opt_exp), - NULL, zonepath, NULL, NULL)) != 0) + zonename, zonepath, NULL, NULL)) != 0) goto next; } @@ -893,13 +893,13 @@ next: * %R Zonepath of zone */ int -brand_platform_iter_gmounts(brand_handle_t bh, const char *zonepath, - int (*func)(void *, const char *, const char *, const char *, - const char *), void *data) +brand_platform_iter_gmounts(brand_handle_t bh, const char *zonename, + const char *zonepath, int (*func)(void *, const char *, const char *, + const char *, const char *), void *data) { struct brand_handle *bhp = (struct brand_handle *)bh; - return (i_brand_platform_iter_mounts(bhp, zonepath, func, data, - DTD_ELEM_GLOBAL_MOUNT)); + return (i_brand_platform_iter_mounts(bhp, zonename, zonepath, func, + data, DTD_ELEM_GLOBAL_MOUNT)); } /* @@ -913,7 +913,7 @@ brand_platform_iter_mounts(brand_handle_t bh, int (*func)(void *, const char *, const char *, const char *, const char *), void *data) { struct brand_handle *bhp = (struct brand_handle *)bh; - return (i_brand_platform_iter_mounts(bhp, NULL, func, data, + return (i_brand_platform_iter_mounts(bhp, NULL, NULL, func, data, DTD_ELEM_MOUNT)); } diff --git a/usr/src/lib/libbrand/common/libbrand.h b/usr/src/lib/libbrand/common/libbrand.h index 5c5fb1b42e..30accf95ba 100644 --- a/usr/src/lib/libbrand/common/libbrand.h +++ b/usr/src/lib/libbrand/common/libbrand.h @@ -21,7 +21,7 @@ /* * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, Joyent, Inc. All rights reserved. + * Copyright (c) 2015, Joyent, Inc. * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ @@ -106,8 +106,8 @@ extern int brand_config_iter_privilege(brand_handle_t, extern int brand_platform_iter_devices(brand_handle_t, const char *, int (*)(void *, const char *, const char *), void *, const char *); extern int brand_platform_iter_gmounts(brand_handle_t, const char *, - int (*)(void *, const char *, const char *, const char *, const char *), - void *); + const char *, int (*)(void *, const char *, const char *, const char *, + const char *), void *); extern int brand_platform_iter_link(brand_handle_t, int (*)(void *, const char *, const char *), void *); extern int brand_platform_iter_mounts(brand_handle_t, int (*)(void *, |