Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
code defects in gssd_search_krb5_keytab(),
when get_ple_by_princ return NULL, can not return the right return code.
if (status) {
printerr(4, "We WILL use this entry (%s)\n", pname);
ple = get_ple_by_princ(context, kte->principal);
/*
* Return, don't free, keytab entry if
* we were successful!
*/
if (ple == NULL) {
retval = ENOMEM;
k5_free_kt_entry(context, kte);
} else {
retval = 0;
*found = 1;
}
k5_free_unparsed_name(context, pname);
break;
}
else {
printerr(4, "We will NOT use this entry (%s)\n",
pname);
}
k5_free_unparsed_name(context, pname);
k5_free_kt_entry(context, kte);
}
if ((code = krb5_kt_end_seq_get(context, kt, &cursor))) {
k5err = gssd_k5_err_msg(context, code);
printerr(0, "WARNING: %s while ending keytab scan for "
"keytab '%s'\n", k5err, kt_name);
}
retval = 0;
^^^ cover the 'if (ple == NULL) { retval = ENOMEM;'
out:
free(k5err);
return retval;
Version-Release number of selected component (if applicable):
nfs-utils-1.3.0
How reproducible:
1
Steps to Reproduce:
1. code review.
2.
3.
Actual results:
when ENOMEM fail happen, the function can not return right code to caller.
Expected results:
fix this.
Additional info:
The upstream commit:
commit e38711f02f5d51eb051937f06373f018d3def386
Author: Steve Dickson <steved>
Date: Thu Jul 30 17:06:39 2015 -0400
rpc.gssd: Only clear the retval if it has not been set
Verified with nfs-utils-1.3.0-0.17.el7.src.rpm
[yyc@dhcp-12-138 nfs-utils-1.3.0]$ cat utils/gssd/krb5_util.c | grep -A3 -B2 "Only clear the retval if has not been set"
}
/* Only clear the retval if has not been set */
if (retval < 0)
retval = 0;
out:
[yyc@dhcp-12-138 nfs-utils-1.3.0]$
Move to VERIFIED
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2015-2196.html
Description of problem: code defects in gssd_search_krb5_keytab(), when get_ple_by_princ return NULL, can not return the right return code. if (status) { printerr(4, "We WILL use this entry (%s)\n", pname); ple = get_ple_by_princ(context, kte->principal); /* * Return, don't free, keytab entry if * we were successful! */ if (ple == NULL) { retval = ENOMEM; k5_free_kt_entry(context, kte); } else { retval = 0; *found = 1; } k5_free_unparsed_name(context, pname); break; } else { printerr(4, "We will NOT use this entry (%s)\n", pname); } k5_free_unparsed_name(context, pname); k5_free_kt_entry(context, kte); } if ((code = krb5_kt_end_seq_get(context, kt, &cursor))) { k5err = gssd_k5_err_msg(context, code); printerr(0, "WARNING: %s while ending keytab scan for " "keytab '%s'\n", k5err, kt_name); } retval = 0; ^^^ cover the 'if (ple == NULL) { retval = ENOMEM;' out: free(k5err); return retval; Version-Release number of selected component (if applicable): nfs-utils-1.3.0 How reproducible: 1 Steps to Reproduce: 1. code review. 2. 3. Actual results: when ENOMEM fail happen, the function can not return right code to caller. Expected results: fix this. Additional info: