mtools: floppyd
1
1 4.1 Floppyd
1 ===========
1
1 `Floppyd' is used as a server to grant access to the floppy drive to
1 clients running on a remote machine, just as an X server grants access
1 to the display to remote clients. It has the following syntax:
1
1 `floppyd' [`-d'] [`-l'] [`-s' PORT] [`-r' USER] [`-b' IPADDR] [`-x'
1 DISPLAY] DEVICENAMES
1
1 `floppyd' is always associated with an X server. It runs on the
1 same machine as its X server, and listens on port 5703 and above.
1
1 4.1.1 Authentication
1 --------------------
1
1 `floppyd' authenticates remote clients using the `Xauthority' protocol.
1 Xhost authentication is not supported. Each floppyd is associated with
1 an X server. When a remote client attempts to connect to floppyd, it
1 sends floppyd the X authority record corresponding to floppyd's X
1 server. Floppyd in turn then tries to open up a connection to the X
1 server in order to verify the authenticity of the xauth record. If the
1 connection to the X server succeeds, the client is granted access.
1 `DISPLAY'.
1
1 *Caution*: In order to make authentication work correctly, the local
1 host should *not* be listed in the `xhost' list of allowed hosts.
1 Indeed, hosts listed in `xhost' do not need a correct `Xauthority'
1 cookie to connect to the X server. As `floppyd' runs on the same host
1 as the X server, all its probe connection would succeed even for
1 clients who supplied a bad cookie. This means that your floppy drive
1 would be open to the world, i.e. a huge security hole. If your X
1 server does not allow you to remove `localhost:0' and `:0' from the
1 `xhost' list, you can prevent floppyd from probing those display names
1 with the `-l' option.
1
1 4.1.2 Command line options
1 --------------------------
1
1 `d'
1 Daemon mode. Floppyd runs its own server loop. Do not supply this
1 if you start floppyd from `inetd.conf'
1
1 `s PORT'
1 Port number for daemon mode. Default is 5703 + DISPLAYNUMBER.
1 This flag implies daemon mode. For example, for display
1 `hitchhiker:5', the port would be 5708.
1
1 `b IPADDR'
1 Bind address (for multi homed hosts). This flag implies daemon mode
1
1 `r USER'
1 Run the server under as the given user
1
1 `x DISPLAY'
1 X display to use for authentication. By default, this is taken
1 from the `DISPLAY' variable. If neither the `x' attribute is
1 present nor `DISPLAY' is set, floppyd uses `:0.0'.
1
1 DEVICENAMES is a list of device nodes to be opened. Default is
1 `/dev/fd0'. Multiple devices are only supported on mtools versions
1 newer than 3.9.11.
1
1 4.1.3 Connecting to floppyd
1 ---------------------------
1
1 In order to use floppyd, add the flag `remote' to the device
1 description in your `~/.mtoolsrc' file. If the flag `remote' is given,
1 the `file' parameter of the device description is taken to be a remote
1 address. It's format is the following:
1 HOSTNAME`:'DISPLAYNUMBER[`/'[BASEPORT][`/'DRIVE]]. When using this
1 entry, mtools connects to port BASEPORT+DISPLAYNUMBER at HOSTNAME. By
1 default BASEPORT is 5703. The drive parameter is to distinguish among
1 multiple drives associated with a single display (only mtools versions
1 more recent than 3.9.11)
1
1 4.1.4 Examples:
1 ---------------
1
1 The following starts a floppy daemon giving access to `/dev/fd0',
1 listening on the default port 5703, tied to the default X servers:
1
1 floppyd -d /dev/fd0
1
1 Each of the following starts a floppy daemon giving access to
1 `/dev/fd1', tied to the :1 local X servers, and listening on port 5704.
1 We assume that the local host is named `hitchhiker'.
1
1 floppyd -d /dev/fd0
1 floppyd -d -x :1 -p 5704 /dev/fd0
1
1 If you want to start floppyd by `inetd' instead of running it as a
1 daemon, insert the following lines into `/etc/services':
1 # floppy daemon
1 floppyd-0 5703/tcp # floppy daemon for X server :0
1 floppyd-1 5704/tcp # floppy daemon for X server :1
1
1 And insert the following into `/etc/inetd.conf' (assuming that you
1 have defined a user named floppy in your `/etc/passwd'):
1
1 # floppy daemon
1 floppyd-0 stream tcp wait floppy /usr/sbin/floppyd floppyd /dev/fd0
1 floppyd-1 stream tcp wait floppy /usr/sbin/floppyd floppyd -x :1 /dev/fd0
1
1 Note that you need to supply the X display names for the second
1 floppyd. This is because the port is opened by inetd.conf, and hence
1 floppyd cannot know its number to interfere the display number.
1
1 On the client side, insert the following into your `~/.mtoolsrc' to
1 define a drive letter accessing floppy drive in your X terminal:
1 drive x: file="$DISPLAY" remote
1
1 If your X terminal has more than one drive, you may access the
1 additional drives as follows:
1 drive y: file="$DISPLAY//1" remote
1 drive z: file="$DISPLAY//2" remote
1