diff options
author | Gordon Ross <gwr@nexenta.com> | 2011-12-07 00:03:44 -0500 |
---|---|---|
committer | Gordon Ross <gwr@nexenta.com> | 2015-04-28 10:53:28 -0400 |
commit | 8622ec4569457733001d4982ef7f5b44427069be (patch) | |
tree | 8a2d85c1d5eee4cea6668e4d3158b760eddeaf22 /usr/src/uts/common/fs/smbsrv/smb_ofile.c | |
parent | e548823371e6dfbf1717dabbe24870fec98c6051 (diff) | |
download | illumos-gate-8622ec4569457733001d4982ef7f5b44427069be.tar.gz |
1527 SMB server in non-global zones
Reviewed by: Dan McDonald <danmcd@nexenta.com>
Reviewed by: Stepan Zastupov <stepan.zastupov@gmail.com>
Reviewed by: Albert Lee <trisk@nexenta.com>
Reviewed by: Thomas Keiser <thomas.keiser@nexenta.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/uts/common/fs/smbsrv/smb_ofile.c')
-rw-r--r-- | usr/src/uts/common/fs/smbsrv/smb_ofile.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr/src/uts/common/fs/smbsrv/smb_ofile.c b/usr/src/uts/common/fs/smbsrv/smb_ofile.c index ee45f13c8b..41515ee392 100644 --- a/usr/src/uts/common/fs/smbsrv/smb_ofile.c +++ b/usr/src/uts/common/fs/smbsrv/smb_ofile.c @@ -199,7 +199,7 @@ smb_ofile_open( } state = FIDALLOC; - of = kmem_cache_alloc(tree->t_server->si_cache_ofile, KM_SLEEP); + of = kmem_cache_alloc(smb_cache_ofile, KM_SLEEP); bzero(of, sizeof (smb_ofile_t)); of->f_magic = SMB_OFILE_MAGIC; of->f_refcnt = 1; @@ -300,7 +300,7 @@ errout: case CRHELD: crfree(of->f_cr); of->f_magic = 0; - kmem_cache_free(tree->t_server->si_cache_ofile, of); + kmem_cache_free(smb_cache_ofile, of); /*FALLTHROUGH*/ case FIDALLOC: smb_idpool_free(&tree->t_fid_pool, fid); @@ -797,7 +797,7 @@ smb_ofile_seek( case SMB_SEEK_END: bzero(&attr, sizeof (smb_attr_t)); attr.sa_mask |= SMB_AT_SIZE; - rc = smb_fsop_getattr(NULL, kcred, of->f_node, &attr); + rc = smb_fsop_getattr(NULL, zone_kcred(), of->f_node, &attr); if (rc != 0) { mutex_exit(&of->f_mutex); return (rc); @@ -955,7 +955,7 @@ smb_ofile_delete(void *arg) mutex_destroy(&of->f_mutex); crfree(of->f_cr); smb_user_release(of->f_user); - kmem_cache_free(of->f_tree->t_server->si_cache_ofile, of); + kmem_cache_free(smb_cache_ofile, of); } /* @@ -968,7 +968,7 @@ uint32_t smb_ofile_access(smb_ofile_t *of, cred_t *cr, uint32_t access) { - if ((of == NULL) || (cr == kcred)) + if ((of == NULL) || (cr == zone_kcred())) return (NT_STATUS_SUCCESS); /* |