1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-21 03:17:08 +03:00

228 Commits

Author SHA1 Message Date
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
-
Jeremy Allison
f82c273a42 Fix for #480. Change the interface for init_unistr2 to not take a length
but a flags field. We were assuming that 2*strlen(mb_string) == length of ucs2-le string.
This is not the case. Count it after conversion.
Jeremy.
-
Herb Lewis
a6a39c61e8 get rid of some sompiler warnings on IRIX -
Tim Potter
7f363fa32d Don't bomb out when trying to unmarshall a zero length printerdata value.
Fixes remote printer publishing of shared printers from a Samba server.
-
Gerald Carter
944480b89a fix bug #178; available space in devmode should be int -
Tim Potter
7fd7af121e Whitespace syncup. -
Andrew Bartlett
32fb801ddc Merge the 'safe' parts of my StrnCpy patch - many of the users really wanted
a pstrcpy/fstrcpy or at most a safe_strcpy().

These have the advantage of being compiler-verifiable.

Get these out of the way, along with a rewrite of 'get_short_archi' in the
spoolss client and server.  (This pushes around const string pointers, rather
than copied strings).

Andrew Bartlett
-
Gerald Carter
52ef84b534 add #define for the max device name length in a DEVICEMODE -
Gerald Carter
e8939165b7 * CR1868: only send a change notify message if we have something
that changed that the client is monitoring.

* couple of comments abnout how we need to validate driver names
  on SetPrinter() and AddPrinter()

* up the debug level on some overly verbose dev mode parsing messages
-
Tim Potter
a20aba0999 Merge: const fixes. -
Gerald Carter
31272d3b6b 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.
-
Gerald Carter
3fc90ea1d9 couple of merges from APP_HEAD
* performance optimization in enumprinterdataex() when keyname is empty
  * fix a few typos in comments
  * reload services after addprinter_command()

dump registry data in ascii when the key is REG_SZ or REG_MULTI_SZ
-
Andrew Bartlett
3a7458f947 Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
-
Tim Potter
872c152d35 Merge of comment about apparent spoolss_io_user_info weirdness. -
Jim McDonough
60502d9d42 Support printer info 7, used for publishing -
Jim McDonough
f6e21ba4c7 Sync with HEAD to get enumprinterkey api. -
Jeremy Allison
d030df7643 Merge of scalable printing code fix... Needs testing.
Jeremy.
-
Tim Potter
0f2ddfcd95 Merge NULL relstr fix from HEAD. -
Jeremy Allison
cb89bcc935 HEAD and APP-HEAD spoolss parsing was out of sync. This MUST NOT HAPPEN !
Jeremy.
-
Gerald Carter
65e7b5273b sync'ing up for 3.0alpha20 release -
Jelmer Vernooij
3928578b52 sync 3.0 branch with head -
Andrew Tridgell
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 -
Gerald Carter
d3aed37dd8 printing merge from HEAD -
Jeremy Allison
4369a58765 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.
-
Gerald Carter
d87aa35d48 specversion merge from SAMBA_2_2 -
Tim Potter
e878cdc9f5 Fixed missing alignment in spoolss_io_q_enumjobs() function. -
Tim Potter
6367bfc478 The useless_ptr must be non-zero for addform and setform client functions
to work.

Note about setprinter level 1 not existing.
-
Gerald Carter
619397cc90 OpenPrinter() merge from 2.2 -
Gerald Carter
88d8897e21 resetprinter merge from SAMBA_2_2 -
Gerald Carter
5760315c1d syncing up printing code with SAMBA_2_2 (already done some merges
in the reverse).

  * add in new printer change notify code from SAMBA_2_2

  * add in se_map_standard() from 2.2 in _spoolss_open_printer_ex()

  * sync up the _print_queue_struct in smb.h (why did someone change the
    user/file names in fs_user/fs_file (or vice-versa) ? )

  * sync up some cli_spoolss_XXX functions
-
Tim Potter
ab1ebd3779 Remove studly gaps from prs_werror() calls so the same debug text is
logged.  This makes it much easier to use grep on log files when searching
for errors.
-
Tim Potter
e69222f081 Implemented client side functions for SPOOLSS addform, getform, setform and
enumforms.
-
Tim Potter
1803778451 Added make functions for SPOOL_Q_{ADD,SET,DELETE}FORM.
I'm pretty sure that the useless_ptr in spoolss_io_q_setform() needs to be
initialised to 1 otherwise the form isn't marshalled at all.  JF, can you
verify this?  If so then this probably applies to the io functions for
setform and deleteform.
-
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
Jeremy Allison
27f65b3aad Fixed ADDPRINTEREX to take a devmode and a security descriptor...
Jeremy.
-
Jeremy Allison
9a969069f1 Added prs_mem_clear(). Clear memory on buffer reallocation. That way
we're not returning what the client gave us.
Jeremy.
-
Jeremy Allison
b63b762978 Added PRINTER_INFO_4/PRINTER_INFO_5, we're seeing level 5 requested on the wire... so.
Jeremy.
-
Tim Potter
690cc12bad Sed error. The status value in the PRINTER_INFO_2 structure isn't a WERROR
but a plain old uint32.
-
Gerald Carter
72d3b16022 merge from 2.2 -
Tim Potter
b596c0b171 Replaced some hardcoded hex numbers with constants.
Made a note about NOTIFY_OPTION_TYPE and NOTIFY_OPTION_TYPE_DATA - they are
actually one structure.  The latter is just the deferred referrant of the
former.
-
Gerald Carter
5b4b3323a3 merge from 2.2 -
Tim Potter
bef4365647 Added client and server code for the GetPrintProcessorDirectory SPOOLSS
rpc.  This was supposed to fix a printer driver download bug but it didn't
but it seemed a shame to trash all this code so I'm commiting it #ifdef'ed
out in case someone needs it one day.
-
Gerald Carter
c60aa6c06f merge from APPLIANCE_HEAD -
Gerald Carter
90ed3d47e1 remove unused variables -
Gerald Carter
96b3a65a73 merge from 2.2 -
Jeremy Allison
9148bb9eaa Tidyups when I was doing the big merge...
Jeremy.
-
Martin Pool
be5d32eb9c spoolss_io_devmode private data is binary and should be shown in hex,
not ascii.
-
Tim Potter
87614c74b3 Wrote some stubs for new win2k only spoolss rpc commands:
GetPrinterDataEx() and SetPrinterDataEx().  Not sure what the command
number is for the latter is - I haven't seen it on the wire yet.
-
Tim Potter
2d0922b0ea Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. -
Simo Sorce
94b0fde8a8 move to SAFE_FREE() -