110 lines
3.0 KiB
Diff
110 lines
3.0 KiB
Diff
*** process_request.c.orig 2011-11-08 14:20:50.000000000 +0100
|
|
--- process_request.c 2011-11-08 17:15:21.000000000 +0100
|
|
***************
|
|
*** 539,564 ****
|
|
|
|
if (ENABLE_TRUSTED_AUTH == TRUE )
|
|
rc = 0; /* bypass the authentication of the user--trust the client completely */
|
|
! else if(munge_on)
|
|
{
|
|
! /* If munge_on is true we will validate the connection now */
|
|
! if ( request->rq_type == PBS_BATCH_AltAuthenUser)
|
|
{
|
|
! rc = req_altauthenuser(request);
|
|
! if (rc == PBSE_NONE)
|
|
{
|
|
! conn_credent[sfds].timestamp = time_now;
|
|
! svr_conn[sfds].cn_authen = PBS_NET_CONN_AUTHENTICATED;
|
|
}
|
|
return;
|
|
}
|
|
else
|
|
! {
|
|
! rc = authenticate_user(request, &conn_credent[sfds]);
|
|
! }
|
|
}
|
|
- else if (svr_conn[sfds].cn_authen != PBS_NET_CONN_AUTHENTICATED)
|
|
- rc = PBSE_BADCRED;
|
|
else
|
|
rc = authenticate_user(request, &conn_credent[sfds]);
|
|
|
|
--- 539,562 ----
|
|
|
|
if (ENABLE_TRUSTED_AUTH == TRUE )
|
|
rc = 0; /* bypass the authentication of the user--trust the client completely */
|
|
! else if (svr_conn[sfds].cn_authen != PBS_NET_CONN_AUTHENTICATED)
|
|
{
|
|
! if (munge_on && request->rq_type == PBS_BATCH_AltAuthenUser)
|
|
{
|
|
! /* If munge_on is true do the validation request now */
|
|
! if (request->rq_ind.rq_authen.rq_port != svr_conn[sfds].cn_port)
|
|
! {
|
|
! req_reject(PBSE_IVALREQ, 0, request, NULL, "Unexpected request to authenticate an alternate connection");
|
|
! }
|
|
! else
|
|
{
|
|
! req_altauthenuser(request);
|
|
}
|
|
return;
|
|
}
|
|
else
|
|
! rc = PBSE_BADCRED;
|
|
}
|
|
else
|
|
rc = authenticate_user(request, &conn_credent[sfds]);
|
|
|
|
***************
|
|
*** 1032,1038 ****
|
|
break;
|
|
|
|
case PBS_BATCH_AltAuthenUser:
|
|
!
|
|
break;
|
|
|
|
case PBS_BATCH_JobObit:
|
|
--- 1030,1036 ----
|
|
break;
|
|
|
|
case PBS_BATCH_AltAuthenUser:
|
|
! req_reject(PBSE_IVALREQ, 0, request, NULL, "Unexpected request to authenticate at this point");
|
|
break;
|
|
|
|
case PBS_BATCH_JobObit:
|
|
*** req_getcred.c.orig 2011-11-08 17:27:36.000000000 +0100
|
|
--- req_getcred.c 2011-11-08 17:20:18.000000000 +0100
|
|
***************
|
|
*** 365,371 ****
|
|
/* Something went wrong. We will have to depend on the parent
|
|
to let everyone know */
|
|
close(fd_pipe[1]);
|
|
! exit(0);
|
|
|
|
}
|
|
|
|
--- 365,371 ----
|
|
/* Something went wrong. We will have to depend on the parent
|
|
to let everyone know */
|
|
close(fd_pipe[1]);
|
|
! _exit(0);
|
|
|
|
}
|
|
|
|
***************
|
|
*** 453,459 ****
|
|
|
|
for (s = 0;s < PBS_NET_MAX_CONNECTIONS;++s)
|
|
{
|
|
! if (preq->rq_ind.rq_authen.rq_port != svr_conn[s].cn_port)
|
|
{
|
|
continue;
|
|
}
|
|
--- 453,460 ----
|
|
|
|
for (s = 0;s < PBS_NET_MAX_CONNECTIONS;++s)
|
|
{
|
|
! if (preq->rq_ind.rq_authen.rq_port != svr_conn[s].cn_port ||
|
|
! svr_conn[preq->rq_conn].cn_addr != svr_conn[s].cn_addr)
|
|
{
|
|
continue;
|
|
}
|