Print this page
NEX-1643 dtrace provider for smbsrv
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Matt Barden <matt.barden@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/smbsrv/smb_logoff_andx.c
          +++ new/usr/src/uts/common/fs/smbsrv/smb_logoff_andx.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  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 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + *
       25 + * Copyright 2017 Nexenta Systems, Inc.  All rights reserved.
  24   26   */
  25   27  
  26   28  #include <smbsrv/smb_kproto.h>
  27   29  
  28   30  
  29   31  /*
  30   32   * smb_com_logoff_andx
  31   33   *
  32   34   * This SMB is the inverse of SMB_COM_SESSION_SETUP_ANDX.
  33   35   *
↓ open down ↓ 22 lines elided ↑ open up ↑
  56   58   * SMB_COM_SESSION_SETUP_ANDX is the only valid AndX command for this SMB.
  57   59   *
  58   60   * 4.1.3.1   Errors
  59   61   *
  60   62   * ERRSRV/invnid  - TID was invalid
  61   63   * ERRSRV/baduid  - UID was invalid
  62   64   */
  63   65  smb_sdrc_t
  64   66  smb_pre_logoff_andx(smb_request_t *sr)
  65   67  {
  66      -        DTRACE_SMB_1(op__LogoffX__start, smb_request_t *, sr);
       68 +        DTRACE_SMB_START(op__LogoffX, smb_request_t *, sr);
  67   69          return (SDRC_SUCCESS);
  68   70  }
  69   71  
  70   72  void
  71   73  smb_post_logoff_andx(smb_request_t *sr)
  72   74  {
  73      -        DTRACE_SMB_1(op__LogoffX__done, smb_request_t *, sr);
       75 +        DTRACE_SMB_DONE(op__LogoffX, smb_request_t *, sr);
  74   76  }
  75   77  
  76   78  smb_sdrc_t
  77   79  smb_com_logoff_andx(smb_request_t *sr)
  78   80  {
  79   81          if (sr->uid_user == NULL) {
  80   82                  smbsr_error(sr, 0, ERRSRV, ERRbaduid);
  81   83                  return (SDRC_ERROR);
  82   84          }
  83   85  
  84   86          smb_user_logoff(sr->uid_user);
  85   87  
  86   88          if (smbsr_encode_result(sr, 2, 0, "bb.ww", 2, sr->andx_com, -1, 0))
  87   89                  return (SDRC_ERROR);
  88   90          return (SDRC_SUCCESS);
  89   91  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX