ira/third_party.git
14 years agos3-rpc_client: make sure cli_rpc_pipe_open_schannel() does not always return NT_STATU...
Günther Deschner [Tue, 10 Nov 2009 12:10:12 +0000 (13:10 +0100)]
s3-rpc_client: make sure cli_rpc_pipe_open_schannel() does not always return NT_STATUS_OK.

Guenther

Part of a fix for bug #6697.
And hopefully a fix for bug #6889.

14 years agos3-rpc_client: protect rpc_pipe_np_smb_conn against a NULL struct rpc_pipe_client.
Günther Deschner [Tue, 10 Nov 2009 10:04:08 +0000 (11:04 +0100)]
s3-rpc_client: protect rpc_pipe_np_smb_conn against a NULL struct rpc_pipe_client.

Guenther

Part of a fix for bug #6697.

14 years agoSecond part of the fix for bug 6828 - infinite timeout occurs when byte lock held...
Jeremy Allison [Tue, 27 Oct 2009 18:55:34 +0000 (11:55 -0700)]
Second part of the fix for bug 6828 - infinite timeout occurs when byte lock held outside of samba. Fixes case where a connection with a pending lock can me marked "idle", and ensures that the lock queue timeout is always recalculated. Jeremy.

14 years agoFix bug 6875 - trans2 FIND_FIRST2 response --> FIND_FIRST2 Data -> Fille Attributes...
Jeremy Allison [Fri, 6 Nov 2009 22:10:49 +0000 (14:10 -0800)]
Fix bug 6875 - trans2 FIND_FIRST2 response --> FIND_FIRST2 Data -> Fille Attributes are returned as 0x220 for LANMAN2.1 dialect Jeremy.

14 years agoFix bug 6880 - cannot list workgroup servers reported by Alban Browaeys <prahal@yahoo...
Jeremy Allison [Mon, 9 Nov 2009 20:41:13 +0000 (12:41 -0800)]
Fix bug 6880 - cannot list workgroup servers reported by Alban Browaeys <prahal@yahoo.com> with fix. Revert 2e989bab0764c298a2530a2d4c8690258eba210c with extra comments - this broke workgroup enumeration. Jeremy.

14 years agoFix bug 6867 - trans2findnext returns reply_nterror(req, ntstatus) In a directory...
Jeremy Allison [Mon, 2 Nov 2009 21:51:27 +0000 (13:51 -0800)]
Fix bug 6867 - trans2findnext returns reply_nterror(req, ntstatus) In a directory with a lot of files. Jeremy.

14 years agos3: Fix crash in pam_winbind, another reference to freed memory.
Bo Yang [Sat, 24 Oct 2009 02:55:36 +0000 (10:55 +0800)]
s3: Fix crash in pam_winbind, another reference to freed memory.

Fix bug #6840.

Signed-off-by: Bo Yang <boyang@samba.org>
14 years agoFix bug 6829 - smbclient does not show special characters properly. All successful...
Jeremy Allison [Thu, 22 Oct 2009 22:35:59 +0000 (15:35 -0700)]
Fix bug 6829 - smbclient does not show special characters properly. All successful calls to cli_session_setup() *must* be followed by calls to cli_init_creds() to stash the credentials we successfully connected with. There were 2 codepaths where this was missing. This caused smbclient to be unable to open the \srvsvc pipe to do an RPC netserverenum, and cause it to fall back to a RAP netserverenum, which uses DOS codepage conversion rather than the full UCS2 of RPC, so the returned characters were not correct (unless the DOS codepage was set correctly). Phew. That was fun to track down :-). Includes logic simplification in libsmb_server.c Jeremy.

14 years agoFix bug 6828 - infinite timeout occurs when byte lock held outside of samba Jeremy.
Jeremy Allison [Wed, 21 Oct 2009 01:17:19 +0000 (18:17 -0700)]
Fix bug 6828 - infinite timeout occurs when byte lock held outside of samba Jeremy.

14 years agos3: Don't fail authentication when one or some group of require-membership-of is...
Bo Yang [Mon, 19 Oct 2009 18:23:36 +0000 (02:23 +0800)]
s3: Don't fail authentication when one or some group of require-membership-of is invalid.

Signed-off-by: Bo Yang <boyang@samba.org>
Fix bug #6826.

14 years agos3:packaging: Adapt directory name.
Karolin Seeger [Fri, 16 Oct 2009 14:06:17 +0000 (16:06 +0200)]
s3:packaging: Adapt directory name.

Karolin

14 years agocifs.upcall: do a brute-force search for KRB5 credcache
Jeff Layton [Wed, 14 Oct 2009 15:06:23 +0000 (11:06 -0400)]
cifs.upcall: do a brute-force search for KRB5 credcache

A few weeks ago, I added some code to cifs.upcall to take the pid sent
by the kernel and use that to get the value of the $KRB5CCNAME
environment var for the process. That works fine on the initial mount,
but could be problematic on reconnect.

There's no guarantee on a reconnect that the process that initiates the
upcall will have $KRB5CCNAME pointed at the correct credcache. Because
of this, the current scheme isn't going to be reliable enough and we
need to use something different.

This patch replaces that scheme with one very similar to the one used by
rpc.gssd in nfs-utils. It searches the credcache dir (currently
hardcoded to /tmp) for a valid credcache for the given uid. If it finds
one then it uses that as the credentials cache. If it finds more than
one, it uses the one with the latest TGT expiration.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Addresses bug #6810.

14 years agocifs.upcall: make using ip address conditional on new option
Jeff Layton [Wed, 14 Oct 2009 15:06:21 +0000 (11:06 -0400)]
cifs.upcall: make using ip address conditional on new option

Igor Mammedov pointed out that reverse resolving an IP address to get
the hostname portion of a principal could open a possible attack
vector. If an attacker were to gain control of DNS, then he could
redirect the mount to a server of his choosing, and fix the reverse
resolution to point to a hostname of his choosing (one where he has
the key for the corresponding cifs/ or host/ principal).

That said, we often trust DNS for other reasons and it can be useful
to do so. Make the code that allows trusting DNS to be enabled by
adding --trust-dns to the cifs.upcall invocation.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
14 years agocifs.upcall: switch to getopt_long
Jeff Layton [Wed, 14 Oct 2009 15:06:20 +0000 (11:06 -0400)]
cifs.upcall: switch to getopt_long

...to allow long option names.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
14 years agocifs.upcall: fix IPv6 addrs sent to upcall to have colon delimiters
Jeff Layton [Wed, 14 Oct 2009 15:06:19 +0000 (11:06 -0400)]
cifs.upcall: fix IPv6 addrs sent to upcall to have colon delimiters

Current kernels don't send IPv6 addresses with the colon delimiters, add
a routine to add them when they're not present.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
14 years agocifs.upcall: use ip address passed by kernel to get server's hostname
Jeff Layton [Wed, 14 Oct 2009 15:06:18 +0000 (11:06 -0400)]
cifs.upcall: use ip address passed by kernel to get server's hostname

Instead of using the hostname given by the upcall to get the server's
principal, take the IP address given in the upcall and reverse resolve
it to a hostname.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
14 years agocifs.upcall: clean up flag handling
Jeff Layton [Wed, 14 Oct 2009 15:04:58 +0000 (11:04 -0400)]
cifs.upcall: clean up flag handling

Add a new stack var to hold the flags returned by the decoder routine
so that we don't need to worry so much about preserving "rc".

With this, we can drop privs before trying to find the location of
the credcache.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
14 years agocifs.upcall: try getting a "cifs/" principal and fall back to "host/"
Jeff Layton [Wed, 14 Oct 2009 15:04:56 +0000 (11:04 -0400)]
cifs.upcall: try getting a "cifs/" principal and fall back to "host/"

cifs.upcall takes a "-c" flag that tells the upcall to get a principal
in the form of "cifs/hostname.example.com@REALM" instead of
"host/hostname.example.com@REALM". This has turned out to be a source of
great confusion for users.

Instead of requiring this flag, have the upcall try to get a "cifs/"
principal first. If that fails, fall back to getting a "host/"
principal.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
14 years agocifs.upcall: declare a structure for holding decoded args
Jeff Layton [Wed, 14 Oct 2009 15:04:55 +0000 (11:04 -0400)]
cifs.upcall: declare a structure for holding decoded args

The argument list for the decoder is becoming rather long. Declare an
args structure and use that for holding the args. This also simplifies
pointer handling a bit.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
14 years agocifs.upcall: formatting cleanup
Jeff Layton [Wed, 14 Oct 2009 15:04:54 +0000 (11:04 -0400)]
cifs.upcall: formatting cleanup

Clean up some unneeded curly braces, and fix some indentation.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
14 years agocifs.upcall: clean up logging and add debug messages
Jeff Layton [Wed, 14 Oct 2009 15:04:53 +0000 (11:04 -0400)]
cifs.upcall: clean up logging and add debug messages

Change the log levels to be more appropriate to the messages being
logged. Error messages should be LOG_ERR and not LOG_WARNING, for
instance.

Add some LOG_DEBUG messages that we can use to diagnose problems with
krb5 upcalls. With these, someone can set up syslog to log daemon.debug
and should be able to get more info when things aren't working.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
14 years agoAttempt to fix the build -- jlayton, please check!
Volker Lendecke [Wed, 14 Oct 2009 15:04:52 +0000 (11:04 -0400)]
Attempt to fix the build -- jlayton, please check!

14 years agocifs.upcall: use pid value from kernel to determine KRB5CCNAME to use
Jeff Layton [Wed, 14 Oct 2009 15:04:50 +0000 (11:04 -0400)]
cifs.upcall: use pid value from kernel to determine KRB5CCNAME to use

If the kernel sends the upcall a pid of the requesting process, we can
open that process' /proc/<pid>/environ file and scrape the KRB5CCNAME
value out of it.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
14 years agos3:winbind: Fix bug 6793 -- segfault in winbindd_pam_auth
Volker Lendecke [Wed, 14 Oct 2009 18:37:10 +0000 (11:37 -0700)]
s3:winbind: Fix bug 6793 -- segfault in winbindd_pam_auth

14 years agos3/aio: Correctly handle aio_error() and errno.
Olaf Flebbe [Tue, 13 Oct 2009 23:49:21 +0000 (16:49 -0700)]
s3/aio: Correctly handle aio_error() and errno.

Fix bug #6805.

14 years agoFix bug 6811 - pam_winbind references freed memory. s3: Fix reference to freed memory...
Bo Yang [Wed, 14 Oct 2009 19:47:49 +0000 (12:47 -0700)]
Fix bug 6811 - pam_winbind references freed memory. s3: Fix reference to freed memory in pam_winbind.

14 years agoWHATSNEW: Start WHATSNEW for 3.3.10.
Karolin Seeger [Thu, 15 Oct 2009 10:43:47 +0000 (12:43 +0200)]
WHATSNEW: Start WHATSNEW for 3.3.10.

Karolin

14 years agoVERSION: Raise version number up to 3.3.10.
Karolin Seeger [Thu, 15 Oct 2009 10:40:37 +0000 (12:40 +0200)]
VERSION: Raise version number up to 3.3.10.

Karolin

14 years agoWHATSNEW: Update changes.
Karolin Seeger [Mon, 12 Oct 2009 11:45:39 +0000 (13:45 +0200)]
WHATSNEW: Update changes.

Karolin

14 years agoWHATSNEW. Update changes since 3.3.8.
Karolin Seeger [Mon, 12 Oct 2009 11:10:29 +0000 (13:10 +0200)]
WHATSNEW. Update changes since 3.3.8.

Karolin

14 years agos3:wbc_sid: Fix build.
Karolin Seeger [Mon, 12 Oct 2009 09:24:30 +0000 (11:24 +0200)]
s3:wbc_sid: Fix build.

Use talloc_free instead of TALLOC_FREE.

Signed-off-by: Volker Lendecke <vl@samba.org>
14 years agos3: Fix a memleak reported by dmarkey (cherry picked from commit 5aeb954ba9382e1975c6...
Volker Lendecke [Fri, 9 Oct 2009 20:58:14 +0000 (22:58 +0200)]
s3: Fix a memleak reported by dmarkey (cherry picked from commit 5aeb954ba9382e1975c64ac96f1e377ed6af3ae0)

Fix bug #6797.

14 years agos3:smbclient: Fix bug 6606 (reported as 6744) in 3.3
Volker Lendecke [Fri, 18 Sep 2009 17:45:36 +0000 (19:45 +0200)]
s3:smbclient: Fix bug 6606 (reported as 6744) in 3.3

This is a port of 1f34ffa0ca and 24309bdb2efc to 3.3.

Fix file corruption using smbclient with NT4 server.

14 years agoCorrect fix for bug 6781 - Cannot rename subfolders in Explorer view with recent...
Jeremy Allison [Wed, 7 Oct 2009 22:49:56 +0000 (15:49 -0700)]
Correct fix for bug 6781 - Cannot rename subfolders in Explorer view with recent versions of Samba. Without this fix, renaming a directory ./a to ./b, whilst a directory ./aa was already open would fail. Jeremy.

14 years agoFix bug 6769 - symlink unlink does nothing. Jeremy.
Jeremy Allison [Thu, 8 Oct 2009 22:55:35 +0000 (15:55 -0700)]
Fix bug 6769 - symlink unlink does nothing. Jeremy.

14 years agos3:mount.cifs: make "mount.cifs -V" print the version, not usage.
Michael Adam [Thu, 8 Oct 2009 14:44:48 +0000 (10:44 -0400)]
s3:mount.cifs: make "mount.cifs -V" print the version, not usage.

(cherry-picked from d7ca4997017e86b6f23ced64f1f1672bfb15716b)

Also make "mount.cifs -h" not exit with error exit code but with return code 0.

Michael

Part 2/2 of a fix for bug #6692 (mount.cifs segfault).

14 years agoRevert "cifs mount did not properly display version string when no other parameters...
Jeff Layton [Thu, 8 Oct 2009 14:42:37 +0000 (10:42 -0400)]
Revert "cifs mount did not properly display version string when no other parameters passed in."

This reverts commit c7bf0f4c222ae46be2a751997e03197832b494cd.

Part 1/2 of a fix for bug #6692.

14 years agoWHATSNEW: Add more coherent explanation for bug #6680.
Karolin Seeger [Thu, 8 Oct 2009 13:21:00 +0000 (15:21 +0200)]
WHATSNEW: Add more coherent explanation for bug #6680.

Karolin

14 years agos3-pamsmbpass: copy _pam_get_item and _pam_get_data from pam_winbind.
Günther Deschner [Thu, 8 Oct 2009 13:16:25 +0000 (15:16 +0200)]
s3-pamsmbpass: copy _pam_get_item and _pam_get_data from pam_winbind.

Fix bug #6790.

Guenther

14 years agoWHATSNEW: List major enhancements.
Karolin Seeger [Thu, 8 Oct 2009 13:12:27 +0000 (15:12 +0200)]
WHATSNEW: List major enhancements.

Karolin

14 years agoWHATSNEW: Update release notes.
Karolin Seeger [Thu, 8 Oct 2009 13:09:46 +0000 (15:09 +0200)]
WHATSNEW: Update release notes.

Karolin

14 years agos3-{u}mount.cifs: remove unrequired dependency on popt.
Günther Deschner [Fri, 19 Jun 2009 15:43:57 +0000 (17:43 +0200)]
s3-{u}mount.cifs: remove unrequired dependency on popt.

Fixes bug #6789.

Guenther

14 years agos3:winbind: Only ever handle one event after a select call
Volker Lendecke [Wed, 7 Oct 2009 13:53:46 +0000 (15:53 +0200)]
s3:winbind: Only ever handle one event after a select call

While handling an fd event, the situation with other fds can change. I've just
seen a winbind stuck in the accept() call on the privileged pipe. I can only
imagine this happen because under high load we first handled other requests and
meanwhile the client on the privileged pipe went away.

14 years agoFix bug 6776 - Running overlapping Byte Lock test will core dump Samba daemon. Re...
Jeremy Allison [Mon, 5 Oct 2009 23:28:59 +0000 (16:28 -0700)]
Fix bug 6776 - Running overlapping Byte Lock test will core dump Samba daemon. Re-write core of POSIX locking logic. Jeremy.

14 years agos3:smbd: Fix bug 6690, wrong error check
Andrew Klosterman [Tue, 8 Sep 2009 15:38:37 +0000 (17:38 +0200)]
s3:smbd: Fix bug 6690, wrong error check

14 years agos3:winbindd_cm: don't invalidate the whole connection when just samr gave ACCCESS_DENIED
Stefan Metzmacher [Thu, 24 Sep 2009 19:35:38 +0000 (21:35 +0200)]
s3:winbindd_cm: don't invalidate the whole connection when just samr gave ACCCESS_DENIED

metze

14 years agos3:rpc_server: we need to make a copy of my_name in serverinfo_to_SamInfo3()
Günther Deschner [Wed, 7 Oct 2009 12:34:05 +0000 (14:34 +0200)]
s3:rpc_server: we need to make a copy of my_name in serverinfo_to_SamInfo3()

This is important for the case the server_info already contains a logon_server.

metze

14 years agos3-rpc_client: fix rpccli_set_timeout to cope with abstract transport.
Günther Deschner [Tue, 6 Oct 2009 09:10:47 +0000 (11:10 +0200)]
s3-rpc_client: fix rpccli_set_timeout to cope with abstract transport.

taken from: b7094c0b804984de8e0b50c17e7908a2685df557

Guenther

14 years agos3:winbind: Fix an uninitialized variable (cherry picked from commit 0724649a8a7c04d0...
Volker Lendecke [Wed, 23 Sep 2009 04:23:50 +0000 (06:23 +0200)]
s3:winbind: Fix an uninitialized variable (cherry picked from commit 0724649a8a7c04d015317d9dc2ae43ee87c1bd25)

14 years agos3-winbindd: Fix Bug #6711: trusts to windows 2008 (2008 r2) not working.
Günther Deschner [Thu, 17 Sep 2009 07:43:36 +0000 (09:43 +0200)]
s3-winbindd: Fix Bug #6711: trusts to windows 2008 (2008 r2) not working.

Winbindd should always try to use LSA via an schannel authenticated ncacn_ip_tcp
connection when talking to AD for LSA lookup calls.

In Samba <-> W2k8 interdomain trust scenarios, LookupSids3 and LookupNames4 via an
schannel ncacn_ip_tcp LSA connection are the *only* options to successfully resolve
sids and names.

Guenther
(cherry picked from commit 6a8ef6c424c52be861ed2a9806f917a64ec892a6)

14 years agos3-winbindd: add cm_connect_lsa_tcp().
Günther Deschner [Sat, 12 Sep 2009 21:30:39 +0000 (23:30 +0200)]
s3-winbindd: add cm_connect_lsa_tcp().

Guenther
(cherry picked from commit 58f2deb94024f002e3c3df47f45454edc97f47e1)

14 years agos3-rpc_client: fix non initialized structure in rpccli_lsa_lookup_sids_noalloc.
Günther Deschner [Thu, 17 Sep 2009 07:42:49 +0000 (09:42 +0200)]
s3-rpc_client: fix non initialized structure in rpccli_lsa_lookup_sids_noalloc.

Guenther
(cherry picked from commit a4b5c792c55ef90648a528d279beec32f86a9b22)

14 years agos3-rpc_client: add rpccli_lsa_lookup_sids3 wrapper.
Günther Deschner [Sat, 12 Sep 2009 22:28:49 +0000 (00:28 +0200)]
s3-rpc_client: add rpccli_lsa_lookup_sids3 wrapper.

Guenther
(cherry picked from commit 2f9adf04e4b3e16c046cb371a428a8a70d5de041)

14 years agos3-rpc_client: add rpccli_lsa_lookup_names4 wrapper.
Günther Deschner [Fri, 11 Sep 2009 17:35:14 +0000 (19:35 +0200)]
s3-rpc_client: add rpccli_lsa_lookup_names4 wrapper.

Guenther
(cherry picked from commit ff968712bab6c2635ef74723c6f52b0fdac4b424)

14 years agos3-winbindd: add and use winbindd_lookup_names().
Günther Deschner [Thu, 17 Sep 2009 06:06:34 +0000 (08:06 +0200)]
s3-winbindd: add and use winbindd_lookup_names().

Guenther
(cherry picked from commit 99c3fc19587431efda1ae6161453d84673b32071)

14 years agos3-winbindd: add and use winbindd_lookup_sids().
Günther Deschner [Thu, 17 Sep 2009 05:59:25 +0000 (07:59 +0200)]
s3-winbindd: add and use winbindd_lookup_sids().

Guenther
(cherry picked from commit f0b52b8c3133e3696db361d9d0e7d1fff0fab991)

14 years agos3-rpc_client: add dcerpc_transport_t to cli_rpc_pipe_open_schannel().
Günther Deschner [Thu, 10 Sep 2009 20:23:21 +0000 (22:23 +0200)]
s3-rpc_client: add dcerpc_transport_t to cli_rpc_pipe_open_schannel().

Guenther
(cherry picked from commit bea8e5fa6038d5abd2ec1e12f9005c4a04abb79f)

14 years agos3-rpc_client: add dcerpc_transport_t to cli_rpc_pipe_open_spnego_ntlmssp and cli_rpc...
Günther Deschner [Mon, 5 Oct 2009 15:41:06 +0000 (17:41 +0200)]
s3-rpc_client: add dcerpc_transport_t to cli_rpc_pipe_open_spnego_ntlmssp and cli_rpc_pipe_open_ntlmssp.

Guenther

14 years agos3-rpc_client: add cli_rpc_pipe_open_noauth_transport.
Günther Deschner [Tue, 4 Nov 2008 17:40:24 +0000 (18:40 +0100)]
s3-rpc_client: add cli_rpc_pipe_open_noauth_transport.

Guenther
(cherry picked from commit 87f61a144b8d25c90b847940ca03ced1f77b036c)

14 years agoWHATSNEW: Prepare release notes for Samba 3.3.9.
Karolin Seeger [Wed, 7 Oct 2009 07:23:27 +0000 (09:23 +0200)]
WHATSNEW: Prepare release notes for Samba 3.3.9.

Karolin

14 years agoVERSION: Raise version number up to 3.3.9.
Karolin Seeger [Wed, 7 Oct 2009 06:44:52 +0000 (08:44 +0200)]
VERSION: Raise version number up to 3.3.9.

Karolin

14 years agoSecond part of a fix for bug #6235.
Jeremy Allison [Fri, 2 Oct 2009 10:23:32 +0000 (12:23 +0200)]
Second part of a fix for bug #6235.

Domain enumeration breaks if master browser has space in name.

14 years agoFix bug #6532.
Derrell Lipman [Fri, 2 Oct 2009 10:22:25 +0000 (12:22 +0200)]
Fix bug #6532.

Domain enumeration breaks if master browser has space in name.

14 years agos3/getdcname: Fix 'net' crash.
Kumar Thangavelu [Fri, 29 May 2009 09:27:38 +0000 (11:27 +0200)]
s3/getdcname: Fix 'net' crash.

'net' command crashed when attempting to join a
domain. This occurred in a very specific case where
the DC had multiple IPs and one of the IPs was invalid.

Signed-off-by: Volker Lendecke <vl@samba.org>
Fixes bug #6420.

14 years agoFix for CVE-2009-2906.
Jeremy Allison [Wed, 30 Sep 2009 12:27:26 +0000 (14:27 +0200)]
Fix for CVE-2009-2906.

Summary:
Specially crafted SMB requests on
authenticated SMB connections can send smbd
into a 100% CPU loop, causing a DoS on the
Samba server.
(cherry picked from commit 5f1f1c47623f846909481073d56bc909d13e5e37)

14 years agoWHATSNEW: Update release notes.
Karolin Seeger [Wed, 30 Sep 2009 11:55:06 +0000 (13:55 +0200)]
WHATSNEW: Update release notes.

Karolin
(cherry picked from commit 7fbee9050d08335c6a3dbf6e267c823b33e928c4)

14 years agoFix for CVE-2009-2813.
Jeremy Allison [Mon, 28 Sep 2009 11:44:12 +0000 (13:44 +0200)]
Fix for CVE-2009-2813.

===========================================================
== Subject:     Misconfigured /etc/passwd file may share folders unexpectedly
==
== CVE ID#:     CVE-2009-2813
==
== Versions:    All versions of Samba later than 3.0.11
==
== Summary:     If a user in /etc/passwd is misconfigured to have
==              an empty home directory then connecting to the home
==              share of this user will use the root of the filesystem
==              as the home directory.
===========================================================
(cherry picked from commit 8afa10ad7d7e81bcae27b6a913210ef8a1ee4426)

14 years agomount.cifs: don't leak passwords with verbose option
Jeff Layton [Fri, 25 Sep 2009 11:01:59 +0000 (07:01 -0400)]
mount.cifs: don't leak passwords with verbose option

When running mount.cifs with the --verbose option, it'll print out the
option string that it passes to the kernel...including the mount
password if there is one. Print a placeholder string instead to help
ensure that this info can't be used for nefarious purposes.

Also, the --verbose option printed the option string before it was
completely assembled anyway. This patch should also make sure that
the complete option string is printed out.

Finally, strndup passwords passed in on the command line to ensure that
they aren't shown by --verbose as well. Passwords used this way can
never be truly kept private from other users on the machine of course,
but it's simple enough to do it this way for completeness sake.

Reported-by: Ronald Volgers <r.c.volgers@student.utwente.nl>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Steve French <sfrench@us.ibm.com>
Part 2/2 of a fix for CVE-2009-2948.
(cherry picked from commit ec0ee6753818d546ad5817bdb09cdd3b7c5673af)

14 years agomount.cifs: check access of credential files before opening
Jeff Layton [Fri, 25 Sep 2009 11:00:18 +0000 (07:00 -0400)]
mount.cifs: check access of credential files before opening

It's possible for an unprivileged user to pass a setuid mount.cifs a
credential or password file to which he does not have access. This can cause
mount.cifs to open the file on his behalf and possibly leak the info in the
first few lines of the file.

Check the access permissions of the file before opening it.

Reported-by: Ronald Volgers <r.c.volgers@student.utwente.nl>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Steve French <sfrench@us.ibm.com>
Part 1/2 of a fix for CVE-2009-2948.
(cherry picked from commit 8f0af2ed4f330be558987dd52c32b32e4b8ed95f)

14 years agoWHATSNEW: Prepare release notes for 3.3.8.
Karolin Seeger [Mon, 28 Sep 2009 11:39:23 +0000 (13:39 +0200)]
WHATSNEW: Prepare release notes for 3.3.8.

Karolin
(cherry picked from commit f9d71be5013dd8903d39645b6a03332ae18646ed)

14 years agoRaise version up to 3.3.8.
Karolin Seeger [Thu, 24 Sep 2009 12:28:54 +0000 (14:28 +0200)]
Raise version up to 3.3.8.

Karolin
(cherry picked from commit c353ad6d63dc884566cc11df12d9461577031634)

14 years agos3: Don't overwrite password in pam_winbind, subsequent pam modules might use the...
Bo Yang [Wed, 16 Sep 2009 15:58:35 +0000 (23:58 +0800)]
s3: Don't overwrite password in pam_winbind, subsequent pam modules might use the old password and new password.

Signed-off-by: Bo Yang <boyang@samba.org>
Fix bug #6735.

14 years agos3:libsmb: Correctly chew keepalive packets
Volker Lendecke [Wed, 9 Sep 2009 10:24:08 +0000 (12:24 +0200)]
s3:libsmb: Correctly chew keepalive packets

Thanks a *lot* to Günther to send me the relevant traces!

Volker

Signed-off-by: Günther Deschner <gd@samba.org>
Fixes bug #6646 (Winbind authentication issue on 3.2.13/14 and 3.4.0 (was:
[Samba] Crazied NTLM_AUTH on samba 3.4.0)).

14 years agos3-winbindd: Fix Bug #6700: Use dns domain name when needing to guess server principal.
Günther Deschner [Wed, 9 Sep 2009 00:29:58 +0000 (02:29 +0200)]
s3-winbindd: Fix Bug #6700: Use dns domain name when needing to guess server principal.

Patch from Robert LeBlanc <robert@leblancnet.us>.

Thanks!

Guenther

14 years agos3-schannel: Fix Bug #6697. Interdomain trusts with Windows 2008 R2 DCs.
Günther Deschner [Tue, 8 Sep 2009 09:57:52 +0000 (11:57 +0200)]
s3-schannel: Fix Bug #6697. Interdomain trusts with Windows 2008 R2 DCs.

The Schannel verifier (aka NL_AUTH_SIGNATURE) structure (32 byte) sent from a
W2k8r2 DC is passed in a buffer with the size of a NL_AUTH_SHA2_SIGNATURE (56
byte). We should just ignore the remaining 12 zeroed bytes and proceed.

Guenther

14 years agoCheck we read off the compelte event from inotify
Simo Sorce [Sat, 5 Sep 2009 14:18:12 +0000 (10:18 -0400)]
Check we read off the compelte event from inotify

The kernel may return a short read, so we must use read_data() to make sure we
read off the full buffer. If somethign bad happens we also need to kill the
inotify watch because the filedescriptor will return out of sync structures if
we read only part of the data.

Fixes bug #6693.

14 years agos3:libwbclient: Fix bug 6349, initialize domain info struct
Volker Lendecke [Sun, 30 Aug 2009 09:39:41 +0000 (11:39 +0200)]
s3:libwbclient: Fix bug 6349, initialize domain info struct

14 years agowbclient: Fix Bug #6680: always activate handling of large (> 256 byte) ntlmv2 blobs...
Günther Deschner [Tue, 1 Sep 2009 09:58:05 +0000 (11:58 +0200)]
wbclient: Fix Bug #6680: always activate handling of large (> 256 byte) ntlmv2 blobs in wbcAuthenticateUserEx().

Guenther

14 years agoFix bug 5886
Volker Lendecke [Tue, 14 Jul 2009 21:12:59 +0000 (23:12 +0200)]
Fix bug 5886

Ok, that's a very long-standing one. I finally got around to install a recent
OpenLDAP and test the different variants of setting a NULL password etc.

Thanks all for your patience!

Volker

14 years agos3:netlogon: replace cred_hash3 by des_crypt112_16
Stefan Metzmacher [Thu, 27 Aug 2009 11:16:15 +0000 (13:16 +0200)]
s3:netlogon: replace cred_hash3 by des_crypt112_16

This makes sure we don't truncate the session key to 8 bytes
Fixes bug #6664.

metze

14 years agoFix unqualified "net join"
Volker Lendecke [Wed, 29 Jul 2009 08:30:52 +0000 (04:30 -0400)]
Fix unqualified "net join"

Kai, please check!

Fixes bug #6585.

Thanks,

Volker
(cherry picked from commit d8543da9dad3286cd330b98374405edb9f976e77)
(cherry picked from commit bf7d1758a77a462d9b30cc2549a960736884ee32)

14 years agos3-ldap: Fix Bug #5879. Update LDAP schema for Netscape DS 5.
Günther Deschner [Thu, 6 Aug 2009 15:17:26 +0000 (17:17 +0200)]
s3-ldap: Fix Bug #5879. Update LDAP schema for Netscape DS 5.

Patch from TAKEDA Yasuma <yasuma@osstech.co.jp>.

Guenther
(cherry picked from commit 9fa042bb9f71057fc869e37d4cc180e8a772b1bb)

14 years agos3:winbindd: raise the timeout for lsa_Lookup*() calls from 10 to 35 seconds.
Stefan Metzmacher [Tue, 11 Aug 2009 09:17:14 +0000 (11:17 +0200)]
s3:winbindd: raise the timeout for lsa_Lookup*() calls from 10 to 35 seconds.

metze
(cherry picked from commit 1e1445bc7672b17a1d689fa0f0732b05b6e04da5)

Fixes bug #6627.

14 years agos3:passdb: fix bug #6509: use gid (not uid) cache in fetch_gid_from_cache().
Michael Adam [Fri, 26 Jun 2009 12:09:10 +0000 (14:09 +0200)]
s3:passdb: fix bug #6509: use gid (not uid) cache in fetch_gid_from_cache().

With the previous code, the cache can never have been hit at all.

Michael

14 years agos3: Unable to browse DFS when using kerberos in libsmbclient
Bo Yang [Fri, 7 Aug 2009 06:58:36 +0000 (14:58 +0800)]
s3: Unable to browse DFS when using kerberos in libsmbclient

Signed-off-by: Bo Yang <boyang@samba.org>
Fixes bug #6615.

14 years agos3/smbldap: Fix typo in debug message.
Karolin Seeger [Thu, 6 Aug 2009 08:06:29 +0000 (10:06 +0200)]
s3/smbldap: Fix typo in debug message.

Karolin
(cherry picked from commit 54dffbea663ecf4542d6c5e30da6e346d5d60424)

14 years agoFix SAMR server for winbindd access. Ensure we allow MAX_ACCESS to be mapped to what...
Jeremy Allison [Mon, 18 May 2009 21:26:37 +0000 (14:26 -0700)]
Fix SAMR server for winbindd access. Ensure we allow MAX_ACCESS to be mapped to what we're giving Everyone. Jeremy.

Fixes bug #6504.

14 years agoIncrease the max_grp value to 128 (AIX NGROUPS_MAX value) instead of 32 to allow...
Yannick Bergeron [Thu, 30 Jul 2009 23:31:24 +0000 (19:31 -0400)]
Increase the max_grp value to 128 (AIX NGROUPS_MAX value) instead of 32 to allow AIX to call sys_getgrouplist only once
(cherry picked from commit c3e12444f57e24dcd6c9259537ed0489db4658e9)
(cherry picked from commit 2666b3e27444ffcad3afc21e276f189ac238433f)

14 years agos3/docs: Fix typos.
Karolin Seeger [Mon, 3 Aug 2009 08:19:45 +0000 (10:19 +0200)]
s3/docs: Fix typos.

Thanks to OPC oota <t-oota@dh.jp.nec.com> for reporting!

Karolin
(cherry picked from commit 7ee7ec3fdba2ef6a6cc3e1f96a5d2154290cdb18)
(cherry picked from commit c94d3183a8e4c7e03c0dd2771cb7b9f4665198ce)

14 years agoWHATSNEW: Remove major enhancements.
Karolin Seeger [Tue, 28 Jul 2009 08:26:59 +0000 (10:26 +0200)]
WHATSNEW: Remove major enhancements.

There are not that much bugs that have been fixed for that release and it's a
bit difficult to determine major ones...

Karolin

14 years agoWHATSNEW: Start WHATSNEW for 3.3.7.
Karolin Seeger [Mon, 27 Jul 2009 14:21:16 +0000 (16:21 +0200)]
WHATSNEW: Start WHATSNEW for 3.3.7.

Karolin

14 years agoVERSION: Raise version number up to 3.3.7.
Karolin Seeger [Mon, 27 Jul 2009 13:56:02 +0000 (15:56 +0200)]
VERSION: Raise version number up to 3.3.7.

Karolin

14 years agodocs: fix typos in the net man page.
Michael Adam [Mon, 27 Jul 2009 12:09:39 +0000 (14:09 +0200)]
docs: fix typos in the net man page.

Noted by Oota Toshiya <t-oota@dh.jp.nec.com> .

Michael

14 years agohandling upn
Bo Yang [Sat, 18 Jul 2009 06:23:24 +0000 (14:23 +0800)]
handling upn

lookupname failed, cannot find domain when attempt
to change password.

This addresses bug #6560.

Signed-off-by: Bo Yang <boyang@samba.org>
14 years agos3:util: let parent_dirname() correctly return toplevel filenames
Stefan Metzmacher [Tue, 30 Jun 2009 14:03:11 +0000 (16:03 +0200)]
s3:util: let parent_dirname() correctly return toplevel filenames

metze
(cherry picked from commit a14efbadd53ac9678d75e6029f947d63cfa0c4e5)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
This addresses bug #6526.

14 years agoFix bug #6520 time stamps.
Jeremy Allison [Thu, 2 Jul 2009 06:37:59 +0000 (08:37 +0200)]
Fix bug #6520 time stamps.

E.g. last mod time is not preserved when "unix extensions=yes" are set - and u
Cancel out any pending "sticky" writes or "last write" changes when
doing a UNIX info level set.

Jeremy.

14 years agos3/docs: Fix typo.
Matt Kraai [Wed, 1 Jul 2009 06:18:11 +0000 (08:18 +0200)]
s3/docs: Fix typo.

This fixes bug #6519.
(cherry picked from commit 4fb1f8e8fe46b3e77c06612ac3fc3d67cf650a11)
(cherry picked from commit 39bfcc5d50892ad0c387f0ca3932e961e77fdc39)

14 years agoDon't require "Modify property" perms to unjoin (bug #6481) "net ads leave" stopped...
Jim McDonough [Mon, 29 Jun 2009 13:42:35 +0000 (09:42 -0400)]
Don't require "Modify property" perms to unjoin (bug #6481) "net ads leave" stopped working when "modify properties" permissions were not granted (meaning you had to be allowed to disable the account that you were about to delete).

Libnetapi should not delete machine accounts, as this does not
happen on win32.  The WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE flag
really means "disable" (both in practice and docs).

However, to keep the functionality in "net ads leave", we
will still try to do the delete.  If this fails, we try
to do the disable.

Additionally, it is possible in windows to not disable or
delete the account, but just tell the local machine that it
is no longer in the account.  libnet can now do this as well.

Don't use ads realm name for non-ads case.  #6481

Also check that the connection to ads worked.

14 years agos3-test: add RPC-SAMR-MACHINE-AUTH to list of tests to run against s3.
Günther Deschner [Mon, 29 Jun 2009 13:27:13 +0000 (15:27 +0200)]
s3-test: add RPC-SAMR-MACHINE-AUTH to list of tests to run against s3.

Guenther

14 years agoVERSION: Raise version number up to 3.3.6.
Karolin Seeger [Tue, 23 Jun 2009 09:35:13 +0000 (11:35 +0200)]
VERSION: Raise version number up to 3.3.6.

Karolin
(cherry picked from commit b09440c77b93ff6088c2fd474d6b24c081054812)