The Samba-Bugzilla – Attachment 12540 Details for
Bug 8618
nt_printing_migrate writes path to driver files into registry
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for master (picked from v3-6-stable)
tmp.diff.txt (text/plain), 2.46 KB, created by
Stefan Metzmacher
on 2016-10-04 13:58:25 UTC
(
hide
)
Description:
Patch for master (picked from v3-6-stable)
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2016-10-04 13:58:25 UTC
Size:
2.46 KB
patch
obsolete
>From b99c2e183e349f1995fa6fdbeea93c29acd3e29c Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Bj=C3=B6rn=20Baumbach?= <bb@sernet.de> >Date: Fri, 18 Nov 2011 18:54:56 +0100 >Subject: [PATCH] s3-printing: fix migrate printer code (bug 8618) > >Removed path from driver files. >We only need the basenames. >(cherry picked from commit d61993043fcb7676a58658476421f5f4ff1a3fea) >(cherry picked from commit 9f07ef2249dc21eab37cd5888623e6edc84b2b59) > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=8618 > >Reviewed-by: Stefan Metzmacher <metze@samba.org> >--- > source3/printing/nt_printing_migrate.c | 27 +++++++++++++++++++++++++++ > 1 file changed, 27 insertions(+) > >diff --git a/source3/printing/nt_printing_migrate.c b/source3/printing/nt_printing_migrate.c >index eacafa2..f56aa70 100644 >--- a/source3/printing/nt_printing_migrate.c >+++ b/source3/printing/nt_printing_migrate.c >@@ -3,6 +3,7 @@ > * RPC Pipe client / server routines > * > * Copyright (c) Andreas Schneider 2010. >+ * Copyright (C) Bjoern Baumbach <bb@sernet.de> 2011 > * > * 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 >@@ -27,6 +28,20 @@ > #include "librpc/gen_ndr/ndr_security.h" > #include "rpc_client/cli_winreg_spoolss.h" > >+static const char *driver_file_basename(const char *file) >+{ >+ const char *basefile; >+ >+ basefile = strrchr(file, '\\'); >+ if (basefile == NULL) { >+ basefile = file; >+ } else { >+ basefile++; >+ } >+ >+ return basefile; >+} >+ > NTSTATUS printing_tdb_migrate_form(TALLOC_CTX *mem_ctx, > struct rpc_pipe_client *winreg_pipe, > const char *key_name, >@@ -101,6 +116,7 @@ NTSTATUS printing_tdb_migrate_driver(TALLOC_CTX *mem_ctx, > WERROR result; > const char *driver_name; > uint32_t driver_version; >+ int i; > > blob = data_blob_const(data, length); > >@@ -123,8 +139,19 @@ NTSTATUS printing_tdb_migrate_driver(TALLOC_CTX *mem_ctx, > ZERO_STRUCT(d3); > ZERO_STRUCT(a); > >+ /* remove paths from file names */ >+ if (r.dependent_files != NULL) { >+ for (i = 0 ; r.dependent_files[i] != NULL; i++) { >+ r.dependent_files[i] = driver_file_basename(r.dependent_files[i]); >+ } >+ } > a.string = r.dependent_files; > >+ r.driverpath = driver_file_basename(r.driverpath); >+ r.configfile = driver_file_basename(r.configfile); >+ r.datafile = driver_file_basename(r.datafile); >+ r.helpfile = driver_file_basename(r.helpfile); >+ > d3.architecture = r.environment; > d3.config_file = r.configfile; > d3.data_file = r.datafile; >-- >1.9.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
gd
:
review+
asn
:
review+
Actions:
View
Attachments on
bug 8618
:
7120
|
7125
|
7126
|
7162
| 12540 |
12568
|
12569
|
12570