Print this page
7806 svccfg restore segfaults in upgrade_manifestfiles
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Jason King <jason.brian.king@gmail.com>
*** 21,30 ****
--- 21,31 ----
/*
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2015 Joyent, Inc.
* Copyright 2012 Milan Jurik. All rights reserved.
+ * Copyright 2017 RackTop Systems.
*/
#include <alloca.h>
#include <assert.h>
*** 3893,3903 ****
* if not then remove the file from the list.
* Commit the list of manifest file names.
*
*/
static int
! upgrade_manifestfiles(pgroup_t *pg, const entity_t *ient,
const scf_snaplevel_t *running, void *ent)
{
scf_propertygroup_t *ud_mfsts_pg = NULL;
scf_property_t *ud_prop = NULL;
scf_iter_t *ud_prop_iter;
--- 3894,3904 ----
* if not then remove the file from the list.
* Commit the list of manifest file names.
*
*/
static int
! upgrade_manifestfiles(pgroup_t *pg, entity_t *ient,
const scf_snaplevel_t *running, void *ent)
{
scf_propertygroup_t *ud_mfsts_pg = NULL;
scf_property_t *ud_prop = NULL;
scf_iter_t *ud_prop_iter;
*** 3963,3979 ****
return (0);
}
/* Fetch the new manifests property group */
! for (mfst_pgroup = uu_list_first(ient->sc_pgroups);
! mfst_pgroup != NULL;
! mfst_pgroup = uu_list_next(ient->sc_pgroups, mfst_pgroup)) {
! if (strcmp(mfst_pgroup->sc_pgroup_name,
! SCF_PG_MANIFESTFILES) == 0)
! break;
! }
if ((r = scf_iter_pg_properties(ud_prop_iter, ud_mfsts_pg)) !=
SCF_SUCCESS)
return (-1);
--- 3964,3976 ----
return (0);
}
/* Fetch the new manifests property group */
! mfst_pgroup = internal_pgroup_find_or_create(ient,
! SCF_PG_MANIFESTFILES, SCF_GROUP_FRAMEWORK);
! assert(mfst_pgroup != NULL);
if ((r = scf_iter_pg_properties(ud_prop_iter, ud_mfsts_pg)) !=
SCF_SUCCESS)
return (-1);