- fix handling of quoted slash alone (bz 248943).

This commit is contained in:
Ian Kent 2007-07-20 15:38:21 +00:00
parent a0eb49c1a0
commit f7ea4d066a
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,14 @@
diff --git a/lib/parse_subs.c b/lib/parse_subs.c
index ad19f34..3627f44 100644
--- a/lib/parse_subs.c
+++ b/lib/parse_subs.c
@@ -297,7 +297,8 @@ char *sanitize_path(const char *path, int origlen, unsigned int type, unsigned i
return NULL;
}
- if (origlen > 1 && *(cp - 1) == '/')
+ /* Remove trailing / but watch out for a quoted / alone */
+ if (strlen(cp) > 1 && origlen > 1 && *(cp - 1) == '/')
*(cp - 1) = '\0';
return s_path;

View File

@ -4,7 +4,7 @@
Summary: A tool for automatically mounting and unmounting filesystems
Name: autofs
Version: 5.0.2
Release: 6
Release: 7
Epoch: 1
License: GPL
Group: System Environment/Daemons
@ -17,6 +17,7 @@ Patch3: autofs-5.0.2-add-multi-nsswitch-lookup.patch
Patch4: autofs-5.0.2-fix-offset-dir-create.patch
Patch5: autofs-5.0.2-quote-exports.patch
Patch6: autofs-5.0.2-hi-res-time.patch
Patch7: autofs-5.0.2-quoted-slash-alone.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
@ -65,6 +66,7 @@ echo %{version}-%{release} > .version
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%build
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@ -117,6 +119,9 @@ fi
%{_libdir}/autofs/
%changelog
* Fri Jul 20 2007 Ian Kent <ikent@redhat.com> - 5.0.2-7
- fix handling of quoted slash alone (bz 248943).
* Wed Jul 18 2007 Ian Kent <ikent@redhat.com> - 5.0.2-6
- fix wait time resolution in alarm and state queue handlers (bz 247711).