From 54faf415560c7e317998481cc163948ff631341c Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Wed, 18 Oct 2006 21:36:40 +0000 Subject: [PATCH] add newlines after new errors --- kadmind.init | 4 +-- krb5-1.5-kt_default_name.patch | 46 ++++++++++++++++++++++++++++++++++ krb5.spec | 18 ++++++++----- 3 files changed, 60 insertions(+), 8 deletions(-) create mode 100644 krb5-1.5-kt_default_name.patch diff --git a/kadmind.init b/kadmind.init index c63f12e..2b22a77 100755 --- a/kadmind.init +++ b/kadmind.init @@ -30,11 +30,11 @@ RETVAL=0 # Shell functions to cut down on useless shell instances. start() { if [ ! -f /var/kerberos/krb5kdc/principal ] ; then - echo -n $"Error. Default principal database does not exist." + echo $"Error. Default principal database does not exist." exit 0 fi if [ -f /var/kerberos/krb5kdc/kpropd.acl ] ; then - echo -n $"Error. This appears to be a slave server, found kpropd.acl" + echo $"Error. This appears to be a slave server, found kpropd.acl" exit 0 else if [ ! -f /var/kerberos/krb5kdc/kadm5.keytab ] ; then diff --git a/krb5-1.5-kt_default_name.patch b/krb5-1.5-kt_default_name.patch new file mode 100644 index 0000000..59fb02b --- /dev/null +++ b/krb5-1.5-kt_default_name.patch @@ -0,0 +1,46 @@ +--- krb5-1.5/src/kadmin/cli/kadmin.c.kt_default_name 2006-10-18 14:13:18.000000000 -0400 ++++ krb5-1.5/src/kadmin/cli/kadmin.c 2006-10-18 14:13:35.000000000 -0400 +@@ -533,15 +533,6 @@ + exit(1); + } + +- /* register the WRFILE keytab type and set it as the default */ +- { +-#define DEFAULT_KEYTAB "WRFILE:/etc/krb5.keytab" +- /* XXX krb5_defkeyname is an internal library global and +- should go away */ +- extern char *krb5_defkeyname; +- krb5_defkeyname = DEFAULT_KEYTAB; +- } +- + return query; + } + +--- krb5-1.5/src/kadmin/cli/keytab.c.kt_default_name 2006-10-18 14:07:36.000000000 -0400 ++++ krb5-1.5/src/kadmin/cli/keytab.c 2006-10-18 14:51:21.000000000 -0400 +@@ -69,15 +69,20 @@ + krb5_keytab *keytab) + { + int code; ++ char filename[FILENAME_MAX]; + + if (*keytab_str == NULL) { +- /* XXX krb5_defkeyname is an internal library global and +- should go away */ +- if (! (*keytab_str = strdup(krb5_defkeyname))) { +- com_err(whoami, ENOMEM, "while creating keytab name"); ++ code = krb5_kt_default_name(my_context, filename, sizeof(filename)); ++ if (code != 0) { ++ com_err(whoami, code, "while determining default keytab name"); ++ return 1; ++ } ++ *keytab_str = strdup(filename); ++ if (*keytab_str == NULL) { ++ com_err(whoami, ENOMEM, "while creating default keytab name"); + return 1; + } +- code = krb5_kt_default(my_context, keytab); ++ code = krb5_kt_resolve(my_context, *keytab_str, keytab); + if (code != 0) { + com_err(whoami, code, "while opening default keytab"); + free(*keytab_str); diff --git a/krb5.spec b/krb5.spec index 22c9a50..c858f00 100644 --- a/krb5.spec +++ b/krb5.spec @@ -10,7 +10,7 @@ Summary: The Kerberos network authentication system. Name: krb5 Version: 1.5 -Release: 9 +Release: 9.99999 # Maybe we should explode from the now-available-to-everybody tarball instead? # http://web.mit.edu/kerberos/dist/krb5/1.5/krb5-1.5-signed.tar Source0: krb5-%{version}.tar.gz @@ -134,6 +134,7 @@ workstation. %changelog * Wed Oct 18 2006 Nalin Dahyabhai - 1.5-10 +- rename krb5.sh and krb5.csh so that they don't overlap (#210623) - way-late application of added error info in kadmind.init (#65853) * Mon Oct 9 2006 Nalin Dahyabhai - 1.5-9 @@ -1060,7 +1061,12 @@ install -m 644 $RPM_SOURCE_DIR/kadm5.acl $RPM_BUILD_ROOT%{_var}/kerberos/krb5kdc # Login-time scriptlets to fix the PATH variable. mkdir -p $RPM_BUILD_ROOT/etc/profile.d install -m 644 $RPM_SOURCE_DIR/krb5.conf $RPM_BUILD_ROOT/etc/krb5.conf -install -m 755 $RPM_SOURCE_DIR/krb5.{sh,csh} $RPM_BUILD_ROOT/etc/profile.d/ +for subpackage in devel workstation ; do + install -m 755 $RPM_SOURCE_DIR/krb5.sh \ + $RPM_BUILD_ROOT/etc/profile.d/krb5-${subpackage}.sh + install -m 755 $RPM_SOURCE_DIR/krb5.csh \ + $RPM_BUILD_ROOT/etc/profile.d/krb5-${subpackage}.csh +done # Server init scripts. mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d @@ -1165,8 +1171,8 @@ fi %files workstation %defattr(-,root,root) -%config(noreplace) /etc/profile.d/krb5.sh -%config(noreplace) /etc/profile.d/krb5.csh +%config(noreplace) /etc/profile.d/krb5-workstation.sh +%config(noreplace) /etc/profile.d/krb5-workstation.csh %config(noreplace) /etc/xinetd.d/* @@ -1313,8 +1319,8 @@ fi %files devel %defattr(-,root,root) -%config(noreplace) /etc/profile.d/krb5.sh -%config(noreplace) /etc/profile.d/krb5.csh +%config(noreplace) /etc/profile.d/krb5-devel.sh +%config(noreplace) /etc/profile.d/krb5-devel.csh %docdir %{krb5prefix}/man %doc doc/api/*.pdf