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

165 Commits

Author SHA1 Message Date
Tim Potter
b872787f01 Doing some research into ACLs on the LSA and SAM policy objects.
- added lsaquerysecobj to rpcclient
 - renamed querysecobj to samquerysecobj
 - removed duplicated display_sec_acl() code from cmd_spoolss.c and
   cmd_samr.c and moved it into display_sec.c
(This used to be commit 59b2e3f408)
2001-12-11 02:17:26 +00:00
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
Tim Potter
6d9adfe73c Renamed sid field in SEC_ACE to trustee to be more in line with MS's
definitions.
(This used to be commit 9712d3f15a)
2001-11-30 01:04:15 +00:00
Tim Potter
06ff349e21 FALSE -> False
(This used to be commit 7c6529c081)
2001-11-15 05:26:22 +00:00
Tim Potter
439c7e0ca2 Some old stuff hanging around since the CIFS conference. Big cleanup of
rpcclient code.  Refactored cmd_* functions to move common mem_ctx and pipe
opening stuff up one level.  Moved rpcclient.h into rpcclient directory and
out of includes/smb.h
(This used to be commit a40facba96)
2001-10-12 05:56:23 +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
Andrew Tridgell
c76dd14040 it now all compiles - so try enabling it by default and see what explodes on the build farm
(This used to be commit 5bb7e4f0f6)
2001-09-04 10:57:29 +00:00
Andrew Tridgell
fd6ea43161 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
(This used to be commit 24f9ab683d)
2001-09-03 08:50:59 +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
Simo Sorce
acc149c427 - 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
(This used to be commit fd54412ce9)
2001-08-10 09:52:10 +00:00
Tim Potter
047a7c88d7 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.
(This used to be commit 5f5ed41ee8)
2001-08-10 05:41:53 +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
Tim Potter
8db78af970 Started adding some help/usage info for rpcclient commands.
(This used to be commit 37052a1bcc)
2001-07-20 04:38:58 +00:00
Andrew Tridgell
87fbb7092b 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.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Gerald Carter
7a33f253e1 merge from 2.2
(This used to be commit 7e23ed4890)
2001-05-31 17:28:40 +00:00
Tim Potter
95dbe55e57 Fixed compiler warning.
(This used to be commit 6e0805c191)
2001-05-24 08:07:13 +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
013b454d1a merge from 2.2 DeletePrinterDriver() server side stud coming
in separate commit after I get it working in 2.2.
(This used to be commit 09506ac0e6)
2001-05-17 18:57:25 +00:00
Tim Potter
a8be5dced6 Tidyup of server vs servername, username vs user to remove compiler
warnings.
(This used to be commit d4f6ce9422)
2001-05-04 07:34:16 +00:00
Gerald Carter
e40449fa72 rpcclient merge from 2.2 (including Jeremy's non-void return fix)
(This used to be commit 0a6ceed279)
2001-04-28 00:32:56 +00:00
Jeremy Allison
f9a15ce1a6 Got "medieval on our ass" about adding the -1 to slprintf.
Jeremy.
(This used to be commit 94747b4639)
2001-04-08 20:22:39 +00:00
Gerald Carter
6e64ea1473 merge from 2.2 (reorder commands in array)
(This used to be commit 1d14d812ea)
2001-03-19 17:23:26 +00:00
Gerald Carter
207e715059 addprinter and adddriver are working now :-)
(This used to be commit 0cb7639cef)
2001-03-15 22:06:53 +00:00
Gerald Carter
729b7cf214 added getdriverdir and cleaned up the PRINTER_DRIVER_CTR struct
(This used to be commit 5d32167385)
2001-03-15 16:43:19 +00:00
Gerald Carter
f4ae39d53a 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.
(This used to be commit 83d6bc4454)
2001-03-15 07:13:27 +00:00
Gerald Carter
79dc43767e more updates. several spoolss commands added as placeholders
to be filled in one at a time.
(This used to be commit 6aaac37663)
2001-03-15 02:15:05 +00:00
Gerald Carter
fb3d8452e5 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
(This used to be commit d98ac8852a)
2001-03-14 20:22:57 +00:00
Tim Potter
7237fd3c85 Pass correctly formatted args to cli_spoolss_open_printer_ex()
(This used to be commit 635db9b601)
2001-01-12 19:47:08 +00:00
Tim Potter
eb1e855f4e Memory leak fixes spotted by insure.
(This used to be commit 8072ee62b0)
2001-01-12 17:53:47 +00:00
Tim Potter
78b2616049 Use MAXIMUM_ALLOWED_ACCESS when doing a cli_spoolss_open_printer_ex()
(This used to be commit 42674cc616)
2001-01-12 02:58:29 +00:00
Tim Potter
fc659e07d0 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...
(This used to be commit 9a953514f2)
2001-01-11 22:49:30 +00:00
Tim Potter
cf9443677d 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?
(This used to be commit 77b0bda4df)
2000-12-08 03:24:38 +00:00
Gerald Carter
072d39165d spoolgetprinterdriver now returns "Windows NT x86" and "Windows 4.0"
driver information.

Will merge into TNG.



jerry
(This used to be commit ae7dd77c24)
2000-09-12 16:03:16 +00:00
Gerald Carter
a86ae846ad added -P (for no prompt) and -A <authfile> options
jerry
(This used to be commit 2d95c38f7e)
2000-08-29 14:43:42 +00:00
Gerald Carter
0136927ed8 fixed an off by one error where I was tromping on memory
when initializing a driver_info_3 struct.  See spoolss_addprinterdriver()



jerry
(This used to be commit 4fad1fc28a)
2000-08-18 06:03:13 +00:00
Gerald Carter
74f2fc40db FIxed some unmarshalling problems with relstr and unistr arrays
jerry
(This used to be commit ce2d20395a)
2000-08-12 14:26:01 +00:00
Gerald Carter
536a055a9a Working on spoolss_getprinterdriver() as it does not display all the
dependentfiles.



jery
(This used to be commit 206565368b)
2000-08-10 14:05:19 +00:00
Gerald Carter
8e0e319674 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
(This used to be commit 880e811616)
2000-08-10 04:10:29 +00:00
Gerald Carter
a08d444896 More work on AddPrinterDriver() and AddPrinterEx() client RPC's
Also fixed init_unistr() to deal with a NULL source character string.



-jerry
(This used to be commit 8ecd5dd52a)
2000-08-09 20:14:29 +00:00
Gerald Carter
0756908d55 Fixed AddPrinterDriver()
jerry
(This used to be commit 39d025693e)
2000-08-09 02:04:25 +00:00
Gerald Carter
f296a8d087 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
(This used to be commit 3bf9a29f34)
2000-08-08 06:57:48 +00:00
Gerald Carter
4fabc1ad0d spoolss_addprinterex() was adding the printer and returning the
correct handle, but was deleting the connection to the server.
Doh!!



--jerry
(This used to be commit 8e5e929561)
2000-08-04 20:32:34 +00:00
Gerald Carter
4003a1c55b 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
(This used to be commit e15d9befd2)
2000-08-04 12:46:36 +00:00
Gerald Carter
a6ef985df4 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
(This used to be commit 45fbf31b69)
2000-07-31 14:50:53 +00:00
Jean-François Micouleau
1e3a5503cd 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.
(This used to be commit 883f7402d4)
2000-07-26 09:40:49 +00:00
Gerald Carter
48a3e00224 some initial code for AddPrinterEx() project. Most is ifdef'd out
'cause it's not all written.


-jerry
(This used to be commit 2c0f6bcc8f)
2000-07-25 21:07:46 +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
Gerald Carter
92708e3945 Added EnumPorts() and fixed up some problems
with the other spoolss client calls.

Also cleaned up output for 'help' command.



jerry
(This used to be commit 56ce247977)
2000-07-21 19:59:51 +00:00
Gerald Carter
58221bfcf7 Fixed unitilized secdesc pointer which was causing spoolgetprinter
rpcclient command to fail on shared printers.




jerry
(This used to be commit c8abc31187)
2000-07-20 13:38:48 +00:00
Gerald Carter
2089176e34 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
(This used to be commit 15b3591271)
2000-07-18 05:02:16 +00:00
Gerald Carter
fb7a24d8b4 adding more spoolss command into rpcclient. They don't all work
currently.  More to come later.


--jerry
(This used to be commit 0faf21662d)
2000-07-14 16:29:22 +00:00
Gerald Carter
9de93aa818 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
(This used to be commit 12e2a21e1b)
2000-07-07 06:18:00 +00:00
Andrew Tridgell
32a965e09c 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
(This used to be commit d7b2087865)
1999-12-13 13:35:20 +00:00
Luke Leighton
4ab9d91428 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.
(This used to be commit 30c7fdd6ef)
1999-12-08 21:43:03 +00:00
Luke Leighton
dbc916a251 renamed PRINTER_HND to POLICY_HND.
(This used to be commit 8b92be25bd)
1999-11-29 17:45:47 +00:00
Luke Leighton
9720774c6a well, i stuffed up the spooler commands.
(This used to be commit 7a69633058)
1999-11-27 23:25:45 +00:00
Luke Leighton
2803a72751 ok. *whew*. this is the first completed part of the restructure.
verified that lsaquery, lsalookupsids work, and found some bugs in the
parameters of these commands :-)

soo... we now have an lsa_* api that has the same arguments as the nt
Lsa* api!  cool!

the only significant coding difference is the introduction of a
user_credentials structure, containing user, domain, pass and ntlmssp
flags.
(This used to be commit 57bff6fe82)
1999-11-24 22:45:09 +00:00
Luke Leighton
288a5059a2 another two.
(This used to be commit b0f8ef6168)
1999-11-22 19:37:05 +00:00
Luke Leighton
aa12f3e0e9 okay :) all cmd_() functions now take int argc, char **argv :) that
means that some commands need more work, as they still use next_token(),
the use of which i wish to avoid.

plus, i was getting fed up of the poor command-line processing in some
of these commands.  i'm starting to need getopt() in them, especially
in samsetuser.

WARNING: only cmd_samr has been modded to use getopt() so far!  reg
commands won't work, esp.
(This used to be commit 9a1efa03c8)
1999-11-22 19:02:39 +00:00
Luke Leighton
826ad16b36 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.
(This used to be commit e6e5caf16c)
1999-11-09 19:35:30 +00:00
Luke Leighton
c6e3fc5838 const feeding frenzy
(This used to be commit e0eb390ab3)
1999-11-08 20:58:06 +00:00
Luke Leighton
514be1cf73 added command-completion printer enum code.
(This used to be commit 6947f8fac7)
1999-11-06 21:08:35 +00:00
Luke Leighton
4dbd1c135c fixed string function for reading in printer_info_N.
(This used to be commit 0249ae50ad)
1999-11-06 20:36:07 +00:00
Luke Leighton
0f18ca772d 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.
(This used to be commit 135eaa9773)
1999-11-06 19:52:04 +00:00
Luke Leighton
bd6467154e 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.
(This used to be commit ef7fa58fd3)
1999-11-06 18:11:19 +00:00