|
|
23b4c9 |
autofs-5.1.2 - fix _strncmp() usage
|
|
|
23b4c9 |
|
|
|
23b4c9 |
From: Ian Kent <raven@themaw.net>
|
|
|
23b4c9 |
|
|
|
23b4c9 |
A change to fix nfs mount options changed to using a custom strncmp()
|
|
|
23b4c9 |
function.
|
|
|
23b4c9 |
|
|
|
23b4c9 |
While the usage of the function is correct in the nfs and bind mount
|
|
|
23b4c9 |
modules it isn't correct in the autofs and ext2 mount modules.
|
|
|
23b4c9 |
|
|
|
23b4c9 |
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
|
23b4c9 |
---
|
|
|
23b4c9 |
CHANGELOG | 1 +
|
|
|
23b4c9 |
modules/mount_autofs.c | 12 ++++++------
|
|
|
23b4c9 |
modules/mount_ext2.c | 2 +-
|
|
|
23b4c9 |
3 files changed, 8 insertions(+), 7 deletions(-)
|
|
|
23b4c9 |
|
|
|
23b4c9 |
--- autofs-5.0.7.orig/CHANGELOG
|
|
|
23b4c9 |
+++ autofs-5.0.7/CHANGELOG
|
|
|
23b4c9 |
@@ -221,6 +221,7 @@
|
|
|
23b4c9 |
- fix short memory allocation in lookup_amd_instance().
|
|
|
23b4c9 |
- fix count_mounts() function.
|
|
|
23b4c9 |
- fix argc off by one in mount_autofs.c.
|
|
|
23b4c9 |
+- fix _strncmp() usage.
|
|
|
23b4c9 |
|
|
|
23b4c9 |
25/07/2012 autofs-5.0.7
|
|
|
23b4c9 |
=======================
|
|
|
23b4c9 |
--- autofs-5.0.7.orig/modules/mount_autofs.c
|
|
|
23b4c9 |
+++ autofs-5.0.7/modules/mount_autofs.c
|
|
|
23b4c9 |
@@ -121,17 +121,17 @@ int mount_mount(struct autofs_point *ap,
|
|
|
23b4c9 |
while (*comma != '\0' && *comma != ',')
|
|
|
23b4c9 |
comma++;
|
|
|
23b4c9 |
|
|
|
23b4c9 |
- if (_strncmp(cp, "nobrowse", 8) == 0)
|
|
|
23b4c9 |
+ if (_strncmp("nobrowse", cp, 8) == 0)
|
|
|
23b4c9 |
ghost = 0;
|
|
|
23b4c9 |
- else if (_strncmp(cp, "nobind", 6) == 0)
|
|
|
23b4c9 |
+ else if (_strncmp("nobind", cp, 6) == 0)
|
|
|
23b4c9 |
nobind = 1;
|
|
|
23b4c9 |
- else if (_strncmp(cp, "browse", 6) == 0)
|
|
|
23b4c9 |
+ else if (_strncmp("browse", cp, 6) == 0)
|
|
|
23b4c9 |
ghost = 1;
|
|
|
23b4c9 |
- else if (_strncmp(cp, "symlink", 7) == 0)
|
|
|
23b4c9 |
+ else if (_strncmp("symlink", cp, 7) == 0)
|
|
|
23b4c9 |
symlnk = 1;
|
|
|
23b4c9 |
- else if (_strncmp(cp, "hosts", 5) == 0)
|
|
|
23b4c9 |
+ else if (_strncmp("hosts", cp, 5) == 0)
|
|
|
23b4c9 |
hosts = 1;
|
|
|
23b4c9 |
- else if (_strncmp(cp, "timeout=", 8) == 0) {
|
|
|
23b4c9 |
+ else if (_strncmp("timeout=", cp, 8) == 0) {
|
|
|
23b4c9 |
char *val = strchr(cp, '=');
|
|
|
23b4c9 |
unsigned tout;
|
|
|
23b4c9 |
if (val) {
|
|
|
23b4c9 |
--- autofs-5.0.7.orig/modules/mount_ext2.c
|
|
|
23b4c9 |
+++ autofs-5.0.7/modules/mount_ext2.c
|
|
|
23b4c9 |
@@ -82,7 +82,7 @@ int mount_mount(struct autofs_point *ap,
|
|
|
23b4c9 |
|
|
|
23b4c9 |
if (options && options[0]) {
|
|
|
23b4c9 |
for (p = options; (p1 = strchr(p, ',')); p = p1)
|
|
|
23b4c9 |
- if (!_strncmp(p, "ro", p1 - p) && ++p1 - p == sizeof("ro"))
|
|
|
23b4c9 |
+ if (!_strncmp("ro", p, p1 - p) && ++p1 - p == sizeof("ro"))
|
|
|
23b4c9 |
ro = 1;
|
|
|
23b4c9 |
if (!strcmp(p, "ro"))
|
|
|
23b4c9 |
ro = 1;
|