From 20ded2bb32464ad2490d642367173101e1324f49 Mon Sep 17 00:00:00 2001 From: Ian Kent Date: Wed, 20 Jun 2007 04:06:30 +0000 Subject: [PATCH] - include krb5.h in lookup_ldap.h (some openssl doesn't implicitly include it). - correct initialization of local var in parse_server_string. --- autofs-5.0.2-add-krb5-include.patch | 12 +++++++++++ autofs-5.0.2-bad-proto-init.patch | 31 +++++++++++++++++++++++++++++ autofs.spec | 10 +++++++++- 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 autofs-5.0.2-add-krb5-include.patch create mode 100644 autofs-5.0.2-bad-proto-init.patch diff --git a/autofs-5.0.2-add-krb5-include.patch b/autofs-5.0.2-add-krb5-include.patch new file mode 100644 index 0000000..acec593 --- /dev/null +++ b/autofs-5.0.2-add-krb5-include.patch @@ -0,0 +1,12 @@ +diff --git a/include/lookup_ldap.h b/include/lookup_ldap.h +index e1c5b4e..0a9deca 100644 +--- a/include/lookup_ldap.h ++++ b/include/lookup_ldap.h +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + #endif + + struct lookup_context { diff --git a/autofs-5.0.2-bad-proto-init.patch b/autofs-5.0.2-bad-proto-init.patch new file mode 100644 index 0000000..ce446bc --- /dev/null +++ b/autofs-5.0.2-bad-proto-init.patch @@ -0,0 +1,31 @@ +diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c +index 06506a0..de8d515 100644 +--- a/modules/lookup_ldap.c ++++ b/modules/lookup_ldap.c +@@ -549,7 +549,7 @@ static int parse_server_string(const char *url, struct lookup_context *ctxt) + const char *ptr, *name; + int l, al_len; + +- *proto = '\0'; ++ memset(proto, 0, 9); + ptr = url; + + debug(LOGOPT_NONE, +@@ -620,7 +620,7 @@ static int parse_server_string(const char *url, struct lookup_context *ctxt) + } else if (strchr(ptr, ':') != NULL) { + char *q = NULL; + +- /* Isolate the server(s). Include the port spec */ ++ /* Isolate the server. Include the port spec */ + q = strchr(ptr, ':'); + if (isdigit(*q)) + while (isdigit(*q)) +@@ -633,7 +633,7 @@ static int parse_server_string(const char *url, struct lookup_context *ctxt) + } + + l = q - ptr; +- if (proto) { ++ if (*proto) { + al_len = l + strlen(proto) + 2; + tmp = malloc(al_len); + } else { diff --git a/autofs.spec b/autofs.spec index a5a6d44..dc10f47 100644 --- a/autofs.spec +++ b/autofs.spec @@ -4,12 +4,14 @@ Summary: A tool for automatically mounting and unmounting filesystems Name: autofs Version: 5.0.2 -Release: 1 +Release: 2 Epoch: 1 License: GPL Group: System Environment/Daemons URL: http://wiki.autofs.net/ Source: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}.tar.bz2 +Patch0: autofs-5.0.2-add-krb5-include.patch +Patch1: autofs-5.0.2-bad-proto-init.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel Conflicts: kernel < 2.6.17 @@ -51,6 +53,8 @@ inkludera nÀtfilsystem, CD-ROM, floppydiskar, och sÄ vidare. %prep %setup -q echo %{version}-%{release} > .version +%patch0 -p1 +%patch1 -p1 %build #CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir} @@ -103,6 +107,10 @@ fi %{_libdir}/autofs/ %changelog +* Wed Jun 20 2007 Ian Kent - 5.0.2-2 +- include krb5.h in lookup_ldap.h (some openssl doesn't implicitly include it). +- correct initialization of local var in parse_server_string. + * Mon Jun 18 2007 Ian Kent - 5.0.2-1 - Update to upstream release 5.0.2.