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

2827 Commits

Author SHA1 Message Date
Volker Lendecke
8fd43f44ef s3: Fix a typo. Thanks to Christian Ambach for pointing me at it :-) 2010-03-09 15:37:39 +01:00
Bo Yang
ef0b4e4687 s3: Add i18n/l10n strings in pam_winbind.c coming from winbindd.
Signed-off-by: Bo Yang <boyang@samba.org>
2010-03-06 01:53:13 +08:00
Karolin Seeger
340797f3fa Fix typo in comments. 2010-03-03 16:03:13 +01:00
Volker Lendecke
9ad1b4cda0 s3: Fix the CHAIN1 torture test
I've tried to solve this just within cli_smb_recv(), but I could not find a way
to sanely determine when we are receiving the last entry in the chain just from
looking at the blob. This solves it in an a bit more brutal way...
2010-02-28 18:49:59 +01:00
Simo Sorce
61b7a24f16 s3 move the sitename cache in its own file 2010-02-23 12:46:26 -05:00
Volker Lendecke
752bffc53f s3: Consolidate server_id_self into the equivalent procid_self() 2010-02-23 15:30:00 +01:00
Volker Lendecke
82f6f3920c s3: Explicitly handle inbuf in cli_trans_done 2010-02-22 23:23:20 +01:00
Volker Lendecke
964210b89a s3: Explicitly handle inbuf in cli_write_andx_done 2010-02-22 23:23:20 +01:00
Volker Lendecke
78d7f27993 s3: Explicitly handle inbuf in cli_read_andx_done 2010-02-22 23:23:20 +01:00
Volker Lendecke
486f734fd8 s3: Explicitly handle inbuf in cli_message_start_done 2010-02-22 23:23:20 +01:00
Volker Lendecke
be62ca1403 s3: Explicitly handle inbuf in cli_dskattr_done 2010-02-22 23:23:20 +01:00
Volker Lendecke
327f93bf1c s3: Explicitly handle inbuf in cli_getatr_done 2010-02-22 23:23:20 +01:00
Volker Lendecke
41ebf583e8 s3: Explicitly handle inbuf in cli_getattrE_done 2010-02-22 23:23:20 +01:00
Volker Lendecke
409fd662b0 s3: Explicitly handle inbuf in cli_open_done 2010-02-22 23:23:19 +01:00
Volker Lendecke
12863ffa56 s3: Explicitly handle inbuf in cli_ntcreate_done 2010-02-22 23:23:19 +01:00
Volker Lendecke
1fab94a31b s3: Explicitly handle inbuf in cli_echo_done 2010-02-22 23:23:19 +01:00
Volker Lendecke
fdd82e69ab s3: Explicitly handle inbuf in cli_negprot_done 2010-02-22 23:23:19 +01:00
Volker Lendecke
160c459b54 s3: Explicitly handle inbuf in cli_tcon_andx_done 2010-02-22 23:23:19 +01:00
Volker Lendecke
036fcafe24 s3: Explicitly handle inbuf in cli_sesssetup_blob_done 2010-02-22 23:23:18 +01:00
Volker Lendecke
47c61b4f15 s3: Explicitly handle inbuf in cli_session_setup_guest_done 2010-02-22 23:23:18 +01:00
Volker Lendecke
299d9c409d s3: Explicitly handle inbuf in cli_smb_oplock_break_waiter_done 2010-02-22 23:23:18 +01:00
Volker Lendecke
d122bfc064 s3: Add a talloc_move for the inbuf to cli_smb_recv 2010-02-22 23:23:18 +01:00
Volker Lendecke
65914ed819 s3: Avoid calling cli_alloc_mid twice in cli_smb_req_iov_send
I hate macros....
2010-02-21 20:42:39 +01:00
Volker Lendecke
8930a9c520 s3: Convert cli_qpathinfo_basic to use cli_trans() 2010-02-20 18:59:30 +01:00
Volker Lendecke
b69a74eeca s3: Convert cli_raw_ioctl to use cli_smb() 2010-02-20 18:59:29 +01:00
Volker Lendecke
89e6a5263e s3: Add cli_smb()
This is a sync wrapper around cli_smb_send/cli_smb_recv. This is a hack to
speed up converting libsmb/ away from cli_send_smb/cli_receive_smb. Some
routines in libsmb/ are only called in one place in smbtorture for example,
where making it async right now is not worth it. With cli_smb_send/cli_smb_recv
in place, pushing the asynchronosity out one level is "just" boilerplate code
that is easy to do should it become necessary.
2010-02-20 18:59:29 +01:00
Andrew Tridgell
8120bc2ba9 s3-lib: use TYPESAFE_QSORT() in remaining s3 library code
the sort_query_replies() in nmblib.c is a TODO. It uses a hack that
treats a char* as a structure. I've left that one alone for now.
2010-02-14 18:44:20 +11:00
Andrew Tridgell
7347ca359d s3-libsmb: use TYPESAFE_QSORT() in namequery code
This one was a bit trickier. I'd appreciate it if someone else can
look over this.
2010-02-14 18:44:20 +11:00
Andrew Tridgell
d550621561 s3-libsmb: update libsmb to use new DLIST macros
manipulating p->prev directly is not safe any more
(cherry picked from commit 3c650ac1e3e1cdbbabecfddcd29325f20b5dcb48)
2010-02-10 15:38:48 -08:00
Jeremy Allison
9ad6f432f3 Fix off-by-one error in working out the limit of the NetServerEnum comment.
Jeremy.
2010-02-09 12:17:08 -08:00
Stefan Metzmacher
9b5198dd44 s3:libsmb: fix NetServerEnum3 rap calls.
metze
2010-02-08 18:47:41 +01:00
Stefan Metzmacher
30a1bc3650 s3:nmbd: also listen explicit on the subnet broadcast addresses
And send replies always via the unicast address of the subnet.

This behavior is off by default (as before)
and can be enabled with "nmbd:bind explicit broadcast = yes".

metze
2010-02-08 18:35:10 +01:00
Volker Lendecke
6e510b49c0 s3: Make cli_get_fs_volume_info() use cli_trans() 2010-02-07 12:29:25 +01:00
Volker Lendecke
c73ffb7280 s3: Remove some unused code 2010-02-07 12:29:25 +01:00
Volker Lendecke
5552b44960 s3: Fix some nonempty blank lines 2010-02-07 12:29:25 +01:00
Stefan Metzmacher
c2e4746fa9 s3:libsmb: don't reuse the callers stype variable in cli_NetServerEnum()
When we need to do more than one network operation to get the
browse list we need to use the same 'stype' value each time.

metze
2010-02-04 14:27:12 +01:00
Matt Kraai
a47b6ebb30 Change uint_t to unsigned int in source3
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:18 +01:00
Jeremy Allison
687e4eba3c Fix bug #7079 - cliconnect gets realm wrong with trusted domains.
Passing NULL as dest_realm for cli_session_setup_spnego() was
always using our own realm (as for a NetBIOS name). Change this
to look for the mapped realm using krb5_get_host_realm() if
the destination machine name is a DNS name (contains a '.').
Could get fancier with DNS name detection (length, etc.) but
this will do for now.

Jeremy.
2010-01-30 19:24:28 -08:00
Jeremy Allison
1876b5a7e3 Fix a really interesting problem found by Volker's conversion of sessionsetup SPNEGO to asynchronous code.
Normally clistr_push_fn() can depend upon cli->outbuf being
initialized by negprot and sessionsetup packets, and cli->outbuf[smb_flgs2] being
correctly set with FLAGS2_UNICODE_STRINGS when cli_setup_packet() is called. When
all the sessionsetups are async, then cli_setup_packet() is never called, the async
code uses cli_setup_packet_buf() - which initializes the allocated async buffer,
not the cli->outbuf one. So the first time clistr_push_fn() is called is from
libsmb/clidfs.c:cli_dfs_get_referral(), just after the connection and tconX.
In this case cli->outbuf has never been initialized, and cli->outbuf[smb_flgs2] = 0
so the DFS query pushes ASCII on the wire, which is not what we want :-).

Remove the dependency on cli->outbuf[smb_flgs2] in clistr_push_fn(), and
fake up a SVAL(cli->outbuf, smb_flg2) value using cli_ucs2(cli) function
instead, which has been initialized. We only care about the FLAGS2_UNICODE_STRINGS
bit anyway.

I don't think this is an issue for 3.5.0 as the sessionsetup is still
synchronous there, but Volker PLEASE CHECK !

Jeremy.
2010-01-29 16:41:53 -08:00
Volker Lendecke
08fa57335a s3: Enable use of ccache by default for libsmbclient
Disable this by setting the environment variable LIBSMBCLIENT_NO_CCACHE, which
has the advantage over an smb.conf option to be easily settable per
application.
2010-01-26 11:45:56 +01:00
Björn Jacke
5439e1a03f s3: fix detection and flags for using pthread
I hope this fixes the build on Tru64, IRIX and maybe bug #6983
2010-01-26 00:19:10 +01:00
Björn Jacke
60a3086d78 s3: remove unused variable 2010-01-26 00:19:10 +01:00
Björn Jacke
38be40f63c s3:async_smb: remove unused variable 2010-01-26 00:19:10 +01:00
Volker Lendecke
4eb1523d87 s3-libsmbclient: Add smbc_setOptionUseCCache()
Can we enable this by default? This would be a change in behaviour, but this
feature is just too cool for everyone to catch up in the apps.

The patch would be
2010-01-24 20:32:17 +01:00
Volker Lendecke
ca48d6ab77 s3: Add CLI_FULL_CONNECTION_USE_CCACHE 2010-01-24 20:32:17 +01:00
Volker Lendecke
d016bdb72c s3: Use -C in smbclient
$ bin/wbinfo --ccache-save=w2k3ad\\vl%Password
saving creds succeeded
$ bin/smbclient //192.168.42.160/tmp -Uvl -N -C -W w2k3ad
OS=[Windows Server 2003 R2 3790 Service Pack 2] Server=[Windows Server 2003 R2 5.2]
smb: \>
$ bin/wbinfo --ccache-save=w2k3ad\\vl%WrongPassword
saving creds succeeded
$ bin/smbclient //192.168.42.160/tmp -Uvl -N -C -W w2k3ad
Anonymous login successful
Domain=[W2K3AD] OS=[Windows Server 2003 R2 3790 Service Pack 2] Server=[Windows Server 2003 R2 5.2]
tree connect failed: NT_STATUS_ACCESS_DENIED
$
2010-01-24 20:32:17 +01:00
Volker Lendecke
a03a83ad26 s3: Add ccache use to cli_session_setup_ntlmssp 2010-01-24 20:32:17 +01:00
Volker Lendecke
ff0274c519 s3: Add NTLMSSP_FEATURE_CCACHE
Uses the winbind ccache to do authentication if asked to do so
2010-01-24 20:32:17 +01:00
Volker Lendecke
185815a647 s3: Remove some calls to memset -- reduces text size by some bytes for me 2010-01-24 14:52:33 +01:00
Volker Lendecke
4dd0c5516a s3: Fix a crash in libsmbclient used against the OpenSolaris CIFS server
A user has sent me a sniff where the OpenSolaris CIFS server returns "32" in
totalentries, but the array in ctr only contains 15 entries. Look at the right
delimiter for walking the array.
2010-01-16 13:53:26 +01:00