|
|
4d476f |
autofs-5.1.3 - revert fix argc off by one in mount_autofs.c
|
|
|
4d476f |
|
|
|
4d476f |
From: Ian Kent <raven@themaw.net>
|
|
|
4d476f |
|
|
|
4d476f |
Commit 6a44f715cf to fix an off by one error in the arguments calculation
|
|
|
4d476f |
when mounting an autofs submount actually introduced an off by one error
|
|
|
4d476f |
instead of fixing one.
|
|
|
4d476f |
|
|
|
4d476f |
Revert the change.
|
|
|
4d476f |
|
|
|
4d476f |
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
|
4d476f |
---
|
|
|
4d476f |
CHANGELOG | 1 +
|
|
|
4d476f |
modules/mount_autofs.c | 8 ++++----
|
|
|
4d476f |
2 files changed, 5 insertions(+), 4 deletions(-)
|
|
|
4d476f |
|
|
|
4d476f |
--- autofs-5.0.7.orig/CHANGELOG
|
|
|
4d476f |
+++ autofs-5.0.7/CHANGELOG
|
|
|
603f99 |
@@ -256,6 +256,7 @@
|
|
|
603f99 |
- fix typos in autofs man pages.
|
|
|
603f99 |
- fix some man page problems.
|
|
|
603f99 |
- allow dot in OPTIONSTR value lexer pattern.
|
|
|
4d476f |
+- revert fix argc off by one in mount_autofs.c.
|
|
|
4d476f |
|
|
|
4d476f |
25/07/2012 autofs-5.0.7
|
|
|
4d476f |
=======================
|
|
|
4d476f |
--- autofs-5.0.7.orig/modules/mount_autofs.c
|
|
|
4d476f |
+++ autofs-5.0.7/modules/mount_autofs.c
|
|
|
4d476f |
@@ -181,11 +181,11 @@ int mount_mount(struct autofs_point *ap,
|
|
|
4d476f |
|
|
|
4d476f |
if (options) {
|
|
|
4d476f |
char *t = options;
|
|
|
4d476f |
- while ((t = strchr(t, ',')) != NULL) {
|
|
|
4d476f |
+ do {
|
|
|
4d476f |
argc++;
|
|
|
4d476f |
if (*t == ',')
|
|
|
4d476f |
t++;
|
|
|
4d476f |
- }
|
|
|
4d476f |
+ } while ((t = strchr(t, ',')) != NULL);
|
|
|
4d476f |
}
|
|
|
4d476f |
argv = (const char **) alloca((argc + 1) * sizeof(char *));
|
|
|
4d476f |
|
|
|
4d476f |
@@ -213,13 +213,13 @@ int mount_mount(struct autofs_point *ap,
|
|
|
4d476f |
|
|
|
4d476f |
if (options) {
|
|
|
4d476f |
p = options;
|
|
|
4d476f |
- while ((p = strchr(p, ',')) != NULL) {
|
|
|
4d476f |
+ do {
|
|
|
4d476f |
if (*p == ',') {
|
|
|
4d476f |
*p = '\0';
|
|
|
4d476f |
p++;
|
|
|
4d476f |
}
|
|
|
4d476f |
argv[argc++] = p;
|
|
|
4d476f |
- }
|
|
|
4d476f |
+ } while ((p = strchr(p, ',')) != NULL);
|
|
|
4d476f |
}
|
|
|
4d476f |
argv[argc] = NULL;
|
|
|
4d476f |
|