Reply to my own post ...
Petric Frank schrieb:
> Hello Alexander,
> > >But how is Samba doing it ?
> > >As i digged out recently you can do a
> > > mount -t smbfs //MACHINE/SHARE <mount point>
> > Do strace on it. You'll see that it's special-cased in mount - it
> > calls a separate helper (mount.smb) which passes it in the same
> > way normal mount would pass -o <options>.
> I'll have a look to the mount source. I've seen a file named mount.smbfs
> which does the mount for samba.
> Maybe there is a generic rule in mount to call mount.<filesystem> if
> available ...
The generic rule is indeed the one i thought above.
mount is searching for a /bin/mount.<filesystem> file and if it is there
he calls it.
Here (in my distribution) it calls in case of samba the script
mount.smbfs which calls smbmount.
This one converts the parameters and calls smbmnt.
smbmnt does a system call mount (see man 2 mount) which passes in the
first parameter '//MACHINE/SHARE' (as like the original mount does).
Here i am stuck actually. I was not able to find the source of this
function. Is there anyone here in this echo which can give me a hint
where to find it ?