From: Miro Jurisic Date: Fri, 22 Jan 1999 21:21:42 +0000 (+0000) Subject: Resource chain mangling fix X-Git-Tag: krb5-1.1-beta1~404 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a4ea51099df2366f56b359980e70a0b4aa9e0808;p=krb5.git Resource chain mangling fix git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11120 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/DNR.c b/src/lib/krb5/os/DNR.c index e44146db1..2a9b2da88 100644 --- a/src/lib/krb5/os/DNR.c +++ b/src/lib/krb5/os/DNR.c @@ -232,12 +232,17 @@ short OpenOurRF(void) OSErr OpenResolver(char *fileName) { short refnum; + short saveResFile; OSErr rc; if (gDNRCodePtr != nil) /* resolver already loaded in */ return(noErr); + /* Remember the resource file so that we do not switch current res file + under the caller */ + saveResFile = CurResFile (); + /* open the MacTCP driver to get DNR resources. Search for it based on creator & type rather than simply file name */ refnum = OpenOurRF(); @@ -250,6 +255,7 @@ OSErr OpenResolver(char *fileName) if (gDNRCodeHndl == nil) { /* can't open DNR */ + UseResFile (saveResFile); return(ResError()); } @@ -276,6 +282,8 @@ OSErr OpenResolver(char *fileName) DisposeHandle(gDNRCodeHndl); gDNRCodePtr = nil; } + + UseResFile (saveResFile); return(rc); }