diff options
Diffstat (limited to 'usr/src/cmd/svc/svccfg/svccfg_libscf.c')
-rw-r--r-- | usr/src/cmd/svc/svccfg/svccfg_libscf.c | 74 |
1 files changed, 1 insertions, 73 deletions
diff --git a/usr/src/cmd/svc/svccfg/svccfg_libscf.c b/usr/src/cmd/svc/svccfg/svccfg_libscf.c index 0e71dc0c67..0397af151c 100644 --- a/usr/src/cmd/svc/svccfg/svccfg_libscf.c +++ b/usr/src/cmd/svc/svccfg/svccfg_libscf.c @@ -5044,7 +5044,6 @@ again: return (-1); case SCF_ERROR_NOT_SET: - case SCF_ERROR_INTERNAL: case SCF_ERROR_INVALID_ARGUMENT: case SCF_ERROR_HANDLE_MISMATCH: bad_error("_scf_snapshot_take_new", @@ -5526,7 +5525,6 @@ nosnap: goto deltemp; case SCF_ERROR_NOT_SET: - case SCF_ERROR_INTERNAL: case SCF_ERROR_INVALID_ARGUMENT: case SCF_ERROR_HANDLE_MISMATCH: bad_error("_scf_snapshot_take_new", @@ -6719,7 +6717,6 @@ lscf_bundle_import(bundle_t *bndl, const char *filename, uint_t flags) int r; pgroup_t *old_dpt; void *cookie; - int annotation_set = 0; const char * const emsg_nomem = gettext("Out of memory.\n"); const char * const emsg_nores = @@ -6806,35 +6803,6 @@ lscf_bundle_import(bundle_t *bndl, const char *filename, uint_t flags) } } - /* Set up the auditing annotation. */ - if (_scf_set_annotation(g_hndl, "svccfg import", filename) == 0) { - annotation_set = 1; - } else { - switch (scf_error()) { - case SCF_ERROR_CONNECTION_BROKEN: - warn(gettext("Repository connection broken.\n")); - repository_teardown(); - result = -1; - goto out; - - case SCF_ERROR_INVALID_ARGUMENT: - case SCF_ERROR_NOT_BOUND: - case SCF_ERROR_NO_RESOURCES: - case SCF_ERROR_INTERNAL: - bad_error("_scf_set_annotation", scf_error()); - /* NOTREACHED */ - - default: - /* - * Do not terminate import because of inability to - * generate annotation audit event. - */ - warn(gettext("_scf_set_annotation() unexpectedly " - "failed with return code of %d\n"), scf_error()); - break; - } - } - /* * Clear the sc_import_state's of all services & instances so we can * report how far we got if we fail. @@ -6986,10 +6954,6 @@ progress: result = -1; out: - if (annotation_set != 0) { - /* Turn off annotation. It is no longer needed. */ - (void) _scf_set_annotation(g_hndl, NULL, NULL); - } load_fini(); free(ud_ctarg); @@ -7069,13 +7033,12 @@ out: * -1 - lscf_import_instance_pgs() failed. */ int -lscf_bundle_apply(bundle_t *bndl, const char *file) +lscf_bundle_apply(bundle_t *bndl) { entity_t *svc, *inst; scf_scope_t *rscope; scf_service_t *rsvc; scf_instance_t *rinst; - int annotation_set = 0; int r; lscf_prep_hndl(); @@ -7090,36 +7053,6 @@ lscf_bundle_apply(bundle_t *bndl, const char *file) if (scf_handle_get_scope(g_hndl, SCF_SCOPE_LOCAL, rscope) != 0) scfdie(); - /* - * Set the strings to be used for the security audit annotation - * event. - */ - if (_scf_set_annotation(g_hndl, "svccfg apply", file) == 0) { - annotation_set = 1; - } else { - switch (scf_error()) { - case SCF_ERROR_CONNECTION_BROKEN: - warn(gettext("Repository connection broken.\n")); - goto out; - - case SCF_ERROR_INVALID_ARGUMENT: - case SCF_ERROR_NOT_BOUND: - case SCF_ERROR_NO_RESOURCES: - case SCF_ERROR_INTERNAL: - bad_error("_scf_set_annotation", scf_error()); - /* NOTREACHED */ - - default: - /* - * Do not abort apply operation because of - * inability to create annotation audit event. - */ - warn(gettext("_scf_set_annotation() unexpectedly " - "failed with return code of %d\n"), scf_error()); - break; - } - } - for (svc = uu_list_first(bndl->sc_bundle_services); svc != NULL; svc = uu_list_next(bndl->sc_bundle_services, svc)) { @@ -7215,11 +7148,6 @@ lscf_bundle_apply(bundle_t *bndl, const char *file) } out: - if (annotation_set) { - /* Remove security audit annotation strings. */ - (void) _scf_set_annotation(g_hndl, NULL, NULL); - } - scf_transaction_destroy(imp_tx); imp_tx = NULL; scf_pg_destroy(imp_pg); |