Add torque-fix-munge-rhbz#752079.patch

This commit is contained in:
Steve Traylen 2011-11-17 21:15:32 +01:00
parent 377bb2f516
commit 41ea1e5c55
2 changed files with 103 additions and 2 deletions

View File

@ -0,0 +1,94 @@
Index: branches/2.5-fixes/src/include/batch_request.h
===================================================================
--- branches/2.5-fixes/src/include/batch_request.h (revision 5100)
+++ branches/2.5-fixes/src/include/batch_request.h (revision 5101)
@@ -404,7 +404,7 @@
#ifndef PBS_MOM
extern void req_authenuser (struct batch_request *req);
-extern void req_altauthenuser (struct batch_request *req);
+extern int req_altauthenuser (struct batch_request *req);
extern void req_connect (struct batch_request *req);
extern void req_locatejob (struct batch_request *req);
extern void req_manager (struct batch_request *req);
Index: branches/2.5-fixes/src/server/req_getcred.c
===================================================================
--- branches/2.5-fixes/src/server/req_getcred.c (revision 5100)
+++ branches/2.5-fixes/src/server/req_getcred.c (revision 5101)
@@ -436,7 +436,7 @@
* utility
*
*/
-void req_altauthenuser(
+int req_altauthenuser(
struct batch_request *preq) /* I */
@@ -462,7 +462,7 @@
if(s >= PBS_NET_MAX_CONNECTIONS)
{
req_reject(PBSE_BADCRED, 0, preq, NULL, "cannot authenticate user");
- return;
+ return (PBSE_BADCRED);
}
@@ -470,7 +470,8 @@
if(rc)
{
/* FAILED */
- return;
+ req_reject(PBSE_SYSTEM, 0, preq, NULL, "munge failure");
+ return (PBSE_SYSTEM);
}
/* SUCCESS */
@@ -482,7 +483,7 @@
svr_conn[s].cn_authen = PBS_NET_CONN_AUTHENTICATED;
reply_ack(preq);
- return;
+ return (PBSE_NONE);
} /* END req_altauthenuser() */
Index: branches/2.5-fixes/src/server/process_request.c
===================================================================
--- branches/2.5-fixes/src/server/process_request.c (revision 5100)
+++ branches/2.5-fixes/src/server/process_request.c (revision 5101)
@@ -541,10 +541,21 @@
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 later */
- conn_credent[sfds].timestamp = time_now;
- svr_conn[sfds].cn_authen = PBS_NET_CONN_AUTHENTICATED;
- rc = 0;
+ /* 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;
@@ -1021,9 +1032,6 @@
break;
case PBS_BATCH_AltAuthenUser:
- /* Use given authentication method to determine
- if user is valid */
- req_altauthenuser(request);
break;

View File

@ -3,7 +3,7 @@
%define name torque %define name torque
%define version 2.5.7 %define version 2.5.7
#%%define snap 200604251602 #%%define snap 200604251602
%define release 2 %define release 3
# The following options are supported: # The following options are supported:
# --with server_name=hostname # --with server_name=hostname
@ -84,7 +84,7 @@
Summary: Tera-scale Open-source Resource and QUEue manager Summary: Tera-scale Open-source Resource and QUEue manager
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
Release: %{?snap:0.%{release}.%{snap}cvs}%{!?snap:%{release}}%{?dist}.3 Release: %{?snap:0.%{release}.%{snap}cvs}%{!?snap:%{release}}%{?dist}
Source: torque-%{version}%{?snap:-snap.%snap}.tar.gz Source: torque-%{version}%{?snap:-snap.%snap}.tar.gz
Source2: xpbs.desktop Source2: xpbs.desktop
Source3: xpbsmon.desktop Source3: xpbsmon.desktop
@ -99,6 +99,9 @@ Patch0: torque-munge-size.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=744138 # https://bugzilla.redhat.com/show_bug.cgi?id=744138
Patch2: torque-initd-hangs-rhbz-744138.patch Patch2: torque-initd-hangs-rhbz-744138.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=752079
Patch3: torque-fix-munge-rhbz#752079.patch
License: OpenPBS and TORQUEv1.1 License: OpenPBS and TORQUEv1.1
Group: System Environment/Daemons Group: System Environment/Daemons
URL: http://www.clusterresources.com/products/torque/ URL: http://www.clusterresources.com/products/torque/
@ -131,6 +134,7 @@ This package holds just a few shared files and directories.
%setup -q -n torque-%{version}%{?snap:-snap.%snap} %setup -q -n torque-%{version}%{?snap:-snap.%snap}
%patch0 -p1 %patch0 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p2
%__install -pm 644 %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} . %__install -pm 644 %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} .
@ -485,6 +489,9 @@ A simple PAM module to authorize users on PBS MOM nodes with a running job.
%changelog %changelog
* Thu Nov 17 2011 Steve Traylen <steve.traylen@cern.ch> - 2.5.7-3
- Add torque-fix-munge-rhbz#752079.patch
* Sun Oct 9 2011 Steve Traylen <steve.traylen@cern.ch> - 2.5.7-2 3 * Sun Oct 9 2011 Steve Traylen <steve.traylen@cern.ch> - 2.5.7-2 3
- Add patch torque-initd-hangs-rhbz-744138.patch - Add patch torque-initd-hangs-rhbz-744138.patch