Skip to content

Commit

Permalink
2.5.5 Clean up to eliminate compile warnings, possible format
Browse files Browse the repository at this point in the history
                injection.
  • Loading branch information
resuna committed Dec 26, 2016
1 parent 56828b4 commit 9e676de
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PLUGDAEMON. Copyright (c) 2004 Peter da Silva. All rights reserved.
PLUGDAEMON. Copyright (c) 2012 Peter da Silva. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#

SOURCES= README Makefile LICENSE plug.1 plug.c plug.h config.h includes.h
VER=2.5.4
VER=2.5.5
T=plugdaemon-$(VER)

# dietlibc with al
Expand Down
6 changes: 6 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,9 @@ Changes:
(see Makefile)
Fix load-balancing (Ben Low).

2.5.4 Fixes a problem where a remote host closed a
connection too quickly, and getpeername failed.

2.5.5 Clean up to eliminate compile warnings, possible format
injection.

11 changes: 6 additions & 5 deletions plug.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* PLUGDAEMON. Copyright (c) 2004 Peter da Silva. All rights reserved.
* PLUGDAEMON. Copyright (c) 2012 Peter da Silva. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -58,7 +58,7 @@ int nproxies = 0;
int nclients = 0;
int nprocs = 0;

char *version = "plugdaemon V2.5.3 Copyright (c) 2004 Peter da Silva";
char *version = "plugdaemon V2.5.5 Copyright (c) 2012 Peter da Silva";

char *usage_string = "[-V] [-P pidfile] [-S sessionfile] [-snklfod[d]...]\n"
"\t[-p proxy-addr] [-i srcaddr] [-a accept_rule]...\n"
Expand Down Expand Up @@ -194,7 +194,8 @@ main(int ac, char **av)
if(debug>2) fprintf(stderr, "start main loop\n");
/* wait for connections and service them */
while(1) {
int clifd, prxfd, cli_len, status;
int clifd, prxfd, status;
socklen_t cli_len;
struct sockaddr_in cli_sockaddr;

if(debug>1)
Expand Down Expand Up @@ -402,7 +403,7 @@ bailout(char *message, int status)
if(!daemonized)
fprintf(stderr, "%s\n", msgbuf);
else {
syslog(LOG_ERR, msgbuf);
syslog(LOG_ERR, "%s", msgbuf);
closelog();
}

Expand Down Expand Up @@ -824,7 +825,7 @@ void delete_client (client_t *client, client_t *back_ptr)
struct dtab *select_target(int clifd, loginfo_t *lp)
{
struct sockaddr_in p_addr;
int len;
socklen_t len;
client_t *client = 0;
dest_t *target = NULL;
static dest_t *dest_next = 0;
Expand Down
2 changes: 1 addition & 1 deletion plug.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* PLUGDAEMON. Copyright (c) 2004 Peter da Silva. All rights reserved.
* PLUGDAEMON. Copyright (c) 2012 Peter da Silva. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down

0 comments on commit 9e676de

Please sign in to comment.