[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: smbmount and PAM



On Mon, 27 Mar 2000, Mihai Ibanescu wrote:

> 	Just my 0.02$: care should be taken to avoid mounting the same
> volume multiple times; also, to decide when a volume should be
> unmounted. Unfortunately, there is no way you can be sure a session is
> closed (logging out cleanly may do, but a crashed connection -- I don't
> know). Maybe you may consider using autofs for this (so that the mount to
> expire after some time). autofs would greatly simplify things, IMHO.

I don't see crashed connections being a problem: so long as the login process
exits normally (i.e., no 'kill -9'), each session will clean up after itself.
The point about unmounting shares that are still in use is well-taken,
however.  I think this can be dealt with in one of two ways, either by
creating a file for storing a reference count and only having the share
unmounted when the refcount reaches zero, and adding a job to the startup
scripts to clean up any Worst Case Scenarios; or by having the PAM module
ignore all errors from mount/umount, and just run a cron job periodically to
unmount any resources that are no longer in use (presuming, of course, that if
the mount point is still in use, the 'umount' will fail).

Steve Langasek
postmodern programmer



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []