[28338] in CVS-changelog-for-Kerberos-V5
krb5 commit: Remove dead code from the mechglue initialization
daemon@ATHENA.MIT.EDU (Greg Hudson)
Thu May 22 18:26:35 2014
Date: Thu, 22 May 2014 18:26:30 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201405222226.s4MMQUUd010678@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
Content-Type: multipart/mixed; boundary="===============0763102197=="
Errors-To: cvs-krb5-bounces@mit.edu
--===============0763102197==
https://github.com/krb5/krb5/commit/123c14fd8862ee8f11f6084d25958cb380655f35
commit 123c14fd8862ee8f11f6084d25958cb380655f35
Author: Günther Deschner <gdeschner@redhat.com>
Date: Wed Mar 5 16:21:55 2014 +0100
Remove dead code from the mechglue initialization
The stat check in gss_indicate_mechs had no consequent and would have
been redundant with logic in updateMechList if it did.
[ghudson@mit.edu: elaborated commit message; removed unused
g_mechSetTime and now-irrelevant comment]
src/lib/gssapi/mechglue/g_initialize.c | 27 ---------------------------
1 files changed, 0 insertions(+), 27 deletions(-)
diff --git a/src/lib/gssapi/mechglue/g_initialize.c b/src/lib/gssapi/mechglue/g_initialize.c
index 48a825e..c6904e0 100644
--- a/src/lib/gssapi/mechglue/g_initialize.c
+++ b/src/lib/gssapi/mechglue/g_initialize.c
@@ -91,7 +91,6 @@ static gss_mech_info g_mechListTail = NULL;
static k5_mutex_t g_mechListLock = K5_MUTEX_PARTIAL_INITIALIZER;
static time_t g_confFileModTime = (time_t)0;
-static time_t g_mechSetTime = (time_t)0;
static gss_OID_set_desc g_mechSet = { 0, NULL };
static k5_mutex_t g_mechSetLock = K5_MUTEX_PARTIAL_INITIALIZER;
@@ -213,8 +212,6 @@ gss_indicate_mechs(minorStatus, mechSet_out)
OM_uint32 *minorStatus;
gss_OID_set *mechSet_out;
{
- char *fileName;
- struct stat fileInfo;
OM_uint32 status;
/* Initialize outputs. */
@@ -233,16 +230,6 @@ gss_OID_set *mechSet_out;
if (*minorStatus != 0)
return (GSS_S_FAILURE);
- fileName = MECH_CONF;
-
- /*
- * If we have already computed the mechanisms supported and if it
- * is still valid; make a copy and return to caller,
- * otherwise build it first.
- */
- if ((stat(fileName, &fileInfo) == 0 &&
- fileInfo.st_mtime > g_mechSetTime)) {
- } /* if g_mechSet is out of date or not initialized */
if (build_mechSet())
return GSS_S_FAILURE;
@@ -289,20 +276,6 @@ build_mechSet(void)
*/
k5_mutex_lock(&g_mechListLock);
-#if 0
- /*
- * this checks for the case when we need to re-construct the
- * g_mechSet structure, but the mechanism list is upto date
- * (because it has been read by someone calling
- * gssint_get_mechanism)
- */
- if (fileInfo.st_mtime > g_confFileModTime)
- {
- g_confFileModTime = fileInfo.st_mtime;
- loadConfigFile(fileName);
- }
-#endif
-
updateMechList();
/*
--===============0763102197==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5
--===============0763102197==--