diff options
Diffstat (limited to 'usr/src/lib/libscf/common/lowlevel.c')
-rw-r--r-- | usr/src/lib/libscf/common/lowlevel.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/usr/src/lib/libscf/common/lowlevel.c b/usr/src/lib/libscf/common/lowlevel.c index a31ff5205e..2e31aa6e1f 100644 --- a/usr/src/lib/libscf/common/lowlevel.c +++ b/usr/src/lib/libscf/common/lowlevel.c @@ -6871,49 +6871,3 @@ _scf_pg_is_read_protected(const scf_propertygroup_t *pg, boolean_t *out) return (scf_set_error(SCF_ERROR_INTERNAL)); return (SCF_SUCCESS); } - -/* - * _scf_set_annotation: a wrapper to set the annotation fields for SMF - * security auditing. - * - * Fails with following in scf_error_key thread specific data: - * _INVALID_ARGUMENT - operation or file too large - * _NOT_BOUND - * _CONNECTION_BROKEN - * _INTERNAL - * _NO_RESOURCES - */ -int -_scf_set_annotation(scf_handle_t *h, const char *operation, const char *file) -{ - struct rep_protocol_annotation request; - struct rep_protocol_response response; - size_t copied; - int r; - - request.rpr_request = REP_PROTOCOL_SET_AUDIT_ANNOTATION; - copied = strlcpy(request.rpr_operation, - (operation == NULL) ? "" : operation, - sizeof (request.rpr_operation)); - if (copied >= sizeof (request.rpr_operation)) - return (scf_set_error(SCF_ERROR_INVALID_ARGUMENT)); - - copied = strlcpy(request.rpr_file, - (file == NULL) ? "" : file, - sizeof (request.rpr_file)); - if (copied >= sizeof (request.rpr_operation)) - return (scf_set_error(SCF_ERROR_INVALID_ARGUMENT)); - - (void) pthread_mutex_lock(&h->rh_lock); - r = make_door_call(h, &request, sizeof (request), - &response, sizeof (response)); - (void) pthread_mutex_unlock(&h->rh_lock); - - if (r < 0) { - DOOR_ERRORS_BLOCK(r); - } - - if (response.rpr_response != REP_PROTOCOL_SUCCESS) - return (scf_set_error(proto_error(response.rpr_response))); - return (0); -} |