1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-10 13:57:47 +03:00

59 Commits

Author SHA1 Message Date
Andrew Tridgell
5bb7e4f0f6 it now all compiles - so try enabling it by default and see what explodes on the build farm -
Andrew Tridgell
24f9ab683d the next step in our error code handling change
- added WERROR for win32 error codes
- added a configure test for immediate structures

still lots to do, so its not enabled by default, but the main
structure is there
-
Andrew Tridgell
1d36250e33 converted another bunch of stuff to NTSTATUS -
Simo Sorce
fd54412ce9 - avoid possible mem leaks in rpcclient/cmd_*.c (talloc_destroy not performed)
- ported two rpc back from TNG (WINREG: shutdown and abort shutdown)
- some optimizations and changed some DEBUG statement in loadparm.c
- changed rpcclient a bit moved from non reentrant next_token_nr to next_token
- in cmd_reg.c not sure if getopt will work ok on all platforms only setting optind=0
-
Tim Potter
5f5ed41ee8 Replaced the duplicate DOS constants with appropriate ones from doserr.h to
emphasise the fact that the spoolss pipe returns DOS error codes instead of
32-bit nt status codes.
-
Tim Potter
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.  (-:
-
Tim Potter
37052a1bcc Started adding some help/usage info for rpcclient commands. -
Andrew Tridgell
debb471267 The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
-
Gerald Carter
7e23ed4890 merge from 2.2 -
Tim Potter
6e0805c191 Fixed compiler warning. -
Gerald Carter
515caaf7b4 merge from 2.2 (deleteprinterdriver RPC) -
Gerald Carter
09506ac0e6 merge from 2.2 DeletePrinterDriver() server side stud coming
in separate commit after I get it working in 2.2.
-
Tim Potter
d4f6ce9422 Tidyup of server vs servername, username vs user to remove compiler
warnings.
-
Gerald Carter
0a6ceed279 rpcclient merge from 2.2 (including Jeremy's non-void return fix) -
Jeremy Allison
94747b4639 Got "medieval on our ass" about adding the -1 to slprintf.
Jeremy.
-
Gerald Carter
1d14d812ea merge from 2.2 (reorder commands in array) -
Gerald Carter
0cb7639cef addprinter and adddriver are working now :-) -
Gerald Carter
5d32167385 added getdriverdir and cleaned up the PRINTER_DRIVER_CTR struct -
Gerald Carter
83d6bc4454 added getdriver and enumdrivers commands. Also fixed
enumprinters so that it works as well.  Couple of other
misc fixes while we're working on rpcclient.
-
Gerald Carter
6aaac37663 more updates. several spoolss commands added as placeholders
to be filled in one at a time.
-
Gerald Carter
d98ac8852a set of changes in the beginning of bringing rpcclient changes
back to working order.  The main change is that the cli_*() RPC
functions from libsmb/*.c now should accept a struct cli_state*.

The reason for this is that rpcclient should establish the
connection to the server at startup so that it is not necessary
to keep the clear test or password hash in memory for each command.

enumports and enumprinters now works as well.  lsa* functions
have been tested.  SAMR calls may or may not work (one of the core
dumps I know), but it compiles :-)



jerry
-
Tim Potter
635db9b601 Pass correctly formatted args to cli_spoolss_open_printer_ex() -
Tim Potter
8072ee62b0 Memory leak fixes spotted by insure. -
Tim Potter
42674cc616 Use MAXIMUM_ALLOWED_ACCESS when doing a cli_spoolss_open_printer_ex() -
Tim Potter
9a953514f2 Start of a rewrite of rpcclient based on the libsmb rpc client routines.
Currently there are a small selection of lsa, samr and spoolss functions
implemented.  More to follow...
-
Tim Potter
77b0bda4df Modified argc passed to rpc_client cmd_* functions to include argv[0].
Gerald, could you check to see I haven't introduced any bugs into
rpcclient/cmd_spoolss.c?
-
Gerald Carter
ae7dd77c24 spoolgetprinterdriver now returns "Windows NT x86" and "Windows 4.0"
driver information.

Will merge into TNG.



jerry
-
Gerald Carter
2d95c38f7e added -P (for no prompt) and -A <authfile> options
jerry
-
Gerald Carter
4fad1fc28a fixed an off by one error where I was tromping on memory
when initializing a driver_info_3 struct.  See spoolss_addprinterdriver()



jerry
-
Gerald Carter
ce2d20395a FIxed some unmarshalling problems with relstr and unistr arrays
jerry
-
Gerald Carter
206565368b Working on spoolss_getprinterdriver() as it does not display all the
dependentfiles.



jery
-
Gerald Carter
880e811616 Needed to add the SHARED attribute bit when creating a printer
on a Samba host.  Also needed to add an option to pass the share
name (printer name) on the command line.

And fixed the checking of the return code for spoolss_r_addprinterex()




jerry
-
Gerald Carter
8ecd5dd52a More work on AddPrinterDriver() and AddPrinterEx() client RPC's
Also fixed init_unistr() to deal with a NULL source character string.



-jerry
-
Gerald Carter
39d025693e Fixed AddPrinterDriver()
jerry
-
Gerald Carter
3bf9a29f34 All changes related to rpcclient...
- cleaned up some code
- Fixed a few memory leaks of my own making
- Add AddPrinterDriver(); I'm missing some of the semantics
  here as the call is done correctly, but I'm not getting all
  the information right in the DRIVER_INFO_3 struct I think.
  Will work on it tomorrow some more...



--jerry
-
Gerald Carter
8e5e929561 spoolss_addprinterex() was adding the printer and returning the
correct handle, but was deleting the connection to the server.
Doh!!



--jerry
-
Gerald Carter
e15d9befd2 clunky support for calling AddPrinterEx(). The code currently reports
that the call failed, but the printer shows up on the remote NT client.
(note this is the client side call).  I've botched the return value
somewhere and will fix that today.




jerry
-
Gerald Carter
45fbf31b69 More work on rpcclient...
* Fixed to work with Jeremy's recent changes re: dunamic
    memory allocation when unmarshalling unistr[2]
  * included EnumPorts level 1
  * more work on AddPrinterEx




--jerry
-
Jean-François Micouleau
883f7402d4 Found out that we are crashing spoolss in enumprinterdata.
So fixed enumprinterdatas in rpcclient to debug the server code,
and found that the parsing code was missing 2 prs_align().

We are not crashing NT anymore. :-)

        J.F.
-
Gerald Carter
2c0f6bcc8f some initial code for AddPrinterEx() project. Most is ifdef'd out
'cause it's not all written.


-jerry
-
Jean-François Micouleau
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.
-
Gerald Carter
56ce247977 Added EnumPorts() and fixed up some problems
with the other spoolss client calls.

Also cleaned up output for 'help' command.



jerry
-
Gerald Carter
c8abc31187 Fixed unitilized secdesc pointer which was causing spoolgetprinter
rpcclient command to fail on shared printers.




jerry
-
Gerald Carter
15b3591271 Fixed some more SPOOLSS functions. The following
functions work now:

  - spoolenum
  - spoolopen
  - spoolgetprinter
  - spoolgetprinterdriver

Items todo:

  - track down memory bug with spoolenumdata
  - fix spoolgetprinterdriverdir
  - fix spoolgetdata
  - fix display_job_info_ctr in spooljobs


--jerry
-
Gerald Carter
0faf21662d adding more spoolss command into rpcclient. They don't all work
currently.  More to come later.


--jerry
-
Gerald Carter
12e2a21e1b More rpcclient merge issues:
* fixes some readline bugs from the merge
	* first attempt at commands (spoolenum almost works)
	* no changes to existing functions in HEAD; only additions
	  of new functions.  I'll weed out what I can as I go.




--jerry
-
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
30c7fdd6ef ABOUT TIME!!!!!!!!
damn, this one is bad.

started, at least two days ago, to add an authentication mechanism to
the smbd<->msrpc redirector/relay, such that sufficient unix / nt
information could be transferred across the unix socket to do a
become_user() on the other side of the socket.

it is necessary that the msrpc daemon inherit the same unix and nt
credentials as the smbd process from which it was spawned, until
such time as the msrpc daemon receives an authentication request
of its own, whereupon the msrpc daemon is responsible for authenticating
the new credentials and doing yet another become_user() etc sequence.
-
Luke Leighton
8b92be25bd renamed PRINTER_HND to POLICY_HND. -
Luke Leighton
7a69633058 well, i stuffed up the spooler commands. -