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)
TDB_CONTEXT *tdb;
TDB_DATA kbuf, newkey, 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]);
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,
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,
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,
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,
return run_rpc_command(c,
NULL,
- &ndr_table_spoolss.syntax_id,
+ &ndr_table_winreg.syntax_id,
0,
printing_migrate_internal,
argc,