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

34688 Commits

Author SHA1 Message Date
Jeremy Allison
0fe744078d Ensure we use vfs_fsp_stat(), not VFS_STAT directly, and store into fsp->fsp_name->st
instead of a SMB_STRUCT_STAT on the stack.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Dec 14 05:05:50 CET 2010 on sn-devel-104
2010-12-14 05:05:50 +01:00
Andrew Bartlett
d97492e42a s3-libsmb Improve error message when denying LM encryption
Now that 'client ntlmv2 auth = yes' is the default, make it more clear
what options a user may need to enable to get this to work.

Andrew Bartlett
2010-12-14 01:10:21 +01:00
Jeremy Allison
f974e68213 Change crediting so that the credits are returned on the interim async response.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Dec 14 01:09:05 CET 2010 on sn-devel-104
2010-12-14 01:09:05 +01:00
Jeremy Allison
041428352c As we handle missing sendfile() inside lib/sendfile.c, remove the WITH_SENDFILE ifdefs.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Dec 13 23:47:07 CET 2010 on sn-devel-104
2010-12-13 23:47:07 +01:00
Jeremy Allison
6ce365b238 We need to start off with smb2.credits_granted == 0. That way
when processing the faked up SMB2 NegProt from the SMB1 packet we
always allocate one credit on reply.

Jeremy.
2010-12-13 13:34:50 -08:00
Jeremy Allison
27a47eb9fc Remove extra unused credit arg. to smbd_smb2_request_setup_out() 2010-12-13 13:20:05 -08:00
Günther Deschner
a5cfdde558 s3-waf: try to fix the build with snow leopard.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Dec 13 15:03:08 CET 2010 on sn-devel-104
2010-12-13 15:03:08 +01:00
Stefan Metzmacher
4ce3b53f12 s3:selftest: fix knownfail for samba3.posix_s3.rpc.spoolss.*printserver.enum_printers_old
The name is in lowercase since commit 35fbc7bbda
(s4-smbtorture: Make test names lowercase and dot-separated.)

This should avoid intermittent failures in make test.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Dec 13 13:52:18 CET 2010 on sn-devel-104
2010-12-13 13:52:18 +01:00
Günther Deschner
a43a1d9226 s3-selftest: support differing VFSLIBDIR in autoconf and waf build.
With this change make test in the s3 waf build (w/o s4 smbtorture yet) works!

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Dec 13 13:06:05 CET 2010 on sn-devel-104
2010-12-13 13:06:05 +01:00
Günther Deschner
b4d398f8e3 s3-waf: add -Wl,--export-dynamic to LDFLAGS.
Our binaries did not export symbols so e.g. smbd could not load vfs modules.
Patch from tridge.

We might remove this later on, once we decide to resolve all symbols and fix all
dependencies in s3 modules.

Guenther
2010-12-13 10:53:42 +01:00
Jelmer Vernooij
35fbc7bbda s4-smbtorture: Make test names lowercase and dot-separated.
This is consistent with the test names used by selftest, should
make the names less confusing and easier to integrate with other tools.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec 11 04:16:13 CET 2010 on sn-devel-104
2010-12-11 04:16:13 +01:00
Jeremy Allison
2ac579ca76 Add a SMB2 crediting algorithm, by default the same as Windows. Defaults to 128 credits.
Jeremy.
2010-12-10 15:46:41 -08:00
Andrew Tridgell
283686af75 s3-vfstest: fixed paths in vfstest
vfstest tries to create /messages.tdb as loadparm has not been
initialised
2010-12-10 08:46:16 +01:00
Andrew Bartlett
280caa6b3b s3-dns Don't use DELEG_FLAG in DNS update, Windows 2008R2 does not like it 2010-12-10 17:58:13 +11:00
Andrew Bartlett
0f1cc889a2 s3-dns Don't use SEQUENCE_FLAG in DNS update, Windows 2008R2 does not like it
Andrew Bartlett
2010-12-10 17:58:13 +11:00
Andrew Bartlett
c2a1ad9047 s3-net Allow 'net ads dns register' to take an optional hostname argument
This allows the administrator to more carefully chose what name to register.

Andrew Bartlett
2010-12-10 17:58:13 +11:00
Andrew Bartlett
6195dfc0eb s3-winbind Improve memory handling in NTLMv2-backend plaintext authentication
Andrew Bartlett
2010-12-10 16:09:06 +11:00
Andrew Bartlett
5cfe949108 s3-winbind Don't send the LM password to the server, ever
This is for the case where we have the plaintext password locally, and
can construct the challenge-response values here.

We should never ever use the LM password in domain authentication.
The last domain controller to only have LM passwords stored was NT
3.5.

Andrew Bartlett
2010-12-10 16:08:31 +11:00
Andrew Bartlett
f13404e27b s3-libsmb Don't ever ask for machine$ principals as a target.
It is never correct to ask for a machine$ principal as the target of a
kerberos connection.  You should always connect via the
servicePrincipalName.

This current code appears to have built up from a series of minimal
changes, as the codebase adapted the to lack of a SPNEGO principal
from Windows 2008.

Andrew Bartlett
2010-12-10 16:08:31 +11:00
Andrew Bartlett
635fbf2b54 s3-client Use NTLMv2 by default in the Samba client
This matches the improved security measures of Windows Vista.

Andrew Bartlett
2010-12-10 16:08:30 +11:00
Andrew Bartlett
b3c2df5e0d s3-smbd Don't send SPNEGO principal (rfc4178 hint) by default
This patch, based on the suggestion by Goldberg, Neil R. <ngoldber@mitre.org>
turns off the sending of the principal in the negprot by default, matching
Windows 2008 behaviour.

This slowly works us back from this hack, which from an RFC
perspective was never the right thing to do in the first place, but we
traditionally follow windows behaviour.  It also discourages client
implmentations from relying on it, as if they do they are more open to
man-in-the-middle attacks.

Andrew Bartlett
2010-12-10 16:08:30 +11:00
Andrew Bartlett
bb7806283e s3-libads Default to NOT using the server-supplied principal from SPNEGO
This principal is not supplied by later versions of windows, and using
it opens up some oportunities for man in the middle attacks.  (Becuase
it isn't the name being contacted that is verified with the KDC).

This adds the option 'client use spnego principal' to the smb.conf (as
used in Samba4) to control this behaivour.  As in Samba4, this
defaults to false.

Against 2008 servers, this will not change behaviour.  Against earlier
servers, it may cause a downgrade to NTLMSSP more often, in
environments where server names are not registered with the KDC as
servicePrincipalName values.

Andrew Bartlett
2010-12-10 16:08:30 +11:00
Andrew Bartlett
a21cb5a0a1 libcli/auth bring ADS_IGNORE_PRINCIPAL in common 2010-12-08 08:55:04 +01:00
Andrew Tridgell
16c36a8cb5 s3-waf: fixed version number handling 2010-12-08 05:26:06 +01:00
Stefan Metzmacher
f802075f08 s3:ntlm_auth: support clients which offer a spnego mechs we don't support
Before we rejected the authentication if we don't support the
first spnego mech the client offered.

We now negotiate the first mech we support.

This fix works arround problems, when a client
sends the NEGOEX (1.3.6.1.4.1.311.2.2.30) oid,
which we don't support.

metze
2010-12-07 17:39:03 +01:00
Stefan Metzmacher
ee4f5ac618 s3:ntlm_auth: free session key, as we don't use it (at least for now)
metze
2010-12-07 17:39:03 +01:00
Stefan Metzmacher
9a56ade6b1 s3:ntlm_auth: fix memory leak in the raw ntlmssp code path
metze
2010-12-07 17:39:03 +01:00
Bjoern Baumbach
6acbcd1b0c Make sure that user exists after running add user script before adding sam account.
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Dec  7 17:37:52 CET 2010 on sn-devel-104
2010-12-07 17:37:52 +01:00
Günther Deschner
94cfb49bb7 s3-waf: add configure/declaration checks for fdatasync, readahead and splice.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Dec  7 16:50:23 CET 2010 on sn-devel-104
2010-12-07 16:50:23 +01:00
Günther Deschner
c5b2fd05af s3-waf: add valgrind configure checks.
Guenther
2010-12-07 16:06:17 +01:00
Michael Adam
d91189727a s3:registry: improve debug messages about regdb refcount changes
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Dec  7 15:18:03 CET 2010 on sn-devel-104
2010-12-07 15:18:03 +01:00
Günther Deschner
af4a4f58b5 s3-waf: build vfs_fileid module if possible.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Dec  7 14:01:46 CET 2010 on sn-devel-104
2010-12-07 14:01:46 +01:00
Günther Deschner
6b1ba79fbf s3-waf: add support for --with-dnsupdate.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Dec  7 13:07:51 CET 2010 on sn-devel-104
2010-12-07 13:07:51 +01:00
Günther Deschner
0745f3fef9 s3-waf: fix the build of nsstest in the non-devel build.
Guenther
2010-12-07 12:04:35 +01:00
Günther Deschner
ffc7434e2b s3-waf: fix library names (we installed liblibsmbclient, etc.)
Guenther
2010-12-07 12:04:11 +01:00
Günther Deschner
8be11b2477 s3-waf: fix pam dependencies of the RPC_SAMR server.
Guenther
2010-12-07 11:49:57 +01:00
Volker Lendecke
f7d97868e4 s3: Fix bug 7844: Race in winbind
If a child dies, the parent process right away closes the socket.
This is wrong, with tevent we still have events pending. This works
fine for epoll but does not for at least the FreeBSD select variant.
Tevent sticks a closed socket into the select masks. This then
returns an error EBADF. When this happens, the parent winbind dies
instead of forking a new child.

This moves the socket close from the SIGCHLD cleanup function to
the socket receiver. I could not reproduce the parent death anymore
and it did not create an obvious fd leak.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Dec  6 23:21:02 CET 2010 on sn-devel-104
2010-12-06 23:21:02 +01:00
Volker Lendecke
ab1b857f58 s3: Fix bug 7842: WINBIND_LOOKUPRIDS does not return the proper domain name
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Dec  6 21:18:07 CET 2010 on sn-devel-104
2010-12-06 21:18:07 +01:00
Volker Lendecke
8f8d188c19 s3: Fix bug 7841: WINBINDD_LOOKUPRIDS asks the wrong domain 2010-12-06 20:33:05 +01:00
Jeremy Allison
cb496c6d24 s3: Fix bug 7843: Expand the local SAMs aliases 2010-12-06 20:33:05 +01:00
Günther Deschner
b73e4e36f5 s3-waf: add pam configure checks.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Dec  6 17:34:45 CET 2010 on sn-devel-104
2010-12-06 17:34:45 +01:00
Holger Hetterich
2ec657b10e Updated french translations from Jean Delvare <jdelvare@suse.de>
Autobuild-User: Jim McDonough <jmcd@samba.org>
Autobuild-Date: Sat Dec  4 18:23:54 CET 2010 on sn-devel-104
2010-12-04 18:23:54 +01:00
Günther Deschner
189b4bc1c2 s3-waf: add krb5 configure check for WRFILE_KEYTAB.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Dec  3 13:54:25 CET 2010 on sn-devel-104
2010-12-03 13:54:24 +01:00
Günther Deschner
704f138b8e s3-waf: add krb5 configure checks for enctype 23.
Guenther
2010-12-03 13:07:53 +01:00
Günther Deschner
5676acbb73 s3-waf: more krb5 configure checks.
Guenther
2010-12-03 13:07:45 +01:00
Jeremy Allison
2b0ff09982 Replace lseek()/write()/lseek() triple with pwrite call. We already emulate this
inside pwrite under the covers.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Dec  3 03:39:42 CET 2010 on sn-devel-104
2010-12-03 03:39:42 +01:00
Jeremy Allison
24ca7bcb60 posix_fallocate() returns an errno, not -1 on error. 2010-12-03 02:55:05 +01:00
Jeremy Allison
b8d7de3199 Merge the two conflicting allocation codes into one function, vfs_slow_fallocate()
and use that from both the truncate and fill_sparse functions.

Jeremy.
2010-12-03 02:55:05 +01:00
Jeremy Allison
1f1491da5a Oops. Missed adding vfswrap_posix_fallocate to vfs_default_fns table.
Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Dec  3 02:26:23 CET 2010 on sn-devel-104
2010-12-03 02:26:22 +01:00
Jeremy Allison
5819a36aef Move posix_fallocate into the VFS where it belongs.
Jeremy.
2010-12-02 16:25:59 -08:00