summaryrefslogtreecommitdiff
path: root/libexec/identd
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-07-20 22:40:43 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-07-20 22:40:43 +0000
commit2ec79f337bae869c31c4dcea714414dcc27762a3 (patch)
tree3619eba8432a29db73ae6e940b2a093b73828151 /libexec/identd
parent6f8ae11c5d50d06b8bdafe0dd2361bc49b000cfe (diff)
bad arguments? usage() should syslog()
Diffstat (limited to 'libexec/identd')
-rw-r--r--libexec/identd/identd.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/libexec/identd/identd.c b/libexec/identd/identd.c
index 2d8f14504f1..ad3dabb801b 100644
--- a/libexec/identd/identd.c
+++ b/libexec/identd/identd.c
@@ -5,16 +5,6 @@
* Please send bug fixes/bug reports to: Peter Eriksson <pen@lysator.liu.se>
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-#include <netdb.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <unistd.h>
-
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ioctl.h>
@@ -23,14 +13,21 @@
#include <sys/time.h>
#include <sys/wait.h>
-#include <pwd.h>
-#include <grp.h>
-
#include <netinet/in.h>
-
#include <arpa/inet.h>
-extern int errno;
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <netdb.h>
+#include <syslog.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <pwd.h>
+#include <grp.h>
#include "identd.h"
#include "error.h"
@@ -63,10 +60,10 @@ static int syslog_facility = LOG_DAEMON;
void
usage()
{
- fprintf(stderr,
- "identd [-i | -w | -b] [-t seconds] [-u uid] [-g gid] [-p port]\n"
- "\t[-a address] [-c charset] [-noelVvmNdh]\n");
- exit(1);
+ syslog(LOG_ERR,
+ "identd [-i | -w | -b] [-t seconds] [-u uid] [-g gid] [-p port] "
+ "[-a address] [-c charset] [-noelVvmNdh]");
+ exit(2);
}