[SCM] Samba Shared Repository - branch master updated
David Disseldorp
ddiss at samba.org
Wed Jan 11 06:40:02 MST 2012
The branch, master has been updated
via 97818fd s3-rpcclient: add deldriverex flags argument
via 8dc9fbd spoolss: fix DPD_DELETE_ALL_FILES error return
from fc2c76f s4:auth: Make sure to check the optional auth_context hooks before using them
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 97818fd6e552f6ddc30f5b9728d6e82121150867
Author: David Disseldorp <ddiss at samba.org>
Date: Wed Jan 11 12:29:58 2012 +0100
s3-rpcclient: add deldriverex flags argument
The spoolss DeletePrinterDriverEx command offers three flags for
controlling how associated files and other versions of the driver are
effected: DPD_DELETE_UNUSED_FILES (1), DPD_DELETE_SPECIFIC_VERSION (2)
and DPD_DELETE_ALL_FILES (4).
This commit adds an optional numeric flags argument to the rpcclient
deldriverex command.
Signed-off-by: David Disseldorp <ddiss at samba.org>
Signed-off-by: Andreas Schneider <asn at samba.org>
Autobuild-User: David Disseldorp <ddiss at samba.org>
Autobuild-Date: Wed Jan 11 14:39:35 CET 2012 on sn-devel-104
commit 8dc9fbd3af0008aac70194ab69f50352a13b9230
Author: David Disseldorp <ddiss at samba.org>
Date: Tue Jan 10 18:21:42 2012 +0100
spoolss: fix DPD_DELETE_ALL_FILES error return
If DeletePrinterDriverEx is called with DPD_DELETE_ALL_FILES and files
assigned to the to-be-deleted driver overlap with other drivers then an
error is returned. Change the error code here to match Windows 2k8r2.
Signed-off-by: David Disseldorp <ddiss at samba.org>
Signed-off-by: Andreas Schneider <asn at samba.org>
-----------------------------------------------------------------------
Summary of changes:
docs-xml/manpages-3/rpcclient.1.xml | 11 +++++++----
source3/rpc_server/spoolss/srv_spoolss_nt.c | 3 +--
source3/rpcclient/cmd_spoolss.c | 14 +++++++-------
3 files changed, 15 insertions(+), 13 deletions(-)
Changeset truncated at 500 lines:
diff --git a/docs-xml/manpages-3/rpcclient.1.xml b/docs-xml/manpages-3/rpcclient.1.xml
index 40e4b9b..46d56ee 100644
--- a/docs-xml/manpages-3/rpcclient.1.xml
+++ b/docs-xml/manpages-3/rpcclient.1.xml
@@ -273,10 +273,13 @@ Comma Separated list of Files
only the entry from the server's list of drivers.
</para></listitem></varlistentry>
- <varlistentry><term>deldriverex <driver> [architecture] [version]
- </term><listitem><para>Delete the specified printer driver including driver files.
- You can limit this action to a specific architecture and a specific version.
- If no architecure is given, all driver files of that driver will be deleted.
+ <varlistentry><term>deldriverex <driver> [architecture] [version] [flags]
+ </term><listitem><para>Delete the specified printer driver and optionally files
+ associated with the driver.
+ You can limit this action to a specific architecture and a specific version.
+ If no architecure is given, all driver files of that driver will be deleted.
+ <parameter>flags</parameter> correspond to numeric DPD_* values, i.e. a value
+ of 3 requests (DPD_DELETE_UNUSED_FILES | DPD_DELETE_SPECIFIC_VERSION).
</para></listitem></varlistentry>
<varlistentry><term>enumdata</term><listitem><para>Enumerate all
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index 87df565..7a51703 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -2272,8 +2272,7 @@ WERROR _spoolss_DeletePrinterDriverEx(struct pipes_struct *p,
printer_driver_files_in_use(tmp_ctx,
b,
info)) {
- /* no idea of the correct error here */
- status = WERR_ACCESS_DENIED;
+ status = WERR_PRINTER_DRIVER_IN_USE;
goto done;
}
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 0e12201..21f70ae 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -1928,24 +1928,24 @@ static WERROR cmd_spoolss_deletedriverex(struct rpc_pipe_client *cli,
uint32_t delete_flags = 0;
/* parse the command arguments */
- if (argc < 2 || argc > 4) {
- printf ("Usage: %s <driver> [arch] [version]\n", argv[0]);
+ if (argc < 2 || argc > 5) {
+ printf("Usage: %s <driver> [arch] [version] [flags]\n", argv[0]);
return WERR_OK;
}
if (argc >= 3)
arch = argv[2];
- if (argc == 4)
- vers = atoi (argv[3]);
-
- if (vers >= 0) {
+ if (argc >= 4) {
+ vers = atoi(argv[3]);
delete_flags |= DPD_DELETE_SPECIFIC_VERSION;
}
+ if (argc == 5)
+ delete_flags = atoi(argv[4]);
/* delete the driver for all architectures */
for (i=0; archi_table[i].long_archi; i++) {
- if (arch && !strequal( archi_table[i].long_archi, arch))
+ if (arch && !strequal(archi_table[i].long_archi, arch))
continue;
if (vers >= 0 && archi_table[i].version != vers)
--
Samba Shared Repository
More information about the samba-cvs
mailing list