[PATCH 1/3] Fix handling of explicit uuid | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
Fix a couple of bugs which show up if you try to explicitly set a
16-byte UUID when exporting a file system. First, exportfs cuts the
first two bytes off the UUID and writes something invalid to etab.
Second, mountd writes the _ascii_ form of the UUID to the kernel,
instead of converting it to hex.
Signed-off-by: David Woodhouse <David.Woodhouse@xxxxxxxxx>
---
support/nfs/exports.c | 2 +-
utils/mountd/cache.c | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/support/nfs/exports.c b/support/nfs/exports.c
index 525e5b1..334c08e 100644
--- a/support/nfs/exports.c
+++ b/support/nfs/exports.c
@@ -595,7 +595,7 @@ bad_option:
if (opt[5]!='\0' && *oe == '\0')
ep->e_flags |= NFSEXP_FSID;
else if (valid_uuid(opt+5))
- ep->e_uuid = strdup(opt+7);
+ ep->e_uuid = strdup(opt+5);
else {
xlog(L_ERROR, "%s: %d: bad fsid \"%s\"\n",
flname, flline, opt);
diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
index f555dcc..cd377ce 100644
--- a/utils/mountd/cache.c
+++ b/utils/mountd/cache.c
@@ -590,8 +590,10 @@ static int dump_to_cache(FILE *f, char *domain, char *path, struct exportent *ex
qword_printhex(f, u, 16);
}
} else {
+ char u[16];
+ get_uuid(NULL, exp->e_uuid, 16, u);
qword_print(f, "uuid");
- qword_printhex(f, exp->e_uuid, 16);
+ qword_printhex(f, u, 16);
}
#endif
}
--
1.5.5.1
--
David Woodhouse Open Source Technology Centre
David.Woodhouse@xxxxxxxxx Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Site Home] [Kernel Newbies] [UNIX Filesystems] [Share Photos] [Security] [Netfilter] [Bugtraq] [Rubini] [Photo] [Yosemite] [Yosemite News] [MIPS Linux] [ARM Linux] [Linux Security] [Linux Ext4 Filesystem] [Linux Cachefs] [Reiser Filesystem] [Linux RAID] [Samba] [Video 4 Linux] [Device Mapper] [Linux Resources]
![]() |