remove unused parameter passwd in StartClient().

This commit is contained in:
matthieu 2016-10-23 10:37:23 +00:00
parent 25805cbb51
commit f24b0a9c84

View File

@ -62,8 +62,7 @@ static Bool StartClient(
struct verify_info *verify, struct verify_info *verify,
struct display *d, struct display *d,
pid_t *pidp, pid_t *pidp,
char *name, char *name);
char *passwd);
static pid_t clientPid; static pid_t clientPid;
static struct greet_info greet; static struct greet_info greet;
@ -173,7 +172,7 @@ ManageSession (struct display *d)
* Start the clients, changing uid/groups * Start the clients, changing uid/groups
* setting up environment and running the session * setting up environment and running the session
*/ */
if (StartClient (&verify, d, &clientPid, greet.name, greet.password)) { if (StartClient (&verify, d, &clientPid, greet.name)) {
Debug ("Client Started\n"); Debug ("Client Started\n");
/* Wait for session to end, */ /* Wait for session to end, */
pid = waitpid(clientPid, NULL, 0); pid = waitpid(clientPid, NULL, 0);
@ -301,8 +300,7 @@ StartClient (
struct verify_info *verify, struct verify_info *verify,
struct display *d, struct display *d,
pid_t *pidp, pid_t *pidp,
char *name, char *name)
char *passwd)
{ {
char **f, *home; char **f, *home;
char *failsafeArgv[2]; char *failsafeArgv[2];
@ -355,9 +353,6 @@ StartClient (
else else
Debug("No WINDOWPATH found\n"); Debug("No WINDOWPATH found\n");
if (passwd != NULL)
bzero(passwd, strlen(passwd));
SetUserAuthorization (d, verify); SetUserAuthorization (d, verify);
home = getEnv (verify->userEnviron, "HOME"); home = getEnv (verify->userEnviron, "HOME");
if (home) if (home)
@ -379,15 +374,11 @@ StartClient (
execute (failsafeArgv, verify->userEnviron); execute (failsafeArgv, verify->userEnviron);
exit (1); exit (1);
case -1: case -1:
if (passwd != NULL)
bzero(passwd, strlen(passwd));
Debug ("StartSession, fork failed\n"); Debug ("StartSession, fork failed\n");
LogError ("can't start session on \"%s\", fork failed: %s\n", LogError ("can't start session on \"%s\", fork failed: %s\n",
d->name, _SysErrorMsg (errno)); d->name, _SysErrorMsg (errno));
return 0; return 0;
default: default:
if (passwd != NULL)
bzero(passwd, strlen(passwd));
Debug ("StartSession, fork succeeded %d\n", pid); Debug ("StartSession, fork succeeded %d\n", pid);
*pidp = pid; *pidp = pid;
return 1; return 1;