diff options
| author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-12-29 18:10:12 +0000 |
|---|---|---|
| committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-12-29 18:10:12 +0000 |
| commit | 8586c29a431b5f357dee84dd2e7541695501d9df (patch) | |
| tree | 6fffc554e95925081d4214e620a0e02d3b19245e /usr/src/cmd/auditd | |
| parent | 07cabe1a94078bca24f73eab3fc7ca1e854cf401 (diff) | |
| parent | 7f7cea96d5057c067c283bdd0a3bd608876b3d90 (diff) | |
| download | illumos-joyent-8586c29a431b5f357dee84dd2e7541695501d9df.tar.gz | |
[illumos-gate merge]
commit 7f7cea96d5057c067c283bdd0a3bd608876b3d90
12126 truss: passing argument 1 to restrict-qualified parameter aliases with argument 4
commit f772f0f818f73daf7235ea98001eb45736057eb4
12121 prtconf: cast between incompatible function types
commit d9a262d9c411812b053dc33b7b8ab0f230c6fb00
12123 sendmail: cast between incompatible function types
commit 698f4ab6008be205f4362675967638572eef4f21
12128 error: this statement may fall through
commit d6beba26494f4877120c99b5931876f56ba5dee5
12127 auditd: cast between incompatible function types
commit 0e540600911704593d2db2a54688b06c90621822
12122 rcm_daemon: cast between incompatible function types
commit 45057a1a493b60c956248b11e538feed43fdc7b6
12120 power: cast between incompatible function types
commit 37395faa43a95e030f79ca75d81f5e4fdfcd2b19
12117 nscd: cast between incompatible function types
commit 491605205e9a54b9266d0b87e470e2dc83ca0d57
12116 idmapd: cast between incompatible function types
commit 13539f0d8047e0522b1de032e340086de35f224e
12113 mailx: cast between incompatible function types
commit 5b784b07fc13e535c4af29e1804b0c6fa58889bf
12111 syseventd: cast between incompatible function types
commit 1146e6b36a51a32283a4cfc8530fd73b88b79a78
12110 audio: control reaches end of non-void function
commit 6af7a37b52615421dd8d8af372794c3399825b45
12108 libfakekernel: passing argument 4 to restrict-qualified parameter aliases with argument 3
commit 6aa760d176ff3ceaed1f2c3f6c2b45352b83e336
12107 libdiskmgt: cast between incompatible function types
commit 2f0b63d22a9a05291df8f83619060f9805eb7581
12104 libkdb_ldap: bitwise comparison always evaluates to false
commit ef2333d135d7eeabe888ac20be8a501a394db591
12102 print: cast between incompatible function types
commit cc98049dd80db1f6cbe13cbd4845c7a4f0e0c863
12101 libsldap: cast between incompatible function types
Diffstat (limited to 'usr/src/cmd/auditd')
| -rw-r--r-- | usr/src/cmd/auditd/auditd.c | 18 | ||||
| -rw-r--r-- | usr/src/cmd/auditd/doorway.c | 15 |
2 files changed, 17 insertions, 16 deletions
diff --git a/usr/src/cmd/auditd/auditd.c b/usr/src/cmd/auditd/auditd.c index 14b1e12b28..16d4bfe572 100644 --- a/usr/src/cmd/auditd/auditd.c +++ b/usr/src/cmd/auditd/auditd.c @@ -115,7 +115,7 @@ static int reset_file = 1; /* 1 to close/open binary log */ static int auditing_set = 0; /* 1 if auditon(A_SETCOND, on... */ static void my_sleep(); -static void signal_thread(); +static void *signal_thread(void *); static void loadauditlist(); static void block_signals(); static int do_sethost(); @@ -262,8 +262,7 @@ main(int argc, char *argv[]) /* * Set up a separate thread for signal handling. */ - if (pthread_create(&tid, NULL, (void *(*)(void *))signal_thread, - NULL)) { + if (pthread_create(&tid, NULL, signal_thread, NULL)) { (void) fprintf(stderr, gettext( "auditd can't create a thread\n")); auditd_exit(1); @@ -725,8 +724,8 @@ block_signals() * The thread is created with all signals blocked. */ -static void -signal_thread() +static void * +signal_thread(void *arg __unused) { sigset_t set; int signal_caught; @@ -766,6 +765,7 @@ signal_thread() } (void) pthread_cond_signal(&(main_thr.thd_cv)); } + return (NULL); } /* @@ -819,11 +819,11 @@ fail: static void conf_to_kernel(void) { - register au_event_ent_t *evp; - register int i; + au_event_ent_t *evp; + int i; char *msg; - au_evclass_map_t ec; - au_stat_t as; + au_evclass_map_t ec; + au_stat_t as; if (auditon(A_GETSTAT, (caddr_t)&as, 0) != 0) { (void) asprintf(&msg, gettext("Audit module does not appear " diff --git a/usr/src/cmd/auditd/doorway.c b/usr/src/cmd/auditd/doorway.c index 325e3ee066..c3fe37afe6 100644 --- a/usr/src/cmd/auditd/doorway.c +++ b/usr/src/cmd/auditd/doorway.c @@ -102,7 +102,7 @@ static pthread_mutex_t b_alloc_lock; static pthread_mutex_t b_refcnt_lock; static void input(void *, void *, int, door_desc_t *, int); -static void process(plugin_t *); +static void *process(void *); static audit_q_t *qpool_withdraw(plugin_t *); static void qpool_init(plugin_t *, int); @@ -505,8 +505,7 @@ auditd_thread_init() (void) pthread_cond_init(&(p->plg_cv), NULL); p->plg_waiting = 0; - if (pthread_create(&(p->plg_tid), NULL, - (void *(*)(void *))process, p)) { + if (pthread_create(&(p->plg_tid), NULL, process, p)) { report_error(INTERNAL_SYS_ERROR, gettext("thread creation failed"), p->plg_path); @@ -787,7 +786,7 @@ bpool_return(audit_rec_t *node) #if DEBUG audit_rec_t *copy = node; #endif - node = audit_release(&b_refcnt_lock, node); /* decrement ref cnt */ + node = audit_release(&b_refcnt_lock, node); /* decrement ref cnt */ if (node != NULL) { /* NULL if ref cnt is not zero */ audit_enqueue(&b_pool, node); @@ -1179,15 +1178,16 @@ input_exit: /* * process() -- pass a buffer to a plugin */ -static void -process(plugin_t *p) +static void * +process(void *arg) { + plugin_t *p = arg; int rc; audit_rec_t *b_node; audit_q_t *q_node; auditd_rc_t plugrc; char *error_string; - struct timespec delay; + struct timespec delay; int sendsignal; int queue_len; struct sched_param param; @@ -1314,4 +1314,5 @@ plugin_removed: (void) pthread_mutex_lock(&plugin_mutex); (void) unload_plugin(p); (void) pthread_mutex_unlock(&plugin_mutex); + return (NULL); } |
