-*- Indented-Text -*-

* Logging in to the SMB server

  Because SMB is session-oriented, each request coming from
  the kernel must be handled in a session corresponding to the uid in
  the credentials.

  How should the user authentication be performed?

  + a fixed database with (SMB server, UNIX name) -> (NetBIOS, password)
    mappings.
    - Bad. Passwords should never be kept anywhere in the clear. (But
      SMB servers presumably keep them?)

  + Some means of telling a running smbmount your password for the SMB
    server in question.  
    
    - RPC call. Too complicated? How to distinguish between multiple
      smbmounts running?

    - An "emulated" file in the root directory? *Yes* The smblogin program
      writes to that file, smbmount notices the write, and saves the
      user name and password for later use. THIS IS HOW IT IS DONE.

* Uid and gid mapping

  Several alternatives:

    - A fixed database (text file), read at startup, containing
      mappings.

    - Map only logged-in or users, other uids get NFSERR_ACCES. THIS
      IS HOW IT IS DONE.
