dmlb2000 pushed to torque (el6). "Add torque-fix-munge-rhbz#752079.patch"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue May 19 19:42:42 UTC 2015


From 41ea1e5c55d2cbada6f3113cae7e640cfc3ac474 Mon Sep 17 00:00:00 2001
From: Steve Traylen <steve.traylen at cern.ch>
Date: Thu, 17 Nov 2011 21:15:32 +0100
Subject: Add torque-fix-munge-rhbz#752079.patch


diff --git a/torque-fix-munge-rhbz#752079.patch b/torque-fix-munge-rhbz#752079.patch
new file mode 100644
index 0000000..5735b7a
--- /dev/null
+++ b/torque-fix-munge-rhbz#752079.patch
@@ -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;
+ 
diff --git a/torque.spec b/torque.spec
index dd9b866..dd4636e 100644
--- a/torque.spec
+++ b/torque.spec
@@ -3,7 +3,7 @@
 %define name torque
 %define version 2.5.7
 #%%define snap 200604251602
-%define release 2
+%define release 3
 
 # The following options are supported:
 #   --with server_name=hostname
@@ -84,7 +84,7 @@
 Summary: Tera-scale Open-source Resource and QUEue manager
 Name: %{name}
 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
 Source2: xpbs.desktop
 Source3: xpbsmon.desktop
@@ -99,6 +99,9 @@ Patch0:      torque-munge-size.patch
 # https://bugzilla.redhat.com/show_bug.cgi?id=744138
 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
 Group: System Environment/Daemons
 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}
 %patch0 -p1
 %patch2 -p1
+%patch3 -p2
 %__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
+* Thu Nov 17 2011 Steve Traylen <steve.traylen at cern.ch> - 2.5.7-3
+- Add torque-fix-munge-rhbz#752079.patch
+
 * Sun Oct  9 2011 Steve Traylen <steve.traylen at cern.ch> - 2.5.7-2 3
 - Add patch torque-initd-hangs-rhbz-744138.patch
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/torque.git/commit/?h=el6&id=41ea1e5c55d2cbada6f3113cae7e640cfc3ac474


More information about the scm-commits mailing list