aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobbie Harwood <rharwood@redhat.com>2018-12-18 15:18:13 -0500
committerGreg Hudson <ghudson@mit.edu>2019-01-07 01:54:52 -0500
commitfc87a96b29dd548b54eff6a1d0abc155a02fb497 (patch)
treeec8196055b391d0f4322e8d3f1888987ccb69fb6
parent17cc01779e8e40cc414b39bc2a99fd48bb064124 (diff)
downloadkrb5-fc87a96b29dd548b54eff6a1d0abc155a02fb497.zip
krb5-fc87a96b29dd548b54eff6a1d0abc155a02fb497.tar.gz
krb5-fc87a96b29dd548b54eff6a1d0abc155a02fb497.tar.bz2
Fix double-close in ksu get_authorized_princ_names
If list_union() fails due to an allocation failure, then close_time() will attempt to fclose users_fp and login_fp a second time. This bug was originally introduced in commit be95b52c2d0c21b1fe92f9f90166fc2fa8eecc95, and has been present in every krb5 release since 1.1. (cherry picked from commit 0b8c6f3e1e8e561aa56a7d4e2171320119991dae) ticket: 8768 version_fixed: 1.15.5
-rw-r--r--src/clients/ksu/heuristic.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/clients/ksu/heuristic.c b/src/clients/ksu/heuristic.c
index 0d055e4..3eb28ab 100644
--- a/src/clients/ksu/heuristic.c
+++ b/src/clients/ksu/heuristic.c
@@ -266,7 +266,6 @@ get_authorized_princ_names(luser, cmd, princ_list)
retval = list_union(k5login_list, k5users_filt_list, &combined_list);
if (retval){
- close_time(k5users_flag,users_fp, k5login_flag,login_fp);
return retval;
}
*princ_list = combined_list;