1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

307 Commits

Author SHA1 Message Date
Tim Potter
1ea5aa4a80 iAdded querydispinfo and querydominfo functions.
Allow rid to be specified in lookupuser.
0001-01-01 00:00:00 +00:00
Tim Potter
982195c89d Added queryaliasmem function.
Moved fetch_domain_sid() calls out of harms way so they didn't spam out
queries on SAMR pipe.
0001-01-01 00:00:00 +00:00
Tim Potter
d4f6ce9422 Tidyup of server vs servername, username vs user to remove compiler
warnings.
0001-01-01 00:00:00 +00:00
Tim Potter
23427a57da Added cmd_samr_enum_dom_groups() function. 0001-01-01 00:00:00 +00:00
Tim Potter
3434e0bf7f More usability fixes. 0001-01-01 00:00:00 +00:00
Tim Potter
37cdf37fee Allow ctrl-d to exit rpcclient.
Don't try to run anything if user just presses return at rpcclient prompt.
0001-01-01 00:00:00 +00:00
Gerald Carter
0a6ceed279 rpcclient merge from 2.2 (including Jeremy's non-void return fix) 0001-01-01 00:00:00 +00:00
Jeremy Allison
94747b4639 Got "medieval on our ass" about adding the -1 to slprintf.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
cea13dff75 Changed usage message for query_groupmem and query_usergroups as they don't
convert names to rids yet.
0001-01-01 00:00:00 +00:00
Jeremy Allison
be825b0746 Added Gerald's fixes.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
38b19fad28 More unused variables.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
1d14d812ea merge from 2.2 (reorder commands in array) 0001-01-01 00:00:00 +00:00
Andrew Tridgell
4ec971e905 fixed rpcclient readline code 0001-01-01 00:00:00 +00:00
Gerald Carter
0cb7639cef addprinter and adddriver are working now :-) 0001-01-01 00:00:00 +00:00
Gerald Carter
5d32167385 added getdriverdir and cleaned up the PRINTER_DRIVER_CTR struct 0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Gerald Carter
6aaac37663 more updates. several spoolss commands added as placeholders
to be filled in one at a time.
0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
Gerald Carter
e652a14264 move charset_initialize() up in the food chain so that lp_load_services
and stuff will work....
0001-01-01 00:00:00 +00:00
Jeremy Allison
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.
0001-01-01 00:00:00 +00:00
Tim Potter
76f08426a0 rpcclient functions for remaining samr and lsa functions. All functions
now pass through insure except for some of the dodgy spoolss prs
weirdness.
0001-01-01 00:00:00 +00:00
Tim Potter
635db9b601 Pass correctly formatted args to cli_spoolss_open_printer_ex() 0001-01-01 00:00:00 +00:00
Tim Potter
079f46aca4 Memory leak fixes and uninitialised variables spotted by insure. 0001-01-01 00:00:00 +00:00
Tim Potter
8072ee62b0 Memory leak fixes spotted by insure. 0001-01-01 00:00:00 +00:00
Tim Potter
42674cc616 Use MAXIMUM_ALLOWED_ACCESS when doing a cli_spoolss_open_printer_ex() 0001-01-01 00:00:00 +00:00
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...
0001-01-01 00:00:00 +00:00
Tim Potter
817819d0cc Port of lsa_lookup_sids() and lsa_lookup_names() rpc client functions from
TNG branch.

Re-instated lsa_lookup_sids and lsa_lookup_names functions in rpcclient.

This requires most samba binaries to link in another handful of object
files due to uncessary coupling between modules.  )-:
0001-01-01 00:00:00 +00:00
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?
0001-01-01 00:00:00 +00:00
Gerald Carter
ae7dd77c24 spoolgetprinterdriver now returns "Windows NT x86" and "Windows 4.0"
driver information.

Will merge into TNG.



jerry
0001-01-01 00:00:00 +00:00
Gerald Carter
2d95c38f7e added -P (for no prompt) and -A <authfile> options
jerry
0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
Gerald Carter
ce2d20395a FIxed some unmarshalling problems with relstr and unistr arrays
jerry
0001-01-01 00:00:00 +00:00
Jeremy Allison
e466c863f5 Tidied up security rights definitions.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
206565368b Working on spoolss_getprinterdriver() as it does not display all the
dependentfiles.



jery
0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
Gerald Carter
39d025693e Fixed AddPrinterDriver()
jerry
0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
Gerald Carter
8e5e929561 spoolss_addprinterex() was adding the printer and returning the
correct handle, but was deleting the connection to the server.
Doh!!



--jerry
0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
Jeremy Allison
c55bcec817 Tidyup removing many of the 0xC0000000 | NT_STATUS_XXX stuff (only need NT_STATUS_XXX).
Removed IS_BITS_xxx macros as they were just reproducing "C" syntax in a more
obscure way.
Jeremy.
0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Gerald Carter
2c0f6bcc8f some initial code for AddPrinterEx() project. Most is ifdef'd out
'cause it's not all written.


-jerry
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Gerald Carter
56ce247977 Added EnumPorts() and fixed up some problems
with the other spoolss client calls.

Also cleaned up output for 'help' command.



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




jerry
0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
Gerald Carter
0faf21662d adding more spoolss command into rpcclient. They don't all work
currently.  More to come later.


--jerry
0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00