1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

1330 Commits

Author SHA1 Message Date
Günther Deschner
21aa7fe633 s3-rpcclient: add cmd_spoolss_play_gdi_script_on_printer_ic.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-01-24 17:42:26 +01:00
Günther Deschner
aab232cb2e s3-rpcclient: decode OsVersion{Ex} binary blobs when displaying printerdata.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-01-24 17:42:26 +01:00
Günther Deschner
3b94b64481 spoolss: make spoolss deal with ndr64 SetForm by using proper container object.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-01-17 17:11:37 +01:00
Günther Deschner
8304fe73f6 spoolss: make spoolss deal with ndr64 AddForm by using proper container object.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-01-17 17:11:37 +01:00
Günther Deschner
e8feca012e spoolss: make spoolss deal with ndr64 ULONG_PTR of devmode_ptr and secdesc_ptr.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-01-17 17:11:37 +01:00
Andreas Schneider
9b0c1ab07c s3-rpcclient: Fix cmd_eventlog_loginfo() null pointer passing.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>

Found by Coverity.
2013-01-02 12:35:37 +01:00
Andreas Schneider
30e1dc08df s3-rpcclient: Fix cmd_eventlog_readlog() null pointer passing.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>

Found by Coverity.
2013-01-02 12:35:36 +01:00
Andreas Schneider
785cc6f3f3 s3-rpcclient: Check return value of add_string_to_array().
Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2012-12-12 09:42:32 +01:00
David Disseldorp
21bd2787ae rpcclient: fix usage docs for rpcclient adddriver
The printer driver name is incorrectly referred to as the printer name.

Reviewed-by: Andreas Schneider <asn@samba.org>
2012-11-29 13:39:53 +01:00
Andreas Schneider
50d47fc081 s3fs-client: Burn commandline password of client utils.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Nov  8 21:24:21 CET 2012 on sn-devel-104
2012-11-08 21:24:21 +01:00
Christian Ambach
8df92a44fc s3:rpcclient fix a compiler warning 2012-09-22 02:45:50 +02:00
Jeremy Allison
644d48d539 Fix compiler warning message. 2012-07-24 00:09:46 +02:00
Alexander Bokovoy
9e116e8a5e s3-rpcclient: support all known netr_LogonControl2 variants properly
logonctrl2 function in rpcclient did not allow to specify arguments
to most of netr_LogonControl2 function code points.

In addition, make descriptive help to show what is expected at each
function code point.

Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Thu Jun 21 12:11:19 CEST 2012 on sn-devel-104
2012-06-21 12:11:19 +02:00
Jeremy Allison
d1bcbd785f Fix warnings using %lu to print a 64-bit value (should by %llu). 2012-06-19 10:27:23 -07:00
David Disseldorp
ac7b60a17b s3-rpcclient: add fsrvp commands
fss_create_expose connects to an FSRVP server and negotiates the
creation and exposure of a share shadow-copy.
shadow-copies of multiple shares can be requested with a single
fss_create_expose request.

ddiss@plati:~> bin/rpcclient -k -U 'LURCH\administrator%password' \
                             ncacn_np:lutze[sign]
rpcclient $> fss_create_expose backup ro hyper
381884f2-b578-45ea-b8d2-cf82491f4011: shadow-copy set created
...
share hyper@{B6137E21-9CBB-4547-A21D-E7AD40D0874B} exposed as a snapshot
of \\lutze\hyper

fss_delete removes the shadow-copy share:
rpcclient $> fss_delete hyper 381884f2-b578-45ea-b8d2-cf82491f4011 \
                        b6137e21-9cbb-4547-a21d-e7ad40d0874

Shadow-copies can be created read-write or read-only.
Experimenting with Windows Server "8" beta, a recovery complete call is
required after creating a read-write (ATTR_AUTO_RECOVERY) shadow copy.
Otherwise subsequent creation requests fail with
FSRVP_E_SHADOW_COPY_SET_IN_PROGRESS.
2012-06-08 13:34:31 +02:00
Luk Claes
4f6f4ea93c s3:libsmb: get rid of cli_state_remote_name
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:45 +02:00
Volker Lendecke
bd4701d286 s3: Fix Coverity ID 242717 Uninitialized scalar variable
In an error path we are closing domain_pol without opening it
2012-05-10 09:11:57 +02:00
Volker Lendecke
2a03d9e42c s3: Fix Coverity ID 242718 Uninitialized scalar variable
In an error path we are closing user_pol without opening it
2012-05-10 09:11:57 +02:00
Volker Lendecke
74ca9cc957 s3: Fix Coverity ID 242719 Uninitialized scalar variable
In an error path we are closing domain_pol without opening it
2012-05-10 09:11:57 +02:00
Volker Lendecke
b2ea585c14 s3: Fix Coverity ID 242720 Uninitialized scalar variable
In an error path we are closing domain_pol without opening it
2012-05-10 09:11:57 +02:00
Volker Lendecke
a4b7a1eb26 s3: Fix Coverity ID 242721 Uninitialized scalar variable
In an error path we are closing domain_pol without opening it
2012-05-10 09:11:57 +02:00
Volker Lendecke
1e3b5ec951 s3: Fix Coverity ID 242722 Uninitialized scalar variable
In an error path we are closing domain_handle without opening it
2012-05-10 09:11:57 +02:00
Volker Lendecke
ba6fa9e527 s3: Fix Coverity ID 242723 Uninitialized scalar variable
In an error path we are closing hnd without opening it
2012-05-10 09:11:57 +02:00
Volker Lendecke
4487f26815 s3: Fix Coverity ID 241961 Uninitialized scalar variable 2012-05-10 09:11:57 +02:00
Volker Lendecke
446791c6bf s3: Fix Coverity ID 242724 Uninitialized scalar variable
In an error path we are closing pol without opening it
2012-05-10 09:11:57 +02:00
Gregor Beck
d14ca5d07a s3:registry: remove usage of reg_objects from cmd_spoolss.c
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:23:03 +02:00
Andrew Bartlett
19cfa3e604 s3-rpcclient: Ensure interfaces are loaded after smb.conf
This ensures that the interfaces line in the smb.conf is honoured.

Andrew Bartlett
2012-03-02 05:27:16 +01:00
Andreas Schneider
2d0d2b570f s3-rpcclient: Remove debug_dsdcinfo_flags() call.
This gets rid of the DCUTIL dependency.
2012-01-25 11:58:28 +01:00
Andrew Bartlett
40715e1251 s3-librpc: pass struct ndr_interface_table down to cli_pipe_open_generic/spnego()
This allows the target service (as determined from the IDL) to be
passed to GSSAPI (rather than the current, incorrect, "cifs").

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-18 16:23:24 +01:00
Andrew Bartlett
34d52532b5 s3-rpcclient: pass struct ndr_interface_table down
This will allow the target service (as determined from the IDL) to be
passed to GSSAPI (rather than the current, incorrect, "cifs").

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-18 16:23:24 +01:00
Andrew Bartlett
c62af4f652 s3-librpc Make cli_rpc_pipe_open_spnego_ntlmssp() generic
This also avoids passing NULL as the server to
gensec_set_target_hostname() in spnego_generic_init_client().

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-18 16:23:23 +01:00
Andrew Bartlett
e012ad9d8b s3-librpc Call GSSAPI via the auth_generic layer and gensec
This simplifies a lot of code, as we know we are always dealing with a
struct gensec_security, and allows the gensec module being used to
implement GSSAPI to be swapped when required for AD-server operation.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-18 16:23:22 +01:00
David Disseldorp
97818fd6e5 s3-rpcclient: add deldriverex flags argument
The spoolss DeletePrinterDriverEx command offers three flags for
controlling how associated files and other versions of the driver are
effected: DPD_DELETE_UNUSED_FILES (1), DPD_DELETE_SPECIFIC_VERSION (2)
and DPD_DELETE_ALL_FILES (4).

This commit adds an optional numeric flags argument to the rpcclient
deldriverex command.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: David Disseldorp <ddiss@samba.org>
Autobuild-Date: Wed Jan 11 14:39:35 CET 2012 on sn-devel-104
2012-01-11 14:39:35 +01:00
Andrew Bartlett
b89a0439b3 s3-librpc Rename and rework cli_rpc_pipe_open_ntlmssp() to be generic
This also includes renaming the helper function
rpccli_ntlmssp_bind_data, and allows this function to operate on any
gensec-supplied auth type.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-11 09:04:41 +01:00
Günther Deschner
158f6d8f68 s3-rpcclient: add tool to call lsa_SetInformationTrustedDomain.
"lsasettrustdominfo S-1-5-21-123456-123456-123456 13 1"

currently you only can set the encryption type field.

Guenther
2011-11-29 13:15:39 +01:00
Andrew Bartlett
da4345a8d1 s3-ntlmssp Remove rpccli_get_pwd_hash and auth_ntlmssp_get_nt_hash
The session key we want here (the only one that is availble to the
encryption layer) is the one obtained by cli_get_session_key(), as
NTLMSSP creates a per-session session key via key exchange and NTLMv2
negotiation.

The key was never directly the NT hash anyway (this is simply a
mistake, the extra MD4() was lost during my previous cleanup
f28f113d8e in 2008), but was MD4(NT
hash) in early implementations of NTLMSSP.

However, regardless this call is not available on domain trusts
between AD domains and Windows 2003 R2, making this less useful.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03 18:48:03 +10:00
Michael Adam
4a21e50474 s3:rpcclient: use the lp_load_global() wrapper of lp_load() 2011-07-28 11:17:31 +02:00
Stefan Metzmacher
540cd1ac96 s3:rpcclient: make use of cli_state_remote_name()
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
9a638c4c5a s3:rpcclient: use rpc_pipe->desthost instead of cli->desthost
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
d7fe70a698 s3:rpcclient: remove unused new_workgroup variable
new_workgroup was not initialized but used to overwrite the
value of lp_workgroup().

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Jun  9 16:00:28 CEST 2011 on sn-devel-104
2011-06-09 16:00:28 +02:00
Andrew Bartlett
74eed8f3ed s3-param Remove special case for global_myname(), rename to lp_netbios_name()
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
3ccc760947 s3-param Remove special case for lp_workgroup()
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
5e26e94092 s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
3d15137653 s3-talloc Change TALLOC_ARRAY() to talloc_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
73b377432c s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_REALLOC_ARRAY isn't standard talloc.

Andrew Bartlett
2011-06-09 12:40:08 +02:00
Andrew Bartlett
c615ebed6e s3-lib Replace StrCaseCmp() with strcasecmp_m()
strcasecmp_m() never needs to call to talloc, and via next_codepoint()
still has an ASCII fast-path bypassing iconv() calls.

Andrew Bartlett
2011-05-18 16:12:08 +02:00
Günther Deschner
27022587e3 s3-libsmb: move protos to libsmb/proto.h
Guenther
2011-05-06 16:37:18 +02:00
Jeremy Allison
f85e095dd2 More simple const fixups. 2011-05-05 23:56:08 +02:00
Günther Deschner
c11d52c7f6 s3-rpcclient: run minimal_includes.pl.
Guenther
2011-05-05 02:05:27 +02:00
Günther Deschner
0bb4701a74 s3: remove various references to server side dcerpc structs (which are not needed).
Guenther
2011-05-02 15:03:44 +02:00