1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

80 Commits

Author SHA1 Message Date
Gerald Carter
d177f1bc8f r5806: * fix a couple more segvs in spoolss
* comment out unused variable after jra's change to revert the 56bit des
  smb signing changes
(This used to be commit 13ed08cd2a)
2007-10-10 10:56:02 -05:00
Gerald Carter
983b4e7011 it never amazes me when some new things crawls out of the windows
spooler. :-(

When installing the Adobe PS driver onto a Samba printer via cupsaddsmb,
I noticed a WIN2k client sending DeletePrinterData("DependentFiles")
pver and over.  I also noticed that we never checked to see if the
value was valid.  No now we do and return WERR_BADFILE which I think
is correct.

Next, I noticed that we never wrote the updated printer out to disk
after a succesfully DeletePrinterData[Ex]().

Finally, I found a driver (Canon BJC 1000 using the Adobe PS drivers
and foomatic PPD file) that was destroying the device name string
in the devmode.  So now get_a_printer_2() always writes out the
device name in \\server\share form.

I think these changes might fix bug 294.
(This used to be commit deb2578087)
2003-08-23 03:34:24 +00:00
Gerald Carter
11777e6a30 Attempt at fixing bug #283. There however is no solution.
There is a workaround documented in the bug report.

This patch does:

  * add server support for the LSA_DS UUID on the lsarpc pipe
  * store a list of context_ids/api_structs in the pipe_struct
    so that we don't have to lookup the function table for a pipe.
    We just match the context_id.  Note that a dce/rpc alter_context
    does not destroy the previous context so it is possible to
    have multiple bindings active on the same pipe. Observed from
    standalone win2k sp4 client.
  * added server code for DsROleGetPrimaryDOmainInfo() but disabled it
    since it causes problems enumerating users and groups from a 2ksp4
    domain member in a Samba domain.
(This used to be commit 96bc2abfcb)
2003-08-14 21:14:28 +00:00
Jim McDonough
8c64504f7c Update my copyrights according to my agreement with IBM
(This used to be commit a2bd8f0bfa)
2003-08-01 15:30:44 +00:00
Jim McDonough
f210ee9b99 Fix copyright statements for various pieces of Anthony Liguori's work.
(This used to be commit 15d2bc4785)
2003-08-01 14:47:39 +00:00
Jelmer Vernooij
17a3acafa8 Use NTSTATUS as return value for smb_register_*() functions and init_module()
function. Patch by metze with some minor modifications.
(This used to be commit bc4b51bcb2)
2003-04-28 17:48:48 +00:00
Jelmer Vernooij
ab8a9c8419 use the new modules system for the rpc modules (backport from HEAD)
(This used to be commit aca7319e8d)
2003-04-15 16:55:21 +00:00
Jim McDonough
49d3f7bc81 merge from HEAD - enable dynamic RPC modules
(This used to be commit d9c485b010)
2003-02-14 00:48:28 +00:00
Jelmer Vernooij
8c53b214da Sync 3.0 branch with HEAD
(This used to be commit e01596853e)
2002-08-17 15:34:15 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Gerald Carter
2699f9b9df printing merge from HEAD
(This used to be commit d3aed37dd8)
2002-04-22 18:48:45 +00:00
Gerald Carter
737423f06e OpenPrinter() merge from 2.2
(This used to be commit 619397cc90)
2002-03-26 03:15:30 +00:00
Gerald Carter
65c007b583 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
(This used to be commit 5760315c1d)
2002-03-15 08:14:10 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Tim Potter
4f53486d78 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.
(This used to be commit bef4365647)
2001-12-10 05:03:17 +00:00
Gerald Carter
116740a5df merge from 2.2
(This used to be commit 96b3a65a73)
2001-11-22 05:56:09 +00:00
Gerald Carter
e3abad1741 Fixed a few typos and added the opnum for ADDPRINTERDRIVEREX to the
rpc_spoolss.h header file.
(This used to be commit d4cafc076b)
2001-11-09 20:59:18 +00:00
Tim Potter
7623cec4ad 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.
(This used to be commit 87614c74b3)
2001-11-05 06:15:02 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Simo Sorce
87945989c0 move to SAFE_FREE()
(This used to be commit 5ceecc7bef)
2001-09-17 10:26:23 +00:00
Andrew Tridgell
19fea3242c the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work
(This used to be commit dcd6e735f7)
2001-09-04 07:13:01 +00:00
Andrew Tridgell
b031af348c converted another bunch of stuff to NTSTATUS
(This used to be commit 1d36250e33)
2001-08-27 19:46:22 +00:00
Tim Potter
648528196c Held a shoot-out between NT_STATUS_NO_PROBLEMO and NT_STATUS_NOPROBLEMO.
According to the incorruptible judges find and grep, the latter won.

Mmm - procrastination.  (-:
(This used to be commit 2e33940360)
2001-07-25 06:42:05 +00:00
Jeremy Allison
3a6019b0eb Merging Gerry's spoolss changes.
Jeremy.
(This used to be commit 6b4a70cd82)
2001-06-21 17:46:14 +00:00
Gerald Carter
43000d8d06 merge from 2.2 (deleteprinterdriver RPC)
(This used to be commit 515caaf7b4)
2001-05-18 04:11:17 +00:00
Gerald Carter
25d975e550 merge from 2.2.
(This used to be commit 817258f117)
2001-03-27 18:19:01 +00:00
Gerald Carter
344fb49fbf reverted the rename of new_spoolss_io_r_enumprinterdrivers()
(This used to be commit fd6bfe03f4)
2001-03-19 18:14:09 +00:00
Gerald Carter
a9dda48d65 renamed one of the enumprinterdrivers parsing functions
for consistency sake.
(This used to be commit cbce0c9350)
2001-03-15 07:11:18 +00:00
Jeremy Allison
da3053048c 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 0be41d5158)
2001-03-11 00:32:10 +00:00
Jeremy Allison
93169a1f34 Roll back to using malloc/realloc on some of spoolss in head.
I'm having problems with talloc_realloc in the 2.2 branch and I
want a stable reference.

The only problem is this breaks the clean auto-generated code
in *one* call in srv_spoolss.c (the rfnpcnex call).

Jeremy.
(This used to be commit 57a9340cba)
2001-03-03 05:27:26 +00:00
Jeremy Allison
30d74f54e6 Finished converion of spoolss code to canonical format. Now to work on the
PRINT_XX struct alloc/free issues.
Jeremy.
(This used to be commit db98d4b020)
2001-02-28 21:19:31 +00:00
Jeremy Allison
acc06fc7a8 More converted to canonical format. Home now - do the rest tomorrow...
Jeremy.
(This used to be commit 9d5979f51e)
2001-02-28 02:38:09 +00:00
Jeremy Allison
2a258f7a64 Converted more to canonical format... save as I go.,
Jeremy.
(This used to be commit 1d4ff7a81b)
2001-02-28 02:03:02 +00:00
Jeremy Allison
6ed9b52862 Ooops - forgot to check the rpcclient and smbcacls compile with the new
code :-(.
Jeremy.
(This used to be commit 70beabf73b)
2001-02-28 01:38:12 +00:00
Jeremy Allison
403562cb94 Partial conversion of SPOOLSS code to canonical format. More to follow.
Once complete then the PRINTER_XX functions and structures will be converted
to talloc control.
Jeremy.
(This used to be commit 8171cc5642)
2001-02-28 01:24:55 +00:00
Jeremy Allison
0f2799aaf1 Move to talloc control of SPOOL_XXX structs. Move to talloc control of
security descriptors and pointers. Syncup with 2.2 tree.
Jeremy.
(This used to be commit 14d5997dc8)
2001-02-28 00:51:02 +00:00
David O'Neill
4a9fb6b6b7 Changes from SAMBA_2_2:
source/rpc_server/srv_spoolss_nt.c
    source/rpc_server/srv_spoolss.c
    source/include/proto.h
        - correct checking of access_required in openprinterex as talked
          with John R. and Jerry.
          You can only do server stuff (adding printers, changing forms,
          ..) if you're root or if user is in printer admin list.
          Printers options are grayed if you don't have the
          PRINTER_ADMINISTER flag in the secdesc.
(This used to be commit f449d871bf)
2001-01-31 18:34:49 +00:00
David O'Neill
22363b9d78 Changes from APPLIANCE_HEAD:
source/include/proto.h
    source/include/rpc_spoolss.h
    source/rpc_parse/parse_spoolss.c
    source/rpc_server/srv_spoolss.c
    source/rpc_server/srv_spoolss_nt.c
        - speedups in printer queue enumeration  - still room for
          improvement.  The construct_dev_mode() still creates and destroys
          a printer info_2 structure every time it is called.
        - fixed job->devmode memory leak
        - converted printer job notification routines to use tallocated
          memory rather than a fixed 2K buffer.   This reduces the memory
          requirements of a 4500 job queue enumeration from 90MB to about
          16MB.
(This used to be commit 7853b27bc1)
2001-01-17 22:55:02 +00:00
Jeremy Allison
e0f9de0c49 Implemented DELETEPRINTERDATA (tested with Gerald's Win32 progs).
Jeremy.
(This used to be commit fb48efaf83)
2000-09-09 00:19:35 +00:00
Jeremy Allison
d644d4438c Implemented GETFORM tested and working using Gerald's Win32 test progs....
Jeremy.
(This used to be commit 55ed0a9b0c)
2000-09-05 20:56:09 +00:00
Jeremy Allison
fa810d4c80 Implemented DELETEFORM tested using Gerald's Win32 test code :-).
Jeremy.
(This used to be commit 596c21a2af)
2000-08-31 19:04:51 +00:00
Jeremy Allison
d407579b94 Implemented AbortPrinter() from Gerald's Win32 test code. Just purge all
possible printjobs from that printer (I think this is correct).
Added error code returns for print_queue_XXX() functions.
Jeremy.
(This used to be commit 6d081a9017)
2000-08-30 00:45:59 +00:00
Andrew Tridgell
9e1f9a5719 yipee!
The spoolss AddJob function has an [in,out] buffer not an [in] buffer
(despite the comment in the code to the contrary). Also, we must fail
this function - not just blindly reply "no problem" as AddJob should
always fail on non-local printers.

This fixes a bug where the "print test page" failed about half the
time. I suspect it will also fix a bunch of other intermittent spoolss
bugs where the client (incorrectly) tries to use the AddJob printing
interface.
(This used to be commit 14e534a890)
2000-08-28 04:42:31 +00:00
Jean-François Micouleau
5a5ef18379 A rather big change set ! (listed in no particular order)
- changed the default forms flag to 2
- all short architecture name are uppercased
- get_short_archi() is now case unsensitive
- the drivers TDB is indexed by archi/version/name
- implemented code to move drivers from the upload area to the download
area. Someone else need to look at that code.
- don't return anymore a default driver if it doesn't exist in the TDB.
Instead return an error.
- cleaned prs_unistr.
- #ifdef out jeremy's new SD parsing in printer_info_2
- removed the unused MANGLE_CODE

- #ifdef out the security checking in update_printer() as it doesn't work
for me.

Zap your ntdrivers.tdb, it won't work anymore.

	J.F.
(This used to be commit ac0a145acc)
2000-07-25 13:15:16 +00:00
Tim Potter
d4081ac703 Pass pipes_struct rather than vuid down to startdocprinter, setprinter and
setjob spoolss server commands.
(This used to be commit f357451374)
2000-07-06 06:51:55 +00:00
Jeremy Allison
69c75c8a16 Fixes for Win2k "add printer driver" INFO_LEVEL_6 was wrong, also some
memory fixes.
Jeremy.
(This used to be commit 2a9e645cbd)
2000-06-20 23:58:56 +00:00
Tim Potter
bc21403497 Simplified server pipe implementation by changing arguments passed down
through to the individual pipe api calls.  Instead of passing two
prs_struct pointers, we now pass the pipes_struct pointer which contains
the former information as well as other useful stuff like the vuid.

Pass the vuid from the pipes_struct down to the lower level spoolss
functions to perform security checks.
(This used to be commit f6436aacd6)
2000-06-16 08:15:01 +00:00
Jeremy Allison
d253db1b9a Memory leak fixes.
Jeremy.
(This used to be commit 34b63896ab)
2000-06-06 20:44:58 +00:00
Jeremy Allison
6d8c131f50 Some tidyup fixes (memory leaks etc.). Still no progress with the
"no driver" issue. I'm banging my head against comparitive packet
dumps right now...
Jeremy.
(This used to be commit 03cd4aa144)
2000-06-05 20:55:57 +00:00
Jeremy Allison
8ff6458a3e More insure found memory leak and corruption fixes.
Jeremy.
(This used to be commit 3cdcfa6325)
2000-06-01 21:52:49 +00:00