diff --git a/src/mod_auth_gssapi.h b/src/mod_auth_gssapi.h index 8c0b972..71404ff 100644 --- a/src/mod_auth_gssapi.h +++ b/src/mod_auth_gssapi.h @@ -79,7 +79,7 @@ struct mag_config { gid_t deleg_ccache_gid; gss_key_value_set_desc *cred_store; bool deleg_ccache_unique; - int s4u2self; + bool s4u2self; char *ccname_envvar; #endif struct seal_key *mag_skey; @@ -90,7 +90,7 @@ struct mag_config { bool negotiate_once; struct mag_name_attributes *name_attributes; const char *required_na_expr; - int enverrs; + bool enverrs; gss_name_t acceptor_name; bool acceptor_name_from_req; }; diff --git a/tests/magtests.py b/tests/magtests.py index a4842a0..576e88f 100755 --- a/tests/magtests.py +++ b/tests/magtests.py @@ -8,7 +8,6 @@ import shutil import signal import subprocess import sys -import traceback # check that we can import requests (for use in test scripts) import requests @@ -208,6 +207,7 @@ def setup_test_certs(testdir, testenv, logfile): with open(opensslcnf, 'w+') as f: f.write(text) + print(pkinit_key) cmd = subprocess.Popen(["openssl", "genrsa", "-out", pkinit_key, "2048"], stdout=logfile, stderr=logfile, env=testenv, @@ -431,7 +431,7 @@ def kinit_user(testdir, kdcenv): stdin=subprocess.PIPE, stdout=logfile, stderr=logfile, env=testenv, preexec_fn=os.setsid) - kinit.communicate(('%s\n' % USR_PWD).encode("utf8")) + kinit.communicate('%s\n' % USR_PWD) kinit.wait() if kinit.returncode != 0: raise ValueError('kinit failed') @@ -495,7 +495,6 @@ def test_spnego_auth(testdir, testenv, logfile): else: sys.stderr.write('SPNEGO No Auth: SUCCESS\n') - return error_count @@ -687,7 +686,7 @@ if __name__ == '__main__': # support virtualenv testenv['PATH'] = os.environ.get('PATH', '') - testenv['VIRTUAL_ENV'] = os.environ.get('VIRTUAL_ENV', '') + testenv['ViRTUAL_ENV'] = os.environ.get('VIRTUAL_ENV', '') testenv['DELEGCCACHE'] = os.path.join(testdir, 'httpd', USR_NAME + '@' + TESTREALM) @@ -716,14 +715,9 @@ if __name__ == '__main__': 'MAG_USER_NAME_2': USR_NAME_2, 'MAG_USER_PASSWORD_2': USR_PWD_2} testenv.update(kdcenv) - testenv['PATH'] = os.environ.get('PATH', '') - testenv['VIRTUAL_ENV'] = os.environ.get('VIRTUAL_ENV', '') - errs += test_basic_auth_krb5(testdir, testenv, logfile) errs += test_no_negotiate(testdir, testenv, logfile) - except Exception: - traceback.print_exc() finally: for name in processes: logfile.write("Killing %s\n" % name) diff --git a/tests/t_spnego_proxy.py b/tests/t_spnego_proxy.py index c47558b..6219721 100755 --- a/tests/t_spnego_proxy.py +++ b/tests/t_spnego_proxy.py @@ -17,7 +17,7 @@ def getAuthToken(target): ctx = gssapi.SecurityContext(name=name, mech=spnego_mech) token = ctx.step() - return 'Negotiate %s' % b64encode(token).decode() + return 'Negotiate %s' % b64encode(token) if __name__ == '__main__':