samba.git
14 years agonsswitch: fix the build of the winbind krb5 locator plugin.
Günther Deschner [Wed, 21 Oct 2009 00:44:44 +0000 (02:44 +0200)]
nsswitch: fix the build of the winbind krb5 locator plugin.

Guenther
(cherry picked from commit b9d9353b548d9b2ab684aa171f511174e6414762)
(cherry picked from commit 087c41e390b8be513016ca29a96d1702b0d03587)

14 years agocifs.upcall: Fix Bug #6868: support building with Heimdal we well as with MIT.
Günther Deschner [Wed, 11 Nov 2009 23:52:38 +0000 (00:52 +0100)]
cifs.upcall: Fix Bug #6868: support building with Heimdal we well as with MIT.

Guenther
(cherry picked from commit b29eed492f1c056adb0b53510be10e738276ca11)
(cherry picked from commit cca1f7a80317e09208a9e56ff2744b113e0dfbc5)

14 years agos3-kerberos: add smb_krb5_principal_get_realm().
Günther Deschner [Wed, 11 Nov 2009 23:51:46 +0000 (00:51 +0100)]
s3-kerberos: add smb_krb5_principal_get_realm().

Guenther
(cherry picked from commit bddafc6de8e37e014d7f074b6107dda6f76ebdc5)

14 years agos3-kerberos: fix some build warnings when building against heimdal.
Günther Deschner [Fri, 6 Nov 2009 09:25:53 +0000 (10:25 +0100)]
s3-kerberos: fix some build warnings when building against heimdal.

Guenther
(cherry picked from commit 6664d015c986946c509f4f8d3524f84fb2f34ff1)

14 years agokerberos: fix some heimdal build warnings.
Günther Deschner [Thu, 9 Oct 2008 09:05:42 +0000 (11:05 +0200)]
kerberos: fix some heimdal build warnings.

Guenther
(cherry picked from commit ce1bea7d692dcf09faafa0941c15313d0d75a9c8)

14 years agos3: Fix shadow copy display on Windows 7
Volker Lendecke [Thu, 8 Oct 2009 12:02:39 +0000 (14:02 +0200)]
s3: Fix shadow copy display on Windows 7

Windows 7 is a bit more picky on our NT_STATUS_BUFFER_TOO_SMALL. Announce the
right buffer size, the same amount we later check for.

Fix bug #6850 (Shadow Copy Support for VISTA / Windows 7).
(cherry picked from commit dc3d1f2f073f135bf48a08163010465ba88b9d37)

14 years agos3:docs: Fix typo in man mount.cifs.
Karolin Seeger [Mon, 30 Nov 2009 13:53:23 +0000 (14:53 +0100)]
s3:docs: Fix typo in man mount.cifs.

Fix bug #6844 (wrong credential file format in mount.cifs manpage).
Thanks to the Debian Samba package maintainers for reporting!

Karolin
(cherry picked from commit 3b7f8a759f57f32a8c1bc2db85236e88f616ffd9)
(cherry picked from commit 54e2e0ae51e2e126696570104ed64d0458beb4ce)
(cherry picked from commit dbe41dce7491df93a26bb0f4bd2a33b53fe90188)
(cherry picked from commit 04fa292f6e7948c10da378ca4b8a741324478008)

14 years agos3:docs: Document "aio write behind".
Karolin Seeger [Mon, 30 Nov 2009 12:34:34 +0000 (13:34 +0100)]
s3:docs: Document "aio write behind".

Part of a fix for bug #6890 (Some smb.conf parameters are undocumented).

Karolin
(cherry picked from commit fde7c2ab19bc7442d8ee9d85ab2fe54e0cfb4782)
(cherry picked from commit 267ebc03b43dd8c11f5aebf341620b0d94d95135)
(cherry picked from commit 93bbbd3cc776e4aa69239cb086067ec953fc8c8e)
(cherry picked from commit 65a3f18ccd9aa8b4ec31e9e7e5465631ee53afca)

14 years agos3:docs: Document "ldap page size".
Karolin Seeger [Mon, 30 Nov 2009 11:29:27 +0000 (12:29 +0100)]
s3:docs: Document "ldap page size".

Part of a fix for bug #6890 (Some smb.conf parameters are undocumented).

Karolin
(cherry picked from commit 9478ec35b5349f50a61bbe2aa88af88577918e91)
(cherry picked from commit 940121d666b9e0645584c93db178b763ac5c8c04)
(cherry picked from commit a1d8a6127448fbdc25d1d87a2541a2ea8e430e17)
(cherry picked from commit eeea76ff150964c7b6db87fb670dbfd1ae68608e)

14 years agos3:docs: Document "enable core files".
Karolin Seeger [Mon, 30 Nov 2009 10:40:06 +0000 (11:40 +0100)]
s3:docs: Document "enable core files".

Part of a fix for bug #6890 (Some smb.conf parameters are undocumented).

Karolin
(cherry picked from commit b03ad70848e6ea889f382c0cb9f21057370f1ab6)
(cherry picked from commit 15f7b70b0e6b6bd2604255cff1c351bb0425e9f3)
(cherry picked from commit 5832bc1c5896b391131952a06013154cbdafe3f9)
(cherry picked from commit f83733838bf94348c98dbc724d86c9021053639b)

14 years agos3: Fix bug 6338 -- net rpc trustdom list always display "none"
Volker Lendecke [Sun, 22 Nov 2009 21:38:45 +0000 (22:38 +0100)]
s3: Fix bug 6338 -- net rpc trustdom list always display "none"
(cherry picked from commit ff9d20909cdce671d92f1d5cee1249db465efa9b)

14 years agodocs: Fix Bug 6922: Add Registry patchfile for Win7 domain join.
Günther Deschner [Tue, 24 Nov 2009 10:36:14 +0000 (11:36 +0100)]
docs: Fix Bug 6922: Add Registry patchfile for Win7 domain join.

Patchfile from SATOH Fumiyasu <fumiyas@osstech.co.jp>.

Thanks!

Guenther
(cherry picked from commit 95d0f0aab01fdd751841d57cebe6150cd6fdf80c)
(cherry picked from commit 91deb46d6a4dc1e5290e816c40925598e2c6ded9)

14 years agoclikrb5: Prefer krb5_free_keytab_entry_contents to krb5_kt_free_entry.
Jelmer Vernooij [Thu, 4 Jun 2009 21:43:31 +0000 (23:43 +0200)]
clikrb5: Prefer krb5_free_keytab_entry_contents to krb5_kt_free_entry.

Both functions exist in MIT Kerberos >= 1.7, but only
krb5_free_keytab_entry_contents has a prototype.

Part of a fix for bug #6918 (Build breaks with krb5-client-1.7-6.1.i586).
(cherry picked from commit f7f183aba2c53426620bab7e934ce79b516dc4fc)

14 years agos3:idmap_ldap: trim the " chars from the location string in idmap_ldap_db_init
Michael Adam [Fri, 20 Nov 2009 11:44:43 +0000 (12:44 +0100)]
s3:idmap_ldap: trim the " chars from the location string in idmap_ldap_db_init

Fix bug #6910 (idmap_ldap stumbles over idmap backend = ldap:"ldap://ldap1
ldap://ldap2"=.

When idmap backend is specified as
idmap backend = ldap:"ldap://server1 ldap://server2"
then currently "ldap://server1 ldap://server2" was passed to
ldap_initialize including the quotes, leading to an ldap error.

Michael
(cherry picked from commit 67f1d0ac6edecec4efb100ae61bc23bd321f518f)

14 years agos3: fixed krb5 build problem on ubuntu karmic
Andrew Tridgell [Thu, 15 Oct 2009 23:40:50 +0000 (10:40 +1100)]
s3: fixed krb5 build problem on ubuntu karmic

Karmic has MIT krb5 1.7-beta3, which has the symbol
krb5_auth_con_set_req_cksumtype but no prototype for it.

See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=531635
(cherry picked from commit a6e4cb500b4162cae1d906a1762507370b4ee89e)

Part of a fix for bug #6918.
(cherry picked from commit fbaed41c8f583f633673aca2f600c517744d28b5)

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.
(cherry picked from commit b6f1eced1f88b747c4cc8077ebf6bf4370100e09)

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.
(cherry picked from commit 1fe281e25708b999a3e9ef1d5808a79995fbb438)

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.
(cherry picked from commit 31bb625273aac6e3e19f95465580b3bcb1885549)

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.
(cherry picked from commit f871ff6367b7bd1b49e8aab649f614fd511bfa6a)

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.
(cherry picked from commit ed99189208b65bcc1a108c4f1a60c0535e75022c)

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.
(cherry picked from commit 92c618cf167b3e9b18db986b05b2c4188b57f882)

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>
(cherry picked from commit 1791b1cc43ce744c73b473aff0e311acbdf0ee4e)

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.
(cherry picked from commit bbeda1398687b79596769a5d046e1e0f249bd382)

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.
(cherry picked from commit 4fce98ce2578f4bc5063a766fdacbdd5f840e446)

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.
(cherry picked from commit 74b861908edc427d57928a7af0aa7ffd5fdb8d5a)

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
(cherry picked from commit 606ec3a311067377ec3d633ee23155f6800dc73f)

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.
(cherry picked from commit 6eacb25d736d47e1b4572aec5a143b15fbed619e)

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>
(cherry picked from commit 6aa0f05509ec1b8578021051f83627f4ca296ef8)

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>
(cherry picked from commit 8fed5de25979654baf1c62b0346c725b9c6b6866)

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>
(cherry picked from commit 177e5437a75267fdfce8ba693f039a10344e5974)

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>
(cherry picked from commit ff1b2c8725e21ed7fc944020a1c1cc12a80a9bec)

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>
(cherry picked from commit fe57399ac4ddbdc601871579478b996cfc85fcee)

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>
(cherry picked from commit e919c3ac1229eae35614b92a9daebc71e770ca1b)

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>
(cherry picked from commit 0b516e8e9e5b1c4b2ab32b27c37ec708d6afd5d2)

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>
(cherry picked from commit 56de963329bed9a06d27d70dad1d6a21f5f9213a)

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>
(cherry picked from commit e9b932b242cac1061a19da9421b515cacf6c631b)

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!
(cherry picked from commit 223bee1fc5f655adb61db603a5423c8bf4a5f582)

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>
(cherry picked from commit 9ecd9e7dbd6f5f6a07614084207b4891a93ca79b)

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
(cherry picked from commit 96b600d429561f3ea155ffcb51a87c0d74151f52)

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.
(cherry picked from commit 4a6a623affe9e055340fee51d10bc321e175a31b)

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.
(cherry picked from commit 80c18ba49f4751dc104062de6a438f00a7afc39d)

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
(cherry picked from commit 1b2536765b8678ac27c213244b4b301b142a17bd)

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
(cherry picked from commit 6147260f3d258d58f71f3bf32717d50419c68a9e)

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

Karolin
(cherry picked from commit 0e52cec95a7b6040a1dd6e6bb5c5439fd3378a32)

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
(cherry picked from commit 680e39a6795729dfa5e9a748e189f1424324434f)

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>
(cherry picked from commit 95389ecdeb2e1d9d9512210a92c05c7a2d753409)

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.
(cherry picked from commit 68c77a51410bd3a1a0fbe61d6714a9a95b4d82cd)

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.
(cherry picked from commit b0fdc578fb10062c36ce2df18ab37cab57a89692)

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.
(cherry picked from commit 1f604d26d038956a6ddde892610c9b2254268160)

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.
(cherry picked from commit fdc28f6700c97e1276e3d6ae1f242f7daa9bab9e)

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).
(cherry picked from commit d41131948346619be98514331d7059d9bffecac5)

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.
(cherry picked from commit 2cda51b4e6fba53c04f87e4c2dd99a952a63d812)

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
(cherry picked from commit 6c4fe1086020d7bc278d84c56b6cbcc6e3a64b5d)

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
(cherry picked from commit baa2c10b11a960dd70b3d32b4868a303d85ca9b2)

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

Karolin
(cherry picked from commit 113e33cc8d9cb4f68345a39081580db18c0468d8)

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

Karolin
(cherry picked from commit 30064fe10bab01bea629b0564078323725bdea03)

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
(cherry picked from commit f8b2fc49937a72fe64c3e4310141f45fb7d679bf)

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.
(cherry picked from commit a4df4406f12281db60fd6612c6ebf93d77af9152)

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.
(cherry picked from commit faf7197b3b4ac9fefeb0fca31a888c9e84bed92f)

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
(cherry picked from commit 076e24cbaf9009f744978b03ddf6ef593d90e9c1)

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
(cherry picked from commit c6d485583aba69b38b2972224e27edb60c3bf09a)

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
(cherry picked from commit 855ac932cf86272aaf02bf68e1fbf0e0a2902982)

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
(cherry picked from commit 3ca4a7bb33c56aa813247d0ea51863d7ded2e5de)

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)
(cherry picked from commit b50ae28be07b93eef04e6e4b9eeb9fc440e21bd4)

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)
(cherry picked from commit acc5e6012adca290ddc067a4ed25a8161b74250e)

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)
(cherry picked from commit 7e4e12f120c666f31af042ab59fd9478017740ea)

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)
(cherry picked from commit bd2e674cc3ab0fb6f1d988b0b19b6ad5544512b3)

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)
(cherry picked from commit 18ba75b763a2fec8f7b05af0444212990753fe1b)

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)
(cherry picked from commit 0d4d3c8e1e5312a820fcaede65471566e75e272c)

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)
(cherry picked from commit afbe7c3605edcb8f7dfc64399681f23fa947fe57)

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)
(cherry picked from commit 5c2c17ffd62010f4590502f40aee9e40997a647a)

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)
(cherry picked from commit 864c0b58aec55e37cf304b28c762a5259fc0ec67)

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
(cherry picked from commit 41158d10cdad5b923d0bfa608f73c0daf8ccd352)

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)
(cherry picked from commit c968714f7910ba90c2e989e46d18c265d9f9b549)

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
(cherry picked from commit f31c2218c4cd6c04b4899f46c3cc2294c677a688)

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
(cherry picked from commit b6f21ad0732d207c7c831c6094fad25e1469b426)

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.
(cherry picked from commit d984b39d971b7fc8f66e6c5376a2b7a98dfc20d8)

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.
(cherry picked from commit e3601a43421cc51b2b4b6413f547daf6ea9b0b41)

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.
(cherry picked from commit 30cca93674d0dad15ad0ccfaf0d81f94d7d17b4a)

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.
(cherry picked from commit 457cbb36700cf460375cdbea85ada5676e03aa45)

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)).
(cherry picked from commit 28674fcda7aaf839fdf5704e4133a0bd3a3f93a2)

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
(cherry picked from commit cd920dcff320a097bcc46a9468a78cedca6fb2be)

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
(cherry picked from commit e7e1e1887e79e4dcbd8836b775e387751c44f318)

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.
(cherry picked from commit 7fd407fefe92939ecb78400d22aac55590851f70)

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
(cherry picked from commit 39a7cc3c1fd6a3fbb56c8030b6e12962d9fb7181)

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
(cherry picked from commit 7253d96fc205717d9fed973bbcad2884ce656fd9)

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
(cherry picked from commit 983c6f22f411aab2488fe41b5b06174c55108868)

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
(cherry picked from commit 570a8cf5bb6924905b3ad20353d1e7b0ca087748)

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)
(cherry picked from commit 9509763346de5e587a098a90e33a5e38d6d00a78)

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)
(cherry picked from commit a01f0a4025d382c1bc82f4992ea4566db4df3818)

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.
(cherry picked from commit 8d57806544dade748aaac9cc493deb75d4e95735)

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
(cherry picked from commit c70d54508e1cb8f5edbad02a632dfd52d65fd699)

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.
(cherry picked from commit 40da23b6a7dc7acfbdf76a6808b7e50c6c39093e)

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)
(cherry picked from commit 2538df1ea3229ea6d8242b5ae6fdd3d453395609)

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.
(cherry picked from commit 4e854cb52cfb4f3c25c92324c6e7505f1c8290b3)

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)
(cherry picked from commit 1da21f70ec4cebb7ee523dda8abf4100584901f8)

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)
(cherry picked from commit 1310ba934b87b804f435cef2c21e6e65590e4a83)

14 years agoFix for CVE-2009-2906. samba-3.3.8
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.

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

Karolin

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.
===========================================================