summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-07-11 18:27:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:58:19 -0500
commite574081ad93ec5f5eb121436a889f64294fa290d (patch)
treec7fcbe6331688da9496f3cdd3da3d824857619f2 /source3/rpc_server
parent279a2b48b488ecb8f0e460c5b230bb57e9aef52d (diff)
downloadsamba-e574081ad93ec5f5eb121436a889f64294fa290d.tar.gz
samba-e574081ad93ec5f5eb121436a889f64294fa290d.tar.bz2
samba-e574081ad93ec5f5eb121436a889f64294fa290d.zip
r8324: * initial cut at creating printers via the registry API
Need to add delete_key support (This used to be commit 9a27f7181adca10f60c47d342a51dec34321e12b)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 0329471d49..b5dd459462 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -6033,7 +6033,7 @@ static BOOL check_printer_ok(NT_PRINTER_INFO_LEVEL_2 *info, int snum)
/****************************************************************************
****************************************************************************/
-static BOOL add_printer_hook(NT_USER_TOKEN *token, NT_PRINTER_INFO_LEVEL *printer)
+BOOL add_printer_hook(NT_USER_TOKEN *token, NT_PRINTER_INFO_LEVEL *printer)
{
char *cmd = lp_addprinter_cmd();
char **qlines;
@@ -6043,7 +6043,7 @@ static BOOL add_printer_hook(NT_USER_TOKEN *token, NT_PRINTER_INFO_LEVEL *printe
int fd;
fstring remote_machine = "%m";
SE_PRIV se_printop = SE_PRINT_OPERATOR;
- BOOL is_print_op;
+ BOOL is_print_op = False;
standard_sub_basic(current_user_info.smb_name, remote_machine,sizeof(remote_machine));
@@ -6052,7 +6052,8 @@ static BOOL add_printer_hook(NT_USER_TOKEN *token, NT_PRINTER_INFO_LEVEL *printe
printer->info_2->portname, printer->info_2->drivername,
printer->info_2->location, printer->info_2->comment, remote_machine);
- is_print_op = user_has_privileges( token, &se_printop );
+ if ( token )
+ is_print_op = user_has_privileges( token, &se_printop );
DEBUG(10,("Running [%s]\n", command));