samba.git
15 years agoFix bug #Bug 6090 renaming or deleting a "not matching/resolving" symlink is failing.
Jeremy Allison [Wed, 4 Feb 2009 23:35:02 +0000 (15:35 -0800)]
Fix bug #Bug 6090 renaming or deleting a "not matching/resolving" symlink is failing.
Reported by Kukks. Make sure we correctly use LSTAT in all cases where
POSIX pathnames are being used. This matters when dealing with symlinks
pointing to invalid paths being renamed or deleted not all deletes and
renames are done via an nt_create open.
Jeremy.

15 years agoFix bug #6085 - In vfs_default.c change utime( ) call.
Miguel Suarez [Tue, 3 Feb 2009 22:35:19 +0000 (14:35 -0800)]
Fix bug #6085 - In vfs_default.c change utime( ) call.

15 years agoProbably fixes a crash during name resolution when log level >= 10
Ted Percival [Tue, 3 Feb 2009 22:10:20 +0000 (14:10 -0800)]
Probably fixes a crash during name resolution when log level >= 10
and libc segfaults if printf is passed NULL for a "%s" arg
(eg. Solaris).

15 years agos3: Fix 'net rpc join' for users with the SeMachineAccountPrivilege.
Volker Lendecke [Tue, 3 Feb 2009 13:41:49 +0000 (14:41 +0100)]
s3: Fix 'net rpc join' for users with the SeMachineAccountPrivilege.

This used to be commit fda8abac in master.

15 years agoFix bug #6082 - smbd_gpfs_getacl failed: Windows client can´t rename or delete file
Jeremy Allison [Tue, 3 Feb 2009 01:11:15 +0000 (17:11 -0800)]
Fix bug #6082 - smbd_gpfs_getacl failed: Windows client can´t rename or delete file
This fixes the generic rename/delete problem for 3.3.0 and above.
Fixed slightly differently to discussions, user viewable modified
ACLs are not a good idea :-).
Jeremy.

15 years agoAdjust regex to match variable names including underscores
Lars Müller [Mon, 2 Feb 2009 20:38:38 +0000 (21:38 +0100)]
Adjust regex to match variable names including underscores

This is required to get the CIFSUPCALL_PROGS setting extracted from
config.log.

15 years agoConditional install of the cifs.upcall man page
Lars Müller [Mon, 2 Feb 2009 20:12:52 +0000 (21:12 +0100)]
Conditional install of the cifs.upcall man page

Only install the cifs.upcall man page if CIFSUPCALL_PROGS was set while
configure.

15 years agos3 build: Fix "assignment discards qualifiers from pointer target type" warnings
Tim Prouty [Mon, 2 Feb 2009 07:59:53 +0000 (23:59 -0800)]
s3 build: Fix "assignment discards qualifiers from pointer target type" warnings

15 years agodocs: Describe "service" in man mount.cifs.
Karolin Seeger [Mon, 2 Feb 2009 10:46:39 +0000 (11:46 +0100)]
docs: Describe "service" in man mount.cifs.

This fixes bug #5346.
Thanks to the Debian Samba package maintainers for reporting and providing a
patch!

Karolin
(cherry picked from commit 73f4fc1f802f31459b70dba4777d142d00fcdd92)

15 years agofix build with external dns_sd libraries
Björn Jacke [Sun, 1 Feb 2009 02:22:41 +0000 (03:22 +0100)]
fix build with external dns_sd libraries

This used to be commit 16f07280 in master.

15 years agos3:winbind_group: fix "getent group" to allocate new gids.
Michael Adam [Sun, 1 Feb 2009 23:46:57 +0000 (00:46 +0100)]
s3:winbind_group: fix "getent group" to allocate new gids.

"getent group" used to fill the idmap cache with negative
cache entries for unmapped group sids.

Don't pass domain name unconditionally to idmap_sid_to_gid().
idmap_sid_to_gid() only creates new mappings (allocating
idmap backends tdb, tdb2, ldap...) when the domain name passed
in is "".

Note that it is _wrong_ to directly call the idmap_sid_to_gid()
functions here, in the main winbindd. The correct fix would be
to send a sid_to_gid request to winbindd itself, but this needs
more work to prepare the async mechanisms, and we nee a quick
fix for getent passwd now.

Michael

15 years agos3:winbind_user: fix "getent passwd" to allocate new uids.
Michael Adam [Sun, 1 Feb 2009 23:36:59 +0000 (00:36 +0100)]
s3:winbind_user: fix "getent passwd" to allocate new uids.

"getent passwd" used to fill the idmap cache with negative
cache entries for unmapped user sids.

Don't pass domain name unconditionally to idmap_sid_to_[ug]id().
idmap_sid_to_[ug]id() only creates new mappings (allocating
idmap backends tdb, tdb2, ldap...) when the domain name passed
in is "".

Note that it is _wrong_ to directly call the idmap_sid_to_[ug]id()
functions here, in the main winbindd. The correct fix would be
to send a sid_to_[ug]id request to winbindd itself, but this needs
more work to prepare the async mechanisms, and we nee a quick
fix for getent passwd now.

Michael

15 years agos3:winbind_user: move initialization of domain up in winbindd_fill_pwent()
Michael Adam [Sun, 1 Feb 2009 23:35:43 +0000 (00:35 +0100)]
s3:winbind_user: move initialization of domain up in winbindd_fill_pwent()

and streamline logic some

Michael

15 years agoFix bug 5798: "CFLAGS info lost in configure"
Volker Lendecke [Thu, 2 Oct 2008 00:17:04 +0000 (02:17 +0200)]
Fix bug 5798: "CFLAGS info lost in configure"

picked from 9097a67de

Volker

15 years agos3-docs: fix typo in eventlogadm manpage.
Günther Deschner [Thu, 22 Jan 2009 18:31:22 +0000 (19:31 +0100)]
s3-docs: fix typo in eventlogadm manpage.

Guenther
(cherry picked from commit fb7b92abc2bea4b3d91cdd896f02db88065a4b8f)

15 years agoFix coverity CID#117 - resource leak in error path.
Jeremy Allison [Fri, 30 Jan 2009 01:56:08 +0000 (17:56 -0800)]
Fix coverity CID#117 - resource leak in error path.
Jeremy.

15 years agoFix coverity CID#116. Resource leak on error path.
Jeremy Allison [Fri, 30 Jan 2009 01:30:45 +0000 (17:30 -0800)]
Fix coverity CID#116. Resource leak on error path.
Jeremy.

15 years agoFix coverity CID#115. Resource leak in error path.
Jeremy Allison [Fri, 30 Jan 2009 01:27:16 +0000 (17:27 -0800)]
Fix coverity CID#115. Resource leak in error path.
Jeremy.

15 years agoadd Tru64 sub-second resolution timestamp support
Björn Jacke [Thu, 29 Jan 2009 21:59:00 +0000 (22:59 +0100)]
add Tru64 sub-second resolution timestamp support

15 years agoadd configure check for Tru64 sub-second timestamp resolution
Björn Jacke [Thu, 29 Jan 2009 20:59:44 +0000 (21:59 +0100)]
add configure check for Tru64 sub-second timestamp resolution

15 years agoadd missing semicolons
Björn Jacke [Thu, 29 Jan 2009 19:56:51 +0000 (20:56 +0100)]
add missing semicolons

the fixed configure check led to a missing semicolon in the now activated BSD
code. Then this error was even copypasted into the new AIX code. grrr

15 years agoFollowing Björn JACKE's patch, unify the detection of the timespec code in configure...
Jeremy Allison [Thu, 29 Jan 2009 18:47:02 +0000 (10:47 -0800)]
Following Björn JACKE's patch, unify the detection of the timespec code in configure.in, and the application of it in time.c
Jeremy.

15 years agoadd configure check for AIX style sub-second resolution support
Björn Jacke [Wed, 28 Jan 2009 23:33:19 +0000 (00:33 +0100)]
add configure check for AIX style sub-second resolution support

15 years agorather cosmetic fix for failed birthtime configure checks
Björn Jacke [Wed, 28 Jan 2009 23:20:00 +0000 (00:20 +0100)]
rather cosmetic fix for failed birthtime configure checks

15 years agogive configure check "sub-second timestamps without struct timespec" a chance to...
Björn Jacke [Wed, 28 Jan 2009 23:17:12 +0000 (00:17 +0100)]
give configure check "sub-second timestamps without struct timespec" a chance to succeed

15 years agos3:configure: autodetect ctdb/cluster support
Stefan Metzmacher [Wed, 28 Jan 2009 16:36:36 +0000 (17:36 +0100)]
s3:configure: autodetect ctdb/cluster support

We need to make sure ctdb has transaction support
and we autodetect ipv6 support.

metze
(cherry picked from commit 11163720e6f30e83f523c5009e1e60b5cf28cda6)

15 years agos3:ctdbd_conn: canonicalize ips before sending them to ctdbd
Stefan Metzmacher [Wed, 28 Jan 2009 17:55:13 +0000 (18:55 +0100)]
s3:ctdbd_conn: canonicalize ips before sending them to ctdbd

This makes samba work with older ctdb versions.

metze
(cherry picked from commit 7540d13956a8a69d25f6fbbc4f9a3417e91db1d2)

15 years agofix bug #6073: prevent ads_connect() from using SSL unless explicitly requested
Michael Adam [Thu, 29 Jan 2009 12:17:46 +0000 (13:17 +0100)]
fix bug #6073: prevent ads_connect() from using SSL unless explicitly requested

This fixes "net ads join".
It copes with the changed default "ldap ssl = start tls".
A new boolean option "ldap ssl : ads" is added to allow for
explicitly requesting ssl with  ads.

Michael

15 years agoAvoid valgrind errors
Volker Lendecke [Wed, 28 Jan 2009 09:35:35 +0000 (10:35 +0100)]
Avoid valgrind errors

In event handlers, we might destroy other events that are pending in the lists.
We can only run one event safely per select call.

Yes, I've seen these valgrind errors :-)

Jeremy, with ccdd921e61 you had checked in the change to run multiple events.
Do you remember why it was necessary and could not be solved in a different
way?

Volker

15 years agoFix a valgrind error when the socket dies
Volker Lendecke [Tue, 27 Jan 2009 18:41:34 +0000 (19:41 +0100)]
Fix a valgrind error when the socket dies

Don't reference anything that might have been deleted in the async_req_error
call.

15 years agoFix warning (bad handler prototype) and fix detection of dns_sd
Jeremy Allison [Wed, 28 Jan 2009 00:17:55 +0000 (16:17 -0800)]
Fix warning (bad handler prototype) and fix detection of dns_sd
libraries.
Jeremy.

15 years agoFix bug #6069 - Build breaks with too many arguments to
Jeremy Allison [Tue, 27 Jan 2009 23:47:47 +0000 (15:47 -0800)]
Fix bug #6069 - Build breaks with too many arguments to
samba-3.3.0/source/smbd/dnsregister.c:85:event_add_timed().
Jeremy.

15 years agoWHATSNEW: oops, the wrong parameter was reported to have been removed.
Michael Adam [Tue, 27 Jan 2009 21:13:47 +0000 (22:13 +0100)]
WHATSNEW: oops, the wrong parameter was reported to have been removed.

Micheal

15 years agolibreplace: fix detection of netinet/ip.h on solaris 8
Michael Adam [Tue, 27 Jan 2009 14:48:20 +0000 (15:48 +0100)]
libreplace: fix detection of netinet/ip.h on solaris 8

(The test needs to additionally include <netinet/in_systm.h>.)

Michael

15 years agolibreplace: fix bug #6066 - netinet/ip.h present but cannot be compiled
Michael Adam [Tue, 27 Jan 2009 11:13:55 +0000 (12:13 +0100)]
libreplace: fix bug #6066 - netinet/ip.h present but cannot be compiled

under solaris

Michael

15 years agoDocument default of the printing config variable.
Andreas Schneider [Mon, 26 Jan 2009 13:38:34 +0000 (14:38 +0100)]
Document default of the printing config variable.

Signed-off-by: Andreas Schneider <anschneider@suse.de>
(cherry picked from commit d8f15e4efc00b9d509ff5761e9ca8ff5c6f443f7)

15 years agodocs: Adapt version number in new vfs_fileid manpage.
Karolin Seeger [Mon, 26 Jan 2009 13:19:48 +0000 (14:19 +0100)]
docs: Adapt version number in new vfs_fileid manpage.

Karolin

15 years agodocs: Adapt version number in new vfs_shadow_copy2 manpage.
Karolin Seeger [Mon, 26 Jan 2009 13:19:07 +0000 (14:19 +0100)]
docs: Adapt version number in new vfs_shadow_copy2 manpage.

Karolin

15 years agodocs: Add manpage for vfs_shadow_copy2.
Karolin Seeger [Mon, 26 Jan 2009 13:17:23 +0000 (14:17 +0100)]
docs: Add manpage for vfs_shadow_copy2.

Karolin
(cherry picked from commit 512cf0ad50d30fcb35a28b0ef1b859d754f42a99)

15 years agos3-eventlog: fix various invalid memcpy in read_package_entry().
Günther Deschner [Sat, 24 Jan 2009 01:10:47 +0000 (02:10 +0100)]
s3-eventlog: fix various invalid memcpy in read_package_entry().

Guenther

15 years agos3-eventlog: fix buffer allocation in eventlog read call.
Günther Deschner [Sat, 24 Jan 2009 01:07:40 +0000 (02:07 +0100)]
s3-eventlog: fix buffer allocation in eventlog read call.

This broke with f6fa3080fee1b20df9f1968500840a88cf0ee592 back in April 2007...

Guenther

15 years agodocs: Fix formatting issue in man libsmbclient.
Karolin Seeger [Fri, 23 Jan 2009 12:02:46 +0000 (13:02 +0100)]
docs: Fix formatting issue in man libsmbclient.

Karolin
(cherry picked from commit aa2fb0efb7ce2bc732569b4baf20c57375fdce59)

15 years agoWHATSNEW: Add note about libsmbclient changes.
Karolin Seeger [Fri, 23 Jan 2009 10:51:56 +0000 (11:51 +0100)]
WHATSNEW: Add note about libsmbclient changes.

Karolin

15 years agolib/replace: add defines to let the callers find out if pwrite and pread are thread...
Stefan Metzmacher [Thu, 22 Jan 2009 10:52:54 +0000 (11:52 +0100)]
lib/replace: add defines to let the callers find out if pwrite and pread are thread/fork safe

metze
(cherry picked from commit 7fc7ee9331d0539359ad88c527f59d5fdf212209)

15 years agoWHATSNEW: Add "Changes since" sections of pre releases and RCs.
Karolin Seeger [Fri, 23 Jan 2009 10:09:07 +0000 (11:09 +0100)]
WHATSNEW: Add  "Changes since" sections of pre releases and RCs.

Karolin

15 years agoWHATSNEW: Update changes since 3.3.0rc2.
Karolin Seeger [Fri, 23 Jan 2009 09:36:25 +0000 (10:36 +0100)]
WHATSNEW: Update changes since 3.3.0rc2.

Karolin

15 years agoApply same logic fix for #4308 Excel save operation corrupts file ACLs
Jeremy Allison [Fri, 23 Jan 2009 00:22:04 +0000 (16:22 -0800)]
Apply same logic fix for #4308 Excel save operation corrupts file ACLs
to NFSv4 ACL code as this uses the same flawed logic as posix_acls.c.
Jeremy.

15 years agoFix logic error in try_chown - we shouldn't arbitrarily chown
Jeremy Allison [Fri, 23 Jan 2009 00:09:26 +0000 (16:09 -0800)]
Fix logic error in try_chown - we shouldn't arbitrarily chown
to ourselves unless that was passed in.
Jeremy.

15 years agoSecond part of the attemt to fix #4308 - Excel save operation corrupts file ACLs.
Jeremy Allison [Thu, 22 Jan 2009 22:32:32 +0000 (14:32 -0800)]
Second part of the attemt to fix #4308 - Excel save operation corrupts file ACLs.
If the chown succeeds then the ACL set should also. Ensure this is the case
(refactor some of this code to make it simpler to read also).
Jeremy.

15 years agoAnother attempt to fix bug #4308 - Excel save operation corrupts file ACLs.
Jeremy Allison [Thu, 22 Jan 2009 18:59:14 +0000 (10:59 -0800)]
Another attempt to fix bug #4308 - Excel save operation corrupts file ACLs.
Simo is completely correct. We should be doing the chown *first*, and fail the
ACL set if this fails. The long standing assumption I made when writing the
initial POSIX ACL code was that Windows didn't control who could chown a file
in the same was as POSIX. In POSIX only root can do this whereas I wasn't sure
who could do this in Windows at the time (I didn't understand the privilege
model). So the assumption was that setting the ACL was more important (early
tests showed many failed ACL set's due to inability to chown). But now we have
privileges in smbd, and we must always fail an ACL set when we can't chown
first. The key that Simo noticed is that the CREATOR_OWNER bits in the ACL
incoming are relative to the *new* owner, not the old one. This is why the old
user owner disappears on ACL set - their access was set via the USER_OBJ in the
creator POSIX ACL and when the ownership changes they lose their access.

Patch is simple - just ensure we do the chown first before evaluating the
incoming ACL re-read the owners. We already have code to do this it just wasn't
rigorously being applied.
Jeremy.

15 years agoMemory leaks and other fixes found by Coverity
todd stecher [Thu, 22 Jan 2009 18:17:37 +0000 (10:17 -0800)]
Memory leaks and other fixes found by Coverity

15 years agobuild-docs: cleanup exit of the script
Michael Adam [Wed, 21 Jan 2009 14:10:10 +0000 (15:10 +0100)]
build-docs: cleanup exit of the script

exit in the directory where it was called using pushd/popd.

Michael
(cherry picked from commit b319549f129b1c79afc9bfd4a84f2730b96d69a3)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agos3:docs: clean build/catalog.xml in "make clean"
Michael Adam [Wed, 21 Jan 2009 14:09:46 +0000 (15:09 +0100)]
s3:docs: clean build/catalog.xml in "make clean"

Michael
(cherry picked from commit 5e21fc3506f2ba7b1135b1acad2697dfb86b5df0)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agos3:docs: clean generated .png images in "make clean"
Michael Adam [Wed, 21 Jan 2009 14:09:12 +0000 (15:09 +0100)]
s3:docs: clean generated .png images in "make clean"

Michael
(cherry picked from commit 9b32e839bec8611c30745607a3a6b124d5b34c01)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agos3:docs: clarify explanation of the allocator in the idmap_ldap manpage
Michael Adam [Wed, 21 Jan 2009 09:56:34 +0000 (10:56 +0100)]
s3:docs: clarify explanation of the allocator in the idmap_ldap manpage

Michael
(cherry picked from commit 816934faa8bbe53dd299bc5e39f471eafdddefa8)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agos3:docs: clarify explanation of the allocator in the idmap_tdb manpage
Michael Adam [Wed, 21 Jan 2009 09:55:19 +0000 (10:55 +0100)]
s3:docs: clarify explanation of the allocator in the idmap_tdb manpage

Michael
(cherry picked from commit 665b5dc70333ca36129a6fe06645bd9faa4f2350)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agos3:docs: clarify explanation of allocator in the idmap_tdb2 manpage
Michael Adam [Wed, 21 Jan 2009 09:49:48 +0000 (10:49 +0100)]
s3:docs: clarify explanation of allocator in the idmap_tdb2 manpage

Michael
(cherry picked from commit 65b79200e46751278c125ad260d899d10d6466a2)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agos3:docs: fix copy and paste error in the idmap_tdb2 manpage
Michael Adam [Wed, 21 Jan 2009 09:38:49 +0000 (10:38 +0100)]
s3:docs: fix copy and paste error in the idmap_tdb2 manpage

Michael
(cherry picked from commit bd252ad665547d2ad012725ccb18720e160d221f)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agos3:docs: add a manpage for idmap_tdb2
Michael Adam [Tue, 20 Jan 2009 23:56:03 +0000 (00:56 +0100)]
s3:docs: add a manpage for idmap_tdb2

Michael
(cherry picked from commit 84f2b2d731fb7d97c98414196bf96ee94ea88bb3)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agos3:docs: update the idmap_ldap manpage to reflect current facts.
Michael Adam [Tue, 20 Jan 2009 23:13:29 +0000 (00:13 +0100)]
s3:docs: update the idmap_ldap manpage to reflect current facts.

Michael
(cherry picked from commit 7c5621b6e09d9ae3fe936a86e46d1b0f35906e6d)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agos3:docs: update the idmap_tdb manpage to reflect current facts.
Michael Adam [Tue, 20 Jan 2009 23:06:10 +0000 (00:06 +0100)]
s3:docs: update the idmap_tdb manpage to reflect current facts.

Michael
(cherry picked from commit 32be66b19da07983670002d1b2b5bc80cf0c8d16)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agos3:docs: fix ommission in fix of (real)distclean targets
Michael Adam [Wed, 21 Jan 2009 10:47:46 +0000 (11:47 +0100)]
s3:docs: fix ommission in fix of (real)distclean targets

Michael
(cherry picked from commit 37412017c5dd2f05a7f4bbe0410a6e00ce4805e5)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agos3:create-tarball: also include the VENDOR_PATCH in the version
Michael Adam [Wed, 21 Jan 2009 10:45:23 +0000 (11:45 +0100)]
s3:create-tarball: also include the VENDOR_PATCH in the version

Michael
(cherry picked from commit ce3e34d37ce5592e0268be5d16240387d971585a)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agos3:docs: fix distclean target and add realdistclean target
Michael Adam [Wed, 21 Jan 2009 10:41:14 +0000 (11:41 +0100)]
s3:docs: fix distclean target and add realdistclean target

- remove stuff created by configure in distclean
- remove stuff created by autoconf in realdistclean

Michael
(cherry picked from commit 65c92fea3d18c3520ff2a1e53a0c5c8825c9788f)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agobuild_docs: Use 'make distclean' instead of 'make clean'.
Karolin Seeger [Wed, 21 Jan 2009 10:37:30 +0000 (11:37 +0100)]
build_docs: Use 'make distclean' instead of 'make clean'.

This fixes bug #6058.
Thanks to Christian Perrier for reporting!

Karolin

15 years agoWHATSNEW: Update changes.
Karolin Seeger [Tue, 20 Jan 2009 10:35:55 +0000 (11:35 +0100)]
WHATSNEW: Update changes.

Karolin

15 years agosocket_wrapper: fix PCAP support broken by aaea68791cfea45c6fa69abc93ad6d0e832d0283
Stefan Metzmacher [Tue, 20 Jan 2009 00:37:53 +0000 (16:37 -0800)]
socket_wrapper: fix PCAP support broken by aaea68791cfea45c6fa69abc93ad6d0e832d0283

We should not close the fd after writing the first packet.

metze

15 years agos3: reinit_after_fork() should reinit the event context before the
Stefan Metzmacher [Tue, 20 Jan 2009 00:26:00 +0000 (16:26 -0800)]
s3: reinit_after_fork() should reinit the event context before the
messaging context

Because messaging_reinit() may add events to the event context, which will
removed by event_context_reinit().

metze

15 years agoAvoid flooding of syslog with failing pam_putenv messages.
Andreas Schneider [Mon, 19 Jan 2009 15:26:07 +0000 (16:26 +0100)]
Avoid flooding of syslog with failing pam_putenv messages.

Signed-off-by: Andreas Schneider <anschneider@suse.de>
Signed-off-by: Günther Deschner <gd@samba.org>
15 years agoS3-ByExample: Use 'winbindd -D' instead of 'winbindd -B'.
Karolin Seeger [Mon, 19 Jan 2009 09:22:46 +0000 (10:22 +0100)]
S3-ByExample: Use 'winbindd -D' instead of 'winbindd -B'.

The option '-B' does not exist at all.

Thanks to Jason Ellison for reporting!

Karolin
(cherry picked from commit 4b26c7bbf4fe93f5ffb92d3f04012be290be25be)

15 years agoS3-HowTo: Change 'winbindd -B' to 'winbindd -D'.
Karolin Seeger [Mon, 19 Jan 2009 07:55:30 +0000 (08:55 +0100)]
S3-HowTo: Change 'winbindd -B' to 'winbindd -D'.

There is no option '-B' at all.

Thanks to Jason Ellison for reporting!

Karolin
(cherry picked from commit 7c1e08518bfbe054db270e72476c642d5db93c0a)

15 years agoDetermine case sensitivity based on file system attributes.
Derrell Lipman [Sat, 17 Jan 2009 18:21:54 +0000 (13:21 -0500)]
Determine case sensitivity based on file system attributes.

- Most of the time, we can determine from the file system we're connecting to
  whether it supports case sensitivity. In those cases, we now set the
  internal case sensitivity flag automatically. For those cases where the
  request to retrieve file system attributes fails, we'll use the
  user-specified option value.

Derrell

15 years agos3:cluster: fix ctdb ipv6 support
Stefan Metzmacher [Wed, 14 Jan 2009 11:09:46 +0000 (12:09 +0100)]
s3:cluster: fix ctdb ipv6 support

We need to use CTDB_CONTROL_TCP_CLIENT instead of CTDB_CONTROL_TCP_ADD.

CTDB_CONTROL_TCP_CLIENT has support for 2 modes in newer ctdb versions:

- with struct ctdb_control_tcp it only supports ipv4.
- with struct ctdb_control_tcp_addr it supports ipv4 and ipv6.

You need new header files which defines struct ctdb_control_tcp_addr,
but at runtime it should be fine to work against older
ctdb versions (<= 1.0.68).

metze
(cherry picked from commit dc6edf1ab4ae8e3fb3ef40b93135ff0ef5407e12)

15 years agos3:docs: vfs_fileid manpage
Stefan Metzmacher [Wed, 14 Jan 2009 10:52:01 +0000 (11:52 +0100)]
s3:docs: vfs_fileid manpage

metze
(cherry picked from commit 6a94b7b9270f3d69595b93e2632051c9842645c9)

15 years agos3:vfs_fileid: readd "fileid:algorithm" as option.
Stefan Metzmacher [Wed, 14 Jan 2009 12:59:09 +0000 (13:59 +0100)]
s3:vfs_fileid: readd "fileid:algorithm" as option.

"fileid:mapping" is still supported as fallback.

metze
(cherry picked from commit 554a89df0cf6d9832778e2913f9fe50b78baeedc)

15 years ago[Bug 6022] smbc_urlencode and smbc_urldecode were not exported
Derrell Lipman [Sat, 17 Jan 2009 01:30:11 +0000 (20:30 -0500)]
[Bug 6022] smbc_urlencode and smbc_urldecode were not exported

- Since the revamp of libsmbclient, there has still been an external
  declaration for smbc_urlencode and smbc_urldecode in libsmbclient.h, yet
  those functions were renamed and made private. The two choices were to
  remove the function names from libsmbclient.h or to make them public
  again. The reported requested that they be public. This commit makes it so.

Derrell

15 years agoTreat file names in POSIX-like case-sensitive fashion by default
Derrell Lipman [Fri, 16 Jan 2009 20:55:08 +0000 (15:55 -0500)]
Treat file names in POSIX-like case-sensitive fashion by default

*** THIS COMMIT CAUSES A CHANGE OF DEFAULT BEHAVIOR IN libsmbclient!!! ***

- libsmbclient now calls cli_set_case_sensitive() for a new CLI. By default,
  it requests case-sensitive, but the old behavior of case-insensitive can be
  requested with smbc_setOptionCaseSensitive(context, False);

  The change of behavior is considered a bug fix, as it was previously
  possible to accidentally overwrite a file that had the same case-insensitive
  name but a different case-sensitive name as a previously-existing file,
  while creating a new file.

Derrell

15 years agoMerge branch 'v3-3-test' of ssh://jra@git.samba.org/data/git/samba into v3-3-test
Jeremy Allison [Fri, 16 Jan 2009 20:25:54 +0000 (12:25 -0800)]
Merge branch 'v3-3-test' of ssh://jra@git.samba.org/data/git/samba into v3-3-test

15 years agoFix a segfault if ? is there but the options are NULL. This is the case if SMBC_parse...
Andreas Schneider [Fri, 16 Jan 2009 20:24:58 +0000 (12:24 -0800)]
Fix a segfault if ? is there but the options are NULL. This is the case if SMBC_parse_path is called by SMBC_stat_ctx.

15 years ago"First thing, kill all the language lawyers" :-). Ensure possible insane compilers
Jeremy Allison [Fri, 16 Jan 2009 19:55:57 +0000 (11:55 -0800)]
"First thing, kill all the language lawyers" :-). Ensure possible insane compilers
can't kill us later.
Jeremy.

15 years agoads_connect: Return immediately on a failed GC connection.
Gerald (Jerry) Carter [Fri, 16 Jan 2009 18:06:49 +0000 (12:06 -0600)]
ads_connect: Return immediately on a failed GC connection.

ads_connect_gc() feeds an explicit server to ads_connect().  However, if the
resulting connection fails, the latter function was attempting to find a DC
on its own and continuing the connection.  This resulting in GC searches being
sent over a connection using port 389 which would fail when using the base
search suffix outside of the domain naming context.

The fix is to fail immediately in ads_connect() since the GC lookup ordering
is handled already in ads_connect_gc().

(was commit 073e9f42f0c5f5de5d736ec7843d80a274c891ce in master)

15 years agoFix bug #6040 - Missing <th> header in Status page.
Jeremy Allison [Thu, 15 Jan 2009 23:55:29 +0000 (15:55 -0800)]
Fix bug #6040 -  Missing <th> header in Status page.
Based on a patch from pkg-samba-maint@lists.alioth.debian.org.
Jeremy.

15 years agoMerge branch 'v3-3-test' of ssh://jra@git.samba.org/data/git/samba into v3-3-test
Jeremy Allison [Thu, 15 Jan 2009 23:53:23 +0000 (15:53 -0800)]
Merge branch 'v3-3-test' of ssh://jra@git.samba.org/data/git/samba into v3-3-test

15 years agoAllow reinit_after_fork to be called safely from within swat and other binaries that...
Jeremy Allison [Thu, 15 Jan 2009 23:50:50 +0000 (15:50 -0800)]
Allow reinit_after_fork to be called safely from within swat and other binaries that don't have
an event context or a msg context. Fixes crash bug in swat.
Jeremy.

15 years agopackaging(RHEL-CTDB): export CC - really use ccache...
Stefan Metzmacher [Thu, 15 Jan 2009 12:46:38 +0000 (13:46 +0100)]
packaging(RHEL-CTDB): export CC - really use ccache...

metze

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agoFix bug #6040 - Calling Samba print server with an aliased DNS-name fails.
Jeremy Allison [Thu, 15 Jan 2009 18:41:01 +0000 (10:41 -0800)]
Fix bug #6040 - Calling Samba print server with an aliased DNS-name fails.
Jeremy.

15 years agoFix bug #6035 - Possible race between fcntl F_SETLKW and alarm delivery.
Jeremy Allison [Wed, 14 Jan 2009 21:15:59 +0000 (13:15 -0800)]
Fix bug #6035 - Possible race between fcntl F_SETLKW and alarm delivery.
Jeremy.

15 years agoFix bug in get_dc_name_via_netlogon(), null pointer refrence.
Bo Yang [Wed, 14 Jan 2009 19:48:16 +0000 (11:48 -0800)]
Fix bug in get_dc_name_via_netlogon(), null pointer refrence.

15 years agoDon't send message to any other child in child process.
Bo Yang [Wed, 14 Jan 2009 19:16:00 +0000 (11:16 -0800)]
Don't send message to any other child in child process.

15 years agoFrom boyang - ensure we never "return" from a forked child, always _exit().
Jeremy Allison [Tue, 13 Jan 2009 23:42:29 +0000 (15:42 -0800)]
From boyang - ensure we never "return" from a forked child, always _exit().
Jeremy.

15 years agoFix bug #6019 File corruption in Clustered SMB/NFS environment managed via CTDB
Jeremy Allison [Tue, 13 Jan 2009 19:15:00 +0000 (11:15 -0800)]
Fix bug #6019 File corruption in Clustered SMB/NFS environment managed via CTDB
Jeremy.

15 years agoDeprecate the "share modes" parameter to address bug #6024, swat disagrees with smbst...
Jeremy Allison [Tue, 13 Jan 2009 00:27:31 +0000 (16:27 -0800)]
Deprecate the "share modes" parameter to address bug #6024, swat disagrees with smbstatus as to share mode with share modes = No set in samba.
Jeremy.

15 years agos3:libsmb: handle the smb signing states the same in the krb5 and ntlmssp cases
Stefan Metzmacher [Mon, 12 Jan 2009 11:32:46 +0000 (12:32 +0100)]
s3:libsmb: handle the smb signing states the same in the krb5 and ntlmssp cases

SMB signing works the same regardless of the used auth mech.

We need to start with the temp signing ("BSRSPYL ")
and the session setup response with NT_STATUS_OK
is the first signed packet.

Now we set the krb5 session key if we got the NT_STATUS_OK
from the server and then recheck the packet.

All this is needed to make the fallback from krb5 to
ntlmssp possible. This commit also resets the cli->vuid
value to 0, if the krb5 auth didn't succeed. Otherwise
the server handles NTLMSSP packets as krb5 packets.

The restructuring of the SMB signing code is needed to
make sure the krb5 code only starts the signing engine
on success. Otherwise the NTLMSSP fallback could not initialize
the signing engine (again).

metze
(cherry picked from commit 7d9fd64f38aa5821b38c1223cf87979fc87bfb71)

15 years agoEven for srclen == 0 we have to return something
Volker Lendecke [Sat, 10 Jan 2009 16:59:43 +0000 (17:59 +0100)]
Even for srclen == 0 we have to return something

This fixes a regression reported by Corinna Vinschen <corinna@vinschen.de>

Thanks,

Volker

15 years agoDon't set child->requests to NULL in parent after fork
Bo Yang [Sat, 10 Jan 2009 22:09:48 +0000 (14:09 -0800)]
Don't set child->requests to NULL in parent after fork

15 years agos3/smbpasswd: Check if Unix account exists before asking for the password.
Karolin Seeger [Sat, 10 Jan 2009 03:39:46 +0000 (19:39 -0800)]
s3/smbpasswd: Check if Unix account exists before asking for the password.

Admins shouldn't have to type in the password twice when the passdb account
cannot be created because the Unix account is missing.

Karolin

15 years agodocs: Improve man mount.cifs.
Karolin Seeger [Fri, 9 Jan 2009 10:22:00 +0000 (11:22 +0100)]
docs: Improve man mount.cifs.

Add hint about specifying the workgroup in the credentials file.
Whitespace cleanup.

This fixes bug #4541.
Patch based on proposed patch from Christian Perrier <bubulle@debian.org>.
Thanks for reporting and providing a patch!

Karolin
(cherry picked from commit 1f7e09ea542df3a2f5f553c0cb11a39c74712950)

15 years agos3: Remove a few unnecessary checks from the streams depot module and fix to work...
Tim Prouty [Fri, 9 Jan 2009 01:21:08 +0000 (17:21 -0800)]
s3: Remove a few unnecessary checks from the streams depot module and fix to work with NTRENAME

Handling of error codes when renaming a file to a stream and a stream
to a file is now done in rename_internals_fsp.

The NTRENAME stream path only passes in the stream name, so the new
base can now be different from the old base.

15 years agos3: Remove a few unnecessary checks from the streams xattr module
Tim Prouty [Fri, 9 Jan 2009 01:20:14 +0000 (17:20 -0800)]
s3: Remove a few unnecessary checks from the streams xattr module

Handling of error codes when renaming a file to a stream and a stream
to a file is now done in rename_internals_fsp.

The NTRENAME stream path only passes in the stream name, so the new
base can now be different from the old base.

15 years agos3: Allow renames of streams via NTRENAME and fix stream error codes on rename
Tim Prouty [Fri, 9 Jan 2009 01:19:24 +0000 (17:19 -0800)]
s3: Allow renames of streams via NTRENAME and fix stream error codes on rename

The test_streams_rename2 test in RAW-STREAMS verifies these changes