From: Keith Vetter <keithv@fusion.com>
Date: Thu, 27 Apr 1995 18:46:48 +0000 (+0000)
Subject: Added PC support for the new profile config file
X-Git-Tag: krb5-1.0-beta5~198
X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=180aa91de97661e98020a919e679001fe0569954;p=krb5.git

Added PC support for the new profile config file

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5554 dc483132-0cff-0310-8789-dd5450dbe970
---

diff --git a/src/lib/ChangeLog b/src/lib/ChangeLog
index de6e5773c..a5feb1d2e 100644
--- a/src/lib/ChangeLog
+++ b/src/lib/ChangeLog
@@ -1,3 +1,7 @@
+Wed Apr 27 11:00:00 1995 Keith Vetter (keithv@fusion.com)
+
+	* Makefile.in: need to include profile.lib in the DLL.
+
 Thu Apr 27 13:32:35 1995  Mark Eichin  <eichin@cygnus.com>
 
 	* configure.in: add kdb4 directory.
diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in
index c0dc55306..ed333e419 100644
--- a/src/lib/Makefile.in
+++ b/src/lib/Makefile.in
@@ -31,8 +31,9 @@ CLIB  = crypto\crypto.lib
 KLIB  = krb5\krb5.lib
 GLIB  = gssapi\gssapi.lib
 ETLIB = $(BUILDTOP)\util\et\comerr.lib
+PLIB  = $(BUILDTOP)\util\profile\profile.lib
 WLIB  = .\winsock.lib
-LIBS  = $(CLIB) $(KLIB) $(GLIB) $(ETLIB) $(WLIB)
+LIBS  = $(CLIB) $(KLIB) $(GLIB) $(ETLIB) $(PLIB) $(WLIB)
 
 lib-windows: winsock.lib libkrb5.lib gssapi.lib 
 
@@ -68,7 +69,7 @@ all-windows::
 	@echo Making in lib\des425
 	cd ..\des425
 	-$(MAKE) -$(MFLAGS) LIBCMD=$(LIBCMD)
-	@echo Making locally
+	@echo Making in lib
 	cd ..
 
 all-windows:: libkrb5.lib gssapi.lib
@@ -86,6 +87,6 @@ clean-windows::
 	@echo Making clean in lib\des425
 	cd ..\des425
 	-$(MAKE) -$(MFLAGS) clean
-	@echo Making clean locally
+	@echo Making clean in lib
 	cd ..
 
diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog
index cba427811..f41e7e7be 100644
--- a/src/lib/krb5/krb/ChangeLog
+++ b/src/lib/krb5/krb/ChangeLog
@@ -1,3 +1,7 @@
+Wed Apr 27 11:30:00 1995 Keith Vetter (keithv@fusion.com)
+
+	* init_ctx.c: krb5_init_context wasn't checking return values.
+	* mk_req.c: deleted unused local variable.
 
 Wed Apr 26 22:49:18 1995  Chris Provenzano  (proven@mit.edu)
 
diff --git a/src/lib/krb5/krb/mk_req.c b/src/lib/krb5/krb/mk_req.c
index 48b72c5af..9f1cd6354 100644
--- a/src/lib/krb5/krb/mk_req.c
+++ b/src/lib/krb5/krb/mk_req.c
@@ -64,7 +64,6 @@ krb5_mk_req(context, auth_context, ap_req_options, service, hostname, in_data,
     krb5_principal	  server;
     krb5_creds 		* credsp;
     krb5_creds 		  creds;
-    char	       ** realm;
 
     retval = krb5_sname_to_principal(context, hostname, service, 
 				     KRB5_NT_SRV_HST, &server);
diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog
index bffe61e67..a9537ef8d 100644
--- a/src/lib/krb5/os/ChangeLog
+++ b/src/lib/krb5/os/ChangeLog
@@ -1,3 +1,8 @@
+Wed Apr 27 11:30:00 1995 Keith Vetter (keithv@fusion.com)
+
+	* osconfig.c: krb5_find_config_files only used for OLD_CONFIG_FILES.
+	* init_os_.c: Get config file location via windows ini files.
+
 Thu Apr 27 13:04:54 1995  Ezra Peisach  <epeisach@kangaroo.mit.edu>
 
 	* Makefile.in (clean): Remove t_std_conf.o 
diff --git a/src/lib/krb5/os/init_os_ctx.c b/src/lib/krb5/os/init_os_ctx.c
index fc7737d37..bb742b157 100644
--- a/src/lib/krb5/os/init_os_ctx.c
+++ b/src/lib/krb5/os/init_os_ctx.c
@@ -23,6 +23,7 @@
  * krb5_init_contex()
  */
 
+#define NEED_WINDOWS
 #include "k5-int.h"
 
 krb5_error_code
@@ -30,7 +31,7 @@ krb5_os_init_context(ctx)
 	krb5_context ctx;
 {
 	krb5_os_context os_ctx;
-	krb5_error_code	retval;
+	krb5_error_code	retval = 0;
 	char *name;
 	const char *filenames[2];
 	
@@ -46,6 +47,24 @@ krb5_os_init_context(ctx)
 	ctx->os_context = (void *) os_ctx;
 
 #ifndef OLD_CONFIG_FILES
+#ifdef _WINDOWS
+    {
+        char defname[160];                      /* Default value */
+        char krb5conf[160];                     /* Actual value */
+
+        GetWindowsDirectory(defname, sizeof(defname) - 10);
+        strcat (defname, "\\");
+        strcat (defname, DEFAULT_PROFILE_FILENAME);
+        GetPrivateProfileString(INI_FILES, INI_KRB5_CONF, defname,
+            krb5conf, sizeof(krb5conf), KERBEROS_INI);
+        name = krb5conf;
+
+        filenames[0] = name;
+        filenames[1] = 0;
+    }
+
+#else /* _WINDOWS */
+
 	/*
 	 * When the profile routines are later enhanced, we will try
 	 * including a config file from user's home directory here.
@@ -54,12 +73,14 @@ krb5_os_init_context(ctx)
 	filenames[0] = name ? name : DEFAULT_PROFILE_FILENAME;
 	filenames[1] = 0;
 
+#endif /* _WINDOWS */
+
 	retval = profile_init(filenames, &ctx->profile);
 	if (retval)
 	    ctx->profile = 0;
 #endif
-	
-	return 0;
+
+	return retval;
 }
 
 void
diff --git a/src/lib/krb5/os/osconfig.c b/src/lib/krb5/os/osconfig.c
index 31f9570fb..ce6bdbc0d 100644
--- a/src/lib/krb5/os/osconfig.c
+++ b/src/lib/krb5/os/osconfig.c
@@ -24,7 +24,9 @@
  * Definition of default configuration parameters.
  */
 
+#ifdef OLD_CONFIG_FILES
 #define NEED_WINDOWS
+#endif
 #include "k5-int.h"
 
 char *krb5_config_file = DEFAULT_CONFIG_FILENAME;
@@ -42,6 +44,7 @@ int krb5_skdc_timeout_1 = SKDC_TIMEOUT_1;
 char *krb5_default_pwd_prompt1 = DEFAULT_PWD_STRING1;
 char *krb5_default_pwd_prompt2 = DEFAULT_PWD_STRING2;
 
+#ifdef OLD_CONFIG_FILES
 /*
  * On Windows, we want to let the user specify in the kerberos.ini file
  * where the config and realms files, krb.con and krb.rea, reside. If they
@@ -79,3 +82,5 @@ krb5_find_config_files ()
 
     return 0;
 }
+#endif /* OLD_CONFIG_FILES */
+