1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00
Commit Graph

599 Commits

Author SHA1 Message Date
Jeremy Allison
cc22d7ea29 Changes I really don't want to lose whilst CVS is playing up.
Dynamic changes to spoolss code.
Jeremy.
(This used to be commit 0a5e7a8f31)
2000-06-01 02:35:30 +00:00
Andrew Tridgell
5b5f41d8e0 fixed some more crashes
this introduces some memory leaks that I need to fix later
(This used to be commit 2170d72d50)
2000-05-29 01:09:14 +00:00
Andrew Tridgell
38b32fb97f don't free a driver structure from the stack!
(This used to be commit d241f1dcaf)
2000-05-28 23:00:23 +00:00
Luke Leighton
4a0635cd6d #ifdef not #if
(This used to be commit f0229102fe)
2000-05-28 21:21:07 +00:00
Luke Leighton
b38aa95bc9 moved notif_y_table struct to spoolss_nt.c only used there.
#ifdef'd driver-code out with define RELIES_ON_SMBD_SPECIFIC_CODE because
spoolssd doesn't link with smbd/*.c (find_service("print$") is not
possible).
(This used to be commit 726c359d1d)
2000-05-28 21:01:14 +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
Luke Leighton
afab6492e1 uninitialised variable "list"
(This used to be commit bf33b10a43)
2000-05-27 03:12:06 +00:00
Luke Leighton
682cccd8af unistr_to_dos not unistr_to_ascii
(This used to be commit f46c4fe876)
2000-05-27 02:05:15 +00:00
Luke Leighton
a65dead017 security descs in spoolss. needs parse_sec.c nttrans.c broken.
(This used to be commit f9f2a04fdb)
2000-05-27 01:26:34 +00:00
Jeremy Allison
9646e6e1ba Compile time warning fixes and a time_t -> uint32 conversion fix.
Jeremy.
(This used to be commit 80a0079b2f)
2000-05-26 20:54:46 +00:00
Andrew Tridgell
722c86a38f a fairly big change in spoolss.
got rid of the forms, drivers and printers files in the nt drivers
directory and instead use a single tdb

note that this is _not_ all finished.
(This used to be commit 537cd6dff0)
2000-05-24 06:34:47 +00:00
Jeremy Allison
69519df0f6 Modify NT driver heirarchy to fix HP bug with duplicate printer driver
filenames :-).
Jeremy.
(This used to be commit adb6ad812a)
2000-05-22 20:04:50 +00:00
Andrew Tridgell
0806cf75ff added spool_io_printer_driver_info_level_6()
thsi function and the associated header structure were autogenerated
using a little awk based code geerator I wroe ths evening. I'll commit
that next ...
(This used to be commit 974813f0d4)
2000-05-12 14:28:46 +00:00
Jeremy Allison
612738a9e1 lib/util_unistr.c:
libsmb/clilist.c:
rpc_server/srv_spoolss_nt.c:
smbd/trans2.c: Changed unistr_to_ascii to unistr_to_dos - do codepage conversion.
msdfs/msdfs.c: Removed stub unistr_to_dos.
libsmb/pwd_cache.c: Removed obfuscation functions as they don't do anything and
					don't add any security.
Jeremy.
(This used to be commit 1ed146467e)
2000-05-10 22:47:09 +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
f6dec4d551 fixed a memory leak
(This used to be commit d4743ec0be)
2000-05-02 07:10:26 +00:00
Jeremy Allison
693ffb8466 Added sys_fork() and sys_getpid() functions to stop the overhead
of doing a system call every time we want to just get our pid.
Jeremy.
(This used to be commit 148628b616)
2000-05-02 02:23:41 +00:00
Andrew Tridgell
565cc66e6a fix handing of ascii_to_unistr
(This used to be commit 385b1844b6)
2000-04-30 14:27:39 +00:00
Andrew Tridgell
00e3fe1324 moved trans2.h and nterr.h into includes.h with all our other includes
(This used to be commit d7cd7c88fd)
2000-04-25 14:06:57 +00:00
Andrew Tridgell
d315f69e54 more pstring/fstring errors found by insure
(This used to be commit ba1931bb65)
2000-04-23 14:25:36 +00:00
Andrew Tridgell
d0e9a0c4f2 another fstring/pstring fix
(This used to be commit 91ed7d8ffe)
2000-04-23 08:44:55 +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
Andrew Tridgell
b1686a6109 we can't pass a fstring to a routine expecting a pstring
(This used to be commit 8af70f2887)
2000-04-23 08:13:48 +00:00
Andrew Tridgell
b062fe0d8f - put the job status in english not french!
- add helper fns to change from internal status codes to nt spoolss codes
(This used to be commit 917c4814fe)
2000-04-16 07:28:06 +00:00
Andrew Tridgell
8a91379a00 JF and Jeremy - please have a look at what I did to the spoolss
code. It now uses the new printing backend.

------------
The following series of commits are for the new tdb based printing
backend. This completely replaces our old printing backend.

Major changes include:

- all print ops are now done in printing/*.c rather than scattered all
  over the place
- system job ids are decoupled from SMB job ids
- the lpq parsers don't need to be nearly so smart, they only need to
  parse the filename, the status and system job id
- we can store lots more info about a job, including the full job name
- the queue cache control is much better

I also added a new utility routine file_lines_load() that loads a text
file and parses it into lines. This is used in out lpq parsing and I
also want to use it to replace all of our fgets() based code in other
places.
(This used to be commit 2df82862c0)
2000-04-16 06:20:43 +00:00
Jean-François Micouleau
416fa5377b added checks to open both \\server\printer and \\server\share.
it doesn't work, the getprinter level 0 reply is wrong...

	J.F.
(This used to be commit a7b09e3e11)
2000-04-10 21:47:46 +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
Jean-François Micouleau
154596cae5 filled the architecture table (useless for the moment).
fixed GetJob.

	J.F.
(This used to be commit 3fea49e1d8)
2000-04-06 16:23:04 +00:00
Jean-François Micouleau
dc2d1544b3 changed all the status code to ERROR_xxx instead of NT_STATUS_xx which are
wrong in the spoolss case.

fxed a bug in the job notify code (that's the polite answer), the truth is
different: there is a bug in the NT spooler service, including SP6a and
NT2K.

changed the default lpcommand in the LPRNG case.

	J.F.
(This used to be commit 396f73c11b)
2000-04-05 10:05:32 +00:00
Jean-François Micouleau
c475ab51d9 split addprinterex in preparation for level 1 support and to stop it
coredump.

	J.F.
(This used to be commit aea47dee7d)
2000-03-29 14:49:05 +00:00
Jean-François Micouleau
6ca0ed9baa rewrote getprinterdriver level 3, now correctly handle the dependent
files.
A number of memleak fixed
some error return values fixed.

	J.F.
(This used to be commit c212fbe009)
2000-03-29 12:36:44 +00:00
Jean-François Micouleau
4d43977130 fix a bug in enumprinterdrivers
J.F.
(This used to be commit a8d04c26da)
2000-03-16 16:23:38 +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
bf5f8bcf70 small fix for addprinterex at level 2
I have some network dumps at level 1, but quoting MSDN: "Level [in]
Specifies the version of the structure to which pPrinter points. This
value must be 2."

I like NT so much :-)

	J.F.
(This used to be commit fbf40c6a91)
2000-03-13 15:53:02 +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
Jeremy Allison
7b97d056a1 You *must* use O_EXCL when using mktemp (security issue).
Glad this code never shipped :-).
This is not a problem in 2.0.x.
Jeremy.
(This used to be commit a0c302f4d0)
2000-03-11 01:02:45 +00:00
Jeremy Allison
5e22394654 Fixups for compiles with gcc flags -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual
Partially implemented rpc daemon redirect (needs more work).
Jeremy.
(This used to be commit a462191698)
2000-03-10 19:50:03 +00:00
Jean-François Micouleau
e0ebb76a74 getprinter level 0: was to short, found most of the fields, undocumented,
undecoded, nothing in MSDN, but now it works :-)

cleanup of error codes.
fixed some dfs declarations function.

	J.F.
(This used to be commit 87da4404ab)
2000-03-10 17:12:24 +00:00
Jean-François Micouleau
fd69e4a13a Enumprinters level 1: reply *exactly* like an NT server
BTW, found a little memleak in it.

	J.F.
(This used to be commit 9c37b5df2d)
2000-03-07 18:10:20 +00:00
Jean-François Micouleau
0f987d77be fixed enumprinterdata.
J.F.
(This used to be commit 2b4f09e7bb)
2000-03-07 09:06:03 +00:00
Jean-François Micouleau
78d7ba5ca0 changed prs_unistr to parse empty and non-empty strings the same way.
fixed typo in SPOOLSS_SYNT
some cleanup of unused functions
wrote make_spoolss_enumprinter and make_spoolss_openprinterex for
rpcclient as I'm trying to keep in sync the parsing code between HEAD and
TNG.

Will commit changes to TNG after lunch.

	J.F.
(This used to be commit 025cdb345f)
2000-03-06 11:13:40 +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
66018871c7 made dynamic the Printer struct. No more limits :-)
J.F.
(This used to be commit b59233b3b6)
2000-02-24 23:01: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
Jean-François Micouleau
0e004212d2 more rewrite ...
comitting before starting on new functions.

	J.F.
(This used to be commit f9c2080111)
2000-02-21 01:58:13 +00:00
Jean-François Micouleau
8688933c7f fix the reply of rpc_alter_context
OpenPrinterEx is now decoding correctly the query
most of the EnumXXX use the new_buffer struct.
check the (un)marshalling return code.

conclusion: still a long way to go. all the client code has to be
rewritten, and I still wonder how to implement correctly the notify stuff.
(This used to be commit 3d6d386375)
2000-02-15 18:07:45 +00:00
Jean-François Micouleau
07fd3b392d Hum, I should remove my gloves when I'm in front of an xterm :)
fixed a stupid bug in unistr2_to_ascii that I introduced

fixed getprinterdata()
(This used to be commit 2f544a8077)
2000-02-07 18:06:54 +00:00
Jean-François Micouleau
6a6749d81e First commit of the spoolss code to the HEAD branch.
still needs a lot of cleaning/debuging.

	J.F.
(This used to be commit bd9d4cdde9)
2000-02-07 16:17:59 +00:00