* Delete a per-auid mask on an audit pipe. */
| 337 | * Delete a per-auid mask on an audit pipe. |
| 338 | */ |
| 339 | static int |
| 340 | audit_pipe_preselect_delete(struct audit_pipe *ap, au_id_t auid) |
| 341 | { |
| 342 | struct audit_pipe_preselect *app; |
| 343 | int error; |
| 344 | |
| 345 | AUDIT_PIPE_LOCK(ap); |
| 346 | app = audit_pipe_preselect_find(ap, auid); |
| 347 | if (app != NULL) { |
| 348 | TAILQ_REMOVE(&ap->ap_preselect_list, app, app_list); |
| 349 | error = 0; |
| 350 | } else |
| 351 | error = ENOENT; |
| 352 | AUDIT_PIPE_UNLOCK(ap); |
| 353 | if (app != NULL) |
| 354 | free(app, M_AUDIT_PIPE_PRESELECT); |
| 355 | return (error); |
| 356 | } |
| 357 | |
| 358 | /* |
| 359 | * Delete all per-auid masks on an audit pipe. |
no test coverage detected