1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-20 14:03:59 +03:00

53 Commits

Author SHA1 Message Date
Jeremy Allison
34b63896ab Memory leak fixes.
Jeremy.
-
Jeremy Allison
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.
-
Andrew Tridgell
6506e6f470 simple increment bug in uniarray_2_dosarray -
Andrew Tridgell
417a88fc6a no space was being reserved for the security descriptor in the parse
buffer
-
Jeremy Allison
ac383bb765 More memory leak and PANIC action fixes.
This is *horrible* code :-(.
Jeremy.
-
Jeremy Allison
48a8031826 Fixed null pointer indirect in addprinterex. Still working on problem
with extra directory layer in NT drivers.
Jeremy.
-
Jeremy Allison
3cdcfa6325 More insure found memory leak and corruption fixes.
Jeremy.
-
Jeremy Allison
eba31e4e80 Back to building. Now to test with insure.
Added some frees needed to stop memory leaks.
Jeremy.
-
Jeremy Allison
c2099cfb03 Getting back to a compilable state (not there yet but close).
Added patches for random -> sys_random.
Added set_effective_xxx patches for AFS code.
Memory allocation changes in spoolss code.
Jeremy.
-
Luke Leighton
726c359d1d 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).
-
Luke Leighton
3f976e7139 hack to get setprinter working, level2, null sec desc. -
Luke Leighton
f9f2a04fdb security descs in spoolss. needs parse_sec.c nttrans.c broken. -
Andrew Tridgell
4fef181af3 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.
-
Andrew Tridgell
87d9bac3a1 don't call prs_dump() here -
Andrew Tridgell
4de7202da4 changed uniarray_2_ascarray to uniarray_2_dosarray -
Jeremy Allison
eefbfb5e16 Added unicode_to_dos_char() function to address converting single UNICODE
characters to one or more DOS codepage characters.
Jeremy.
-
Andrew Tridgell
974813f0d4 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 ...
-
Andrew Tridgell
e72a571853 added support for deleting printers into the spoolss system -
Andrew Tridgell
d7cd7c88fd moved trans2.h and nterr.h into includes.h with all our other includes -
Jeremy Allison
9a118cd4a2 Modified interfaces and added checks around *all* *alloc calls
so that errors are returned on memory allocation failure.
Jeremy.
-
Jean-François Micouleau
cef44398f9 off by one error ...
J.F.
-
Jean-François Micouleau
396f73c11b 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.
-
Jean-François Micouleau
c212fbe009 rewrote getprinterdriver level 3, now correctly handle the dependent
files.
A number of memleak fixed
some error return values fixed.

	J.F.
-
Jeremy Allison
53721fbc7d rpc_parse/parse_spoolss.c: Added checks on mallocs/overflow checks on all prs_xx
calls.
smbd/connection.c: Fix from David Lee <T.D.Lee@durham.ac.uk>.
Jeremy.
-
Jean-François Micouleau
4847f7b17b oops ! forgot smb.h in last commit
added info level 1 parsing code for addprinter(ex)

	J.F.
-
Jean-François Micouleau
07f2e194ba parse correctly getprinterdriver2
found a stupid bug in enumprinters
fixed some memleaks
found a coredump in enumprinterdata
getprinterdriverdir responds correctly now.

	J.F.
-
Jean-François Micouleau
87da4404ab 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.
-
Jean-François Micouleau
025cdb345f 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.
-
Jean-François Micouleau
d7bcfe17ce added enumprintprocessordatatypes
now NT is happy and the "always send data in RAW mode" is checked

	J.F.
-
Jean-François Micouleau
b76ae1f92f 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.
-
Jean-François Micouleau
aa9054d14b 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.
-
Jean-François Micouleau
f9c2080111 more rewrite ...
comitting before starting on new functions.

	J.F.
-
Jean-François Micouleau
3d6d386375 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.
-
Jean-François Micouleau
2f544a8077 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()
-
Jean-François Micouleau
bd9d4cdde9 First commit of the spoolss code to the HEAD branch.
still needs a lot of cleaning/debuging.

	J.F.
-
Andrew Tridgell
d7b2087865 2nd phase of head branch sync with SAMBA_2_0 - this delets all the files that were in the head branch but weren't in SAMBA_2_0 -
Luke Leighton
caa5052522 final part of "first" phase converting over to msrpc daemon architecture.
done a minimal amout of clean-up in the Makefile, removing unnecessary
modules from the link stage.  this is not complete, yet, and will
involve some changes, for example to smbd, to remove dependencies on
the password database API that shouldn't be there.  for example,
smbd should not ever call getsmbpwXXX() it should call the Samr or Lsa
API.

this first implementation has minor problems with not reinstantiating
the same services as the caller.  the "homes" service is a good example.
-
Luke Leighton
aa3c659a8d delineation between smb and msrpc more marked. smbd now constructs
pdus, and then feeds them over either a "local" function call or a "remote"
function call to an msrpc service.  the "remote" msrpc daemon, on the
other side of a unix socket, then calls the same "local" function that
smbd would, if the msrpc service were being run from inside smbd.

this allows a transition from local msrpc services (inside the same smbd
process) to remote (over a unix socket).

removed reference to pipes_struct in msrpc services.  all msrpc processing
functions take rpcsrv_struct which is a structure containing state info
for the msrpc functions to decode and create pdus.

created become_vuser() which does everything not related to connection_struct
that become_user() does.

removed, as best i could, connection_struct dependencies from the nt spoolss
printing code.

todo: remove dcinfo from rpcsrv_struct because this stores NETLOGON-specific
info on a per-connection basis, and if the connection dies then so does
the info, and that's a fairly serious problem.

had to put pretty much everything that is in user_struct into parse_creds.c
to feed unix user info over to the msrpc daemons.  why?  because it's
expensive to do unix password/group database lookups, and it's definitely
expensive to do nt user profile lookups, not to mention pretty difficult
and if you did either of these it would introduce a complication /
unnecessary interdependency.  so, send uid/gid/num_groups/gid_t* +
SID+num_rids+domain_group_rids* + unix username + nt username + nt domain
+ user session key etc.  this is the MINIMUM info identified so far that's
actually implemented.  missing bits include the called and calling
netbios names etc.  (basically, anything that can be loaded into
standard_sub() and standard_sub_basic()...)
-
Luke Leighton
7a69633058 well, i stuffed up the spooler commands. -
Luke Leighton
e6e5caf16c debugging rpcclient spoolenum and spooljobs commands. oh, did i forget
to mention, there's a spooljobs <printer name> command, and it uses
command-line completion?  prints out NT print jobs really nicely, too.
-
Luke Leighton
bc659a09f9 preparation for doing a spoolss enum jobs command. had to rewrite
spoolss_enumjobs parsing code to do read / writes not just writes.
-
Luke Leighton
681cbb9ec1 missed mem_grow_data call -
Luke Leighton
0249ae50ad fixed string function for reading in printer_info_N. -
Luke Leighton
135eaa9773 added rpcclient spoolenum command. enumerates printers.
spoolss_r_io_enumprinters doesn't decode strings correctly
as printer_info_1/2 code has only been written to write
structures, not read them.
-
Luke Leighton
ef7fa58fd3 spoolss openprinterex / closeprinter client-code.
experimental spoolopen <printer name> command added.

jean-francois, f.y.i. i changed the #define for SPOOLSS_OPENPRINTEREX from
op code 0x44 to 0x45.
-
Luke Leighton
c86edef90e experimental spoolss rpcclient commands -
Luke Leighton
3b583f7be5 return results on prs_xxxxx() and all xxx_io_xxx() routines.
the whole task is not complete, yet.  xxx_io_xxx() routines that
_call_ xxx_io_xxx() routines not done.

prs_xxxx() covered by macros.  considering doing xxx_io_xxxx in the same way.
-
Jean-François Micouleau
a893df5c00 Correctly handle the dependent files in the printer_driver_info_3 struct
It means complex printer drivers should now download fine.

	J.F.
-
Jean-François Micouleau
7dc7801c20 Alan (alanh@pinacl.co.uk) found a nasty bug
J.F.
-
Jean-François Micouleau
bf9b639bf9 - enumprintprocessors and enumprintmonitors added.
- getjob (level 1 and 2) done.
- better handling of getprinterdriver (level 2).
- added workaround to print PCL files.

Now the spoolss code should be compliant with all kind of printers :-)

	Jean Francois
-