Print this page
NEX-6096 Enable compile warnings re. parentheses in smbsrv
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Jean McCormack <jean.mccormack@nexenta.com>
NEX-4083 Upstream changes from illumos 5917 and 5995
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Kevin Crowe <kevin.crowe@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
SMB-50 User-mode SMB server (fix vnodetopath)
SMB-50 User-mode SMB server
 Includes work by these authors:
 Thomas Keiser <thomas.keiser@nexenta.com>
 Albert Lee <trisk@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/smbsrv/libfksmbsrv/common/fake_lookup.c
          +++ new/usr/src/lib/smbsrv/libfksmbsrv/common/fake_lookup.c
↓ open down ↓ 127 lines elided ↑ open up ↑
 128  128                  error = ENOTDIR;
 129  129                  goto bad;
 130  130          }
 131  131  
 132  132          if (rpnp && VN_CMP(vp, rootvp))
 133  133                  (void) pn_set(rpnp, "/");
 134  134  
 135  135          /*
 136  136           * Process the next component of the pathname.
 137  137           */
 138      -        if (error = pn_getcomponent(pnp, component)) {
      138 +        if ((error = pn_getcomponent(pnp, component)) != 0) {
 139  139                  goto bad;
 140  140          }
 141  141  
 142  142          /*
 143  143           * Handle "..": two special cases.
 144  144           * 1. If we're at the root directory (e.g. after chroot or
 145  145           *    zone_enter) then change ".." to "." so we can't get
 146  146           *    out of this subtree.
 147  147           * 2. If this vnode is the root of a mounted file system,
 148  148           *    then replace it with the vnode that was mounted on
↓ open down ↓ 151 lines elided ↑ open up ↑
 300  300           * front of the remaining pathname.
 301  301           */
 302  302          if (cvp->v_type == VLNK && ((flags & FOLLOW) || pn_pathleft(pnp))) {
 303  303                  struct pathname linkpath;
 304  304  
 305  305                  if (++nlink > MAXSYMLINKS) {
 306  306                          error = ELOOP;
 307  307                          goto bad;
 308  308                  }
 309  309                  pn_alloc(&linkpath);
 310      -                if (error = pn_getsymlink(cvp, &linkpath, cr)) {
      310 +                if ((error = pn_getsymlink(cvp, &linkpath, cr)) != 0) {
 311  311                          pn_free(&linkpath);
 312  312                          goto bad;
 313  313                  }
 314  314  
 315  315                  if (pn_pathleft(&linkpath) == 0)
 316  316                          (void) pn_set(&linkpath, ".");
 317  317                  error = pn_insert(pnp, &linkpath, strlen(component));
 318  318                  pn_free(&linkpath);
 319  319                  if (error)
 320  320                          goto bad;
↓ open down ↓ 240 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX