From 0133868c80f837f513c9f3d631646135a36c4765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Wed, 8 Jun 2005 17:55:06 +0000 Subject: [PATCH] init some important variables and check that they are set checking authentication, all to please gcc git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15358 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/rsh/rshd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/appl/rsh/rshd.c b/appl/rsh/rshd.c index 25f04b27f..c34b36fe8 100644 --- a/appl/rsh/rshd.c +++ b/appl/rsh/rshd.c @@ -664,7 +664,7 @@ doit (void) socklen_t thisaddr_len, thataddr_len; int port; int errsock = -1; - char *client_user, *server_user, *cmd; + char *client_user = NULL, *server_user = NULL, *cmd = NULL; struct passwd *pwd; int s = STDIN_FILENO; char **env; @@ -771,6 +771,9 @@ doit (void) syslog_and_die("recv_bsd_auth failed"); } + if (client_user == NULL || server_user == NULL || cmd == NULL) + syslog_and_die("mising client/server/cmd"); + #if defined(DCE) && defined(_AIX) esetenv("AUTHSTATE", "DCE", 1); #endif