Skip to content
Snippets Groups Projects
Commit 376aefcc authored by Michael Weiser's avatar Michael Weiser
Browse files

Make getprinc raise an exception on insufficient privileges

parent c749f1e8
No related branches found
No related tags found
No related merge requests found
...@@ -1013,6 +1013,8 @@ PyKAdminPrincipalObject *PyKAdminPrincipalObject_principal_with_name(PyKAdminObj ...@@ -1013,6 +1013,8 @@ PyKAdminPrincipalObject *PyKAdminPrincipalObject_principal_with_name(PyKAdminObj
if ((retval != KADM5_OK) || code) { if ((retval != KADM5_OK) || code) {
PyKAdminPrincipal_dealloc(principal); PyKAdminPrincipal_dealloc(principal);
if (retval == KADM5_AUTH_GET)
PyKAdminError_raise_error(retval, "kadm5_get_principal");
principal = (PyKAdminPrincipalObject *)Py_None; principal = (PyKAdminPrincipalObject *)Py_None;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment