From c3cbcaeb454a24716c583adeb3c49ee206c449f9 Mon Sep 17 00:00:00 2001 From: Ian Kent Date: Sun, 2 Nov 2008 03:13:46 +0000 Subject: [PATCH] - fix two latest patches not applying. --- autofs-5.0.3-fix-bad-alloca-usage.patch | 29 +++++-------------- ....0.3-fix-master-map-lexer-eval-order.patch | 23 +++------------ 2 files changed, 11 insertions(+), 41 deletions(-) diff --git a/autofs-5.0.3-fix-bad-alloca-usage.patch b/autofs-5.0.3-fix-bad-alloca-usage.patch index df664e7..e6aee39 100644 --- a/autofs-5.0.3-fix-bad-alloca-usage.patch +++ b/autofs-5.0.3-fix-bad-alloca-usage.patch @@ -6,28 +6,13 @@ In the lookup_ghost() function alloca is used within a loop which can lead to stack overflow. --- - CHANGELOG | 1 + daemon/lookup.c | 6 +++++- - 2 files changed, 6 insertions(+), 1 deletions(-) + 1 file changed, 5 insertions(+), 1 deletion(-) -diff --git a/CHANGELOG b/CHANGELOG -index 879380e..07feb29 100644 ---- a/CHANGELOG -+++ b/CHANGELOG -@@ -48,6 +48,7 @@ - - fix $mandir definition in Makefile.conf.in - - fix init script stop function. - - fix master map lexer eval order. -+- fix bad alloca usage. - - 14/01/2008 autofs-5.0.3 - ----------------------- -diff --git a/daemon/lookup.c b/daemon/lookup.c -index 2233ac8..49030e1 100644 ---- a/daemon/lookup.c -+++ b/daemon/lookup.c -@@ -608,7 +608,7 @@ int lookup_ghost(struct autofs_point *ap, const char *root) +--- autofs-5.0.3.orig/daemon/lookup.c ++++ autofs-5.0.3/daemon/lookup.c +@@ -608,7 +608,7 @@ int lookup_ghost(struct autofs_point *ap goto next; } @@ -36,7 +21,7 @@ index 2233ac8..49030e1 100644 if (!fullpath) { warn(ap->logopt, "failed to allocate full path"); goto next; -@@ -619,6 +619,7 @@ int lookup_ghost(struct autofs_point *ap, const char *root) +@@ -619,6 +619,7 @@ int lookup_ghost(struct autofs_point *ap if (ret == -1 && errno != ENOENT) { char *estr = strerror_r(errno, buf, MAX_ERR_BUF); warn(ap->logopt, "stat error %s", estr); @@ -44,7 +29,7 @@ index 2233ac8..49030e1 100644 goto next; } -@@ -627,6 +628,7 @@ int lookup_ghost(struct autofs_point *ap, const char *root) +@@ -627,6 +628,7 @@ int lookup_ghost(struct autofs_point *ap char *estr = strerror_r(errno, buf, MAX_ERR_BUF); warn(ap->logopt, "mkdir_path %s failed: %s", fullpath, estr); @@ -52,7 +37,7 @@ index 2233ac8..49030e1 100644 goto next; } -@@ -634,6 +636,8 @@ int lookup_ghost(struct autofs_point *ap, const char *root) +@@ -634,6 +636,8 @@ int lookup_ghost(struct autofs_point *ap me->dev = st.st_dev; me->ino = st.st_ino; } diff --git a/autofs-5.0.3-fix-master-map-lexer-eval-order.patch b/autofs-5.0.3-fix-master-map-lexer-eval-order.patch index 3db38e3..750bcf8 100644 --- a/autofs-5.0.3-fix-master-map-lexer-eval-order.patch +++ b/autofs-5.0.3-fix-master-map-lexer-eval-order.patch @@ -7,28 +7,13 @@ analyser lack brackets which leads to an evaluation order error in some versions of flex. --- - CHANGELOG | 1 + lib/master_tok.l | 4 ++-- - 2 files changed, 3 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/CHANGELOG b/CHANGELOG -index 8cdaab2..879380e 100644 ---- a/CHANGELOG -+++ b/CHANGELOG -@@ -47,6 +47,7 @@ - - fix incorrect pthreads condition handling for expire requests. - - fix $mandir definition in Makefile.conf.in - - fix init script stop function. -+- fix master map lexer eval order. - - 14/01/2008 autofs-5.0.3 - ----------------------- -diff --git a/lib/master_tok.l b/lib/master_tok.l -index d2c86bc..801aa6f 100644 ---- a/lib/master_tok.l -+++ b/lib/master_tok.l -@@ -99,7 +99,7 @@ DNSERVSTR1 ([[:alpha:]][[:alnum:]\-.]*(:[0-9]+)?:) +--- autofs-5.0.3.orig/lib/master_tok.l ++++ autofs-5.0.3/lib/master_tok.l +@@ -99,7 +99,7 @@ DNSERVSTR1 ([[:alpha:]][[:alnum:]\-.]*(: DNSERVSTR2 (\/\/[[:alpha:]][[:alnum:]\-.]*(:[0-9]+)?\/) DNSERVSTR3 (([[:digit:]]{1,3}\.){3}[[:digit:]]{1,3}(:[0-9]+)?:) DNSERVSTR4 (\/\/([[:digit:]]{1,3}\.){3}[[:digit:]]{1,3}(:[0-9]+)?\/)