1 autofs-5.0.4 - zero s_magic is valid
3 From: Ian Kent <raven@themaw.net>
5 When checking the super magic using the mount control ioctl
6 re-implementation an incorrect assumption is made that s_magic
7 field in the super block will not be zero.
11 lib/dev-ioctl-lib.c | 10 ++++------
12 2 files changed, 5 insertions(+), 6 deletions(-)
15 diff --git a/CHANGELOG b/CHANGELOG
16 index 5f1cf7f..4ed80e0 100644
20 - fix memory leak reading master map.
21 - fix st_remove_tasks() locking.
22 - reset flex scanner when setting buffer.
23 +- zero s_magic is valid.
25 4/11/2008 autofs-5.0.4
26 -----------------------
27 diff --git a/lib/dev-ioctl-lib.c b/lib/dev-ioctl-lib.c
28 index 7c8c433..a034a3d 100644
29 --- a/lib/dev-ioctl-lib.c
30 +++ b/lib/dev-ioctl-lib.c
31 @@ -764,12 +764,10 @@ static int dev_ioctl_ismountpoint(unsigned int logopt,
33 *mountpoint = DEV_IOCTL_IS_MOUNTED;
35 - if (param->ismountpoint.out.magic) {
36 - if (param->ismountpoint.out.magic == AUTOFS_SUPER_MAGIC)
37 - *mountpoint |= DEV_IOCTL_IS_AUTOFS;
39 - *mountpoint |= DEV_IOCTL_IS_OTHER;
41 + if (param->ismountpoint.out.magic == AUTOFS_SUPER_MAGIC)
42 + *mountpoint |= DEV_IOCTL_IS_AUTOFS;
44 + *mountpoint |= DEV_IOCTL_IS_OTHER;
47 free_dev_ioctl_path(param);