1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-22 16:59:09 +03:00
Commit Graph

80 Commits

Author SHA1 Message Date
13ed08cd2a r5806: * fix a couple more segvs in spoolss
* comment out unused variable after jra's change to revert the 56bit des
  smb signing changes
2007-10-10 10:56:02 -05:00
deb2578087 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.
-
96bc2abfcb 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.
-
a2bd8f0bfa Update my copyrights according to my agreement with IBM -
15d2bc4785 Fix copyright statements for various pieces of Anthony Liguori's work. -
bc4b51bcb2 Use NTSTATUS as return value for smb_register_*() functions and init_module()
function. Patch by metze with some minor modifications.
-
aca7319e8d use the new modules system for the rpc modules (backport from HEAD) -
d9c485b010 merge from HEAD - enable dynamic RPC modules -
e01596853e Sync 3.0 branch with HEAD -
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 -
d3aed37dd8 printing merge from HEAD -
619397cc90 OpenPrinter() merge from 2.2 -
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
-
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
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.
-
96b3a65a73 merge from 2.2 -
d4cafc076b Fixed a few typos and added the opnum for ADDPRINTERDRIVEREX to the
rpc_spoolss.h header file.
-
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.
-
2d0922b0ea Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. -
5ceecc7bef move to SAFE_FREE() -
dcd6e735f7 the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work -
1d36250e33 converted another bunch of stuff to NTSTATUS -
2e33940360 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.  (-:
-
6b4a70cd82 Merging Gerry's spoolss changes.
Jeremy.
-
515caaf7b4 merge from 2.2 (deleteprinterdriver RPC) -
817258f117 merge from 2.2. -
fd6bfe03f4 reverted the rename of new_spoolss_io_r_enumprinterdrivers() -
cbce0c9350 renamed one of the enumprinterdrivers parsing functions
for consistency sake.
-
0be41d5158 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.
-
57a9340cba 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.
-
db98d4b020 Finished converion of spoolss code to canonical format. Now to work on the
PRINT_XX struct alloc/free issues.
Jeremy.
-
9d5979f51e More converted to canonical format. Home now - do the rest tomorrow...
Jeremy.
-
1d4ff7a81b Converted more to canonical format... save as I go.,
Jeremy.
-
70beabf73b Ooops - forgot to check the rpcclient and smbcacls compile with the new
code :-(.
Jeremy.
-
8171cc5642 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.
-
14d5997dc8 Move to talloc control of SPOOL_XXX structs. Move to talloc control of
security descriptors and pointers. Syncup with 2.2 tree.
Jeremy.
-
f449d871bf 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.
-
7853b27bc1 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.
-
fb48efaf83 Implemented DELETEPRINTERDATA (tested with Gerald's Win32 progs).
Jeremy.
-
55ed0a9b0c Implemented GETFORM tested and working using Gerald's Win32 test progs....
Jeremy.
-
596c21a2af Implemented DELETEFORM tested using Gerald's Win32 test code :-).
Jeremy.
-
6d081a9017 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.
-
14e534a890 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.
-
ac0a145acc 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.
-
f357451374 Pass pipes_struct rather than vuid down to startdocprinter, setprinter and
setjob spoolss server commands.
-
2a9e645cbd Fixes for Win2k "add printer driver" INFO_LEVEL_6 was wrong, also some
memory fixes.
Jeremy.
-
f6436aacd6 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.
-
34b63896ab Memory leak fixes.
Jeremy.
-
03cd4aa144 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.
-
3cdcfa6325 More insure found memory leak and corruption fixes.
Jeremy.
-