# This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. --- /root/Desktop/googleauth/googleauth.module +++ /opt/coolstack/apache2/htdocs/drupal5/modules/googleauth/googleauth.module @@ -112,8 +112,62 @@ function get_the_actual_response($i, $public, $private) { $curr = <<{{ISSUER_DOMAIN}}{{USERNAME_STRING}}urn:oasis:names:tc:SAML:2.0:ac:classes:Password + + + + + + + + + + + + + + + + + + + + + + + {{ISSUER_DOMAIN}} + + + {{USERNAME_STRING}} + + + + + + + + {{DESTINATION}} + + + + + + urn:oasis:names:tc:SAML:2.0:ac:classes:Password + + + + + EOF; + $curr = str_replace('{{USERNAME_STRING}}', $i['user_name'], $curr); $curr = str_replace('{{RESPONSE_ID}}', get_random_id(), $curr); $curr = str_replace('{{ISSUE_INSTANT}}', get_wierd_time(0), $curr); @@ -138,7 +192,8 @@ $temp_out = tempnam('/var/tmp', 'SIGNED_'); exec('chmod a+r ' . $temp); exec('chmod a+r ' . $temp_out, $trash); - $result = exec(variable_get('googleauth_path_to_xmlsec', '/usr/bin/xmlsec1') . ' sign --privkey-pem ' . $private . ' --pubkey-der ' . $public . ' --output ' . $temp_out . ' ' . $temp, $result); + $execline = variable_get('googleauth_path_to_xmlsec', '/usr/bin/xmlsec1') . ' sign --privkey-pem ' . $private . ' --pubkey-der ' . $public . ' --output ' . $temp_out . ' ' . $temp; + $result = exec($execline, $result); unlink($temp); $actual_response = file_get_contents($temp_out); if (!$actual_response) {