cvs2svn Import User [Thu, 30 May 2002 20:08:33 +0000 (30 20:08 +0000)]
This commit was manufactured by cvs2svn to create tag
'APPLIANCE_HEAD_PRE_2_2_5_MERGE'.
Gerald Carter [Thu, 30 May 2002 20:08:32 +0000 (30 20:08 +0000)]
make sure we close resolv.conf; needs some testing still
Jeremy Allison [Wed, 22 May 2002 23:32:17 +0000 (22 23:32 +0000)]
Ensure we know when we're doing async processing.
Jeremy.
Jeremy Allison [Wed, 22 May 2002 23:15:32 +0000 (22 23:15 +0000)]
lib/select.c: Allow timeval to be preserved.
smbd/oplock.c: Ensure kernel oplocks checked first.
smbd/process.c: Ensure we don't hang in shutdown.
Jeremy.
John Reilly [Wed, 22 May 2002 19:11:15 +0000 (22 19:11 +0000)]
Some changes to tdbtool:
Add redirect detection which dumps tdb in text to stdout (e.g. tdbtool src.tdb > text)
Add copy command (copy dest.tdb)
Add command line copy capability (e.g. tdbtool src.tdb dest.tdb)
Add remove command to delete all partitial key matches (e.g. remove DRIVER_INIT)
Add checksum [fingerprint] to key and data output, so long values may be easily compared
Cleaned up help text
Fixed some logic on when to show help
JohnR cr657 (rv:no)
John Reilly [Wed, 22 May 2002 19:10:19 +0000 (22 19:10 +0000)]
Changes to rpc_server/srv_spoolss_nt.c:
Dropped specific 9x test for deleting driver init data
Added switch to cover 9x(0), Nt/2k(2), and 2k/Xp(3) cases for deleting driver init data
Fixed minor space/tab issue
JohnR cr657 (rv:sn)
Jeremy Allison [Wed, 22 May 2002 00:58:06 +0000 (22 00:58 +0000)]
Simplify receive_local_message - we don't need to pass in a fdset.
When doing the select again we must re-set up the fdset each time
to get incoming messages. More CR#653 stuff.
Jeremy.
Jeremy Allison [Tue, 21 May 2002 23:07:40 +0000 (21 23:07 +0000)]
Failing to find an entry when doing mod_share_entry isn't a error
condition, as we look for the entry before locking the chain - thus
someone else could have legitimately deleted it. More CR#653 investigations.
Jeremy.
Jeremy Allison [Tue, 21 May 2002 20:53:11 +0000 (21 20:53 +0000)]
Tricky fix. If we were waiting for an oplock break response message from
another smbd and an incoming SIGUSR1 message arrived we'd break out of
the wait early - as we have to use sys_select() to wait for an oplock
response message, not sys_select_intr() (which ignores EINTR errors)
because of the real time signal kernel interface. Found by CR#653.
Jeremy.
Jeremy Allison [Tue, 21 May 2002 20:42:49 +0000 (21 20:42 +0000)]
Fix crash bug on CR#653 - we were freeing a devmode then still using it !
Jeremy.
Gerald Carter [Tue, 21 May 2002 19:12:30 +0000 (21 19:12 +0000)]
merge from SAMBA_2_2
Jeremy Allison [Tue, 21 May 2002 18:57:29 +0000 (21 18:57 +0000)]
Fix for EINTR problems when downloading fixes to an XP client. Merge
from 2.2.4. Also added debug statement for too many processes.
Jermey.
Gerald Carter [Sat, 18 May 2002 13:55:20 +0000 (18 13:55 +0000)]
revert Tim's previous change. Not because it was wrong :-)
Just was deemed as too much of a risk at this stage of testing.
As per John's descision.
Jeremy Allison [Fri, 17 May 2002 22:56:59 +0000 (17 22:56 +0000)]
Fix max connection bug that could stop client connecting.
Jeremy.
Tim Potter [Fri, 17 May 2002 06:08:29 +0000 (17 06:08 +0000)]
Merge from 2.2. This is a fix for a CR whose number I can't seem to track
down now. The defect was printers appearing in the Add Printer Wizard
browse list at the workgroup level instead of the server level.
>If we respond to a enum_printers level 1 on our name with flags set to
>PRINTER_ENUM_REMOTE with a list of printers then these printers incorrectly
>appear in the APW browse list. Specifically the printers for the server
>appearw at the workgroup level where all the other servers in the domain
>are listed. Windows responds to this call with a WERR_CAN_NOT_COMPLETE so
>we should do the same.
John Reilly [Thu, 9 May 2002 18:29:51 +0000 (9 18:29 +0000)]
Fixed recently added code that deletes driver init data when a new driver for any
Windows version is installed. We should not do the delete if the driver is for 9x.
JohnR cr620 (rv:SN)
John Reilly [Tue, 30 Apr 2002 23:51:05 +0000 (30 23:51 +0000)]
I shouldn't commit on 4 hours of sleep. Please ignore the previous accidental commit.
Fixed printer driver file upgrade decision logic. We now compare the time stamps when the
major and minor versions are the same as the previous file major and minor versions.
This situation was discovered when upgrading a Lexmark C720 PS3 driver from one version
to another.
Further research needs to be done to determine if we should just drop the version test
altogether. But, for XP this test is, even more complicated...
JF - if you have any thoughts on this, please let me know.
JohnR cr616
John Reilly [Tue, 30 Apr 2002 22:49:25 +0000 (30 22:49 +0000)]
Fixed printer driver file upgrade decision logic. We now compare the time stamps when the
major and minor versions are the same as the previous file major and minor versions.
This situation was discovered when upgrading a Lexmark C720 PS3 driver from one version
to another.
Further research needs to be done to determine if we should just drop the version test
altogether. But, for XP this test is, even more complicated...
JF - if you have any thoughts on this, please let me know.
JohnR cr616
Gerald Carter [Sat, 27 Apr 2002 16:33:15 +0000 (27 16:33 +0000)]
Another localized change to AddPrinterDriver() for CR-609.
after a talk with John, we agreed that driver init data for an old version
of a driver should be deleted upon the upload of a newer version.
However, the caveat is that we also think that we should reinit
all printers bound to the driver (this would be done via a message
sent during an update_printer()). Not doing this right now,
but will probably go ahead and add it later.
Gerald Carter [Sat, 27 Apr 2002 14:43:48 +0000 (27 14:43 +0000)]
clarified debug
Gerald Carter [Sat, 27 Apr 2002 12:59:17 +0000 (27 12:59 +0000)]
backed out TIm's name_is_local() change to user_in_unix_group_list()
as per our conversation. Trying to stick with on extended character
changes right now.
Gerald Carter [Sat, 27 Apr 2002 12:58:08 +0000 (27 12:58 +0000)]
back out Jeremy's change which changed the relationship
between domain user's and local users of the same same.
As per conversation with Sundeep and Mike.
Gerald Carter [Sat, 27 Apr 2002 12:48:17 +0000 (27 12:48 +0000)]
merge from SAMBA_2_2 which should my the samba part of
CR-609. We need to bump change_id on all printers bound to a driver
if we upload a new version of that same driver.
Tim Potter [Fri, 26 Apr 2002 07:27:03 +0000 (26 07:27 +0000)]
More cr593 madness...
Some changes to user_in_unix_group_list():
- since user_in_list() is passed strings in dos codepage for printer admin
access checks, we must convert before doing a getpwnam()
- check local username in preference to winbind user. If we have a local
printer admin with the same username as a domain admin, checking
the winbind name first will give access denied as the domain user with
the same name will probably not have admin access.
Jeremy, if you get a chance could you take a look at these?
Jeremy Allison [Thu, 25 Apr 2002 21:57:51 +0000 (25 21:57 +0000)]
Always check the DOM\user name first. More CR#593 stuff.
Jeremy.
Jeremy Allison [Thu, 25 Apr 2002 20:30:24 +0000 (25 20:30 +0000)]
More codepage fixes for CR#593.
Jeremy.
Jeremy Allison [Thu, 25 Apr 2002 01:44:10 +0000 (25 01:44 +0000)]
Attempt for final fix for CR#593. If we're handling dos codepage
conversion in the lp_printer_admin() code we don't want to do the
auto conversion with FLAG_DOS when reading the smb.conf.
Jeremy.
Tim Potter [Wed, 24 Apr 2002 01:33:20 +0000 (24 01:33 +0000)]
An alternate fix for CR593. Instead of having to re-order the smb.conf
file to get the value of 'printer admin' converted to dos code page, use a
function to do the conversion at lp_printer_admin() time rather than
smb.conf parsing time.
Yes this code is too ugly to live. (-:
Tim Potter [Tue, 23 Apr 2002 02:19:47 +0000 (23 02:19 +0000)]
Other half of the fix for cr593. Convert the username to dos codepage
before calling user_in_list() against lp_printer_admin().
Now the username and admin list are both in DOS codepage which means the
strupper()/strlower() routines will work.
NOTE: the codepage related smb.conf parameters *must* come before the
printer admin parameter or it won't work.
Jeremy Allison [Mon, 22 Apr 2002 23:03:45 +0000 (22 23:03 +0000)]
Added FLAG_DOS_STRING to szPrinterAdmin in an attempt to fix CR#593
Jeremy.
Jeremy Allison [Mon, 22 Apr 2002 21:27:54 +0000 (22 21:27 +0000)]
With an NT4.x DC we must have a mutex over the entire login process.
CR#556
Jeremy.
Tim Potter [Mon, 22 Apr 2002 11:38:13 +0000 (22 11:38 +0000)]
After further thought the previous patch is bogus. The case tables are not
broken, but rather the implementation of the toupper and tolower macros as
they assume dos codepage.
Tim Potter [Mon, 22 Apr 2002 07:10:27 +0000 (22 07:10 +0000)]
There was no case mapping for ü to Ü. Other characters may be missing as
well.
HP CR#593
Tim Potter [Sat, 20 Apr 2002 07:09:43 +0000 (20 07:09 +0000)]
Added a debug to show whether the connected user is a printer admin. This
is calculated at register_vuid() time.
Gerald Carter [Sat, 20 Apr 2002 03:01:29 +0000 (20 03:01 +0000)]
fix CR-598. Specversion 0400 and 0401 are equivalent as far as I can tell
Jeremy Allison [Fri, 19 Apr 2002 17:11:54 +0000 (19 17:11 +0000)]
When opening a tdb fails - don't expect to be able to do tdb_errstr ! (Doh!).
Jeremy.
Martin Pool [Fri, 19 Apr 2002 07:14:43 +0000 (19 07:14 +0000)]
Undo incorrect doc.
Martin Pool [Fri, 19 Apr 2002 07:03:54 +0000 (19 07:03 +0000)]
Doc.
Jeremy Allison [Thu, 18 Apr 2002 23:44:48 +0000 (18 23:44 +0000)]
Ensure fd zero doesn't get closed by accident if we don't connect.
Jeremy.
Jeremy Allison [Thu, 18 Apr 2002 01:47:05 +0000 (18 01:47 +0000)]
Fix for CR#569 found by Li - XP clients don't bother to set the devmode_ptr
in the SetPrinter() call - they send it in the devmode_ctr instead.
Jeremy.
John Reilly [Tue, 16 Apr 2002 02:21:59 +0000 (16 02:21 +0000)]
Fixed issue where changing the driver didn't always fully change; the PrinterProp page
would display the new driver, but printing a test page would use the previous driver.
The failure occured because the client was part way through the process when Samba had
a panic... just like a computer to get so bothered by not properly freeing memory.
rpc_server/srv_spoolss_nt.c use free_dev_mode() instead of safe_free()
JohnR cr518
Jeremy Allison [Mon, 15 Apr 2002 23:30:16 +0000 (15 23:30 +0000)]
Sneaky fix to use less memory (one less lp_string()) in a printer
job enumeration loop - cuts down RSS on a big test a *LOT*.
Jeremy
Gerald Carter [Sat, 13 Apr 2002 15:45:05 +0000 (13 15:45 +0000)]
commented out an access check for funky masks as per conversation with JRA.
Jeremy Allison [Thu, 11 Apr 2002 19:55:01 +0000 (11 19:55 +0000)]
Merged in Jerry's specversion changes (as requested by JohnR) as a PSA
needs to print from ACT too :-). Jerry please check.....
Jeremy.
Jeremy Allison [Thu, 11 Apr 2002 18:51:46 +0000 (11 18:51 +0000)]
Fix for CR#537. HP2500C driver writes devmode with private data that ends
on a 2 byte boundary. We then miss-parse the desired_access. Also added
other fixes to ensure we align after private data (discussed with Gerry).
Jeremy.
Jeremy Allison [Thu, 11 Apr 2002 03:10:05 +0000 (11 03:10 +0000)]
Ensure we allow/deny printer access bits correctly (as NT does).
Jeremy.
Tim Potter [Wed, 10 Apr 2002 01:01:52 +0000 (10 01:01 +0000)]
Jeremy, I don't think this debug is meant to be at level 0.
Jeremy Allison [Wed, 27 Mar 2002 00:42:46 +0000 (27 00:42 +0000)]
Ensure that we never wait more than 20 seconds for the server mutex.
Fix msleep to never sleep more than 1 second. Cope with time changes.
These may be the final code fixes for CR#465.
Jeremy.
Gerald Carter [Wed, 20 Mar 2002 23:04:10 +0000 (20 23:04 +0000)]
fix unreported CR whereby we did not send PRINTER_CHANGE_JOB
message to ourselves because of a check I put in for
update_printer(). We now (rightfully so) send all notification
back trhough the messaging system (which was the original design).
The bug I was seeing is that the Win2k queue monitor window was not
refreshing the list of jobs on the client that was adding/deleting
jobs.
Jeremy Allison [Wed, 20 Mar 2002 22:27:52 +0000 (20 22:27 +0000)]
Ensure queuename is always stored in UNIX character set.
Ensure we don't do lp_servicename()'s in tdb traverse as this
allocates lots of memory.
Jeremy.
Jeremy Allison [Wed, 20 Mar 2002 21:52:57 +0000 (20 21:52 +0000)]
Fix for (upcoming) CR where print jobs were missing from queues.
We *MUST* store the queue name, not snum as it may be different in
each smbd.
Jeremy.
Jeremy Allison [Wed, 20 Mar 2002 21:06:57 +0000 (20 21:06 +0000)]
John's patch changed the size of a structure stored in the tdb - we
must thus update the versionid of the tdb.
Jeremy.
Tim Potter [Wed, 20 Mar 2002 06:17:03 +0000 (20 06:17 +0000)]
Some fixes for the risk-free merge.
Gerald Carter [Wed, 20 Mar 2002 03:31:53 +0000 (20 03:31 +0000)]
no risk merge from SAMBA_2_2. JohnR correctly noticed that we were
probably not unmarshalling the ResetPrinter() request. However,
we always read the minimum for for the structure (assuming NULL members)
and thus would never set the fault state on the spoolss pipe.
This call doesn't come up often, but does come up in a few drivers.
Tim Potter [Wed, 20 Mar 2002 00:15:56 +0000 (20 00:15 +0000)]
Don't put two copies of the server name in construct_printer_info_1()
hp cr 437
John Reilly [Tue, 19 Mar 2002 20:34:40 +0000 (19 20:34 +0000)]
Fixed size()-1 typo
printing/printing.c changed to size()-1 for job_page_count and job_size
JohnR cr276
John Reilly [Tue, 19 Mar 2002 19:45:45 +0000 (19 19:45 +0000)]
Fixed page count/job size macros.
printing/printing.c add print job page count (%c) and print job file size in bytes (%z)
JohnR cr276
John Reilly [Mon, 18 Mar 2002 20:20:10 +0000 (18 20:20 +0000)]
Fixed page/job size.
include/smb.h add page_count to print_queue_struct
printing/nt_printing.c track pages/size
rpc_server/srv_spoolss_nt.c catch end of page
JohnR cr276
John Reilly [Fri, 15 Mar 2002 21:17:41 +0000 (15 21:17 +0000)]
Fixed segv with spoolss_addprinterex_level_2 bug with out of order srv_spoolss_sendnotify
and free_a_printer... Jerry - Beware the Ides of March
rpc_server/srv_spoolss_nt.c reverse order of notify and free.
JohnR cr198
Gerald Carter [Fri, 15 Mar 2002 07:32:56 +0000 (15 07:32 +0000)]
This fixes several things all of which were done in hopes of
correctly CR198.
* fill in notification structures instead of replying
"something changed, but I can't remember what"
* add in several defines for bit flags in the DEVICEMODE
* support structure-less ROUTERREPLYPRINTER call for printer
change notification in addition to the REPLY_RRPCN call.
* send the notification to our client before responding OK
to the SETPRINTER call. Other smbd's are still notified
of the change using the messaging system. We just will ignore
any messages sent to ourselves.
Tim Potter [Thu, 14 Mar 2002 06:07:30 +0000 (14 06:07 +0000)]
Convert key for security descriptor to unix codepage.
HP CR448
Jeremy Allison [Thu, 14 Mar 2002 02:35:00 +0000 (14 02:35 +0000)]
Take terminate signals inline as we have reliable signals.
Jeremy.
Tim Potter [Thu, 14 Mar 2002 01:28:47 +0000 (14 01:28 +0000)]
Backed out enumprinters stuff - leave it for another day.
Gerald Carter [Tue, 12 Mar 2002 23:38:04 +0000 (12 23:38 +0000)]
fix Jeremy's typo that broke build 47
Gerald Carter [Tue, 12 Mar 2002 23:06:57 +0000 (12 23:06 +0000)]
add in new se_map_standard() to _spoolss_open_printer_ex()
Logging this against CR-461
Gerald Carter [Tue, 12 Mar 2002 22:13:46 +0000 (12 22:13 +0000)]
revert to prepending servername to printername in PRINTER_INFO_2
Tim Potter [Mon, 11 Mar 2002 03:49:27 +0000 (11 03:49 +0000)]
Merge of enumprinter vs getprinter fix from 2.2.
HP CR 437
Jeremy Allison [Fri, 8 Mar 2002 00:27:13 +0000 (8 00:27 +0000)]
Fix for CR#469
Turns out an Admin user shouldn't always have access on a handle.
Jeremy.
Jeremy Allison [Thu, 7 Mar 2002 21:00:48 +0000 (7 21:00 +0000)]
Cope with system time changes forward then back on the lpq caching
system. This fixes a (to be logged) CR. I *love* the HP testers.... :-).
Jeremy.
Jeremy Allison [Thu, 7 Mar 2002 20:50:20 +0000 (7 20:50 +0000)]
Return correct codes for oplocks - merge from HEAD.
Jeremy.
Gerald Carter [Thu, 7 Mar 2002 19:43:11 +0000 (7 19:43 +0000)]
remove confusing define for RRPCN in the "not implemented" list
since in fact it is implemented.
Jeremy Allison [Thu, 7 Mar 2002 04:28:15 +0000 (7 04:28 +0000)]
Fix delete on close semantics.
Jeremy.
Jeremy Allison [Wed, 6 Mar 2002 23:32:33 +0000 (6 23:32 +0000)]
Fix mapping for access admin.
Jeremy.
Jeremy Allison [Wed, 6 Mar 2002 22:56:44 +0000 (6 22:56 +0000)]
Move the SetPrinterData/Form etc. access checks to handle based checks.
This should fix the "anonymous user on a pipe" problem (fingers crossed).
Jeremy.
Jeremy Allison [Sat, 2 Mar 2002 01:01:41 +0000 (2 01:01 +0000)]
This code is so obviously correct it needs to be in app-head.
Jeremy.
Jeremy Allison [Wed, 27 Feb 2002 23:32:08 +0000 (27 23:32 +0000)]
If pdc_only is not set, try looking up first the 1C name then if that
fails the 1B name. This should never happen but with broken WINS
servers it may.... Attempt to fix CR#453.
Jeremy.
Jeremy Allison [Wed, 27 Feb 2002 17:49:44 +0000 (27 17:49 +0000)]
Memory leak on error condition fixed by Kian Win <codegrunt@rubbercookie.com>.
Jeremy.
Jeremy Allison [Tue, 26 Feb 2002 03:19:07 +0000 (26 03:19 +0000)]
Attempt fix for CR#452 - fix job change messages.
Jeremy.
Martin Pool [Tue, 26 Feb 2002 01:17:02 +0000 (26 01:17 +0000)]
"constants aren't, safe_strcat isn't."
This patch tries to fix a bug in the lpq parsing code that causes a
crash in lprng and BSD parsers when there are long lines in the
output. A too-short length parameter was passed to safe_strcat, which
provoked a signedness bug.
It also makes the lpq parser consistently use fstring routines, rather
than its own hand-crafted strlen/sizeof guff. Some variables were
renamed to make this obvious.
Finally safe_strcat is changed so that it actually does handle the
situation where strlen(dest)>maxlen, rather than crying for help by
clobbering -1 bytes of memory.
(HP CR #430)
John Reilly [Tue, 26 Feb 2002 00:29:11 +0000 (26 00:29 +0000)]
Fixed SetPrinterData(magic key) to support zero length DEVMODE as is the case with the
Okidata Okipage 20 PCLXL Advanced printer driver.
printing/nt_printing.c add clause to if to skip 'then' condition on data_len==0
JohnR cr276
Jeremy Allison [Sat, 23 Feb 2002 21:09:40 +0000 (23 21:09 +0000)]
Only set smb_read_error if still zero.
Jeremy.
Tim Potter [Fri, 22 Feb 2002 20:11:23 +0000 (22 20:11 +0000)]
Move admin log message from password_ok() to it's correct place in
domain_client_validate().
CR168
Gerald Carter [Fri, 22 Feb 2002 00:04:06 +0000 (22 00:04 +0000)]
fix for XP :-( It use's *SMBSERV (instead of *SMBSERVER)
when connecting to a CIFS box using NetBIOS (but mapped
using net use \\ip.add.rr.ess\share)
Gerald Carter [Wed, 20 Feb 2002 23:36:20 +0000 (20 23:36 +0000)]
WIndows UI cosmetic fix from 2.2
Gerald Carter [Tue, 19 Feb 2002 22:25:57 +0000 (19 22:25 +0000)]
fix for mysterious access check failures for Samba servers
in domain mode and printers with default secdesc. We should look
up our own copy of the domain sid from secrets.tdb and not use winbind.
Not logged against a CR but surely been seen by others. Nor sure
how long this has been broken. :-(
Gerald Carter [Tue, 19 Feb 2002 19:28:05 +0000 (19 19:28 +0000)]
fix for CR 212. Map a user not in smbpasswd (but in /etc/passwd)
to guest on "map to guest = Bad User"
Gerald Carter [Tue, 19 Feb 2002 02:02:52 +0000 (19 02:02 +0000)]
fix for CR 402. We were sending the configfile in the place
of the driver file when replying to the uLevel == 52 for DosPrintQGetInfo.
I think these are often the same, but thing break when they are not
and we send the config file. Particularly with the HP CLJ 8500
PCL 9x driver.
Tim Potter [Tue, 19 Feb 2002 00:13:57 +0000 (19 00:13 +0000)]
Merge ... tridge's fix for win2k negprot with multiple open connections.
This appears to fix CR403 but I suspect it only makes it harder to
reproduce.
Tim Potter [Mon, 18 Feb 2002 23:59:00 +0000 (18 23:59 +0000)]
Merge of tridge's message_named_mutex code.
Gerald Carter [Sun, 17 Feb 2002 13:23:06 +0000 (17 13:23 +0000)]
reformat a little and update error #define
Tim Potter [Sat, 16 Feb 2002 19:12:23 +0000 (16 19:12 +0000)]
We were freeing the devmode before it was being marshalled. Use
free_devmode() instead of free() to avoid leaking
sizeof(devmode->private).
Tim Potter [Sat, 16 Feb 2002 18:21:57 +0000 (16 18:21 +0000)]
Make proto.
Tim Potter [Sat, 16 Feb 2002 18:20:55 +0000 (16 18:20 +0000)]
Removed a bunch of unused functions.
Tim Potter [Sat, 16 Feb 2002 18:19:33 +0000 (16 18:19 +0000)]
Save sizeof(DEVICEMODE) * (sizeof(print queue) - 1) bytes when calling
enumjobs level 2. Instead of allocating a devicemode for each job use a
pointer to one prepared earlier when calling fill_job_info_2().
Also, in enumjobs_level2() we have sufficient information to return
ERROR_INSUFFICIENT_BUFFER slightly earlier in the piece.
Tim Potter [Sat, 16 Feb 2002 02:03:16 +0000 (16 02:03 +0000)]
Store the printer snum instead of the queue name in the internal print job
structure. It turns out we never actually use the queue name and it is
always passed to print_queue_snum() to return the service number.
This cuts 50MB(!) off the RSS of smbd when enumerating a queue with 1800
print jobs in it.
HP CR #343.
Martin Pool [Fri, 15 Feb 2002 22:00:15 +0000 (15 22:00 +0000)]
Back out 1.16.2.3:
receive_smb: You might think that we ought to set smb_read_error here,
but apparently that breaks the recursive main loop in oplock.c.
Global variables suck. :-/
Tim Potter [Fri, 15 Feb 2002 21:51:45 +0000 (15 21:51 +0000)]
Dispose of temporary memory sooner when enumerating jobs. Still more to be
done in this department though.
Partial fix for CR343.
Martin Pool [Fri, 15 Feb 2002 21:45:18 +0000 (15 21:45 +0000)]
Fix typo in comment.
Gerald Carter [Fri, 15 Feb 2002 18:56:32 +0000 (15 18:56 +0000)]
small sanity check merge from 2.2
Gerald Carter [Fri, 15 Feb 2002 18:47:58 +0000 (15 18:47 +0000)]
Fairly significant change to OpenPrinterEx(). The original printing
code allowed a printer to have a name that was different from its
sharename. This meant that we have to iterate over all of the
printer services in smb.conf and make a get_a_printer() call
to get the actual printername.
The current code never allows this so I replaced the loop
to verify the printername in the open request against
lp_servicename(snum). get_a_printer() is one of those
expensive functions that we should avoid when we can.
The main servers that will experience a speed up with this
change are those with a moderate or large number of printers
defined (possible even as few as 30!).
This fix relates to CR 362 and 414.
jerry