`
`Protocols for X/Open PC lnterworkingz
`SMB, Version 2
`
`THE Open GROUP
`
`Page 1 of 267
`
`Verizon Exhibit 1004
`
`
`
`j iII—fII
`
`
`
`
`
`
`
`
`
`
`
`
`
`Contents
`
`Chapte r
`
`Chapte r
`
`Chapte r
`
`1
`
`1.1
`1.2
`
`1.3
`
`2
`2.1
`2.2
`2.2.1
`2.2.2
`
`3
`
`3.1
`3.2
`
`3.3
`3.3.1
`3.3.2
`3.3.3
`3.4
`
`3.5
`3.5.1
`3.5.2
`
`3.5.3
`3.5.4
`
`3.5.5
`3.6
`
`3.7
`3.7.1
`3.7.2
`3.7.3
`
`3.8
`3.8.1
`3.8.2
`3.9
`3.10
`3.10.1
`3.10.2
`3.1 1
`
`3.12
`
`Introduction................................................................................................ ..
`
`Why Republish ............................................................................................. ..
`This Document ............................................................................................. ..
`
`Overview of Document Layout ................................................................ ..
`
`l\D>—->->-‘
`
`SMB File -sharing Se rvice Model ....................................................
`SMB Protocol Principles ............................................................................. ..
`Security Overview ....................................................................................... ..
`Share—level Security Mode ...................................................................... ..
`User—level Security Mode ........................................................................ ..
`
`SMB Protocol Conve ntions............................................................... ..
`
`Summary of SMBs ....................................................................................... ..
`SMB Environment Definitions .................................................................. ..
`
`Share—level and User—level Security Modes ............................................ ..
`Share—level Security Mode ...................................................................... ..
`User—level Security Mode with Extended Protocols .......................... ..
`User—level Security with Core Protocol ................................................ ..
`Connection Protocols .................................................................................. ..
`
`Naming .......................................................................................................... ..
`Resource Names ....................................................................................... ..
`NetBIOS Names ........................................................................................ ..
`
`Uniform Naming Convention ................................................................ ..
`Canonical Pathnames............................................................................... ..
`
`Long Names ............................................................................................... ..
`Wildcards ...................................................................................................... ..
`
`File Paradigm ................................................................................................ ..
`Regular Files .............................................................................................. ..
`Open Modes ............................................................................................... ..
`Write Behaviour ........................................................................................ ..
`
`Locking Conventions .................................................................................. ..
`Byte Locking .............................................................................................. ..
`Opportunistic Locking............................................................................. ..
`Chaining of Extended SMB Requests ...................................................... ..
`Exception and Error Handling .................................................................. ..
`Disorderly LMX Session Dissolution.................................................... ..
`Errors and Error Handling ...................................................................... ..
`Timeouts ........................................................................................................ ..
`
`Downward-compatibility Support .......................................................... ..
`
`Protocols for X/Open PC Interworking: SMB, Version 2
`
`iii
`
`Page 5 of 267
`
`
`
`Contents
`
`LMX Conside rations ............................................................................. ..
`
`27
`
`LMX Username Mapping........................................................................... ..
`LMX Filename Mapping ............................................................................ ..
`LMX File Mapping....................................................................................... ..
`SMB File Attributes .................................................................................. ..
`CAE File Access Permissions ................................................................. ..
`
`File System Issues ..................................................................................... ..
`CAE Special Files ...................................................................................... ..
`Deleting or Renaming a File ................................................................... ..
`Long Filenames ......................................................................................... ..
`Extended Attributes ................................................................................. ..
`
`LMX File Locking ......................................................................................... ..
`Interlocking Behaviour ............................................................................ ..
`Locking Timeouts ..................................................................................... ..
`Read-only Locks ........................................................................................ ..
`LMX Server Caching ................................................................................... ..
`LMX Print Spooling ..................................................................................... ..
`SMB Error Codes .......................................................................................... ..
`
`Security Policy .............................................................................................. ..
`Negotiated Dialect ....................................................................................... ..
`Network Issues ............................................................................................. ..
`
`Data Objects and Constants ...............................................................
`SMB Format................................................................................................... ..
`SMB Command Codes ................................................................................ ..
`
`Data Objects .................................................................................................. ..
`Time Fields ................................................................................................. ..
`Date Fields .................................................................................................. ..
`File Attributes Fields ................................................................................ ..
`Buffers ......................................................................................................... ..
`
`File-sharing Control ................................................................................. ..
`Resource Types .......................................................................................... ..
`Access Modes ............................................................................................ ..
`
`27
`28
`30
`30
`30
`
`30
`31
`31
`31
`3 1
`
`33
`33
`34
`34
`35
`35
`35
`
`36
`36
`36
`
`37
`37
`40
`
`43
`43
`43
`43
`44
`
`44
`45
`46
`
`46
`Open Function ........................................................................................... ..
`Resource Names, Pathnames, Filenames and Network Pathnames.....46
`File Identifiers ............................................................................................ ..
`47
`SMB Dialects ................................................................................................. ..
`48
`Timeouts ........................................................................................................ ..
`48
`SMB Error Codes .......................................................................................... ..
`49
`
`SMB Error Class Mappings ..................................................................... ..
`Error Codes for the SUCCESS Class ..................................................... ..
`Error Codes for the ERRDOS Class ...................................................... ..
`Error Codes for the ERRSRV Class ....................................................... ..
`Error Codes for the ERRHRD Class ...................................................... ..
`
`49
`49
`49
`51
`52
`
`4 4
`
`.1
`4.2
`4.3
`4.3.1
`4.3.2
`4.3.3
`4.3.4
`4.3.5
`4.3.6
`4.3.7
`4.4
`4.4.1
`4.4.2
`4.4.3
`4.5
`4.6
`4.7
`4.8
`4.9
`4.10
`
`5 5
`
`.1
`5.2
`5.3
`5.3.1
`5.3.2
`5.3.3
`5.3.4
`5.3.5
`5.3.6
`5.3.7
`5.3.8
`5.3.9
`5.3.10
`5.4
`5.5
`5.6
`5.6.1
`5.6.2
`5.6.3
`5.6.4
`5.6.5
`
`Chapte r
`
`Chapte r
`
`iv
`
`Page 6 of 267
`
`X/Open CAE Specification (1992)
`
`
`
`Contents
`
`Chapte r
`
`Chapter
`
`Chapter
`
`Chapter
`
`Chapte r
`
`Chapte r
`
`6
`6.1
`6.2
`6.3
`6.4
`
`7
`7.1
`7.2
`7.3
`7.4
`7.5
`7.6
`7.7
`7.8
`7.9
`7.10
`7.11
`7. 12
`
`8
`8. 1
`8.2
`8.3
`8.4
`8.5
`8.6
`8.7
`
`9
`9.1
`9.2
`9.3
`9.4
`
`10
`10.1
`10.2
`10.3
`10.4
`10.5
`10.6
`
`11
`11.1
`11.2
`11.3
`11.4
`
`Core SMB Conne ction Manage In e nt Re que sts ......................
`SMBnegprot Specification .......................................................................... ..
`SMBtcon Specification ................................................................................ ..
`SMBtdis Specification ................................................................................. ..
`SMBexit Specification ................................................................................. ..
`
`Core SMB File Operation Re quests...............................................
`SMBcreate Specification ............................................................................. ..
`SMBmknew Specification .......................................................................... ..
`SMBopen Specification ............................................................................... ..
`SMBread Specification ................................................................................ ..
`SMBwrite Specification............................................................................... ..
`SMB1seek Specification ............................................................................... ..
`SMB1ock Specification................................................................................. ..
`SMBun1ock Specification ............................................................................ ..
`SMBflush Specification ............................................................................... ..
`SMBc1ose Specification ............................................................................... ..
`SMBmv Specification .................................................................................. ..
`SMBun1ink Specification ............................................................................ ..
`
`55
`55
`57
`59
`61
`
`63
`63
`67
`70
`73
`76
`79
`81
`83
`85
`87
`89
`92
`
`95
`Core SMB Directory and Attribute Operations .....................
`95
`SMBmkdir Specification ............................................................................. ..
`97
`SMBrmdir Specification .............................................................................. ..
`99
`SMBsearch Specification ............................................................................ ..
`SMBgetatr Specification ............................................................................. .. 103
`SMBsetatr Specification .............................................................................. .. 105
`SMBdskattr Specification ........................................................................... .. 107
`SMBchkpath Specification ......................................................................... .. 109
`
`Core SMB Spool Operation Re quests .......................................... 111
`SMBsp1open Specification.......................................................................... .. 111
`SMBsp1wr Specification .............................................................................. ..
`1 13
`SMBsp1c1ose Specification.......................................................................... .. 115
`SMBsp1retq Specification ........................................................................... ..
`1 17
`
`Core Plus SMB File Ope rations ....................................................... 121
`SMBnegprot Specification .......................................................................... .. 121
`SMBreadbraw Specification....................................................................... .. 123
`SMBwritebraw Specification ..................................................................... .. 125
`SMB1ockread Specification ........................................................................ .. 128
`SMBwriteun1ock Specification .................................................................. .. 130
`SMBwritec1ose Specification ..................................................................... .. 132
`
`135
`Exte nde d 1.0 SMB Conne ction Manage In e nt Re que sts
`SMBnegprot Specification .......................................................................... .. 135
`SMBsecpkgX Specification ......................................................................... .. 139
`SMBsesssetupX Specification .................................................................... .. 144
`SMBtconX Specification ............................................................................. .. 147
`
`Protocols for X/Open PC Interworking: SMB, Version 2
`
`V
`
`Page 7 of 267
`
`
`
`Chapter
`
`Chapter
`
`Chapte r
`
`Chapter
`
`Chapte r
`
`Contents
`
`12
`12.1
`12.2
`12.3
`12.4
`12.5
`12.6
`12.7
`12.8
`
`13
`13.1
`13.2
`13.3
`13.4
`13.5
`
`14
`14.1
`14.2
`14.3
`14.4
`
`15
`15.1
`15.2
`15.3
`15.4
`15.5
`
`16
`16.1
`
`16.1.1
`16.1.2
`16.1.3
`16.1.4
`16.1.5
`
`16.1.5.1
`16.1.5.2
`16.1.5.3
`16.1.5.4
`16.1.6
`16.1.7
`
`16.2
`16.3
`16.4
`16.5
`16.6
`
`Extended 1.0 SMB File Operations................................................. 151
`SMBopenX Specification ............................................................................ .. 151
`SMB1ockingX Specification ........................................................................ .. 156
`SMBreadX Specification ............................................................................. .. 160
`SMBwritebraw Specification ..................................................................... .. 163
`SMBwriteclose Specification ..................................................................... .. 166
`SMBwriteX Specification ............................................................................ .. 168
`SMBreadbmpx Specification ..................................................................... .. 171
`SMBwritebmpx Specification .................................................................... .. 174
`
`Exte nde d 1.0 SMB Directory and Attribute Ope rations.... 179
`SMBffirst Specification ................................................................................ .. 179
`SMBfclose Specification .............................................................................. .. 181
`SMBfunique Specification .......................................................................... .. 182
`SMBgetattrE Specification.......................................................................... .. 183
`SMBsetattrE Specification .......................................................................... .. 185
`
`Exte nde d 1.0 SMB Misce llane ous Re que sts ............................. 187
`SMBcopy Specification ............................................................................... .. 187
`SMBecho Specification ................................................................................ .. 191
`SMBioctl Specification ................................................................................ .. 193
`SMBmove Specification .............................................................................. .. 194
`
`Extended 2.0 Protocol Additions and Modifications ........... 197
`SMBsesssetupX Specification .................................................................... .. 197
`SMBcopy Specification ............................................................................... .. 201
`SMBfindnclose Specification ..................................................................... .. 202
`SMBfindclose Specification ........................................................................ .. 203
`SMBuloggofiX Specification ...................................................................... .. 204
`
`Exte nde d 2.0 Protocol SMBtrans2 ................................................... 207
`SMBtrans2 ..................................................................................................... .. 207
`
`Request Formats ........................................................................................ .. 207
`Response Format....................................................................................... .. 209
`Transaction Flow ....................................................................................... .. 210
`Service .......................................................................................................
`211
`Extended Attribute ................................................................................... .. 212
`
`Errors Encountered When Creating EAs .......................................... .. 212
`Encapsulation of EAs in the SMB Protocol....................................... .. 212
`FEA Structure ......................................................................................... .. 212
`GEA Structure ........................................................................................ .. 214
`Information Levels ................................................................................... .. 214
`Defined SMBtrans2 Protocols ................................................................. .. 214
`
`TRANSACT2_OPEN .................................................................................. .. 216
`TRANSACT2_FINDFIRST ........................................................................ .. 221
`TRANSACT2_FINDNEXT ........................................................................ .. 225
`TRANSACT2_QFSINFO ............................................................................ .. 229
`TRANSACT2_SETFSINFO ........................................................................ .. 231
`
`Vi
`
`Page 8 of 267
`
`X/Open CAE Specification (1992)
`
`
`
`Contents
`
`16.7
`16.8
`16.9
`16.10
`16.11
`16.12
`16.13
`
`TRANSACT2_QPATHINFO ..................................................................... .. 233
`TRANSACT2_SETPATHINFO ................................................................. .. 236
`TRANSACT2_QFILEINFO ........................................................................ .. 238
`TRANSACT2_SETFILEINFO .................................................................... .. 241
`TRANSACT2_FINDNOTIFYFIRST......................................................... .. 243
`TRANSACT2_FINDNOTIFYNEXT ........................................................ .. 246
`TRANSACT2_lVIKDIR ................................................................................ .. 249
`
`Appendix A
`A.1
`A.2
`A.3
`
`SMB Transmission Analysis .............................................................. 251
`Introduction .................................................................................................. .. 251
`DOS Functions .............................................................................................. .. 252
`OS/2 Functions ............................................................................................ .. 259
`
`Appendix B
`B.1
`B.2
`
`LAN Manager Remote Administration Protocol ................... 263
`Overview ....................................................................................................... .. 263
`Remote API Protocol ................................................................................... .. 264
`
`B.3
`B.4
`B.4.1
`B.4.2
`
`B.5
`B.5.1
`B.5.2
`
`B.6
`B.6.1
`B.6.2
`B.7
`B.7.1
`B.7.2
`B.7.3
`B.8
`
`LMX Access Control Lists Mapping ........................................................ .. 265
`Transaction API Request Format .............................................................. .. 267
`Parameter Section ..................................................................................... .. 267
`Data Section ............................................................................................... .. 267
`
`Transaction API Response Format ........................................................... .. 268
`Parameter Section ..................................................................................... .. 268
`Data Section ............................................................................................... .. 268
`
`Descriptor Strings ........................................................................................ .. 269
`Descriptor String Types ........................................................................... .. 269
`Pointer Types and Returned Data ......................................................... .. 271
`Examples ....................................................................................................... .. 272
`NetShareDel ............................................................................................... .. 272
`NetShareAdd ............................................................................................. .. 272
`NetShareEnum .......................................................................................... .. 273
`API Numbers ................................................................................................ .. 275
`
`Appendix C
`C.1
`C.2
`
`The X/Open Security Package ........................................................... 277
`E() Functions ................................................................................................ .. 277
`U() Functions ................................................................................................ .. 278
`
`Appendix D
`D.1
`
`SMB Encryption Techniques ............................................................. 279
`SMB Authentication .................................................................................... .. 279
`
`D.1.1
`D.1.2
`
`SMBnegprot Response ............................................................................. .. 279
`SMBtcon, SMBtconX, SMBsesssetupX Requests ................................ .. 279
`
`Appendix E
`
`TOP/Ne tBIOS .............................................................................................. 281
`
`Appendix F
`
`RFC 1001 ......................................................................................................... 349
`
`Protocols for X/Open PC Interworking: SMB, Version 2
`
`Vii
`
`Page 9 of 267
`
`
`
`
`
`
`Preface
`
`X/Open
`
`X/ Open is an independent, worldwide, open systems organisation supported by most of the
`world’s largest information systems suppliers, user organisations and software companies. Its
`mission is to bring to users greater value from computing, through the practical implementation
`of open systems.
`
`X/Open’s strategy for achieving this goal is to combine existing and emerging standards into a
`comprehensive,
`integrated, high-value and usable open system environment, called the
`Common Applications Environment (CAE). This environment covers the standards, above the
`hardware level, that are needed to support open systems. It provides for portability and
`interoperability of applications, and so protects investment in existing software while enabling
`additions and enhancements. It also allows users to move between systems with a minimum of
`retraining.
`
`X/ Open defines this CAE in a set of specifications which include an evolving portfolio of
`application programming interfaces
`(APIs) which significantly enhance portability of
`application programs at the source code level, along with definitions of and references to
`protocols and protocol profiles which significantly enhance the interoperability of applications
`and systems.
`
`The X/ Open CAE is implemented in real products and recognised by a distinctive trade mark —
`the X/ Open brand — that is licensed by X/ Open and may be used on products which have
`demonstrated their conformance.
`
`X/Ope n Te chnical Publications
`
`X/ Open publishes a wide range of technical literature, the main part of which is focussed on
`specification development, but which also includes Guides, Snapshots, Technical Studies,
`Branding/Testing documents, industry surveys, and business titles.
`
`There are two types of X/ Open specification:
`
`- CAE Specifications
`
`CAE (Common Applications Environment) specifications are the stable specifications that
`form the basis for X/Open-branded products. These specifications are intended to be used
`widely within the industry for product development and procurement purposes.
`
`Anyone developing products that implement an X/ Open CAE specification can enjoy the
`benefits of a single, widely supported standard.
`In addition,
`they can demonstrate
`compliance with the majority of X/ Open CAE specifications once these specifications are
`referenced in an X/ Open component or profile definition and included in the X/ Open
`branding programme.
`
`CAE specifications are published as soon as they are developed, not published to coincide
`with the launch of a particular X/ Open brand. By making its specifications available in this
`way, X/ Open makes it possible for conformant products to be developed as soon as is
`practicable, so enhancing the value of the X/ Open brand as a procurement aid to users.
`
`Protocols for X/Open PC Interworking: SMB, Version 2
`
`ix
`
`Page 11 of 267
`
`
`
`Preia ce
`
`- Preliminary Specifications
`
`These specifications, which often address an emerging area of technology and consequently
`are not yet supported by multiple sources of stable conformant implementations, are
`released in a controlled manner for the purpose of validation through implementation of
`products. A Preliminary specification is not a draft specification. In fact, it is as stable as
`X/ Open can make it, and on publication has gone through the same rigorous X/ Open
`development and review procedures as a CAE specification.
`
`Preliminary specifications are analogous to the trial—use standards issued by formal standards
`organisations, and product development teams are encouraged to develop products on the
`basis of them. However, because of the nature of the technology that a Preliminary
`specification is addressing, it may be untried in multiple independent implementations, and
`may therefore change before being published as a CAE specification. There is always the
`intent to progress to a corresponding CAE specification, but the ability to do so depends on
`consensus among X/ Open members. In all cases, any resulting CAE specification is made as
`upwards-compatible as possible. However, complete upwards-compatibility from the
`Preliminary to the CAE specification cannot be guaranteed.
`
`In addition, X/ Open publishes:
`
`- Guides
`
`These provide information that X/ Open believes is useful in the evaluation, procurement,
`development or management of open systems, particularly those that are X/ Open-
`compliant. X/ Open Guides are advisory, not normative, and should not be referenced for
`purposes of specifying or claiming X/ Open conformance.
`
`- Technical Studies
`
`X/ Open Technical Studies present results of analyses performed by X/ Open on subjects of
`interest
`in areas relevant
`to X/Open’s Technical Programme. They are intended to
`communicate the findings to the outside world and, where appropriate, stimulate discussion
`and actions by other bodies and the industry in general.
`
`- Snapshots
`
`These provide a mechanism for X/ Open to disseminate information on its current direction
`and thinking, in advance of possible development of a Specification, Guide or Technical
`Study. The intention is to stimulate industry debate and prototyping, and solicit feedback. A
`Snapshot represents the interim results of an X/ Open technical activity. Although at the time
`of its publication, there may be an intention to progress the activity towards publication of a
`Specification, Guide or Technical Study, X/ Open is a consensus organisation, and makes no
`commitment regarding future development and further publication. Similarly, a Snapshot
`does not represent any commitment by X/ Open members to develop any specific products.
`
`Versions and Issues of Specifications
`
`As with all live documents, CAE Specifications require revision, in this case as the subject
`technology develops and to align with emerging associated international standards. X/ Open
`makes a distinction between revised specifications which are fully backward compatible and
`those which are not:
`
`- a new Version indicates that this publication includes all the same (unchanged) definitive
`information from the previous publication of that title, but also includes extensions or
`additional information. As such, it replaces the previous publication.
`
`X
`
`Page 12 of 267
`
`X/Open CAE Specification (1992)
`
`
`
`Prelace
`
`- a new Issue does include changes to the definitive information contained in the previous
`publication of that title (and may also include extensions or additional information). As such,
`X/ Open maintains both the previous and new issue as current publications.
`
`Corrige nda
`
`the leading edge of open systems
`Most X/ Open publications deal with technology at
`development. Feedback from implementation experience gained from using these publications
`occasionally uncovers errors or inconsistencies. Significant errors or recommended solutions to
`reported problems are communicated by means of Corrigenda.
`
`The reader of this document is advised to check periodically if any Corrigenda apply to this
`publication. This may be done in any one of the following ways:
`
`- anonymous ftp to ftp.xopen.org
`
`- ftpmail (see below)
`
`- reference to the Corrigenda list in the latest X/ Open Publications Price List.
`
`To request Corrigenda information using ftpmail, send a message to ftpmail@xopen.org with the
`following four lines in the body of the message:
`
`open
`
`cd pub/Corrigenda
`get index
`quit
`
`This will return the index of publications for which Corrigenda exist. Use the same email
`address to request a copy of the full corrigendum information following the email instructions.
`
`This Docum e nt
`
`Of all the types of computers, personal computers are the most abundant. Originally intended
`to be a personal productivity tool, an ever-increasing number of them are being connected to
`computer networks, thus becoming parts of distributed information systems.
`
`Personal computers normally run under single-user operating systems with interfaces differing
`from those specified in the X/ Open Portability Guide. However, X/ Open realises how
`important it is to facilitate interworking between personal computers and X/Open-compliant
`systems in a standardised way.
`
`interoperability, and programming
`Two areas have to be addressed to achieve this goal;
`interfaces to server functions facilitating applications portability. Interoperability means that
`personal computers and X/Open-compliant systems can interchange information using the
`same network protocols. Standardisation of programming interfaces to server functions, in
`addition to standardisation of protocols, makes it possible to write distributed client/server
`applications whose server component will be portable to all X/Open-compliant systems.
`
`For interoperability via asynchronous serial links, X/ Open has already defined in the X/ Open
`Portability Guide, Issue 3 a file transfer protocol and a set of features provided on X/ Open-
`compliant systems for terminal emulators. Now it is time to address interworking in local area
`networks (LANs).
`
`In the X/ Open (PC)NFS and SMB Developers’ Specifications interoperability of personal
`computers and X/Open-compliant
`systems
`is addressed. The applications portability
`components, containing definitions of programmatic interfaces to server
`functions, are
`documented in the X/ Open CAE Specification, [PC Mechanisms for SMB and the X/ Open CAE
`Specification, Use of XTI to Access NetBIOS.
`
`Protocols for X/Open PC Interworking: SMB, Version 2
`
`xi
`
`Page 13 of 267
`
`
`
`Prefi ce
`
`When connecting personal computer