1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

205 Commits

Author SHA1 Message Date
Gerald Carter
f75369ec86 r5691: wrapping the pause/resume/purge printer commands in
{become,unbecome}_root() blocks.  We've already done
a print_access_check() to ensure the user is admin.
The means that non-root users can pause and manage printers.
I really don't see how this worked before without setuid
binaries on the server.

Also update print_queue_update() interface to allow an smbd
to update the print queue cache locally rather than going through
the bg lpq daemon.  This is needed for things like pjob_delete()
to ensure the cache is current for the specific client.
2007-10-10 10:55:55 -05:00
Jeremy Allison
5942bb7737 r4662: Fix from "Jerome Borsboom" <j.borsboom@erasmusmc.nl> to fix
missing release reference for printer tdb.
Jeremy.
2007-10-10 10:53:50 -05:00
Gerald Carter
1cad525093 r4539: patch from Rob -- adding real printcap name cache function to speed up printcap reloads 2007-10-10 10:53:46 -05:00
Gerald Carter
56b1110c71 r4094: BUG 2107: fix memory bloating caused by large numbers of print_queue_updates() requests sent via messages.tdb 2007-10-10 10:53:34 -05:00
Jeremy Allison
620f2e608f r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
2007-10-10 10:53:32 -05:00
Gerald Carter
a64505d52f r4028: * prevent the background LPQ daemon from updating
the print queue cache just because multiple smbd
  processes sent a message that it was out of date.

* add some extra debug messages while trying to track down
  down jobs being left in the queue after printing has
  completed.
2007-10-10 10:53:28 -05:00
Jeremy Allison
8a91a69961 r3867: Fix from david.hu@hp.com - make a copy of an incoming message
rather than indirecting into it as a struct (may not be on an
even byte boundary). Bug #2052.
Jeremy.
2007-10-10 10:53:22 -05:00
Gerald Carter
de7af09e72 r3067: patch based on volker's initial work in trunk that fixes the queu update problem when using the background daemon 2007-10-10 10:53:00 -05:00
Gerald Carter
50a5a3dbd0 r2569: Patch from Rob Foehl <rwf@loonybin.net>:
- fix typo in libads/ldap_printer.c:39, ads_find_printer_on_server()
  (originally libads-typo.patch)
- fix leak in printing/nt_printing.c, is_printer_published()
  (originally is_printer_published-leak.patch)
- fix double print_backend_init() calls, now only called from main()
- restructuring in printing/nt_printing.c
  - replaced (un)publish_it() with ads-specific functions
  - moved common code to nt_printer_publish()
  - improved error handling in several places
- added check_published_printers() in printing/nt_printing.c, to verify
  that each published printer is actually in the directory at startup
- changed calling semantics of mod_a_printer, dump_a_printer, and
  update_driver_init to be more consistent with the rest of the api and
  reduce some copying
2007-10-10 10:52:46 -05:00
Gerald Carter
9e42d016e1 r2191: ensure that we assign our pid to print jobs (and not our parent's pid); ensures that spooling jobs from dead smbds are removed from the tdb 2007-10-10 10:52:35 -05:00
Gerald Carter
7474c6a446 r2133: Several fixes:
* BUG 1627: fix for NIS compiles on HPUX 11.00, AIX 4.3 and 5.1
  patch from Olaf Flebbe <o.flebbe@science-computing.de>.
  Will need to watch this one in the build farm.

* Fix bug found by rwf@loonybin.net where the PRINT_ATTRIBUTE_PUBLISHED
  was getting reset by attempts to sanitize the defined attributes
  (PRINTER_ATTRIBUTE_SAMBA)

* Resolve name conflict on DEC OSF-5.1 (inspired by patch from
  Adharsh Praveen <rprav@india.hp.com>)

* Work around parsing error in the print change notify code
  (not that the alignment bug is still there but reording the
   entries in the array works around it).

* remove duplicate declaration of getprintprocdir from rpcclient.
2007-10-10 10:52:32 -05:00
Gerald Carter
540daf71d8 r1885: tighten the cache consistency with the ntprinters.tdb entry an the in memory cache associated with open printer handles; also make sure that register_messages_flags() doesn't overwrite the originally registers flags 2007-10-10 10:52:23 -05:00
Gerald Carter
bc8cf6c852 r1384: ensure we remove the tdb entry for a job in the spooling state 2007-10-10 10:52:09 -05:00
Volker Lendecke
c66be874d8 r1295: To be able to send a message to the background queue updated, we need to be
root. Otherwise the USR1 signal will not be delivered.

Volker
2007-10-10 10:52:04 -05:00
Gerald Carter
e3d4fea780 r1230: (merges from HP PSA) fixing a couple of caching bugs in the printing code. (a) make sure to clear jobs_changed list when deleting a job and, (b) invalidate the printer handle cache when we get a notification that something has changed on that printer 2007-10-10 10:52:01 -05:00
Gerald Carter
066b9c4276 r925: add changes frpm trunk (r841 and r842) -- enable background queue update process and allow printers to have different sharenames from printernames 2007-10-10 10:51:49 -05:00
Jim McDonough
e0491dae98 r560: Fix bugzilla 1279: cannot control individual print jobs using cups
Store the print job using a little-endian key.
2007-10-10 10:51:29 -05:00
Jim McDonough
7c1cfb16c0 r555: Fix big-endian storage of jobids in jobs_changed list. Found during
debugging of 1279
2007-10-10 10:51:29 -05:00
Gerald Carter
17ecea4152 merging print change notify fix from HP appliance. Also might address some one the issues in BUG 1007 -
Gerald Carter
26681cd2a1 fix byte ordering problem when storing the updating pid for the lpq cache; was causing an abort in process_exists() on solaris -
Gerald Carter
df19b6066e fix compiler warning -
Gerald Carter
14de9c0657 allow the 'printing' parameter to be set on a per share basis.
The problem was that the current_printif struct was set during
print_backend_init() based on the 'printcap name'.  So you could
not use cups and then override the setting for a specific printer
by setting 'printing = bsd' (a common setup for pdf generation
print services.

There is a subtle change in behavior in that the print
interface functions are selecting on the basis of lp_printing()
and not lp_printcap_name(), but the new behavior seems more
intuitive IMHO.
-
Gerald Carter
91af1fb73a BUG 1147; bad pointer case in get_stored_queue_info() causing seg fault -
Gerald Carter
5145611188 bug 770; correct fix this time; Make sure that we send the SMBjobid for unix jobs back to the client. Allows windows client to remove print jobs submitted from lpr -
Gerald Carter
be9f25bea9 bug 660; using byte order safe macros (or tdb_unpack) when reading 2 or 4 byte values from a tdb buffer -
Gerald Carter
3a55788dca don't mistake pre-existing UNIX jobs for smb jobs; patch from SATOH Fumiyasu bug 770 -
Gerald Carter
5979f4d645 allow users to delete jobs with cups printing backend
The changes the name of the job passed off to cups
from "Test Page" to "smbprn.00000033 Test Page" so that
we can get the smb jobid back from lpq.  Working on bug
770.
-
Gerald Carter
fd98af75d6 * Fix from SATOH Fumiyasu for bug 660 (failing to view print
jobs) by only enforce the 'max reported print jobs' parameter
  when it is non-zero.

* Fixed bug 338 by making sure that data values are written
  out when we are marshalling an EnumPrinterDataEx() reply.
  This probably fixes other bugs reported against point-n-print
  feature in 3.0.0
-
Andrew Tridgell
b3e024ce1d a small include file rearrangement that doesn't affect normal
compilation, but that allows Samba3 to take advantage of pre-compiled
headers in gcc if available.
-
Gerald Carter
8382cd6796 fix unitiailized timestamp where merging print_jobs and lpq listing -
Gerald Carter
66359531b8 i guess i'm the only one this ever annyoed...
fix the confusion when we tdb_lock_bystring() but
we retrieve an entry using tdb_fetch_by_string.
It's now always tdb.*bystring()
-
Gerald Carter
fd24183ec3 fix typos in log messages and comments. -
Jeremy Allison
03a1f46e34 Fix mem leak. Spotted by tpot (thanks Tim).
Jeremy.
-
Jeremy Allison
9e6e6c3f50 Grr. Get rid of one of the extra NULL's that crept in from app-head.
Spotted by Andrew Esh.
Jeremy.
-
Jeremy Allison
59be98401c Fix the new storage code to correctly convert from system queue info to
pjob info. Ensure we retrieve more than one job from the storage code.
Jeremy.
-
Jeremy Allison
e5e83544dc Subtle changes to message handling after ENUMJOBS.
Jeremy.
-
Jeremy Allison
b2ef052ada Fix extra NULL arg added during app-head merge.
Jeremy.
-
Jeremy Allison
331e621b58 Merge of new appliance-head scalable printing fixes.
Jeremy.
-
Jeremy Allison
bf795b684e lib/messages.c: Check return from chainlock before modifying message queue.
Apply the job returned limit across all requests for job queues.
Jeremy.
-
Jeremy Allison
a75d9fc4e1 Ensure added jobs increment total_jobs.
Jeremy.
-
Jeremy Allison
7ec1c8869d Bit of a hack job to prevent smbprn.XXX jobs appearing in the queue if the
jobid is below the UNIX_JOB_START number.
Jeremy.
-
Jeremy Allison
82cf8aa747 Ensure we return NOSPACE if we can't fast allocate a print job.
Jeremy.
-
Jeremy Allison
62e274abbb Hold the lock for a much shorter time when allocating a new jobid.
Jeremy.
-
Jeremy Allison
7ace900b33 More scalable print tdb fixes.
Jeremy.
-
Andrew Bartlett
9b70fa868e Merge from HEAD:
- fstring/pstring mixups
 - the detection code that found them (disabled)
 - a bit of whitespace
 - a static

Andrew Bartlett
-
Gerald Carter
f8a915b14d [merge] make sure to update print queue cache during timeout_processing() to send notify events; CR 1491 -
Jeremy Allison
6cb9f6ccb1 Don't delete jobs subitted after the lpq time.
Jeremy.
-
Andrew Bartlett
3a7458f947 Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
-
Jeremy Allison
6eb27e4f0d Fix debugs for rap mapping. Delete job on map fail.
Jeremy.
-
Jeremy Allison
6c23d2030a The element in fsp->print_job should be a RAP jobid, not a uint32 RPC
jobid. This was causing Win9x client "set name" calls to fail.
Still need one cleanup fix to finish.
Jeremy.
-