1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

66 Commits

Author SHA1 Message Date
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
Jeremy Allison
61ab5b46cf Back to building. Now to test with insure.
Added some frees needed to stop memory leaks.
Jeremy.
(This used to be commit eba31e4e80)
2000-06-01 18:17:22 +00:00
Andrew Tridgell
5f7c40f6d0 getting and setting security descriptors on printers now works
this needed some fixes in tdb_unpack(). Tim, you'll need to update
(This used to be commit 9422719ab4)
2000-05-27 09:53:11 +00:00
Andrew Tridgell
49a0e6d598 more merging voodoo
this adds "#define OLD_NTDOMAIN 1" in lots of places. Don't panic -
this isn't permanent, it should go after another few merge steps have
been done
(This used to be commit 92109d7b3c)
2000-05-10 10:41:59 +00:00
Andrew Tridgell
f3a861e04e - use full_name instead of real_name
- got rid of guest map code in lpq parser
(This used to be commit 8e53f781d3)
2000-05-04 07:59:34 +00:00
Andrew Tridgell
59fa2dbe2c added support for deleting printers into the spoolss system
(This used to be commit e72a571853)
2000-05-02 15:31:55 +00:00
Andrew Tridgell
4a57f9763a fixed a memory leak of devmode in spoolss
this stuff is screaming out for talloc() rather than malloc/free
(This used to be commit e9576124cb)
2000-04-25 00:46:24 +00:00
Andrew Tridgell
6d667ad4d3 fixed another spoolss memory leak
I am falling in love with insure - it is finding _lots_ of memory
problems
(This used to be commit d9b4076293)
2000-04-23 08:40:54 +00:00
Jeremy Allison
aac823aca1 Modified interfaces and added checks around *all* *alloc calls
so that errors are returned on memory allocation failure.
Jeremy.
(This used to be commit 9a118cd4a2)
2000-04-06 22:48:53 +00:00
Tim Potter
ba0a53b52c Removed unused parameter vuid from rpc_server api_* calls. For the very few
functions that need to access the vuid, it can be obtained from the
current_user global.

Did some whitespace cleanup.
(This used to be commit 738b307bd7)
2000-04-04 00:35:34 +00:00
Jean-François Micouleau
c5fbb293a8 oops ! forgot smb.h in last commit
added info level 1 parsing code for addprinter(ex)

	J.F.
(This used to be commit 4847f7b17b)
2000-03-13 19:34:04 +00:00
Jean-François Micouleau
79bfb14318 parse correctly getprinterdriver2
found a stupid bug in enumprinters
fixed some memleaks
found a coredump in enumprinterdata
getprinterdriverdir responds correctly now.

	J.F.
(This used to be commit 07f2e194ba)
2000-03-13 11:09:20 +00:00
Jean-François Micouleau
fd3acf437a added enumprintprocessordatatypes
now NT is happy and the "always send data in RAW mode" is checked

	J.F.
(This used to be commit d7bcfe17ce)
2000-02-26 23:01:02 +00:00
Jean-François Micouleau
badee62bca rewrote enumprinterdata. still a bug in it but reproducing it hard and
borring.

I need a client test program urgently!!!

rewrote setprinter, doesn't coredump anymore, and no memleak.

	J.F.
(This used to be commit b76ae1f92f)
2000-02-26 22:22:24 +00:00
Jean-François Micouleau
f3319f7963 converted a couple of bzero() to memset()
rewrote the printer notify code, so now it's compatible with SP5 and fully
dynamic. No more limits on printers and job lists.

removed the make_xxx() functions as they are not used and broken

fixed a bug in the open handle function.

	J.F.
(This used to be commit aa9054d14b)
2000-02-24 16:27:06 +00:00