Disclaimer:
I could not complie-test or runtime-test these patches right now. This is a
pure code-only review of the patches.
Actually, I think the error was a different one. Right now, it seems as if the
server socket is never closed, unless that happens in a different file ?!?
Should sd and sd6 both be global variables and both be "if (sd{4,6} != -1)
close(sd{4,6});" in tcsd_signal_term ?
Am Mittwoch, den 09.04.2014, 15:41 -0300 schrieb [email protected]:
> From: Richard Maciel <[email protected]>
>
> Related to coverity CID 10302
>
> A global variable sd (which shouldn't exist, thus was removed) was
> used as a consequence of a programming typo. The right variable to
> be used is sd6.
>
> Signed-off-by: Richard Maciel <[email protected]>
> ---
> src/tcsd/svrside.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/src/tcsd/svrside.c b/src/tcsd/svrside.c
> index 807d1ea..bf4d629 100644
> --- a/src/tcsd/svrside.c
> +++ b/src/tcsd/svrside.c
> @@ -44,7 +44,6 @@ struct tcsd_config tcsd_options;
> struct tpm_properties tpm_metrics;
> static volatile int hup = 0, term = 0;
> extern char *optarg;
> -int sd;
> char *tcsd_config_file = NULL;
>
> struct srv_sock_info {
> @@ -72,7 +71,6 @@ static void
> tcsd_signal_term(int signal)
> {
> term = 1;
> - close(sd);
> }
>
> void
> @@ -324,7 +322,7 @@ int setup_ipv6_socket(struct srv_sock_info *ssi)
> return 0;
>
> err:
> - if (sd != -1)
> + if (sd6 != -1)
> close(sd6);
>
> return -1;
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
TrouSerS-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-tech