From 2e7df84576d26bc37eb87b7e3c79fcb3fb358d68 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 15 Mar 2006 17:28:46 +0000 Subject: r14456: don't access the smbsrv_tcon inside the ntvfs modules metze (This used to be commit 5709c1c4e1a561dd9af98cfefbbbdac9b18765b7) --- source4/ntvfs/print/vfs_print.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source4/ntvfs/print') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index eb17ef9c63..bd1615d603 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -35,13 +35,11 @@ static NTSTATUS print_connect(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, const char *sharename) { - struct smbsrv_tcon *tcon = req->tcon; + ntvfs->ctx->fs_type = talloc_strdup(ntvfs->ctx, "NTFS"); + NT_STATUS_HAVE_NO_MEMORY(ntvfs->ctx->fs_type); - tcon->fs_type = talloc_strdup(tcon, "NTFS"); - NT_STATUS_HAVE_NO_MEMORY(tcon->fs_type); - - tcon->dev_type = talloc_strdup(tcon, "LPT1:"); - NT_STATUS_HAVE_NO_MEMORY(tcon->dev_type); + ntvfs->ctx->dev_type = talloc_strdup(ntvfs->ctx, "LPT1:"); + NT_STATUS_HAVE_NO_MEMORY(ntvfs->ctx->dev_type); return NT_STATUS_OK; } @@ -78,6 +76,8 @@ static NTSTATUS print_ioctl(struct ntvfs_module_context *ntvfs, } if (io->ioctl.in.request == IOCTL_QUERY_JOB_INFO) { + int snum = ntvfs->ctx->config.snum; + /* a request for the print job id of an open print job */ io->ioctl.out.blob = data_blob_talloc(req, NULL, 32); @@ -86,7 +86,7 @@ static NTSTATUS print_ioctl(struct ntvfs_module_context *ntvfs, p = (char *)io->ioctl.out.blob.data; SSVAL(p,0, 1 /* REWRITE: fsp->rap_print_jobid */); push_string(p+2, lp_netbios_name(), 15, STR_TERMINATE|STR_ASCII); - push_string(p+18, lp_servicename(req->tcon->service), 13, STR_TERMINATE|STR_ASCII); + push_string(p+18, lp_servicename(snum), 13, STR_TERMINATE|STR_ASCII); return NT_STATUS_OK; } -- cgit