mount call gives "." as the directory & /proc/mounts doesn't resolve it

Georgina Russell sfbebe at yahoo.com
Fri Dec 1 18:56:11 GMT 2000


BACKGROUND : 
In the samba source code (smbmnt.c) the call to mount
system call gives "." as the mount point (second
argument).  Prior to calling mount, the program
changes into the mount point directory, so "." is in
fact the right directory 

However, the problem is that on linux redhat 6.3.2,
the call to mount results in "." being put into the
/proc/mounts file.   The /etc/mtab file resolves "."
or any other argument be it a symlink, etc, but
/proc/mounts does not. If you run a "df" or "mount" at
the command line, everything looks good.  But when one
takes a look at /proc/mounts, the "." is visible.


This becomes a problem when shutting down a machine
without unmounting the samba filesystems.  The
shutdown routine goes through and kills every process
inside directories left in /proc/mounts.  However, in
the case of an unmounted samba fs, the shutdown
routine tries to remove all process inside ".". 
BADDDDD! :)

I am not sure why the mount call only resolves the
mount point when adding to mtab but not proc.
It probably shouldn't.

BUT WHAT I REALLY WANT TO KNOW RIGHT NOW  :
Is there any good reason why the samba code calls
mount with a "." and not the mount point?   It will be
easier/quicker for me to fix the problem by adjusting
the "." to be the full pathname inside the samba code.


Thanks for any help, 
Georgina



__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/




More information about the samba mailing list