UNIX Extensions: Difference between revisions
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
CAP_UNIX (0x00800000) |
CAP_UNIX (0x00800000) |
||
included in the SMB negotiate protocol response. |
|||
Additional POSIX extensions have been added based on |
Additional POSIX extensions have been added based on |
||
Line 17: | Line 17: | ||
== New File Info (and Path Info) levels == |
== New File Info (and Path Info) levels == |
||
{| |
|||
! Capability !! Value |
|||
|- |
|||
|| QUERY_FILE_UNIX_BASIC || 0x200 |
|| QUERY_FILE_UNIX_BASIC || 0x200 |
||
|- |
|||
|| QUERY_FILE_UNIX_LINUX || 0x201 |
|| QUERY_FILE_UNIX_LINUX || 0x201 |
||
|- |
|||
|| QUERY_POSIX_ACL || 0x204 |
|| QUERY_POSIX_ACL || 0x204 |
||
|- |
|||
|| QUERY_XATTR || 0x205 |
|| QUERY_XATTR || 0x205 |
||
|- |
|||
|| QUERY_ATTR_FLAGS || 0x206 |
|| QUERY_ATTR_FLAGS || 0x206 |
||
|- |
|||
|| QUERY_POSIX_PERMISSION || 0x207 |
|| QUERY_POSIX_PERMISSION || 0x207 |
||
|- |
|||
|| QUERY_POSIX_LOCK || 0x208 |
|| QUERY_POSIX_LOCK || 0x208 |
||
Revision as of 21:57, 1 March 2007
See http://samba.org/samba/CIFS_POSIX_extensions.html
Introduction
The Unix Extensions to the CIFS Protocol have been done in stages. An initial set which included various new infolevels to TRANSACT2 commands in the range from 0x200 to 0x2FF (inclusive), was available when:
CAP_UNIX (0x00800000)
included in the SMB negotiate protocol response.
Additional POSIX extensions have been added based on negotiating individual capabilities on the tree connection (via a Unix QueryFSInfo and SetFSInfo level). Following is a list of the previous levels that were available:
New File Info (and Path Info) levels
Capability | Value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
QUERY_FILE_UNIX_BASIC | 0x200 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
QUERY_FILE_UNIX_LINUX | 0x201 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
QUERY_POSIX_ACL | 0x204 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
QUERY_XATTR | 0x205 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
QUERY_ATTR_FLAGS | 0x206 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
QUERY_POSIX_PERMISSION | 0x207 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
QUERY_POSIX_LOCK | 0x208
Posix OpenThe server specifies it can serve these by returning CIFS_UNIX_POSIX_PATH_OPERATIONS_CAP in the reply to a trans2 qfsinfo (TRANSACT2_QFSINFO 0x03) info level SMB_QUERY_CIFS_UNIX_INFO (0x200) call. All values are little endian. For open, call TRANSACT2_SETPATHINFO (0x06) call info level : SMB_POSIX_PATH_OPEN 0x209 The request data block should be 14 bytes consisting of the following :
Encodings are as follows :
SMB WHOAMIThe SMBWhoami extension is intended to be a lightweight method for a Unix client to be able to display sensible file ownership information. SMBWhoami is performed by requesting a TRANS2_QFSINFO with an info level of SMB_QUERY_POSIX_WHOAMI. There are no parameters passed. The vuid field is implicitly used.
The first two fields of the SMBWhoami response are a set of flags that further describe how the server has mapped the connected user. The mask is returned so that the client can distinguish which flag bits are meaningful.
Note that the list of group IDs and DOM_SIDs are both optional. A server may choose not to return these (eg. if the information is expensive to gather). If these are not returned the corresponding count fields must be zero. UNIX_INFO2The UNIX_INFO2 is an extension to the UNIX_BASIC info level. This info level can be used in FindFirst/FindNext, QueryPathInfo, QueryFileInfo and PosixOpen (but is not restricted to those calls).
The response block for the UNIX_INFO2 level is below. This is deliberately defined to be the same as UNIX_BASIC except for the last 3 fields.
The defined set of file flags is
|