2008-02-23 15:40:06

by Jindrich Makovicka

[permalink] [raw]
Subject: [PATCH] nfsmount segfault fix


In current nfsmount, two tests of the mount result version are out of
sync. The test in nfs_call_mount() tests the mnt_server->pmap.pm_vers to
decide what mount function (v2 or v3) to call, but later in nfsmount(),
(nfs_pmap->pm_vers == 2) condition is used to decide about the result
format, which is wrong. The result then can be misinterpreted, causing
a segfault, when mnt_pmap->pm_vers==2 and nfs_pmap->pm_vers>2, and
nfsmount tries to read the auth flavors.

Trivial fix is attached.

Jindrich Makovicka

(No filename) (528.00 B)
nfsmount.c.diff (387.00 B)
Download all attachments