ae57b40499
- sync patches
29 lines
1.0 KiB
Plaintext
29 lines
1.0 KiB
Plaintext
# $OpenBSD: patch-mainc,v 1.2 2003/06/18 12:18:12 naddy Exp $
|
|
--- main.c.orig Thu Jun 19 11:06:28 1997
|
|
+++ main.c Wed Jun 18 14:13:14 2003
|
|
@@ -23,7 +23,7 @@
|
|
static char rcsid[] = "$Id: patch-mainc,v 1.2 2003/06/18 12:18:12 naddy Exp $";
|
|
|
|
|
|
-void main(int argc, char *argv[]) {
|
|
+int main(int argc, char *argv[]) {
|
|
/* default proxy identification and setup */
|
|
char delimiter = '#'; /* needed to parse username and hostname */
|
|
int timeout = 120; /* timeout is 2 minutes */
|
|
@@ -60,7 +60,7 @@ void main(int argc, char *argv[]) {
|
|
|
|
/* set server's hostname and setup greeting */
|
|
if (gethostname(server_name, MAXHOSTNAMELEN) != 0)
|
|
- strncpy(server_name, "localhost", MAXHOSTNAMELEN);
|
|
+ (void)strlcpy(server_name, "localhost", MAXHOSTNAMELEN);
|
|
snprintf(output, MAX_IO_LEN, "%s %s %s %s%s", pos_reply, server_name,
|
|
GREETING, "ready", terminator);
|
|
|
|
@@ -88,5 +88,6 @@ void main(int argc, char *argv[]) {
|
|
|
|
syslog(LOG_PRIO, "signing off (in: %d bytes, out: %d bytes)", in_bytes, out_bytes);
|
|
closelog();
|
|
+ return(0);
|
|
}
|
|
|