diff options
author | jjj <none@none> | 2006-06-01 17:01:11 -0700 |
---|---|---|
committer | jjj <none@none> | 2006-06-01 17:01:11 -0700 |
commit | 0ea5e3a571e3da934507bdd32924d11659c70704 (patch) | |
tree | ba35ba32eeb100c1272139f7cfcc462bdc77e3a4 /usr/src/cmd/syslogd/queue.c | |
parent | f4646a6c4cd95d2c0e0e22ab5aaf71e77cc8b2b3 (diff) | |
download | illumos-gate-0ea5e3a571e3da934507bdd32924d11659c70704.tar.gz |
PSARC 2004/368 Secure By Default
4875624 *syslogd* turn off UDP listener by default
5004374 Ship with remote services disabled by default
5016956 By default rpcbind should not listen for remote requests
5016975 By default snmpd/dx should not be enabled.
5016998 By default inetd should not listen for remote connections.
5017041 By default sendmail should not listen for remote connections
5046450 Create a greenline profile for Secure by Default installation
6267741 RFE: One-touch knob for outbound-only sendmail
6414308 syslogd could use some lint soap
Diffstat (limited to 'usr/src/cmd/syslogd/queue.c')
-rw-r--r-- | usr/src/cmd/syslogd/queue.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/usr/src/cmd/syslogd/queue.c b/usr/src/cmd/syslogd/queue.c index e546605e40..e285f83a26 100644 --- a/usr/src/cmd/syslogd/queue.c +++ b/usr/src/cmd/syslogd/queue.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 1996-2002 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -49,7 +48,7 @@ dataq_init(dataq_t *ptr) ptr->num_waiters = 0; ll_init(&ptr->data); ll_init(&ptr->waiters); - pthread_mutex_init(&ptr->lock, NULL); + (void) pthread_mutex_init(&ptr->lock, NULL); assert((pthread_mutex_lock(&ptr->lock) == 0) && (dataq_check(ptr) == 1) && (pthread_mutex_unlock(&ptr->lock) == 0)); @@ -65,7 +64,7 @@ dataq_enqueue(dataq_t *dataq, void *in) if (ptr == NULL) return (-1); ptr->data = in; - pthread_mutex_lock(&dataq->lock); + (void) pthread_mutex_lock(&dataq->lock); assert(dataq_check(dataq)); ll_enqueue(&dataq->data, &ptr->list); dataq->num_data++; @@ -73,10 +72,10 @@ dataq_enqueue(dataq_t *dataq, void *in) /*LINTED*/ sleeper = (dataq_waiter_t *)ll_peek(&dataq->waiters); sleeper->wakeup = 1; - pthread_cond_signal(&sleeper->cv); + (void) pthread_cond_signal(&sleeper->cv); } assert(dataq_check(dataq)); - pthread_mutex_unlock(&dataq->lock); + (void) pthread_mutex_unlock(&dataq->lock); return (0); } @@ -86,23 +85,23 @@ dataq_dequeue(dataq_t *dataq, void **outptr, int try) dataq_data_t *dptr; dataq_waiter_t *sleeper; - pthread_mutex_lock(&dataq->lock); + (void) pthread_mutex_lock(&dataq->lock); if ((dataq->num_waiters > 0) || ((dptr = (dataq_data_t *)ll_dequeue(&dataq->data)) == NULL)) { dataq_waiter_t wait; if (try) { - pthread_mutex_unlock(&dataq->lock); + (void) pthread_mutex_unlock(&dataq->lock); return (1); } wait.wakeup = 0; - pthread_cond_init(&wait.cv, NULL); + (void) pthread_cond_init(&wait.cv, NULL); dataq->num_waiters++; ll_enqueue(&dataq->waiters, &wait.list); while (wait.wakeup == 0) - pthread_cond_wait(&wait.cv, &dataq->lock); - ll_dequeue(&dataq->waiters); + (void) pthread_cond_wait(&wait.cv, &dataq->lock); + (void) ll_dequeue(&dataq->waiters); dataq->num_waiters--; - pthread_cond_destroy(&wait.cv); + (void) pthread_cond_destroy(&wait.cv); dptr = (dataq_data_t *)ll_dequeue(&dataq->data); } dataq->num_data--; @@ -110,9 +109,9 @@ dataq_dequeue(dataq_t *dataq, void **outptr, int try) /*LINTED*/ sleeper = (dataq_waiter_t *)ll_peek(&dataq->waiters); sleeper->wakeup = 1; - pthread_cond_signal(&sleeper->cv); + (void) pthread_cond_signal(&sleeper->cv); } - pthread_mutex_unlock(&dataq->lock); + (void) pthread_mutex_unlock(&dataq->lock); *outptr = dptr->data; free(dptr); return (0); @@ -130,14 +129,14 @@ static void dataq_waiters_destroy(void * p) { dataq_waiter_t *d = (dataq_waiter_t *)p; - pthread_cond_destroy(&d->cv); + (void) pthread_cond_destroy(&d->cv); free(d); } int dataq_destroy(dataq_t *dataq) { - pthread_mutex_destroy(&dataq->lock); + (void) pthread_mutex_destroy(&dataq->lock); ll_mapf(&dataq->data, dataq_data_destroy); ll_mapf(&dataq->waiters, dataq_waiters_destroy); return (0); |