[PATCH 1/2] s3/smbd: Add new file information classes

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/2] s3/smbd: Add new file information classes

Samba - samba-technical mailing list
Add definitions for missing file information classes documented in
[MS-FSCC] section 2.4.

Signed-off-by: Justin Maggard <[hidden email]>
---
 source3/include/trans2.h | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/source3/include/trans2.h b/source3/include/trans2.h
index 3085344a406..ece436a048f 100644
--- a/source3/include/trans2.h
+++ b/source3/include/trans2.h
@@ -329,7 +329,17 @@ Byte offset   Type     name                description
 #define SMB_FILE_NETWORK_OPEN_INFORMATION 1034
 #define SMB_FILE_ATTRIBUTE_TAG_INFORMATION 1035
 #define SMB_FILE_TRACKING_INFORMATION 1036
-#define SMB_FILE_MAXIMUM_INFORMATION 1037
+#define SMB_FILE_ID_BOTH_DIRECTORY_INFORMATION 1037
+#define SMB_FILE_ID_FULL_DIRECTORY_INFORMATION 1038
+#define SMB_FILE_VALID_DATA_LENGTH_INFORMATION 1039
+#define SMB_FILE_SHORT_NAME_INFORMATION 1040
+#define SMB_FILE_SFIO_RESERVE_INFORMATION 1044
+#define SMB_FILE_SFIO_VOLUME_INFORMATION 1045
+#define SMB_FILE_HARD_LINK_INFORMATION 1046
+#define SMB_FILE_NORMALIZED_NAME_INFORMATION 1048
+#define SMB_FILE_ID_GLOBAL_TX_DIRECTORY_INFORMATION 1050
+#define SMB_FILE_STANDARD_LINK_INFORMATION 1054
+#define SMB_FILE_MAXIMUM_INFORMATION 1055
 
 /* NT passthough levels for qfsinfo. */
 
--
2.15.1


Reply | Threaded
Open this post in threaded view
|

[PATCH 2/2] s3/smbd: Fix error code for unsupported SET_INFO requests

Samba - samba-technical mailing list
FileValidDataLengthInformation and FileShortNameInformation are both
valid FileInfoClasses that we don't support.  According to [MS-SMB2]
3.3.5.21.1, we should be returning STATUS_NOT_SUPPORTED instead of
NT_STATUS_INVALID_LEVEL for these.

Signed-off-by: Justin Maggard <[hidden email]>
---
 source3/smbd/trans2.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index dbad71be3b7..512918efc89 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -8541,6 +8541,11 @@ NTSTATUS smbd_do_setfilepathinfo(connection_struct *conn,
  break;
  }
 
+ /* [MS-SMB2] 3.3.5.21.1 states we MUST fail with STATUS_NOT_SUPPORTED. */
+ case SMB_FILE_VALID_DATA_LENGTH_INFORMATION:
+ case SMB_FILE_SHORT_NAME_INFORMATION:
+ return NT_STATUS_NOT_SUPPORTED;
+
  /*
  * CIFS UNIX extensions.
  */
--
2.15.1


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 1/2] s3/smbd: Add new file information classes

Samba - samba-technical mailing list
In reply to this post by Samba - samba-technical mailing list
On Tue, Jan 09, 2018 at 12:04:15PM -0800, Justin Maggard via samba-technical wrote:

These (and the following patch) LGTM. Can I get a second Team
reviewer ?

Jeremy.

> Add definitions for missing file information classes documented in
> [MS-FSCC] section 2.4.
>
> Signed-off-by: Justin Maggard <[hidden email]>
> ---
>  source3/include/trans2.h | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/source3/include/trans2.h b/source3/include/trans2.h
> index 3085344a406..ece436a048f 100644
> --- a/source3/include/trans2.h
> +++ b/source3/include/trans2.h
> @@ -329,7 +329,17 @@ Byte offset   Type     name                description
>  #define SMB_FILE_NETWORK_OPEN_INFORMATION 1034
>  #define SMB_FILE_ATTRIBUTE_TAG_INFORMATION 1035
>  #define SMB_FILE_TRACKING_INFORMATION 1036
> -#define SMB_FILE_MAXIMUM_INFORMATION 1037
> +#define SMB_FILE_ID_BOTH_DIRECTORY_INFORMATION 1037
> +#define SMB_FILE_ID_FULL_DIRECTORY_INFORMATION 1038
> +#define SMB_FILE_VALID_DATA_LENGTH_INFORMATION 1039
> +#define SMB_FILE_SHORT_NAME_INFORMATION 1040
> +#define SMB_FILE_SFIO_RESERVE_INFORMATION 1044
> +#define SMB_FILE_SFIO_VOLUME_INFORMATION 1045
> +#define SMB_FILE_HARD_LINK_INFORMATION 1046
> +#define SMB_FILE_NORMALIZED_NAME_INFORMATION 1048
> +#define SMB_FILE_ID_GLOBAL_TX_DIRECTORY_INFORMATION 1050
> +#define SMB_FILE_STANDARD_LINK_INFORMATION 1054
> +#define SMB_FILE_MAXIMUM_INFORMATION 1055
>  
>  /* NT passthough levels for qfsinfo. */
>  
> --
> 2.15.1
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 1/2] s3/smbd: Add new file information classes

Samba - samba-technical mailing list
On Tuesday, 9 January 2018 21:49:50 CET Jeremy Allison via samba-technical
wrote:
> On Tue, Jan 09, 2018 at 12:04:15PM -0800, Justin Maggard via samba-technical
> wrote:
>
> These (and the following patch) LGTM. Can I get a second Team
> reviewer ?

RB+
 

> Jeremy.
>
> > Add definitions for missing file information classes documented in
> > [MS-FSCC] section 2.4.
> >
> > Signed-off-by: Justin Maggard <[hidden email]>
> > ---
> >
> >  source3/include/trans2.h | 12 +++++++++++-
> >  1 file changed, 11 insertions(+), 1 deletion(-)
> >
> > diff --git a/source3/include/trans2.h b/source3/include/trans2.h
> > index 3085344a406..ece436a048f 100644
> > --- a/source3/include/trans2.h
> > +++ b/source3/include/trans2.h
> > @@ -329,7 +329,17 @@ Byte offset   Type     name              
> > description
> >
> >  #define SMB_FILE_NETWORK_OPEN_INFORMATION 1034
> >  #define SMB_FILE_ATTRIBUTE_TAG_INFORMATION 1035
> >  #define SMB_FILE_TRACKING_INFORMATION 1036
> >
> > -#define SMB_FILE_MAXIMUM_INFORMATION 1037
> > +#define SMB_FILE_ID_BOTH_DIRECTORY_INFORMATION 1037
> > +#define SMB_FILE_ID_FULL_DIRECTORY_INFORMATION 1038
> > +#define SMB_FILE_VALID_DATA_LENGTH_INFORMATION 1039
> > +#define SMB_FILE_SHORT_NAME_INFORMATION 1040
> > +#define SMB_FILE_SFIO_RESERVE_INFORMATION 1044
> > +#define SMB_FILE_SFIO_VOLUME_INFORMATION 1045
> > +#define SMB_FILE_HARD_LINK_INFORMATION 1046
> > +#define SMB_FILE_NORMALIZED_NAME_INFORMATION 1048
> > +#define SMB_FILE_ID_GLOBAL_TX_DIRECTORY_INFORMATION 1050
> > +#define SMB_FILE_STANDARD_LINK_INFORMATION 1054
> > +#define SMB_FILE_MAXIMUM_INFORMATION 1055
> >
> >  /* NT passthough levels for qfsinfo. */


--
Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             [hidden email]
www.samba.org