summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-03-11 00:32:10 +0000
committerJeremy Allison <jra@samba.org>2001-03-11 00:32:10 +0000
commitda3053048c3d224a20d6383ac6682d31059cd46c (patch)
treee0608d0bb47fcf3b6228db16507d3263afb869bd /source3/printing
parent1af77d39fa69d201be739e379d8bf4a370fc2df1 (diff)
downloadsamba-da3053048c3d224a20d6383ac6682d31059cd46c.tar.gz
samba-da3053048c3d224a20d6383ac6682d31059cd46c.tar.bz2
samba-da3053048c3d224a20d6383ac6682d31059cd46c.zip
Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy. (This used to be commit 0be41d5158ea4e645e93e8cd30617c038416e549)
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/load.c8
-rw-r--r--source3/printing/nt_printing.c13
-rw-r--r--source3/printing/printfsp.c4
-rw-r--r--source3/printing/printing.c4
4 files changed, 9 insertions, 20 deletions
diff --git a/source3/printing/load.c b/source3/printing/load.c
index 275ffa21ed..c4fc3377c3 100644
--- a/source3/printing/load.c
+++ b/source3/printing/load.c
@@ -48,9 +48,9 @@ static void add_auto_printers(void)
printers = lp_servicenumber(PRINTERS_NAME);
if (printers < 0) {
- free(str);
- return;
- }
+ free(str);
+ return;
+ }
for (p=strtok(str,LIST_SEP);p;p=strtok(NULL,LIST_SEP)) {
if (lp_servicenumber(p) >= 0) continue;
@@ -60,7 +60,7 @@ static void add_auto_printers(void)
}
}
- free(str);
+ free(str);
}
/***************************************************************************
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index e491d9a6b9..f5c4a234ee 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -1,4 +1,3 @@
-#define OLD_NTDOMAIN 1
/*
* Unix SMB/Netbios implementation.
* Version 1.9.
@@ -1089,7 +1088,6 @@ BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
struct passwd *pass;
int ecode;
int ver = 0;
- int outsize = 0;
int i;
*perr = 0;
@@ -1175,7 +1173,7 @@ BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
slprintf(new_name, sizeof(new_name), "%s/%s", architecture, driver->driverpath);
slprintf(old_name, sizeof(old_name), "%s/%s", new_dir, driver->driverpath);
if (ver != -1 && (ver=file_version_is_newer(conn, new_name, old_name)) > 0) {
- if ((outsize = rename_internals(conn, inbuf, outbuf, new_name, old_name, True)) != 0) {
+ if (rename_internals(conn, inbuf, outbuf, new_name, old_name, True) != 0) {
DEBUG(0,("move_driver_to_download_area: Unable to rename [%s] to [%s]\n",
new_name, old_name));
*perr = (uint32)SVAL(outbuf,smb_err);
@@ -1192,7 +1190,7 @@ BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
slprintf(new_name, sizeof(new_name), "%s/%s", architecture, driver->datafile);
slprintf(old_name, sizeof(old_name), "%s/%s", new_dir, driver->datafile);
if (ver != -1 && (ver=file_version_is_newer(conn, new_name, old_name)) > 0) {
- if ((outsize = rename_internals(conn, inbuf, outbuf, new_name, old_name, True)) != 0) {
+ if (rename_internals(conn, inbuf, outbuf, new_name, old_name, True) != 0) {
DEBUG(0,("move_driver_to_download_area: Unable to rename [%s] to [%s]\n",
new_name, old_name));
*perr = (uint32)SVAL(outbuf,smb_err);
@@ -1211,7 +1209,7 @@ BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
slprintf(new_name, sizeof(new_name), "%s/%s", architecture, driver->configfile);
slprintf(old_name, sizeof(old_name), "%s/%s", new_dir, driver->configfile);
if (ver != -1 && (ver=file_version_is_newer(conn, new_name, old_name)) > 0) {
- if ((outsize = rename_internals(conn, inbuf, outbuf, new_name, old_name, True)) != 0) {
+ if (rename_internals(conn, inbuf, outbuf, new_name, old_name, True) != 0) {
DEBUG(0,("move_driver_to_download_area: Unable to rename [%s] to [%s]\n",
new_name, old_name));
*perr = (uint32)SVAL(outbuf,smb_err);
@@ -1231,7 +1229,7 @@ BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
slprintf(new_name, sizeof(new_name), "%s/%s", architecture, driver->helpfile);
slprintf(old_name, sizeof(old_name), "%s/%s", new_dir, driver->helpfile);
if (ver != -1 && (ver=file_version_is_newer(conn, new_name, old_name)) > 0) {
- if ((outsize = rename_internals(conn, inbuf, outbuf, new_name, old_name, True)) != 0) {
+ if (rename_internals(conn, inbuf, outbuf, new_name, old_name, True) != 0) {
DEBUG(0,("move_driver_to_download_area: Unable to rename [%s] to [%s]\n",
new_name, old_name));
*perr = (uint32)SVAL(outbuf,smb_err);
@@ -1260,7 +1258,7 @@ BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract,
slprintf(new_name, sizeof(new_name), "%s/%s", architecture, driver->dependentfiles[i]);
slprintf(old_name, sizeof(old_name), "%s/%s", new_dir, driver->dependentfiles[i]);
if (ver != -1 && (ver=file_version_is_newer(conn, new_name, old_name)) > 0) {
- if ((outsize = rename_internals(conn, inbuf, outbuf, new_name, old_name, True)) != 0) {
+ if (rename_internals(conn, inbuf, outbuf, new_name, old_name, True) != 0) {
DEBUG(0,("move_driver_to_download_area: Unable to rename [%s] to [%s]\n",
new_name, old_name));
*perr = (uint32)SVAL(outbuf,smb_err);
@@ -3195,4 +3193,3 @@ uint32 printer_write_default_dev(int snum, const PRINTER_DEFAULT *printer_defaul
free_a_printer(&printer, 2);
return result;
}
-#undef OLD_NTDOMAIN
diff --git a/source3/printing/printfsp.c b/source3/printing/printfsp.c
index c87fb9754f..efb97be919 100644
--- a/source3/printing/printfsp.c
+++ b/source3/printing/printfsp.c
@@ -1,5 +1,3 @@
-#define OLD_NTDOMAIN 1
-
/*
Unix SMB/Netbios implementation.
Version 3.0
@@ -98,5 +96,3 @@ void print_fsp_end(files_struct *fsp, BOOL normal_close)
string_free(&fsp->fsp_name);
}
}
-
-#undef OLD_NTDOMAIN
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index e771e93600..241135f744 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -1,4 +1,3 @@
-#define OLD_NTDOMAIN 1
/*
Unix SMB/Netbios implementation.
Version 3.0
@@ -792,14 +791,12 @@ BOOL print_job_resume(struct current_user *user, int jobid, int *errcode)
char *printer_name;
int snum, ret;
fstring jobstr;
- BOOL owner;
if (!pjob || !user) return False;
if (!pjob->spooled || pjob->sysjob == -1) return False;
snum = print_job_snum(jobid);
- owner = is_owner(user, jobid);
if (!is_owner(user, jobid) &&
!print_access_check(user, snum, JOB_ACCESS_ADMINISTER)) {
@@ -1401,4 +1398,3 @@ BOOL print_queue_purge(struct current_user *user, int snum, int *errcode)
return True;
}
-#undef OLD_NTDOMAIN