Print this page
NEX-14666 Need to provide SMB 2.1 Client
NEX-17187 panic in smbfs_acl_store
NEX-17231 smbfs create xattr files finds wrong file
NEX-17224 smbfs lookup EINVAL should be ENOENT
NEX-17260 SMB1 client fails to list directory after NEX-14666
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Joyce McIntosh <joyce.mcintosh@nexenta.com>
and: (cleanup)
NEX-5665 SMB2 oplock leases
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>
NEX-5665 SMB2 oplock leases
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>
SMB-136 Snapshots not visible in Windows previous versions
SMB-65 SMB server in non-global zones (use zone_kcred())
SMB-65 SMB server in non-global zones (data structure changes)
Many things move to the smb_server_t object, and
many functions gain an sv arg (which server).
re #14152 Race between ipmi_submit_driver_request() and kcs_loop() (sync with illumos fix 3902)
SMB-46 File handle leaks exposed by mtime fixes (rm 7815)
re #7815 SMB server delivers old modification time...

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/smbsrv/smb_nt_transact_ioctl.c
          +++ new/usr/src/uts/common/fs/smbsrv/smb_nt_transact_ioctl.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  23      - * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
       23 + * Copyright 2018 Nexenta Systems, Inc.  All rights reserved.
  24   24   */
  25   25  
  26   26  #include <smbsrv/smb_kproto.h>
  27      -#include <smbsrv/winioctl.h>
       27 +#include <smb/winioctl.h>
  28   28  
  29   29  
  30   30  static uint32_t smb_nt_trans_ioctl_noop(smb_request_t *, smb_xa_t *);
  31   31  static uint32_t smb_nt_trans_ioctl_invalid_parm(smb_request_t *, smb_xa_t *);
  32   32  static uint32_t smb_nt_trans_ioctl_set_sparse(smb_request_t *, smb_xa_t *);
  33   33  static uint32_t smb_nt_trans_ioctl_query_alloc_ranges(smb_request_t *,
  34   34      smb_xa_t *);
  35   35  static uint32_t smb_nt_trans_ioctl_set_zero_data(smb_request_t *, smb_xa_t *);
  36   36  static uint32_t smb_nt_trans_ioctl_enum_snaps(smb_request_t *, smb_xa_t *);
  37   37  
  38   38  /*
  39   39   * This table defines the list of FSCTL values for which we'll
  40   40   * call a funtion to perform specific processing.
  41      - *
  42      - * Note: If support is added for FSCTL_SET_ZERO_DATA, it must break
  43      - * any oplocks on the file to none:
  44      - *   smb_oplock_break(sr, node, SMB_OPLOCK_BREAK_TO_NONE);
  45   41   */
  46   42  static const struct {
  47   43          uint32_t fcode;
  48   44          uint32_t (*ioctl_func)(smb_request_t *sr, smb_xa_t *xa);
  49   45  } ioctl_ret_tbl[] = {
  50   46          { FSCTL_GET_OBJECT_ID, smb_nt_trans_ioctl_invalid_parm },
  51   47          { FSCTL_QUERY_ALLOCATED_RANGES, smb_nt_trans_ioctl_query_alloc_ranges },
  52   48          { FSCTL_SET_ZERO_DATA, smb_nt_trans_ioctl_set_zero_data },
  53   49          { FSCTL_SRV_ENUMERATE_SNAPSHOTS, smb_nt_trans_ioctl_enum_snaps },
  54   50          { FSCTL_SET_SPARSE, smb_nt_trans_ioctl_set_sparse },
↓ open down ↓ 160 lines elided ↑ open up ↑
 215  211          }
 216  212  
 217  213          smbsr_release_file(sr);
 218  214          return (NT_STATUS_SUCCESS);
 219  215  }
 220  216  
 221  217  /*
 222  218   * smb_nt_trans_ioctl_set_zero_data
 223  219   *
 224  220   * Check that the request is valid on the specified file.
 225      - * The implementation is a noop.
      221 + * The implementation is a noop. XXX - bug!
      222 + * XXX: We have this in the fsclt module now.  Call that.
      223 + *
      224 + * Note: When support is added for FSCTL_SET_ZERO_DATA, it must
      225 + * break any oplocks on the file to none:
      226 + *      (void) smb_oplock_break_WRITE(node, ofile);
 226  227   */
 227  228  /* ARGSUSED */
 228  229  static uint32_t
 229  230  smb_nt_trans_ioctl_set_zero_data(smb_request_t *sr, smb_xa_t *xa)
 230  231  {
 231  232          smb_node_t *node;
 232  233  
 233  234          if (SMB_TREE_IS_READONLY(sr))
 234  235                  return (NT_STATUS_ACCESS_DENIED);
 235  236  
↓ open down ↓ 123 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX