[SCM] Samba Shared Repository - branch master updated -
release-4-0-0alpha6-1008-ge9c42e3
Günther Deschner
gd at samba.org
Thu Feb 19 18:21:03 GMT 2009
The branch, master has been updated
via e9c42e3c21cdc1fa25a05ef0f2edc4ca9b0b486e (commit)
via ebb3b307006d913b943a3cb341b32843e9ac6200 (commit)
via 0038acb20d1c5ed8eea632adf631ed84f960165f (commit)
via bcb5331fa7e8711e22c9543c59efa442143a6cc6 (commit)
from 4f803502ef0bca3fee5017469f858bea702b069d (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit e9c42e3c21cdc1fa25a05ef0f2edc4ca9b0b486e
Author: Günther Deschner <gd at samba.org>
Date: Thu Feb 19 19:17:19 2009 +0100
s3-spoolss: fix _spoolss_GetPrinterDriverDirectory.
treat architecture correctly as it is a [unique] pointer, and newer
Windows versions sometimes send in an empty string.
Guenther
commit ebb3b307006d913b943a3cb341b32843e9ac6200
Author: Günther Deschner <gd at samba.org>
Date: Thu Feb 19 17:41:10 2009 +0100
s3-rpcclient: use SPOOLSS_ARCHITECTURE_NT_X86 define in spoolss getdriverdir cmd.
Guenther
commit 0038acb20d1c5ed8eea632adf631ed84f960165f
Author: Günther Deschner <gd at samba.org>
Date: Thu Feb 19 15:56:05 2009 +0100
s3-spoolss: _spoolss_OpenPrinterEx needs to wipe out policy handle upon failure.
Guenther
commit bcb5331fa7e8711e22c9543c59efa442143a6cc6
Author: Günther Deschner <gd at samba.org>
Date: Thu Feb 19 17:40:21 2009 +0100
s3-spoolss: _spoolss_AddPrinterEx needs to wipe out policy handle upon failure.
Guenther
-----------------------------------------------------------------------
Summary of changes:
source3/rpc_server/srv_spoolss_nt.c | 18 +++++++++++++++++-
source3/rpcclient/cmd_spoolss.c | 2 +-
2 files changed, 18 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index d72e270..171953b 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -1529,6 +1529,7 @@ WERROR _spoolss_OpenPrinterEx(pipes_struct *p,
DEBUGADD(3,("checking name: %s\n",name));
if (!open_printer_hnd(p, handle, name, 0)) {
+ ZERO_STRUCTP(r->out.handle);
return WERR_INVALID_PARAM;
}
@@ -1537,6 +1538,7 @@ WERROR _spoolss_OpenPrinterEx(pipes_struct *p,
DEBUG(0,("_spoolss_OpenPrinterEx: logic error. Can't find printer "
"handle we created for printer %s\n", name ));
close_printer_handle(p,handle);
+ ZERO_STRUCTP(r->out.handle);
return WERR_INVALID_PARAM;
}
@@ -1587,6 +1589,7 @@ WERROR _spoolss_OpenPrinterEx(pipes_struct *p,
~(SERVER_ACCESS_ADMINISTER | SERVER_ACCESS_ENUMERATE)) {
DEBUG(3, ("access DENIED for non-printserver bits\n"));
close_printer_handle(p, handle);
+ ZERO_STRUCTP(r->out.handle);
return WERR_ACCESS_DENIED;
}
@@ -1598,6 +1601,7 @@ WERROR _spoolss_OpenPrinterEx(pipes_struct *p,
if (!lp_ms_add_printer_wizard()) {
close_printer_handle(p, handle);
+ ZERO_STRUCTP(r->out.handle);
return WERR_ACCESS_DENIED;
}
@@ -1613,6 +1617,7 @@ WERROR _spoolss_OpenPrinterEx(pipes_struct *p,
p->server_info->ptok,
lp_printer_admin(snum))) {
close_printer_handle(p, handle);
+ ZERO_STRUCTP(r->out.handle);
return WERR_ACCESS_DENIED;
}
@@ -1635,6 +1640,7 @@ WERROR _spoolss_OpenPrinterEx(pipes_struct *p,
if (!get_printer_snum(p, handle, &snum, NULL)) {
close_printer_handle(p, handle);
+ ZERO_STRUCTP(r->out.handle);
return WERR_BADFID;
}
@@ -1660,6 +1666,7 @@ WERROR _spoolss_OpenPrinterEx(pipes_struct *p,
if ( !check_access(get_client_fd(), lp_hostsallow(snum), lp_hostsdeny(snum)) ) {
DEBUG(3, ("access DENIED (hosts allow/deny) for printer open\n"));
+ ZERO_STRUCTP(r->out.handle);
return WERR_ACCESS_DENIED;
}
@@ -1669,12 +1676,14 @@ WERROR _spoolss_OpenPrinterEx(pipes_struct *p,
r->in.access_mask)) {
DEBUG(3, ("access DENIED for printer open\n"));
close_printer_handle(p, handle);
+ ZERO_STRUCTP(r->out.handle);
return WERR_ACCESS_DENIED;
}
if ((r->in.access_mask & SPECIFIC_RIGHTS_MASK)& ~(PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE)) {
DEBUG(3, ("access DENIED for printer open - unknown bits\n"));
close_printer_handle(p, handle);
+ ZERO_STRUCTP(r->out.handle);
return WERR_ACCESS_DENIED;
}
@@ -1690,6 +1699,7 @@ WERROR _spoolss_OpenPrinterEx(pipes_struct *p,
default:
/* sanity check to prevent programmer error */
+ ZERO_STRUCTP(r->out.handle);
return WERR_BADFID;
}
@@ -7861,6 +7871,7 @@ static WERROR spoolss_addprinterex_level_2(pipes_struct *p,
/* Handle open failed - remove addition. */
del_a_printer(printer->info_2->sharename);
free_a_printer(&printer,2);
+ ZERO_STRUCTP(handle);
return WERR_ACCESS_DENIED;
}
@@ -8055,15 +8066,20 @@ WERROR _spoolss_addprinterdriverex(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVEREX *
static WERROR getprinterdriverdir_level_1(TALLOC_CTX *mem_ctx,
const char *servername,
- const char *long_archi,
+ const char *environment,
struct spoolss_DriverDirectoryInfo1 *info1,
uint32_t offered,
uint32_t *needed)
{
char *path = NULL;
const char *pservername = NULL;
+ const char *long_archi = SPOOLSS_ARCHITECTURE_NT_X86;
const char *short_archi;
+ if (environment) {
+ long_archi = environment;
+ }
+
pservername = canon_servername(servername);
if ( !is_myname_or_ipaddr(pservername))
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 2011154..90995ff 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -1166,7 +1166,7 @@ static WERROR cmd_spoolss_getdriverdir(struct rpc_pipe_client *cli,
{
WERROR result;
NTSTATUS status;
- const char *env = "Windows NT x86";
+ const char *env = SPOOLSS_ARCHITECTURE_NT_X86;
DATA_BLOB buffer;
uint32_t offered;
union spoolss_DriverDirectoryInfo info;
--
Samba Shared Repository
More information about the samba-cvs
mailing list