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

1765 Commits

Author SHA1 Message Date
Derrell Lipman
44c1504c03 r18012: Should fix bug 4018.
NetApp filers expect paths in Open AndX Request to have a leading slash.
Windows clients send the leading slash, so we should too.
(This used to be commit fc5b6e4bd8)
2007-10-10 11:39:48 -05:00
Derrell Lipman
40665edf5e r18011: Should fix bug 3835.
Jeremy: requires your eyes...

If the remote connection timed out while cli_list() was retrieving its list of
files, the error was not returned to the user, e.g. via smbc_opendir(), so the
user didn't have a way to know to set the timeout longer and try again.  This
problem would occur when a very large directory is being read with a too-small
timeout on the cli.

Jeremy, although there were a couple of areas that needed to be handled, I
needed to make one change that you should bless, in libsmb/clientgen.c.  It
was setting

  cli->smb_rw_error = smb_read_error;

but smb_read_error is zero, so this had no effect.  I'm now doing

  cli->smb_rw_error = READ_TIMEOUT;

instead, and according to the OP, these (cumulative) changes (in a slightly
different form) solve the problem.

Please confirm this smb_rw_error change will have no other adverse effects
that you can see.

Derrell
(This used to be commit fa664b24b8)
2007-10-10 11:39:48 -05:00
Derrell Lipman
5e44fc4cd4 r18009: Fixes bug 4026.
This completes the work Jeremy began last week, disambiguating the meaning of
c_time.  (In POSIX terminology, c_time means "status Change time", not "create
time".)  All uses of c_time, a_time and m_time have now been replaced with
change_time, access_time, and write_time, and when creation time is intended,
create_time is used.

Additionally, the capability of setting and retrieving the create time have
been added to the smbc_setxattr() and smbc_getxattr() functions.  An example
of setting all four times can be seen with the program

  examples/libsmbclient/testacl

with the following command line similar to:

  testacl -f -S "system.*:CREATE_TIME:1000000000,ACCESS_TIME:1000000060,WRITE_TIME:1000000120,CHANGE_TIME:1000000180" 'smb://server/share/testfile.txt'

The -f option turns on the new mode which uses full time names in the
attribute specification (e.g. ACCESS_TIME vs A_TIME).
(This used to be commit 8e119b64f1)
2007-10-10 11:39:47 -05:00
Volker Lendecke
b7a5e3de1e r18008: Ok, same fix as before. But this time also allocate the session key. This had
worked in one test, no idea what memory I've overwritten that time. This time
it survives the unpatched w2k password change.

Volker
(This used to be commit bf7bf8e4e9)
2007-10-10 11:39:47 -05:00
Jeremy Allison
380c4183ee r18007: Ensure we don't namecache KDC entries with port 88
as a generic DC (that should be the LDAP port).
Jeremy.
(This used to be commit f16b41c3c9)
2007-10-10 11:39:47 -05:00
Jeremy Allison
0f1bc28744 r18006: Actually a smaller change than it looks. Leverage
the get_dc_list code to get the _kerberos. names
for site support. This way we don't depend on one
KDC to do ticket refresh. Even though we know it's
up when we add it, it may go down when we're trying
to refresh.
Jeremy.
(This used to be commit 77fe2a3d74)
2007-10-10 11:39:47 -05:00
Volker Lendecke
bd5fca847a r18005: The ntlmssp fix is not correct yet, working on it
(This used to be commit 3e4da5541c)
2007-10-10 11:39:47 -05:00
Volker Lendecke
27e37eab98 r17977: To be honest, I have NO idea whatsoever what this does, but it fixes what I
have been able to reproduce with smbtorture4 for bug number 4059. It's too
late here now to check with W2k native, I'll do that tomorrow or over the
weekend. I'll then also check in a samba4 torture test to walk this from now
on.

Abartlet, can you do me a favor and look over this? It is a 1:1 copy of the
corresponding Samba4 code.

Thanks,

Volker
(This used to be commit fb5ebab873)
2007-10-10 11:39:45 -05:00
Volker Lendecke
1e5996387a r17976: Fix typo
(This used to be commit 410d6b9de2)
2007-10-10 11:39:44 -05:00
Jeremy Allison
2fcd113f55 r17945: Store the server and client sitenames in the ADS
struct so we can see when they match - only create
the ugly krb5 hack when they do.
Jeremy.
(This used to be commit 9be4ecf24b)
2007-10-10 11:39:01 -05:00
Jeremy Allison
6fada7a82a r17943: The horror, the horror. Add KDC site support by
writing out a custom krb5.conf file containing
the KDC I need. This may suck.... Needs some
testing :-).
Jeremy.
(This used to be commit d500e1f96d)
2007-10-10 11:39:01 -05:00
Jeremy Allison
bc28b5c700 r17933: Don't print a NULL sitename.
Jeremy.
(This used to be commit 2829dbc3e0)
2007-10-10 11:39:00 -05:00
Jeremy Allison
7b7ce43b40 r17929: Ok, I think I finally figured out where to put
the code to redo the CLDAP query to restrict DC
DNS lookups to the sitename. Jerry, please check
to stop me going insane :-).
Jeremy.
(This used to be commit 8d22cc1115)
2007-10-10 11:38:59 -05:00
Jeremy Allison
2abab7ee6d r17928: Implement the basic store for CLDAP sitename
support when looking up DC's. On every CLDAP
call store the returned client sitename (if
present, delete store if not) in gencache with
infinate timeout. On AD DNS DC lookup, try looking
for sitename DC's first, only try generic if
sitename DNS lookup failed.
I still haven't figured out yet how to ensure
we fetch the sitename with a CLDAP query before
doing the generic DC list lookup. This code is
difficult to understand. I'll do some experiments
and backtraces tomorrow to try and work out where
to force a CLDAP site query first.
Jeremy.
(This used to be commit ab3f0c5b1e)
2007-10-10 11:38:59 -05:00
Jeremy Allison
ed132d87ce r17902: Fix possible null deref caught by Stanford checker.
Jeremy.
(This used to be commit e8b0649fe1)
2007-10-10 11:38:58 -05:00
Jeremy Allison
a08ca7a0a0 r17900: Fix from Michael Adam <ma@sernet.de> - make internal_resolve_name
do what it's supposed to.
Jeremy.
(This used to be commit 4b7387a054)
2007-10-10 11:38:57 -05:00
Volker Lendecke
c52b3fb89f r17881: Another microstep towards better error reporting: Make get_sorted_dc_list
return NTSTATUS.

If we want to differentiate different name resolution problems we might want
to introduce yet another error class for Samba-internal errors. Things like no
route to host to the WINS server, a DNS server explicitly said host not found
etc might be worth passing up.

Because we can not stash everything into the existing NT_STATUS codes, what
about a Samba-specific error class like NT_STATUS_DOS and NT_STATUS_LDAP?

Volker
(This used to be commit 60a166f034)
2007-10-10 11:38:57 -05:00
Jeremy Allison
41d1f322f8 r17874: Fix possible null deref found by Stanford checker.
Jeremy.
(This used to be commit 2894310cc8)
2007-10-10 11:38:56 -05:00
Jeremy Allison
6ee700bd65 r17863: Fix unneeded NULL check on pointer parameters causing the
Stanford checker to flag null deref.
Jeremy.
(This used to be commit b7fc023e90)
2007-10-10 11:38:54 -05:00
Volker Lendecke
cb3e14d5a2 r17855: Fix the build on systems without LDAP
(This used to be commit 2e9f5c520a)
2007-10-10 11:38:54 -05:00
Volker Lendecke
4bbb995e8d r17854: Steal the LDAP in NTSTATUS trick from Samba4
Thanks to Michael Adam <ma@sernet.de>

Volker
(This used to be commit 91878f9b6f)
2007-10-10 11:38:54 -05:00
Jeremy Allison
a64925ddff r17800: Start using struct timespec internally for file times
on the wire. This allows us to go to nsec resolution
for systems that support it. It should also now be
easy to add a correct "create time" (birth time)
for systems that support it (*BSD). I'll be watching
the build farm closely after this one for breakage :-).
Jeremy.
(This used to be commit 425280a1d2)
2007-10-10 11:38:48 -05:00
Gerald Carter
8cac7c1399 r17795: Finally track down the "ads_connect: Interrupted system call"
error.  Fix our DNS SRV lookup code to deal with multi-homed hosts.
We were noly remembering one IP address per host from the Additional
records section in the SRV response which could have been an unreachable
address.
(This used to be commit 899179d2b9)
2007-10-10 11:38:47 -05:00
Jeremy Allison
aee6b5942a r17761: Handle times consistently across all client utils.
Fixes bugs reported in libsmbclient.
Jeremy.
(This used to be commit 42a417fb75)
2007-10-10 11:38:47 -05:00
Gerald Carter
fddeed8adb r17760: The DNS SRV lookup already sorts by priority and weight so don't
use the generic IP list sort in get_sorted_dc_list().
(This used to be commit 03a767539d)
2007-10-10 11:38:47 -05:00
Günther Deschner
58247fea05 r17677: There is no need for a 2nd krb5_to_nt_status function, is there?
Michael Adam/Volker, please check.

Guenther
(This used to be commit d0feb85781)
2007-10-10 11:38:46 -05:00
Gerald Carter
232569c1f1 r17672: remove duplicate description on NT_STATUS_INVALID_PARAMETER (from Michael Adam <ma@sernet.de>)
(This used to be commit 7b51e27d02)
2007-10-10 11:38:46 -05:00
Volker Lendecke
7119823403 r17620: Fix two C++ Warnings and a memleak
(This used to be commit d7246284e0)
2007-10-10 11:38:44 -05:00
Jeremy Allison
ffa590854a r17612: Modify NTLMSSP session code so that it doesn't store
a copy of the plaintext password, only the NT and LM
hashes (all it needs). Fix smbencrypt to expose hash
verions of plaintext function. Andrew Bartlett, you
might want to look at this for gensec.
This should make it easier for winbindd to store
cached credentials without having to store plaintext
passwords in an NTLM-only environment (non krb5).
Jeremy.
(This used to be commit 629faa530f)
2007-10-10 11:38:43 -05:00
Volker Lendecke
41a4496b20 r17606: Introduce krb5_to_ntstatus.
Thanks to Michael Adam <ma@sernet.de>

Volker
(This used to be commit 6e641c90b8)
2007-10-10 11:38:42 -05:00
Jeremy Allison
b4f39f4a9e r17595: Fix from Ben Winslow <rain@bluecherry.net> to allow
client smb signing to be correctly turned off.
Jeremy.
(This used to be commit 61f052b0a6)
2007-10-10 11:38:41 -05:00
Volker Lendecke
aa2138ed5b r17583: Change internal cli_session_setup functions to NTSTATUS.
Volker
(This used to be commit 990da03f09)
2007-10-10 11:38:40 -05:00
Volker Lendecke
b29915d611 r17571: Change the return code of cli_session_setup from BOOL to NTSTATUS
Volker
(This used to be commit 94817a8ef5)
2007-10-10 11:38:39 -05:00
Volker Lendecke
3fc9b7e626 r17556: Remove duplicate entries. Thanks to Michael Adam <ma@sernet.de>
Volker
(This used to be commit ea83001d3e)
2007-10-10 11:38:39 -05:00
Jeremy Allison
a8627a8576 r17431: Fix bug #4003, reported by dale-keyword-samba.c7b741@codefu.org.
NTcancel doesn't send a reply, so in this case the signing
sequence number is only incremented by 1, not 2.
Jeremy.
(This used to be commit 85841a0198)
2007-10-10 11:38:33 -05:00
Volker Lendecke
467ec2a32b r17363: Some C++ warnings
(This used to be commit fd82f185a2)
2007-10-10 11:38:28 -05:00
Volker Lendecke
02eea79624 r17333: Some C++ warnings
(This used to be commit be9aaffdac)
2007-10-10 11:38:26 -05:00
Jeremy Allison
321b0a3a63 r17292: Try and fix bug #3967 - signing problems on trans
calls introduced by signing code simplification.
Please test if you've seen signing problems with
3.0.23a.
Jeremy.
(This used to be commit f462daf02c)
2007-10-10 11:38:23 -05:00
Jeremy Allison
9d9c90f31a r17291: Fix memory leaks on early exit path.
Jeremy.
(This used to be commit deaac5bd46)
2007-10-10 11:38:23 -05:00
Jeremy Allison
8f93665bb5 r17262: After messages from Metze and traces from Karolin Seeger,
turns out that EDQUOTA must map to NT_STATUS_DISK_FULL
for Windows apps to work correctly. My mistake.
Jeremy.
(This used to be commit de1e3f7a7a)
2007-10-10 11:38:23 -05:00
Jeremy Allison
74cd692d9b r17234: Fix error mappings for EQUOTA and ENOBUFS.
Based on an idea from Shlomi Yaakobovich <Shlomi@exanet.com>.
Jeremy.
(This used to be commit 9c440925f8)
2007-10-10 11:38:21 -05:00
Andrew Bartlett
fe348fdb28 r17216: From Kai Blin <kai.blin@gmail.com>:
A patch to make ntlm_auth recognize three new commands in
ntlmssp-client-1 and squid-2.5-ntlmssp:

The commands are the following:

Command: SF <hex number>
Reply: OK
Description: Takes feature request flags similar to samba4's
gensec_want_feature() call. So far, only NTLMSSP_FEATURE_SESSION_KEY,
NTLMSSP_FEATURE_SIGN and NTLMSSP_FEATURE_SEAL are implemented, using the same
values as the corresponding GENSEC_FEATURE_* flags in samba4.

Command: GF
Reply: GF <hex number>
Description: Returns the negotiated flags.

Command: GK
Reply: GK <base64 encoded session key>
Description: Returns the negotiated session key.

(These commands assist a wine project to use ntlm_auth for signing and
sealing of bulk data).

Andrew Bartlett
(This used to be commit bd3e06a0e4)
2007-10-10 11:38:19 -05:00
Gerald Carter
bd8556c8dd r17162: Fix typo small typos noticed by Paul Green.
(This used to be commit 1a58745886)
2007-10-10 11:38:17 -05:00
Andrew Tridgell
f2faf11204 r17124: fixed a bug which caused resolve_ads() to spin forever if one of the
DCs isn't resolvable in DNS. The fix is to leave that DC out of the
returned list of DCs. I think the original code intended that anyway,
just didn't quite get it right ('i' wasn't incremented in that code
path, so the loop didn't terminate)
(This used to be commit d7ec9f3cc0)
2007-10-10 11:38:13 -05:00
Volker Lendecke
5fe140babc r17060: Some c++ warnings
(This used to be commit 2e7afa9e19)
2007-10-10 11:19:22 -05:00
Jeremy Allison
760671b0e2 r16962: Add a few utility fns into client. Allow POSIX capabilities
to be selected.
Jeremy.
(This used to be commit 2d8d4bd77b)
2007-10-10 11:19:16 -05:00
Volker Lendecke
6dfccad564 r16960: Some warnings from host "opi"
(This used to be commit 083ef11cc9)
2007-10-10 11:19:15 -05:00
Jeremy Allison
fbdcf2663b r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
(This used to be commit 9dafb7f48c)
2007-10-10 11:19:14 -05:00
Jeremy Allison
d0b0ed90eb r16696: Fix the multiple-outstanding write and trans client
signing bug.
Jeremy.
(This used to be commit 3b7fbe856c)
2007-10-10 11:19:08 -05:00
Jeremy Allison
2b8abc030b r16644: Fix bug #3887 reported by jason@ncac.gwu.edu
by converting the lookup_XX functions to correctly
return SID_NAME_TYPE enums.
Jeremy.
(This used to be commit ee2b2d96b6)
2007-10-10 11:19:05 -05:00