1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-18 17:57:55 +03:00

474 Commits

Author SHA1 Message Date
Gerald Carter
21ec2b6ba3 add #define for the max device name length in a DEVICEMODE -
Jeremy Allison
60b0cfc8a5 Writable string const fixes.
Jeremy.
-
Andrew Bartlett
6c43327ea2 Fix another 'off by one' bug with safe_strcpy(). It is unclear if the intent
was to limit the string to 31 or 32 characters (excluding the null term), so
I've assumed for now that 32 is fine, as this matches current behaviour (well, current behaviour would crash, but anyway...)

Jerry:  Can you look at this for me?

Andrew Bartlett
-
Jeremy Allison
d29c6853dd Ensure added jobs increment total_jobs.
Jeremy.
-
Gerald Carter
33c7b75225 Progress on CR 601
cache the printer_info_2 with the open printer handle.
cache is invalidated on a mod_a_printer() call **on that smbd**.

Yes, this means that the window for admins to step on each other
from different clients just got larger, but since handles a generally
short lived this is probably ok.
-
Jeremy Allison
e8a9bf67cb 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.
-
Andrew Bartlett
9be21976f7 This patch fixes one of my longest-standing pet hates with Samba :-).
When we look see if a user is in a list, and we try to 'expand' an @group, we
should lookup the user's own list of groups, rather than looking for all the
members of a group.

I'm sure this will fix some nasty performance issues, particularly on large
domains etc.  In particular, this avoids contacting winbind at all, if the
group is not a winbind group.

(This caused a deadlock on my winbind-on-PDC setup).

The groups list always includes the user's primary group, as per the
getgrouplist manpage, and my recent changes to our implementation.

Andrew Bartlett
-
Gerald Carter
043b9dff22 * set PRINTER_ATTRIBUTE_RAW_ONLY; CR 1736
* never save a pointer to an automatic variable (they go away)
  implement a deep copy for SPOOLSS_NOTIFY_MSG to correct
  messages being sent that have junk for strings;
  fix in response to changes for CR 1504
-
Gerald Carter
4b5b0bcd90 off by one bug in string length; CR 1159 -
Andrew Bartlett
9deb14a2e6 Prevent NULL-pointer induced segfaults.
Is tdb_pack in appliance_head different for some reason?

Andrew Bartlett
-
Andrew Bartlett
79650e08c9 Failure to find a CUPS printer, when auto-adding printers is not a level 0 error.
Andrew Bartlett
-
Jeremy Allison
9cd29f2bac Ensure we return NOSPACE if we can't fast allocate a print job.
Jeremy.
-
Jeremy Allison
203959f1c2 Collapse duplicate messages before sending.
Jeremy.
-
Gerald Carter
364a4de6df CUPS patch to log client name -
Jeremy Allison
0b5a0fec82 Hold the lock for a much shorter time when allocating a new jobid.
Jeremy.
-
Jeremy Allison
5f13d6b4a0 Up the hash table size for printing tdb.c
Jeremy.
-
Jeremy Allison
2110901b38 Ensure we only ever set fsp->conn in one place.
Jeremy.
-
Jeremy Allison
4ae130bfa8 Add 3 second timeout when terminating server and sending print notify
messages. Stops build-up of large numbers of smbd's waiting to terminate
on large print throughput.
Jeremy.
-
Jeremy Allison
fa8647eb20 More scalable print tdb fixes.
Jeremy.
-
Gerald Carter
d74d4fe0b0 CUPS-PRINTER_CLASS patch from Michael Sweet -
Andrew Bartlett
919889de78 Fix warnings by getting the function into a shape the autoprototyper will
read, and add a static.

Andrew Bartlett
-
Andrew Bartlett
51b1413056 Crash fixes:
- fix a crash when a second NTLMSSP session tried to free the first
 - fix a crash due to some NULL pointers in the Add Printer Wizard (or read
   printer code too it appears).  As far as I can tell it's just that the
   GUID just might not exist.

Andrew Bartlett
-
Andrew Bartlett
b328b67fd8 The last of the fstring/pstring mixups, and an extra 'static'. -
Gerald Carter
142c5029c7 [merge] make sure to updatre print queue cache during timeout_processing() to send notify events; CR 1491 -
Jeremy Allison
21c8acd25a Fix lpq_cache time check (missed from yesterday).
Jeremy.
-
Andrew Bartlett
92a777d0ea BIG patch...
This patch makes Samba compile cleanly with -Wwrite-strings.
 - That is, all string literals are marked as 'const'.  These strings are
always read only, this just marks them as such for passing to other functions.

What is most supprising is that I didn't need to change more than a few lines of code (all
in 'net', which got a small cleanup of net.h and extern variables).  The rest
is just adding a lot of 'const'.

As far as I can tell, I have not added any new warnings - apart from making all
of tdbutil.c's function const (so they warn for adding that const string to
struct).

Andrew Bartlett
-
Jeremy Allison
842e08e52a Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
-
Jim McDonough
f0fc4e30f6 Store printer guid in the dsspooler registry key so we don't have to
query the directory server every time someone asks
-
Jim McDonough
adda04379e More printer publishing code.
- Add published attribute to info2, needed for win clients to work properly
- Return proper info on getprinter 7

This means you can now look at the sharing tab of a printer and get correct
info about whether it is published or not, and change it.
-
Jeremy Allison
631d606698 Fix debugs for rap mapping. Delete job on map fail.
Jeremy.
-
Jim McDonough
82f3a786bf More printer data to publish -
Jeremy Allison
15f0bad1fc 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.
-
Jim McDonough
4fc602fd7d More attributes to publish. All DsSpooler attributes except REG_MULTI_SZ ones should be published now. -
Jeremy Allison
a2ab78d68d Janitor for tpot yet again... Merging in memory leak fix.
Jeremy.
-
Jim McDonough
bbd7c8071a Automatic printer publishing when using APW or choosing 'list in the directory' in printer settings. Currently very little is published, and you cannot unpublish because of a bug in win2k clients. -
Gerald Carter
256d8c27cd [print notify fixes from APP_HEAD]
* fixing change notify on print server handle
 * adding change notify support into smbcontrol for sending comment
   changes, etc...

All part of CR 1159/1160
-
Andrew Bartlett
b3049bb0d0 No need to #include smb.h, when we already #include include.h -
Jeremy Allison
19f86f1f72 Lots of fixes for error paths where tdb_fetch() data need freeing.
Found via a post from Arcady Chernyak <Arcady.Chernyak@efi.com>.
Jeremy.
-
Jeremy Allison
82b8f749a3 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
-
Jeremy Allison
940b04ddfa First cut of fix for changenotify on a print server handle. Use the connections tdb
with an snum of -1 and a special printername.
Jeremy.
-
Jeremy Allison
c206643baa Fix for scalable printing noticed by tpot. Don't loop infinately
when holding a mutex.... :-).
Jeremy.
-
Jeremy Allison
9b08b4e4c2 Fix crash bug with overwriting memory.
Jeremy.
-
Jeremy Allison
ceb01b5ab1 Keeping branches in sync....
Jeremy.
-
Jeremy Allison
10024ed06e Merge of scalable printing code fix... Needs testing.
Also tidied up some of Richard's code (I don't think he uses the compiler
flags -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual like
I do :-) :-).
Jeremy.
-
Jeremy Allison
d05b147fb3 Fix slowdown because of enumerating all print queues on every smbd startup.
Jeremy.
-
Jeremy Allison
9e47aa32ed Check the long_archi name is not null.
Jeremy.
-
Jeremy Allison
997c234e15 Fix problem where an fd would be left open for every printer queue.
Jeremy.
-
Gerald Carter
e7dd8cf903 merge from samba_3_0
removed the following parameters

  * postscript
  * printer driver
  * printer driver location
  * printer driver file

also removed the get_a_printer_driver_9x_compatible() function
-
Jeremy Allison
0d989a911d Never do a ZERO_STRUCT on a structure in a linked list, it's dumb :-).
Jeremy.
-
Jeremy Allison
25f6a9247e SMB_ASSERT to check list terminates.
Jeremy
-