summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-07-05 02:33:23 +0200
committerGünther Deschner <gd@samba.org>2011-07-07 18:06:02 +0200
commit57bbb32c64db1027e2b9ae1aef7f5f3b33ae3882 (patch)
tree8ea5513245e4b2b7c9fc41e4b6caaf0c4c962838 /source3/utils
parent8f3d5f5333a61922c4ea7ff1e1d244978958e857 (diff)
downloadsamba-57bbb32c64db1027e2b9ae1aef7f5f3b33ae3882.tar.gz
samba-57bbb32c64db1027e2b9ae1aef7f5f3b33ae3882.tar.bz2
samba-57bbb32c64db1027e2b9ae1aef7f5f3b33ae3882.zip
s3-printing: remove spoolss pipe from migration library, only using winreg finally.
Guenther Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_printing.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/source3/utils/net_printing.c b/source3/utils/net_printing.c
index 9c2f70082d..cefbd6eec6 100644
--- a/source3/utils/net_printing.c
+++ b/source3/utils/net_printing.c
@@ -224,7 +224,7 @@ static NTSTATUS printing_migrate_internal(struct net_context *c,
const struct dom_sid *domain_sid,
const char *domain_name,
struct cli_state *cli,
- struct rpc_pipe_client *pipe_hnd,
+ struct rpc_pipe_client *winreg_pipe,
TALLOC_CTX *mem_ctx,
int argc,
const char **argv)
@@ -233,22 +233,12 @@ static NTSTATUS printing_migrate_internal(struct net_context *c,
TDB_CONTEXT *tdb;
TDB_DATA kbuf, dbuf;
NTSTATUS status;
- struct rpc_pipe_client *winreg_pipe = NULL;
tmp_ctx = talloc_new(mem_ctx);
if (tmp_ctx == NULL) {
return NT_STATUS_NO_MEMORY;
}
- status = cli_rpc_pipe_open_noauth(rpc_pipe_np_smb_conn(pipe_hnd),
- &ndr_table_winreg.syntax_id,
- &winreg_pipe);
- if (!NT_STATUS_IS_OK(status)) {
- d_fprintf(stderr, _("failed to open winreg pipe: %s\n"),
- nt_errstr(status));
- goto done;
- }
-
tdb = tdb_open_log(argv[0], 0, TDB_DEFAULT, O_RDONLY, 0600);
if (tdb == NULL) {
d_fprintf(stderr, _("failed to open tdb file: %s\n"), argv[0]);
@@ -267,7 +257,6 @@ static NTSTATUS printing_migrate_internal(struct net_context *c,
if (strncmp((const char *) kbuf.dptr, FORMS_PREFIX, strlen(FORMS_PREFIX)) == 0) {
printing_tdb_migrate_form(tmp_ctx,
- pipe_hnd,
winreg_pipe,
(const char *) kbuf.dptr + strlen(FORMS_PREFIX),
dbuf.dptr,
@@ -278,7 +267,6 @@ static NTSTATUS printing_migrate_internal(struct net_context *c,
if (strncmp((const char *) kbuf.dptr, DRIVERS_PREFIX, strlen(DRIVERS_PREFIX)) == 0) {
printing_tdb_migrate_driver(tmp_ctx,
- pipe_hnd,
winreg_pipe,
(const char *) kbuf.dptr + strlen(DRIVERS_PREFIX),
dbuf.dptr,
@@ -289,7 +277,6 @@ static NTSTATUS printing_migrate_internal(struct net_context *c,
if (strncmp((const char *) kbuf.dptr, PRINTERS_PREFIX, strlen(PRINTERS_PREFIX)) == 0) {
printing_tdb_migrate_printer(tmp_ctx,
- pipe_hnd,
winreg_pipe,
(const char *) kbuf.dptr + strlen(PRINTERS_PREFIX),
dbuf.dptr,
@@ -300,7 +287,6 @@ static NTSTATUS printing_migrate_internal(struct net_context *c,
if (strncmp((const char *) kbuf.dptr, SECDESC_PREFIX, strlen(SECDESC_PREFIX)) == 0) {
printing_tdb_migrate_secdesc(tmp_ctx,
- pipe_hnd,
winreg_pipe,
(const char *) kbuf.dptr + strlen(SECDESC_PREFIX),
dbuf.dptr,
@@ -333,7 +319,7 @@ static int net_printing_migrate(struct net_context *c,
return run_rpc_command(c,
NULL,
- &ndr_table_spoolss.syntax_id,
+ &ndr_table_winreg.syntax_id,
0,
printing_migrate_internal,
argc,