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

482 Commits

Author SHA1 Message Date
Günther Deschner
3e4ded48bb s3-net: use libnetjoin for "net rpc join" newstyle.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:01 +02:00
Günther Deschner
9cfa625160 s3-net: use libnetjoin for "net rpc testjoin".
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:01 +02:00
Günther Deschner
d398a12f79 s3-libnetjoin: move "net rpc oldjoin" to use libnetjoin.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:01 +02:00
Günther Deschner
9813fe2b04 s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:00 +02:00
Günther Deschner
f6d61b571d s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_schannel().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:29:59 +02:00
Günther Deschner
93e92faca9 s3-net: pass down ndr_interface_table to connect_dst_pipe().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:29:59 +02:00
Andreas Schneider
b70d1168cf s3-net: Don't leak username.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:13 +01:00
Andreas Schneider
e4e3293b48 s3-net: Check the return value of strlower_m().
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
Andreas Schneider
f70c56b747 s3-net: Check return value of string_to_sid().
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
Andreas Schneider
0d5f5424b4 net: Use new samba_getpass() function for 'net rpc'.
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2012-12-03 14:35:09 +01:00
Jeremy Allison
07b918ade8 s3: Fix bug 8966, Fix net rpc share allowedusers to work with 2008r2
The RAP NetShareEnum command was removed in 2008r2, so use the RPC
equivalent instead.

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Oct  1 07:59:34 CEST 2012 on sn-devel-104
2012-10-01 07:59:34 +02:00
Jeremy Allison
526e875cec Check error returns from strupper_m() (in all reasonable places). 2012-08-09 12:06:54 -07:00
Stefan Metzmacher
0068a9fd93 s3:utils/net_rpc*: make use of cli_get_session_key()
metze
2012-08-01 14:17:15 +02:00
Luk Claes
764b5e5610 s3:libsmb: get rid of cli_negprot
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:49 +02:00
Luk Claes
d8c0646a5d s3:libsmb: get rid of cli_state_protocol
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:45 +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
Luk Claes
987e81b0ee s3:libsmb: get rid of cli_state_*_sockaddr
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:44 +02:00
Jeremy Allison
959516d61b More strlcat/strlcpy truncate checks. 2012-03-30 21:26:07 +02: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
9729bdf89f s3-utils/net: 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
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
Amitay Isaacs
9e2d4b61de s3-net: Fix the return codes. 0 on success, -1 on failure
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Mon Dec 19 01:57:24 CET 2011 on sn-devel-104
2011-12-19 01:57:24 +01:00
Stefan Metzmacher
c6ed8e3211 s3:utils: make use of cli_tree_connect()
metze
2011-11-24 19:02:32 +01:00
Stefan Metzmacher
92a6f577ce s3:utils: s/Undefined/SMB_SIGNING_DEFAULT/
metze
2011-11-03 16:55:12 +01:00
Stefan Metzmacher
3f00cce9b3 s3:libsmb: pass max_protocol to cli_negprot()
metze
2011-09-15 10:25:17 +02:00
Stefan Metzmacher
3e227d8544 s3:libsmb: pass CLI_FULL_CONNECTION_* flags via cli_connect_nb()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Sep  8 10:21:50 CEST 2011 on sn-devel-104
2011-09-08 10:21:50 +02:00
Vicentiu Ciorbaru
283da12a73 s3-net: Added the command rpc conf to the net binary.
The net binary now has an extra item linked to it, the
net_rpc_conf.c module.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:24 +02:00
Vicentiu Ciorbaru
b46655bd18 s3-net: Fixed whitespace errors
Fixed previously existing whitespace errors in net_rpc.c

Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-22 13:59:24 +02: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
Stefan Metzmacher
ed6b8deea7 s3:net_rpc: make use of cli_state_protocol()
metze
2011-08-02 04:54:29 +02:00
Björn Baumbach
7302277e43 s3-utils/net_rpc.c: replace cli_query_secdesc_old()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:31:12 +02:00
Björn Baumbach
768646c9a2 s3-libsmb: rename cli_query_secdesc() to cli_query_secdesc_old()
Will introduce new cli_query_secdesc() function

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:56 +02:00
Stefan Metzmacher
27c38dfb44 s3:net_rpc: make use of cli_state_remote_name()
metze
2011-07-22 17:06:10 +02:00
Stefan Metzmacher
f88723ab27 s3:net_rpc: use netr->desthost instead of cli->desthost
metze
2011-07-22 17:06:10 +02:00
Stefan Metzmacher
9b40092cbd s3:net_rpc: make use of cli_state_remote_sockaddr()
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
8f41e54d53 s3:libsmb: move cli->cnum to cli->smb1.tid and hide it behind cli_state_[g|s]et_tid()
metze
2011-07-20 15:56:27 +02:00
Stefan Metzmacher
9a350ca3b6 s3:utils: avoid cli_nt_error()/cli_errstr() if we already have the status
metze
2011-07-07 19:16:27 +02:00
Volker Lendecke
26782fbbf3 s3: make cli_resolve_path return NTSTATUS
This looks larger than it is. No parameters needed changing.
2011-07-06 08:35:27 +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
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
ad0a07c531 s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Günther Deschner
f103e0c39f s3: fix more -Wunused-but-set-variable build warnings.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Jun  1 00:29:30 CEST 2011 on sn-devel-104
2011-06-01 00:29:30 +02:00
Volker Lendecke
797316ae97 s3: Use cli_connect_nb in net_rpc_check
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat May 28 21:57:04 CEST 2011 on sn-devel-104
2011-05-28 21:57:04 +02:00
Andrew Bartlett
da662b82b8 s3-lib Replace StrnCaseCmp() with strncasecmp_m()
strncasecmp_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
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
9eee6e2fd2 More const fixes... getting near the end now.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri May  6 00:57:00 CEST 2011 on sn-devel-104
2011-05-06 00:57:00 +02:00
Jeremy Allison
8380835fc6 Fix warning messages caused by addition of null check in fstrcpy macro. 2011-05-04 12:12:15 -07:00
Andrew Bartlett
0eca33bbf6 s3-smb Use FILE_ATTRIBUTE_DIRECTORY intead of aDIR
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:13 +10:00
Andrew Bartlett
0a3c84b554 s3-smb Use FILE_ATTRIBUTE_SYSTEM intead of aSYSTEM
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:13 +10:00