`
`Technical Standard
`
`Protocols for X/Open PC Interworking:
`SMB, Version 2
`
`C
`A
`
` SL
`
`I
`
`N
`
`T
`
`A
`N
`D
`
`D
`
`R
`
`A
`
`H
`C
`
`E T
`
`DELL
`
`
`
`[This page intentionally left blank]
`
`Ex.1055.002
`
`DELL
`
`
`
`X/Open CAE Specification
`
`Protocols for X/Open PC Interworking: SMB, Version 2
`
`X/Open Company Ltd.
`
`Ex.1055.003
`
`DELL
`
`
`
`(cid:211) September 1992, X/Open Company Limited
`All rights reserved. No part of this publication may be reproduced, stored in a retrieval system,
`or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or
`otherwise, without the prior permission of the copyright owners.
`
`X/Open CAE Specification
`Protocols for X/Open PC Interworking: SMB, Version 2
`ISBN: 1 872630 45 6
`X/Open Document Number: C209
`
`Published by X/Open Company Ltd., U.K.
`
`Any comments relating to the material contained in this document may be submitted to X/Open
`at:
`
`X/Open Company Limited
`Apex Plaza
`Forbury Road
`Reading
`Berkshire, RG1 1AX
`United Kingdom
`or by Electronic Mail to:
`XoSpecs@xopen.org
`
`ii
`
`X/Open CAE Specification (1992)
`
`Ex.1055.004
`
`DELL
`
`
`
`Contents
`
`Chapter
`
`
`
`
`Chapter
`
`
`
`
`
`Chapter
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`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.11
`3.12
`
`Introduction..................................................................................................
` Why Republish...............................................................................................
` This Document ...............................................................................................
` Overview of Document Layout..................................................................
`
`SMB File-sharing Service Model ....................................................
` SMB Protocol Principles ...............................................................................
` Security Overview .........................................................................................
` Share-level Security Mode ........................................................................
` User-level Security Mode..........................................................................
`
`SMB Protocol Conventions.................................................................
` 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 ............................................................
`
`1
`1
`1
`2
`
`3
`4
`5
`5
`5
`
`7
`7
`10
`12
`12
`12
`13
`14
`15
`15
`15
`16
`16
`16
`17
`17
`18
`18
`19
`20
`20
`20
`22
`24
`24
`24
`25
`25
`
`Protocols for X/Open PC Interworking: SMB, Version 2
`
`iii
`
`Ex.1055.005
`
`DELL
`
`
`
`Contents
`
`Chapter
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`Chapter
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`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
`
`LMX Considerations ...............................................................................
` 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...............................................................................................
`
`27
`27
`28
`30
`30
`30
`30
`31
`31
`31
`31
`33
`33
`34
`34
`35
`35
`35
`36
`36
`36
`
`Data Objects and Constants...............................................................
`37
`37
` SMB Format.....................................................................................................
`40
` SMB Command Codes..................................................................................
`43
` Data Objects ....................................................................................................
`43
` Time Fields...................................................................................................
`43
` Date Fields....................................................................................................
`43
` File Attributes Fields..................................................................................
`44
` Buffers ...........................................................................................................
`44
` File-sharing Control ...................................................................................
`45
` Resource Types............................................................................................
`46
` Access Modes ..............................................................................................
`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.......................................................................
`49
` Error Codes for the SUCCESS Class .......................................................
`49
` Error Codes for the ERRDOS Class ........................................................
`49
` Error Codes for the ERRSRV Class .........................................................
`51
` Error Codes for the ERRHRD Class........................................................
`52
`
`iv
`
`X/Open CAE Specification (1992)
`
`Ex.1055.006
`
`DELL
`
`
`
`Contents
`
`Chapter
`
`
`
`
`
`Chapter
`
`
`
`
`
`
`
`
`
`
`
`
`
`Chapter
`
`
`
`
`
`
`
`
`Chapter
`
`
`
`
`
`Chapter
`
`
`
`
`
`
`
`Chapter
`
`
`
`
`
`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 Connection Management Requests ......................
` SMBnegprot Specification............................................................................
` SMBtcon Specification ..................................................................................
` SMBtdis Specification ...................................................................................
` SMBexit Specification ...................................................................................
`
`Core SMB File Operation Requests...............................................
` SMBcreate Specification ...............................................................................
` SMBmknew Specification ............................................................................
` SMBopen Specification .................................................................................
` SMBread Specification ..................................................................................
` SMBwrite Specification.................................................................................
` SMBlseek Specification .................................................................................
` SMBlock Specification...................................................................................
` SMBunlock Specification..............................................................................
` SMBflush Specification .................................................................................
` SMBclose Specification .................................................................................
` SMBmv Specification ....................................................................................
` SMBunlink Specification ..............................................................................
`
`55
`55
`57
`59
`61
`
`63
`63
`67
`70
`73
`76
`79
`81
`83
`85
`87
`89
`92
`
`Core SMB Directory and Attribute Operations .....................
`95
`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 Requests .......................................... 111
` SMBsplopen Specification............................................................................ 111
` SMBsplwr Specification................................................................................ 113
` SMBsplclose Specification............................................................................ 115
` SMBsplretq Specification ............................................................................. 117
`
`Core Plus SMB File Operations ....................................................... 121
` SMBnegprot Specification............................................................................ 121
` SMBreadbraw Specification......................................................................... 123
` SMBwritebraw Specification ....................................................................... 125
` SMBlockread Specification .......................................................................... 128
` SMBwriteunlock Specification .................................................................... 130
` SMBwriteclose Specification ....................................................................... 132
`
`Extended 1.0 SMB Connection Management Requests .... 135
` SMBnegprot Specification............................................................................ 135
` SMBsecpkgX Specification........................................................................... 139
` SMBsesssetupX Specification...................................................................... 144
` SMBtconX Specification ............................................................................... 147
`
`Protocols for X/Open PC Interworking: SMB, Version 2
`
`v
`
`Ex.1055.007
`
`DELL
`
`
`
`Contents
`
`Chapter
`
`
`
`
`
`
`
`
`
`Chapter
`
`
`
`
`
`
`Chapter
`
`
`
`
`
`Chapter
`
`
`
`
`
`
`Chapter
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`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
`
`Extended 1.0 SMB File Operations................................................. 151
` SMBopenX Specification .............................................................................. 151
` SMBlockingX Specification.......................................................................... 156
` SMBreadX Specification ............................................................................... 160
` SMBwritebraw Specification ....................................................................... 163
` SMBwriteclose Specification ....................................................................... 166
` SMBwriteX Specification.............................................................................. 168
` SMBreadbmpx Specification ....................................................................... 171
` SMBwritebmpx Specification...................................................................... 174
`
`Extended 1.0 SMB Directory and Attribute Operations.... 179
` SMBffirst Specification.................................................................................. 179
` SMBfclose Specification................................................................................ 181
` SMBfunique Specification ............................................................................ 182
` SMBgetattrE Specification............................................................................ 183
` SMBsetattrE Specification ............................................................................ 185
`
`Extended 1.0 SMB Miscellaneous Requests............................. 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
` SMBuloggoffX Specification ........................................................................ 204
`
`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 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
`
`X/Open CAE Specification (1992)
`
`Ex.1055.008
`
`DELL
`
`
`
`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_MKDIR.................................................................................. 249
`
`Appendix A
`
`A.1
`
`A.2
`
`A.3
`
`Appendix B
`
`B.1
`
`B.2
`
`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
`
`Appendix C
`
`C.1
`
`C.2
`
`SMB Transmission Analysis.............................................................. 251
` Introduction .................................................................................................... 251
` DOS Functions................................................................................................ 252
` OS/2 Functions .............................................................................................. 259
`
`LAN Manager Remote Administration Protocol................... 263
` Overview......................................................................................................... 263
` Remote API Protocol..................................................................................... 264
` 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
`
`The X/Open Security Package ........................................................... 277
` E( ) Functions .................................................................................................. 277
` U( ) Functions.................................................................................................. 278
`
`Appendix D
`
`D.1
`
`D.1.1
`
`D.1.2
`
`SMB Encryption Techniques ............................................................. 279
` SMB Authentication ...................................................................................... 279
` SMBnegprot Response............................................................................... 279
` SMBtcon, SMBtconX, SMBsesssetupX Requests.................................. 279
`
`Appendix E
`
`TOP/NetBIOS.............................................................................................. 281
`
`Appendix F
`
`RFC 1001 ......................................................................................................... 349
`
`Protocols for X/Open PC Interworking: SMB, Version 2
`
`vii
`
`Ex.1055.009
`
`DELL
`
`
`
`Contents
`
`Appendix G
`
`RFC 1002 ......................................................................................................... 419
`
`
`
`
`
`
`
`
`
`Glossary .......................................................................................................... 505
`
`Index.................................................................................................................. 511
`
`viii
`
`X/Open CAE Specification (1992)
`
`Ex.1055.010
`
`DELL
`
`
`
`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/Open Technical 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
`
`Ex.1055.011
`
`DELL
`
`
`
`Preface
`
`• 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
`
`X/Open CAE Specification (1992)
`
`Ex.1055.012
`
`DELL
`
`
`
`Preface
`
`• 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.
`
`Corrigenda
`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 Co