~ubuntu-branches/ubuntu/hardy/klibc/hardy-updates

« back to all changes in this revision

Viewing changes to usr/kinit/nfsmount/README.locking

  • Committer: Bazaar Package Importer
  • Author(s): Jeff Bailey
  • Date: 2006-01-04 20:24:52 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060104202452-ec4v3n829rymukuv
Tags: 1.1.15-0ubuntu1
* New upstream version.

* Patch to fix compilation on parisc64 kernels.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
I have implemented portmap spoofing in klibc nfsmount (released as
 
2
klibc-0.144) This is basically a vestigial portmap daemon which gets
 
3
launched before the mount() call and then just records any
 
4
transactions it gets to a file and sends back an affirmative reply.
 
5
 
 
6
There are two ways to use it (this belongs in a README file, but it's
 
7
too late at night right now):
 
8
 
 
9
a) Set a fixed portnumber in /proc/sys/nfs/nlm_tcpport and
 
10
/proc/sys/nfs/nlm_udpport before calling nfsmount; once the portmapper
 
11
starts feed that fixed portnumber to pmap_set(8).  In this case the
 
12
pmap_file can be /dev/null.
 
13
 
 
14
b) Allow the kernel to bind to any port and use the file produced by
 
15
nfsroot to feed to pmap_set (it should be directly compatible); this
 
16
means the file needs to be transferred to a place where the "real
 
17
root" can find it before run-init.
 
18
 
 
19
In either case, it is imperative that the real portmapper is launched
 
20
before any program actually tries to create locks!
 
21
 
 
22
To use it:
 
23
 
 
24
        # We need the loopback device to be up before we do this!
 
25
        ipconfig 127.0.0.1:::::lo:none
 
26
        nfsroot -p pmap_file -o lock server:/pathname /realpath
 
27