diff options
author | Simo Sorce <simo@redhat.com> | 2016-11-02 08:58:42 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2016-11-02 09:09:41 -0400 |
commit | e36894f77be2ab20bc91a1d39c087b3f398e332e (patch) | |
tree | 958331b0af8b778678e4366946b4ef387867fb26 /tests/t_spnego.py | |
parent | 4ed98d156122f748c6f0d4fed183944d52e245e7 (diff) | |
download | mod_auth_gssapi-perms.tar.gz mod_auth_gssapi-perms.tar.xz mod_auth_gssapi-perms.zip |
Add tests for delegation and ccache mode settingperms
Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'tests/t_spnego.py')
-rwxr-xr-x | tests/t_spnego.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/t_spnego.py b/tests/t_spnego.py index d6f77ca..a010089 100755 --- a/tests/t_spnego.py +++ b/tests/t_spnego.py @@ -3,16 +3,21 @@ import os import requests +from stat import ST_MODE from requests_kerberos import HTTPKerberosAuth, OPTIONAL if __name__ == '__main__': sess = requests.Session() url = 'http://%s/spnego/' % os.environ['NSS_WRAPPER_HOSTNAME'] - r = sess.get(url, auth=HTTPKerberosAuth()) + r = sess.get(url, auth=HTTPKerberosAuth(delegate=True)) if r.status_code != 200: raise ValueError('Spnego failed') c = r.cookies if not c.get("gssapi_session").startswith("MagBearerToken="): raise ValueError('gssapi_session not set') + + data = os.stat(os.environ['DELEGCCACHE']) + if data[ST_MODE] != 0100666: + raise ValueError('Incorrect perm on ccache: %o' % data[ST_MODE]) |