From: Theodore Tso Date: Tue, 27 Feb 1996 23:50:45 +0000 (+0000) Subject: accept_sec_context.c (krb5_gss_accept_sec_context): Remove dead code X-Git-Tag: krb5-1.0-beta6~443 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5a0a558c0108244338b2538ff385e9b7df55a566;p=krb5.git accept_sec_context.c (krb5_gss_accept_sec_context): Remove dead code which used geteuid(). Makefile.in (gssapi_err_krb5.$(OBJEXT)): Add Windows production to add file to library. pname_to_uid.c: Don't try to compile pname_to_uid.c for MS-DOS or Macintosh. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7555 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index 87b9ca34a..6f6b86c3d 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,3 +1,14 @@ +Tue Feb 27 17:53:22 1996 Theodore Y. Ts'o + + * accept_sec_context.c (krb5_gss_accept_sec_context): Remove dead + code which used geteuid(). + + * Makefile.in (gssapi_err_krb5.$(OBJEXT)): Add Windows production + to add file to library. + + * pname_to_uid.c: Don't try to compile pname_to_uid.c for MS-DOS + or Macintosh. + Mon Feb 26 18:08:57 1996 Sam Hartman * k5mech.c : do not declare kg_context static as it is declared in another file, and declared extern in a header. diff --git a/src/lib/gssapi/krb5/Makefile.in b/src/lib/gssapi/krb5/Makefile.in index 846e8f19f..2cc9f8733 100644 --- a/src/lib/gssapi/krb5/Makefile.in +++ b/src/lib/gssapi/krb5/Makefile.in @@ -23,6 +23,11 @@ ETHDRS= gssapi_err_krb5.h gssapi_err_krb5.$(OBJEXT): gssapi_err_krb5.c $(CC) $(CFLAGS) -c $*.c @SHARED_RULE_LOCAL@ +##DOS!if defined(LIBNAME) +##DOS!if "$(LIBCMD)"!="rem" +##DOS $(LIBCMD) /nologo $(LIBNAME) -+$@; +##DOS!endif +##DOS!endif gssapi_err_krb5.h: gssapi_err_krb5.et diff --git a/src/lib/gssapi/krb5/accept_sec_context.c b/src/lib/gssapi/krb5/accept_sec_context.c index b083a74f7..7c0d11743 100644 --- a/src/lib/gssapi/krb5/accept_sec_context.c +++ b/src/lib/gssapi/krb5/accept_sec_context.c @@ -23,7 +23,6 @@ #include "gssapiP_krb5.h" #include "rsa-md5.h" #include -#include /* Decode, decrypt and store the forwarded creds in the local ccache. */ static krb5_error_code @@ -96,8 +95,6 @@ krb5_gss_accept_sec_context(ct, minor_status, context_handle, krb5_ticket * ticket = NULL; int option_id; krb5_data option; - char user_id [1024]; - struct passwd *pw_entry; krb5_auth_context auth_context_cred = NULL; @@ -270,9 +267,6 @@ krb5_gss_accept_sec_context(ct, minor_status, context_handle, TREAD_STR(ptr, ptr2, bigend); option.data = (char FAR *) ptr2; - pw_entry = getpwuid(geteuid()); - strcpy(user_id, pw_entry->pw_name); - /* get a temporary auth_context structure for the call to rd_and_store_for_creds() and clear its flags */ diff --git a/src/lib/gssapi/krb5/k5mech.c b/src/lib/gssapi/krb5/k5mech.c index 6f0f35a0c..3855b96f0 100644 --- a/src/lib/gssapi/krb5/k5mech.c +++ b/src/lib/gssapi/krb5/k5mech.c @@ -11,7 +11,6 @@ #include "../mechglue/mglueP.h" #include "gssapiP_krb5.h" - /* * These are the extern declarations, one group per mechanism. They are * contained in the files named _gssd_extern_srvr.conf. diff --git a/src/lib/gssapi/krb5/pname_to_uid.c b/src/lib/gssapi/krb5/pname_to_uid.c index 1da331fb1..0beca8742 100644 --- a/src/lib/gssapi/krb5/pname_to_uid.c +++ b/src/lib/gssapi/krb5/pname_to_uid.c @@ -25,12 +25,14 @@ #include "gssapiP_krb5.h" #include +#if !defined(_MSDOS) && !defined(_MACINTOSH) #ifdef HAVE_STDLIB_H #include #endif #include #include #include +#endif /* !_MSDOS && !_MACINTOSH */ /* * This function will probably get replaced with the gsscred stuff... @@ -44,6 +46,9 @@ gss_OID name_type; gss_OID mech_type; uid_t * uid; { +#if defined(_MSDOS) || defined(_MACINTOSH) + return (0); /* failure */ +#else struct passwd *pw; static unsigned char krb5principalname[] = @@ -85,4 +90,6 @@ uid_t * uid; } else { return(0); } + +#endif }