Implementing new features in samba and smbfs

Urban Widmark urban at
Thu Jan 24 06:13:01 GMT 2002

On Thu, 24 Jan 2002, Andrew Bartlett wrote:

> John Newbigin wrote:
> > 
> > I am looking at the feasibility of adding some features to the SMB
> > protocol to allow UNIX file information so the linux smbfs can access
> > things like the file mode and possibly the user and group id.
> The server side has been done.  HP had 'CIFS Unix extenstions' in their
> version of Samba (known as CIFS/9000) for a while, and Jeremy has ported
> it to 2.2 and HEAD (at least in part) in the last few weeks.

Has it been merged or is it in the process of being merged?

> I'm sure any work on smbfs would be very much apprciated - but contact
> the maintainer.

Hey! That's me!

John, what you want and more (device nodes, symlinks, hard links) is
covered by the "CIFS Extensions for UNIX systems v2.0" (use google).

Don't know how much you have done but ...

The spec adds a SMB_QUERY_FILE_UNIX_BASIC "infolevel" to the protocol.

To do the things you listed you need to make smbfs read this and that is
done by adding the infolevel to smb_proc_readdir_long() and
smb_decode_long_dirent(). Also look at the getattr variants.

Changing ownership and permissions is done by smb_notify_change(). It
needs to be told when it can do that and then add a new setattr().

The spec describes how to detect that a server supports these extensions,
it's just a bit in the capabilities word.


More information about the samba-technical mailing list