From ef2e26c91b80556af033d3335e55f5dfa6fff31d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 Aug 2003 01:53:07 +0000 Subject: first public release of samba4 code (This used to be commit b0510b5428b3461aeb9bbe3cc95f62fc73e2b97f) --- source4/ntvfs/print/vfs_print.c | 104 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 source4/ntvfs/print/vfs_print.c (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c new file mode 100644 index 0000000000..2563f0ad9c --- /dev/null +++ b/source4/ntvfs/print/vfs_print.c @@ -0,0 +1,104 @@ +/* + Unix SMB/CIFS implementation. + default print NTVFS backend + Copyright (C) Andrew Tridgell 2003 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +/* + this implements the print backend, called by the NTVFS subsystem to + handle requests on printing shares +*/ + +#include "includes.h" + +/* + connect to a share - used when a tree_connect operation comes + in. For printing shares this should check that the spool directory + is available +*/ +static NTSTATUS print_connect(struct request_context *req, const char *sharename) +{ + return NT_STATUS_OK; +} + +/* + disconnect from a share +*/ +static NTSTATUS print_disconnect(struct tcon_context *conn) +{ + return NT_STATUS_OK; +} + +/* + lots of operations are not allowed on printing shares - mostly return NT_STATUS_ACCESS_DENIED +*/ +static NTSTATUS print_unlink(struct request_context *req, struct smb_unlink *unl) +{ + return NT_STATUS_ACCESS_DENIED; +} + + +/* + ioctl - used for job query +*/ +static NTSTATUS print_ioctl(struct request_context *req, struct smb_ioctl *io) +{ + char *p; + + if (io->in.request == IOCTL_QUERY_JOB_INFO) { + /* a request for the print job id of an open print job */ + io->out.blob = data_blob_talloc(req->mem_ctx, NULL, 32); + + memset(io->out.blob.data, 0, io->out.blob.length); + + p = io->out.blob.data; + SSVAL(p,0, 1 /* REWRITE: fsp->rap_print_jobid */); + push_string(NULL, p+2, lp_netbios_name(), 15, STR_TERMINATE|STR_ASCII); + push_string(NULL, p+18, lp_servicename(req->conn->service), 13, STR_TERMINATE|STR_ASCII); + return NT_STATUS_OK; + } + + return NT_STATUS_INVALID_PARAMETER; +} + + +/* + initialialise the print backend, registering ourselves with the ntvfs subsystem + */ +BOOL print_vfs_init(void) +{ + BOOL ret; + struct ntvfs_ops ops; + + ZERO_STRUCT(ops); + + /* fill in all the operations */ + ops.connect = print_connect; + ops.disconnect = print_disconnect; + ops.unlink = print_unlink; + ops.ioctl = print_ioctl; + + /* register ourselves with the NTVFS subsystem. We register under the name 'default' + as we wish to be the default backend */ + ret = ntvfs_register("default", NTVFS_PRINT, &ops); + + if (!ret) { + DEBUG(0,("Failed to register PRINT backend!\n")); + return False; + } + + return True; +} -- cgit From a846e592058726b670e40505493a4668bd856186 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 25 Nov 2003 03:15:26 +0000 Subject: CVS: ---------------------------------------------------------------------- CVS: Enter Log. Lines beginning with `CVS:' are removed automatically CVS: CVS: Committing in . CVS: CVS: Modified Files: CVS: Makefile.in configure.in include/includes.h include/ntvfs.h CVS: include/smb.h lib/iconv.c lib/module.c ntvfs/ntvfs_base.c CVS: ntvfs/cifs/vfs_cifs.c ntvfs/ipc/vfs_ipc.c CVS: ntvfs/posix/vfs_posix.c ntvfs/print/vfs_print.c CVS: ntvfs/reference/vfs_ref.c ntvfs/simple/vfs_simple.c CVS: passdb/pdb_interface.c CVS: Added Files: CVS: include/module.h CVS: ---------------------------------------------------------------------- Update to the modules system. Fixed: - get rid of smb_probe_module - merge older updates from 3.0 - introduced register_subsystem() and register_backend() functions - adapt ntvfs and charset to use new register functions - made smb_load_modules() work recursively (e.g. 'preload modules = /usr/lib/samba') - got rid of some old remains Things that still need work: - Did I break tankFS? I don't think so, but I can't test it here :-( - Add 'postload modules = ' (for modules that need to be loaded after fork() in smbd, if applicable) - Convert RPC, auth, passdb, etc to use new register_{subsystem,backend}() functions - Accept wildcards in 'preload modules' option, instead of loading recursively (This used to be commit 7512b9ab1a8b3103f7a6c13f736353c46a26b668) --- source4/ntvfs/print/vfs_print.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index 2563f0ad9c..82829d759a 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -78,13 +78,16 @@ static NTSTATUS print_ioctl(struct request_context *req, struct smb_ioctl *io) /* initialialise the print backend, registering ourselves with the ntvfs subsystem */ -BOOL print_vfs_init(void) +NTSTATUS ntvfs_print_init(void) { - BOOL ret; + NTSTATUS ret; struct ntvfs_ops ops; ZERO_STRUCT(ops); + ops.name = "default"; + ops.type = NTVFS_PRINT; + /* fill in all the operations */ ops.connect = print_connect; ops.disconnect = print_disconnect; @@ -93,12 +96,11 @@ BOOL print_vfs_init(void) /* register ourselves with the NTVFS subsystem. We register under the name 'default' as we wish to be the default backend */ - ret = ntvfs_register("default", NTVFS_PRINT, &ops); + ret = register_backend("ntvfs", &ops); - if (!ret) { + if (!NT_STATUS_IS_OK(ret)) { DEBUG(0,("Failed to register PRINT backend!\n")); - return False; } - return True; + return ret; } -- cgit From 926240428c0646aabb13539745940b61a7cf44a9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 4 Dec 2003 02:03:06 +0000 Subject: * patch based on work by Jim Myers to unify the ioctl handling to be more like the other major SMB functions * added SMBntrename code (This used to be commit f2d3dc9893fa0e089c407fa16ce9ff13587e70cd) --- source4/ntvfs/print/vfs_print.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index 82829d759a..a9484d4329 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -54,17 +54,21 @@ static NTSTATUS print_unlink(struct request_context *req, struct smb_unlink *unl /* ioctl - used for job query */ -static NTSTATUS print_ioctl(struct request_context *req, struct smb_ioctl *io) +static NTSTATUS print_ioctl(struct request_context *req, union smb_ioctl *io) { char *p; - if (io->in.request == IOCTL_QUERY_JOB_INFO) { + if (io->generic.level != RAW_IOCTL_IOCTL) { + return NT_STATUS_NOT_IMPLEMENTED; + } + + if (io->ioctl.in.request == IOCTL_QUERY_JOB_INFO) { /* a request for the print job id of an open print job */ - io->out.blob = data_blob_talloc(req->mem_ctx, NULL, 32); + io->ioctl.out.blob = data_blob_talloc(req->mem_ctx, NULL, 32); - memset(io->out.blob.data, 0, io->out.blob.length); + data_blob_clear(&io->ioctl.out.blob); - p = io->out.blob.data; + p = io->ioctl.out.blob.data; SSVAL(p,0, 1 /* REWRITE: fsp->rap_print_jobid */); push_string(NULL, p+2, lp_netbios_name(), 15, STR_TERMINATE|STR_ASCII); push_string(NULL, p+18, lp_servicename(req->conn->service), 13, STR_TERMINATE|STR_ASCII); -- cgit From 894e02f80c254da4edca5dbae99561d205c63fbe Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 2 Feb 2004 13:28:29 +0000 Subject: some DEBUG and comment fixes metze (This used to be commit 5ac4f878687eb0fa95a2e5830a8372168a27d3b3) --- source4/ntvfs/print/vfs_print.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index a9484d4329..f56b906501 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -88,7 +88,8 @@ NTSTATUS ntvfs_print_init(void) struct ntvfs_ops ops; ZERO_STRUCT(ops); - + + /* fill in the name and type */ ops.name = "default"; ops.type = NTVFS_PRINT; -- cgit From 4ddb2d347d86818a13d71d0eb2f0f8983c2cc41f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 28 Jun 2004 08:27:36 +0000 Subject: r1279: rename struct tcon_context to smbsrv_tcon metze (This used to be commit 99473fab4b1ff87a795f3c08f4c521d9beb504c0) --- source4/ntvfs/print/vfs_print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index f56b906501..a2ac429458 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -37,7 +37,7 @@ static NTSTATUS print_connect(struct request_context *req, const char *sharename /* disconnect from a share */ -static NTSTATUS print_disconnect(struct tcon_context *conn) +static NTSTATUS print_disconnect(struct smbsrv_tcon *tcon) { return NT_STATUS_OK; } @@ -71,7 +71,7 @@ static NTSTATUS print_ioctl(struct request_context *req, union smb_ioctl *io) p = io->ioctl.out.blob.data; SSVAL(p,0, 1 /* REWRITE: fsp->rap_print_jobid */); push_string(NULL, p+2, lp_netbios_name(), 15, STR_TERMINATE|STR_ASCII); - push_string(NULL, p+18, lp_servicename(req->conn->service), 13, STR_TERMINATE|STR_ASCII); + push_string(NULL, p+18, lp_servicename(req->tcon->service), 13, STR_TERMINATE|STR_ASCII); return NT_STATUS_OK; } -- cgit From 8bf537d119be3e1823ad41b8b8af0d163251b1c5 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 28 Jun 2004 08:39:00 +0000 Subject: r1280: rename struct request_context to smbsrv_request metze (This used to be commit a85d2db5826a84b812ea5162a11f54edd25f74e3) --- source4/ntvfs/print/vfs_print.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index a2ac429458..fa5835843a 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -29,7 +29,7 @@ in. For printing shares this should check that the spool directory is available */ -static NTSTATUS print_connect(struct request_context *req, const char *sharename) +static NTSTATUS print_connect(struct smbsrv_request *req, const char *sharename) { return NT_STATUS_OK; } @@ -45,7 +45,7 @@ static NTSTATUS print_disconnect(struct smbsrv_tcon *tcon) /* lots of operations are not allowed on printing shares - mostly return NT_STATUS_ACCESS_DENIED */ -static NTSTATUS print_unlink(struct request_context *req, struct smb_unlink *unl) +static NTSTATUS print_unlink(struct smbsrv_request *req, struct smb_unlink *unl) { return NT_STATUS_ACCESS_DENIED; } @@ -54,7 +54,7 @@ static NTSTATUS print_unlink(struct request_context *req, struct smb_unlink *unl /* ioctl - used for job query */ -static NTSTATUS print_ioctl(struct request_context *req, union smb_ioctl *io) +static NTSTATUS print_ioctl(struct smbsrv_request *req, union smb_ioctl *io) { char *p; -- cgit From 893c62d38388b20c52cf3c45069d836c46f42bd3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 8 Sep 2004 05:39:06 +0000 Subject: r2249: got rid of some more mem_ctx elements in structures (This used to be commit 21ef338cbbe96acc8594ffc550ef60c6a40fb951) --- source4/ntvfs/print/vfs_print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index fa5835843a..4b50e3e6e5 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -64,7 +64,7 @@ static NTSTATUS print_ioctl(struct smbsrv_request *req, union smb_ioctl *io) if (io->ioctl.in.request == IOCTL_QUERY_JOB_INFO) { /* a request for the print job id of an open print job */ - io->ioctl.out.blob = data_blob_talloc(req->mem_ctx, NULL, 32); + io->ioctl.out.blob = data_blob_talloc(req, NULL, 32); data_blob_clear(&io->ioctl.out.blob); -- cgit From 9a9dcc7250ccd4544cb797c15b3bc3dfbb760be0 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 23 Sep 2004 00:51:45 +0000 Subject: r2552: Character set conversion and string handling updates. The intial motivation for this commit was to merge in some of the bugfixes present in Samba3's chrcnv and string handling code into Samba4. However, along the way I found a lot of unused functions, and decided to do a bit more... The strlen_m code now does not use a fixed buffer, but more work is needed to finish off other functions in str_util.c. These fixed length buffers hav caused very nasty, hard to chase down bugs at some sites. The strupper_m() function has a strupper_talloc() to replace it (we need to go around and fix more uses, but it's a start). Use of these new functions will avoid bugs where the upper or lowercase version of a string is a different length. I have removed the push_*_allocate functions, which are replaced by calls to push_*_talloc. Likewise, pstring and other 'fixed length' wrappers are removed, where possible. I have removed the first ('base pointer') argument, used by push_ucs2, as the Samba4 way of doing things ensures that this is always on an even boundary anyway. (It was used in only one place, in any case). (This used to be commit dfecb0150627b500cb026b8a4932fe87902ca392) --- source4/ntvfs/print/vfs_print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index 4b50e3e6e5..7405697bb9 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -70,8 +70,8 @@ static NTSTATUS print_ioctl(struct smbsrv_request *req, union smb_ioctl *io) p = io->ioctl.out.blob.data; SSVAL(p,0, 1 /* REWRITE: fsp->rap_print_jobid */); - push_string(NULL, p+2, lp_netbios_name(), 15, STR_TERMINATE|STR_ASCII); - push_string(NULL, p+18, lp_servicename(req->tcon->service), 13, STR_TERMINATE|STR_ASCII); + 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); return NT_STATUS_OK; } -- cgit From 18104c5679331c763f513f4c01b67b68f7a746fd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 25 Sep 2004 12:48:09 +0000 Subject: r2633: fixed some function types in the (unused) print backend (This used to be commit e9803058ecc0b0f849aee48a077bff4e2c8feaa5) --- source4/ntvfs/print/vfs_print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index 7405697bb9..0e6824a14e 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -29,7 +29,7 @@ in. For printing shares this should check that the spool directory is available */ -static NTSTATUS print_connect(struct smbsrv_request *req, const char *sharename) +static NTSTATUS print_connect(struct smbsrv_request *req, const char *sharename, int depth) { return NT_STATUS_OK; } @@ -37,7 +37,7 @@ static NTSTATUS print_connect(struct smbsrv_request *req, const char *sharename) /* disconnect from a share */ -static NTSTATUS print_disconnect(struct smbsrv_tcon *tcon) +static NTSTATUS print_disconnect(struct smbsrv_tcon *tcon, int depth) { return NT_STATUS_OK; } -- cgit From dcad0f6fd492506efd9a69b4e32c7bbfa5da90e5 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 29 Sep 2004 13:17:09 +0000 Subject: r2751: this is a new ntvfs design which tries to solve: - the stacking of modules - finding the modules private data - hide the ntvfs details from the calling layer - I set NTVFS_INTERFACE_VERSION 0 till we are closer to release (because we need to solve some async problems with the module stacking) metze (This used to be commit 3ff03b5cb21bb79afdd3b1609be9635f6688a539) --- source4/ntvfs/print/vfs_print.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index 0e6824a14e..d487392e6f 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -29,7 +29,8 @@ in. For printing shares this should check that the spool directory is available */ -static NTSTATUS print_connect(struct smbsrv_request *req, const char *sharename, int depth) +static NTSTATUS print_connect(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, const char *sharename) { return NT_STATUS_OK; } @@ -37,7 +38,8 @@ static NTSTATUS print_connect(struct smbsrv_request *req, const char *sharename, /* disconnect from a share */ -static NTSTATUS print_disconnect(struct smbsrv_tcon *tcon, int depth) +static NTSTATUS print_disconnect(struct ntvfs_module_context *ntvfs, + struct smbsrv_tcon *tcon) { return NT_STATUS_OK; } @@ -45,7 +47,8 @@ static NTSTATUS print_disconnect(struct smbsrv_tcon *tcon, int depth) /* lots of operations are not allowed on printing shares - mostly return NT_STATUS_ACCESS_DENIED */ -static NTSTATUS print_unlink(struct smbsrv_request *req, struct smb_unlink *unl) +static NTSTATUS print_unlink(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, struct smb_unlink *unl) { return NT_STATUS_ACCESS_DENIED; } @@ -54,7 +57,8 @@ static NTSTATUS print_unlink(struct smbsrv_request *req, struct smb_unlink *unl) /* ioctl - used for job query */ -static NTSTATUS print_ioctl(struct smbsrv_request *req, union smb_ioctl *io) +static NTSTATUS print_ioctl(struct ntvfs_module_context *ntvfs, + struct smbsrv_request *req, union smb_ioctl *io) { char *p; -- cgit From 3643fb11092e28a9538ef32cedce8ff21ad86a28 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 06:42:15 +0000 Subject: r3463: separated out some more headers (asn_1.h, messages.h, dlinklist.h and ioctl.h) (This used to be commit b97e395c814762024336c1cf4d7c25be8da5813a) --- source4/ntvfs/print/vfs_print.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index d487392e6f..b1155a0761 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -23,6 +23,7 @@ */ #include "includes.h" +#include "ioctl.h" /* connect to a share - used when a tree_connect operation comes -- cgit From aa34fcebf8aa0660574a7c6976b33b3f37985e27 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Nov 2004 07:18:24 +0000 Subject: r3466: split out request.h, signing.h, and smb_server.h (This used to be commit 7c4e6ebf05790dd6e29896dd316db0fff613aa4e) --- source4/ntvfs/print/vfs_print.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index b1155a0761..372f64e982 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -24,6 +24,7 @@ #include "includes.h" #include "ioctl.h" +#include "smb_server/smb_server.h" /* connect to a share - used when a tree_connect operation comes -- cgit From 31ded4901b4529ad2e49871502cab5ecba71483a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 14 Nov 2004 22:23:23 +0000 Subject: r3737: - Get rid of the register_subsystem() and register_backend() functions. - Re-disable tdbtool (it was building fine on my Debian box but other machines were having problems) (This used to be commit 0d7bb2c40b7a9ed59df3f8944133ea562697e814) --- source4/ntvfs/print/vfs_print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index 372f64e982..4e2dfad0ca 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -107,7 +107,7 @@ NTSTATUS ntvfs_print_init(void) /* register ourselves with the NTVFS subsystem. We register under the name 'default' as we wish to be the default backend */ - ret = register_backend("ntvfs", &ops); + ret = ntvfs_register(&ops); if (!NT_STATUS_IS_OK(ret)) { DEBUG(0,("Failed to register PRINT backend!\n")); -- cgit From 3308087bae76a99c02687bd11f4237d803f9f605 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 25 Nov 2004 20:01:47 +0000 Subject: r3971: fix compiler warnings metze (This used to be commit 234166606dc86b9e98226cff94b3869ec173671e) --- source4/ntvfs/print/vfs_print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index 4e2dfad0ca..c62357c949 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -74,7 +74,7 @@ static NTSTATUS print_ioctl(struct ntvfs_module_context *ntvfs, data_blob_clear(&io->ioctl.out.blob); - p = io->ioctl.out.blob.data; + 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); -- cgit From 90428a44a91d0a97769ba6c2d8459c35a9e96b12 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 22 Feb 2005 11:33:33 +0000 Subject: r5500: ntvfs modules that are the final backend needs to set the dev and fs types this prevents the main smbsrv code from crashing when someone does a tree connect on a print share metze (This used to be commit e8b081d5d10ef617eaed88fd05990e7753a85b99) --- source4/ntvfs/print/vfs_print.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index c62357c949..c04cf76f33 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -34,6 +34,14 @@ static NTSTATUS print_connect(struct ntvfs_module_context *ntvfs, struct smbsrv_request *req, const char *sharename) { + struct smbsrv_tcon *tcon = req->tcon; + + 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); + return NT_STATUS_OK; } -- cgit From 0a3c167f6bcf08b2204ca49831ca49eef73dcbf4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 27 Dec 2005 22:51:30 +0000 Subject: r12528: Add seperate proto headers for ntvfs, tdr, smb_server and nbt_server. (This used to be commit 87f665a1d5ba74289974bf9d8f9441c162e6f1b1) --- source4/ntvfs/print/vfs_print.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index c04cf76f33..e933f5502b 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -25,6 +25,7 @@ #include "includes.h" #include "ioctl.h" #include "smb_server/smb_server.h" +#include "ntvfs/ntvfs.h" /* connect to a share - used when a tree_connect operation comes -- cgit From dfc517b05395d925a4d7b1ce9633a849f9468e70 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 23 Feb 2006 15:52:24 +0000 Subject: r13658: More moving around of files: - Collect the generic utility functions into a lib/util/ (a la GLib is for the GNOME folks) - Remove even more files from include/ (This used to be commit ba62880f5b05c2a505dc7f54676b231197a7e707) --- source4/ntvfs/print/vfs_print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index e933f5502b..b0c34b2abe 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -23,7 +23,7 @@ */ #include "includes.h" -#include "ioctl.h" +#include "libcli/raw/ioctl.h" #include "smb_server/smb_server.h" #include "ntvfs/ntvfs.h" -- cgit From 86497db6113c4ec3210d671c3fcf957d1026098c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 10 Mar 2006 14:31:17 +0000 Subject: r14157: - pass a struct ntvfs_request to the ntvfs layer (for now we just do #define ntvfs_request smbsrv_request, but it's the first step...) - rename ntvfs_openfile() -> ntvfs_open() - fix the talloc hierachie in some places in the ntvfs_map_*() code metze (This used to be commit ed9ed1f48f602354810937c0b0de850b44322191) --- source4/ntvfs/print/vfs_print.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index b0c34b2abe..1c7699566d 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -33,7 +33,7 @@ is available */ static NTSTATUS print_connect(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, const char *sharename) + struct ntvfs_request *req, const char *sharename) { struct smbsrv_tcon *tcon = req->tcon; @@ -49,8 +49,7 @@ static NTSTATUS print_connect(struct ntvfs_module_context *ntvfs, /* disconnect from a share */ -static NTSTATUS print_disconnect(struct ntvfs_module_context *ntvfs, - struct smbsrv_tcon *tcon) +static NTSTATUS print_disconnect(struct ntvfs_module_context *ntvfs) { return NT_STATUS_OK; } @@ -59,7 +58,7 @@ static NTSTATUS print_disconnect(struct ntvfs_module_context *ntvfs, lots of operations are not allowed on printing shares - mostly return NT_STATUS_ACCESS_DENIED */ static NTSTATUS print_unlink(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, struct smb_unlink *unl) + struct ntvfs_request *req, struct smb_unlink *unl) { return NT_STATUS_ACCESS_DENIED; } @@ -69,7 +68,7 @@ static NTSTATUS print_unlink(struct ntvfs_module_context *ntvfs, ioctl - used for job query */ static NTSTATUS print_ioctl(struct ntvfs_module_context *ntvfs, - struct smbsrv_request *req, union smb_ioctl *io) + struct ntvfs_request *req, union smb_ioctl *io) { char *p; -- cgit From 307e43bb5628e8b53a930c2928279af994281ba5 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 10 Mar 2006 20:49:20 +0000 Subject: r14173: change smb interface structures to always use a union smb_file, to abtract - const char *path fot qpathinfo and setpathinfo - uint16_t fnum for SMB - smb2_handle handle for SMB2 the idea is to later add a struct ntvfs_handle *ntvfs so that the ntvfs subsystem don't need to know the difference between SMB and SMB2 metze (This used to be commit 2ef3f5970901b5accdb50f0d0115b5d46b0c788f) --- source4/ntvfs/print/vfs_print.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index 1c7699566d..eb17ef9c63 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -58,7 +58,8 @@ static NTSTATUS print_disconnect(struct ntvfs_module_context *ntvfs) lots of operations are not allowed on printing shares - mostly return NT_STATUS_ACCESS_DENIED */ static NTSTATUS print_unlink(struct ntvfs_module_context *ntvfs, - struct ntvfs_request *req, struct smb_unlink *unl) + struct ntvfs_request *req, + union smb_unlink *unl) { return NT_STATUS_ACCESS_DENIED; } -- cgit 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/vfs_print.c') 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 From ad06a8bd651e3a8b598c92a356ac1ce4117ae72e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 26 Mar 2006 01:23:40 +0000 Subject: r14736: - the ntvfs subsystem should not know about smb_server.h - the process module subsystem should not know about smb_server.h - the smb_server module should not know about process models metze (This used to be commit bac95bb8f4ad35a31ee666f5916ff9b2f292d964) --- source4/ntvfs/print/vfs_print.c | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index bd1615d603..1aa38a59c2 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -24,7 +24,6 @@ #include "includes.h" #include "libcli/raw/ioctl.h" -#include "smb_server/smb_server.h" #include "ntvfs/ntvfs.h" /* -- cgit From f380d365eaad89db2c46331a3fa2d5d8600aeba1 Mon Sep 17 00:00:00 2001 From: James Peach Date: Sun, 23 Apr 2006 23:44:14 +0000 Subject: r15185: Force all NTVFS modules to provide a critical sizes structure so the version information can be checked when modules are registered. (This used to be commit 95eb55806339fc5409c0adf137ebd5bffd7098ac) --- source4/ntvfs/print/vfs_print.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index 1aa38a59c2..31cfcc9303 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -100,6 +100,7 @@ NTSTATUS ntvfs_print_init(void) { NTSTATUS ret; struct ntvfs_ops ops; + NTVFS_CURRENT_CRITICAL_SIZES(vers); ZERO_STRUCT(ops); @@ -115,7 +116,7 @@ NTSTATUS ntvfs_print_init(void) /* register ourselves with the NTVFS subsystem. We register under the name 'default' as we wish to be the default backend */ - ret = ntvfs_register(&ops); + ret = ntvfs_register(&ops, &vers); if (!NT_STATUS_IS_OK(ret)) { DEBUG(0,("Failed to register PRINT backend!\n")); -- cgit From 6ab33938d5239e8688440f65e802f627622d301b Mon Sep 17 00:00:00 2001 From: James Peach Date: Mon, 24 Apr 2006 00:16:51 +0000 Subject: r15186: Introduce ISDOT and ISDOTDOT macros for testing whether a filename is "." for "..". These express the intention better that strcmp or strequal and improve searchability via cscope/ctags. (This used to be commit 7e4ad7e8e5ec266b969e3075c4ad7f021571f24e) --- source4/ntvfs/print/vfs_print.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index 31cfcc9303..1aa38a59c2 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -100,7 +100,6 @@ NTSTATUS ntvfs_print_init(void) { NTSTATUS ret; struct ntvfs_ops ops; - NTVFS_CURRENT_CRITICAL_SIZES(vers); ZERO_STRUCT(ops); @@ -116,7 +115,7 @@ NTSTATUS ntvfs_print_init(void) /* register ourselves with the NTVFS subsystem. We register under the name 'default' as we wish to be the default backend */ - ret = ntvfs_register(&ops, &vers); + ret = ntvfs_register(&ops); if (!NT_STATUS_IS_OK(ret)) { DEBUG(0,("Failed to register PRINT backend!\n")); -- cgit From 7baa8a13aa751e2a1de287d43de0884ea638f04e Mon Sep 17 00:00:00 2001 From: James Peach Date: Mon, 24 Apr 2006 01:26:31 +0000 Subject: r15188: Restore svn rev. 15183, 15184 and 15185, which I inadvertantly clobbered in r15186. I don't think I should be allowed to use quilt and svn at the same time any more :( (This used to be commit e0ca5ead27743c84f5d9310a05d6d718862ead1d) --- source4/ntvfs/print/vfs_print.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index 1aa38a59c2..31cfcc9303 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -100,6 +100,7 @@ NTSTATUS ntvfs_print_init(void) { NTSTATUS ret; struct ntvfs_ops ops; + NTVFS_CURRENT_CRITICAL_SIZES(vers); ZERO_STRUCT(ops); @@ -115,7 +116,7 @@ NTSTATUS ntvfs_print_init(void) /* register ourselves with the NTVFS subsystem. We register under the name 'default' as we wish to be the default backend */ - ret = ntvfs_register(&ops); + ret = ntvfs_register(&ops, &vers); if (!NT_STATUS_IS_OK(ret)) { DEBUG(0,("Failed to register PRINT backend!\n")); -- cgit From 9c66f601f1520a99b9236c32bc9f03a33bd4b2aa Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 23 Jul 2006 18:43:07 +0000 Subject: r17206: Add a modular API for share configuration. Commit the classic backwards compatible module which is the default one (This used to be commit a89cc346b9296cb49929898d257a064a6c2bae86) --- source4/ntvfs/print/vfs_print.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index 31cfcc9303..dfe76b846e 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -75,7 +75,6 @@ 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); @@ -85,7 +84,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(snum), 13, STR_TERMINATE|STR_ASCII); + push_string(p+18, ntvfs->ctx->config->name, 13, STR_TERMINATE|STR_ASCII); return NT_STATUS_OK; } -- cgit From 0479a2f1cbae51fcd8dbdc3c148c808421fb4d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:07:03 +0000 Subject: r23792: convert Samba4 to GPLv3 There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa) --- source4/ntvfs/print/vfs_print.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index dfe76b846e..30bb530ee9 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -5,7 +5,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -14,8 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ /* this implements the print backend, called by the NTVFS subsystem to -- cgit From ffeee68e4b72dd94fee57366bd8d38b8c284c3d4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 8 Sep 2007 12:42:09 +0000 Subject: r25026: Move param/param.h out of includes.h (This used to be commit abe8349f9b4387961ff3665d8c589d61cd2edf31) --- source4/ntvfs/print/vfs_print.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index 30bb530ee9..120f88373c 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -24,6 +24,7 @@ #include "includes.h" #include "libcli/raw/ioctl.h" #include "ntvfs/ntvfs.h" +#include "param/param.h" /* connect to a share - used when a tree_connect operation comes -- cgit From 37d53832a4623653f706e77985a79d84bd7c6694 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 28 Sep 2007 01:17:46 +0000 Subject: r25398: Parse loadparm context to all lp_*() functions. (This used to be commit 3fcc960839c6e5ca4de2c3c042f12f369ac5f238) --- source4/ntvfs/print/vfs_print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index 120f88373c..f9d3235116 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -83,7 +83,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+2, lp_netbios_name(global_loadparm), 15, STR_TERMINATE|STR_ASCII); push_string(p+18, ntvfs->ctx->config->name, 13, STR_TERMINATE|STR_ASCII); return NT_STATUS_OK; } -- cgit From 39ee38d9c1aabf4db065b433d067d0da053d7d61 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 6 Dec 2007 17:52:23 +0100 Subject: r26316: Use contexts for conversion functions. (This used to be commit f6420d933b5b011d428974f3a2a57edf19e6f482) --- source4/ntvfs/print/vfs_print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index f9d3235116..baa1d876d6 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -83,8 +83,8 @@ 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(global_loadparm), 15, STR_TERMINATE|STR_ASCII); - push_string(p+18, ntvfs->ctx->config->name, 13, STR_TERMINATE|STR_ASCII); + push_string(global_smb_iconv_convenience, p+2, lp_netbios_name(global_loadparm), 15, STR_TERMINATE|STR_ASCII); + push_string(global_smb_iconv_convenience, p+18, ntvfs->ctx->config->name, 13, STR_TERMINATE|STR_ASCII); return NT_STATUS_OK; } -- cgit From a72c5053c587f0ed6113ef514fe3739cb81e7abf Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 8 Dec 2007 23:32:43 +0100 Subject: r26353: Remove use of global_loadparm. (This used to be commit 17637e4490e42db6cdef619286c4d5a0982e9d1a) --- source4/ntvfs/print/vfs_print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index baa1d876d6..5fdb7aada6 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -83,7 +83,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(global_smb_iconv_convenience, p+2, lp_netbios_name(global_loadparm), 15, STR_TERMINATE|STR_ASCII); + push_string(global_smb_iconv_convenience, p+2, lp_netbios_name(ntvfs->ctx->lp_ctx), 15, STR_TERMINATE|STR_ASCII); push_string(global_smb_iconv_convenience, p+18, ntvfs->ctx->config->name, 13, STR_TERMINATE|STR_ASCII); return NT_STATUS_OK; } -- cgit From d891c0c74a03d797aed1c5ac0329fd9d1d78da63 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 13 Dec 2007 22:46:09 +0100 Subject: r26429: Avoid use of global_smb_iconv_convenience. (This used to be commit d37136b7abfbba75ef2e5ab855eb3382b9648b8c) --- source4/ntvfs/print/vfs_print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index 5fdb7aada6..267f325dd4 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -83,8 +83,8 @@ 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(global_smb_iconv_convenience, p+2, lp_netbios_name(ntvfs->ctx->lp_ctx), 15, STR_TERMINATE|STR_ASCII); - push_string(global_smb_iconv_convenience, p+18, ntvfs->ctx->config->name, 13, STR_TERMINATE|STR_ASCII); + push_string(lp_iconv_convenience(global_loadparm), p+2, lp_netbios_name(ntvfs->ctx->lp_ctx), 15, STR_TERMINATE|STR_ASCII); + push_string(lp_iconv_convenience(global_loadparm), p+18, ntvfs->ctx->config->name, 13, STR_TERMINATE|STR_ASCII); return NT_STATUS_OK; } -- cgit From 96a200511e884a88dcf48fa5b313b2cddb2df566 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 14 Dec 2007 00:27:31 +0100 Subject: r26443: Remove global_loadparm instances. (This used to be commit 8242c696235d1bfb402b5c276a57f36d93610545) --- source4/ntvfs/print/vfs_print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/ntvfs/print/vfs_print.c') diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index 267f325dd4..aa9b11a973 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -83,8 +83,8 @@ 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(lp_iconv_convenience(global_loadparm), p+2, lp_netbios_name(ntvfs->ctx->lp_ctx), 15, STR_TERMINATE|STR_ASCII); - push_string(lp_iconv_convenience(global_loadparm), p+18, ntvfs->ctx->config->name, 13, STR_TERMINATE|STR_ASCII); + push_string(lp_iconv_convenience(ntvfs->ctx->lp_ctx), p+2, lp_netbios_name(ntvfs->ctx->lp_ctx), 15, STR_TERMINATE|STR_ASCII); + push_string(lp_iconv_convenience(ntvfs->ctx->lp_ctx), p+18, ntvfs->ctx->config->name, 13, STR_TERMINATE|STR_ASCII); return NT_STATUS_OK; } -- cgit