mbox series

[0/2] cifs: Add IOCTL passthrough for QUERY-INFO

Message ID 20181003004203.5840-1-lsahlber@redhat.com
Headers show
Series cifs: Add IOCTL passthrough for QUERY-INFO | expand

Message

Ronnie Sahlberg Oct. 3, 2018, 12:42 a.m. UTC
Steve, All

Please find two patches.
The first patch is for the kernel and adds an IOCTL to allow passthrough
to the SMB server for QUERY-INFO commands.

The Second is a patch to cifs-utils that adds a new command smbinfo that
can be used to display the securityDescriptor of a file or to show the
Quotas for a volume.

The second is just a start and it would be nice to extend this to query
all types of information that can be retreived by Query-Info

Comments

Ronnie Sahlberg Oct. 3, 2018, 9:45 p.m. UTC | #1
Steve

I use _IOWR() for this IOCTL since we both write the buffer from userspace to kernel when we invoke
the query and then write the buffer back to userspace when the query has finished.

Additionally, for query-quota, we pass data buffers both from client to server and also from server back to client as part of the processing.


Based on this kernel comment that defined the _IO macros I think _IOWR is the right one to use.

/*
 * Used to create numbers.
 *
 * NOTE: _IOW means userland is writing and kernel is reading. _IOR
 * means userland is reading and kernel is writing.
 */



----- Original Message -----
From: "Ronnie Sahlberg" <lsahlber@redhat.com>
To: "linux-cifs" <linux-cifs@vger.kernel.org>
Cc: "Steve French" <smfrench@gmail.com>
Sent: Wednesday, 3 October, 2018 10:42:01 AM
Subject: [PATCH 0/2] cifs: Add IOCTL passthrough for QUERY-INFO

Steve, All

Please find two patches.
The first patch is for the kernel and adds an IOCTL to allow passthrough
to the SMB server for QUERY-INFO commands.

The Second is a patch to cifs-utils that adds a new command smbinfo that
can be used to display the securityDescriptor of a file or to show the
Quotas for a volume.

The second is just a start and it would be nice to extend this to query
all types of information that can be retreived by Query-Info