From 6850e0d055e6b0284a6c0dca699f8ea2dbfd3f9c Mon Sep 17 00:00:00 2001 From: Garrick Staples Date: Thu, 3 Aug 2006 05:39:37 +0000 Subject: [PATCH] - fix incorrect _pam_getpwnam_r usage in pam module --- torque-2.1.2-pam-getpwnam.patch | 13 +++++++++++++ torque.spec | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 torque-2.1.2-pam-getpwnam.patch diff --git a/torque-2.1.2-pam-getpwnam.patch b/torque-2.1.2-pam-getpwnam.patch new file mode 100644 index 0000000..39e3d44 --- /dev/null +++ b/torque-2.1.2-pam-getpwnam.patch @@ -0,0 +1,13 @@ +diff -pruN torque-2.1.2_orig/src/pam/pam_pbssimpleauth.c torque-2.1.2/src/pam/pam_pbssimpleauth.c +--- torque-2.1.2_orig/src/pam/pam_pbssimpleauth.c 2006-07-12 08:25:23.000000000 -0700 ++++ torque-2.1.2/src/pam/pam_pbssimpleauth.c 2006-08-02 22:22:27.000000000 -0700 +@@ -94,8 +94,7 @@ int pam_sm_authenticate(pam_handle_t *pa + return PAM_SERVICE_ERR; + } + +- if (_pam_getpwnam_r(username, &pwd, &ubuf, &ubuflen, &user_pwd) != 0) +- user_pwd = NULL; ++ user_pwd = getpwnam(username); + + /* no early returns from this point on because we need to free ubuf */ + diff --git a/torque.spec b/torque.spec index 3cfbf7e..a8cec09 100644 --- a/torque.spec +++ b/torque.spec @@ -3,7 +3,7 @@ %define name torque %define version 2.1.2 #%%define snap 200604251602 -%define release 1 +%define release 2 # The following options are supported: # --with server_name=hostname @@ -92,6 +92,7 @@ Source4: xpbs.png Source5: xpbsmon.png Source6: README-localhost Patch1: torque-2.1.0-remove-rpath.path +Patch2: torque-2.1.2-pam-getpwnam.patch License: Freely redistributable (See PBS_License.txt) Group: System Environment/Daemons URL: http://www.clusterresources.com/products/torque/ @@ -121,6 +122,7 @@ This package holds just a few shared files and directories. %prep %setup -q -n torque-%{version}%{?snap:-snap.%snap} %patch1 -p1 +%patch2 -p1 %__install -pm 644 %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} . @@ -401,6 +403,9 @@ A simple PAM module to authorize users on PBS MOM nodes with a running job. %changelog +* Wed Aug 2 2006 Garrick Staples 2.1.2-2 +- fix incorrect _pam_getpwnam_r usage in pam module + * Tue Aug 1 2006 Garrick Staples 2.1.2-1 - bump to 2.1.2 - fix bz #200830