samba.git
15 years agos3:events: change event_add_timed() prototype to match samba4
Stefan Metzmacher [Tue, 6 Jan 2009 19:22:08 +0000 (11:22 -0800)]
s3:events: change event_add_timed() prototype to match samba4

metze
(cherry picked from commit a632a1bcd694cff03de3456dac582800e94c451e)

15 years agos3/swat: Fix creation of the first share using SWAT.
Volker Lendecke [Tue, 6 Jan 2009 14:13:43 +0000 (15:13 +0100)]
s3/swat: Fix creation of the first share using SWAT.

This fixes bug #5965.
(cherry picked from commit f76614169f1e0a932cf2895702cfa9e8a5735875)

15 years agodocs: Improve description of the share commands in man smb.conf.
Karolin Seeger [Tue, 6 Jan 2009 11:26:23 +0000 (12:26 +0100)]
docs: Improve description of the share commands in man smb.conf.

-Correct the parameter names.
-Fix typos.
-Fix related parameters.

This fixes bug #6008.
Thanks to TAKAHASHI Motonobu <monyo@samba.gr.jp> for reporting!

Karolin
(cherry picked from commit 8b7f66c548ed170d2dab0c91ccff4aca00f4b52d)
(cherry picked from commit 6f38786aa878bd1a7fc10069773c19b28437fbbb)

15 years agodocs: Fix example in man vfs_recycle.
Karolin Seeger [Tue, 6 Jan 2009 09:26:37 +0000 (10:26 +0100)]
docs: Fix example in man vfs_recycle.

This fixes bug #6001.
Thanks to TAKAHASHI Motonobu <monyo@samba.gr.jp> for reporting!

Karolin
(cherry picked from commit 9f44a17c3bf36067d04cec036c3e529798932cd7)
(cherry picked from commit 5e073807f7c4679dd299a2b8f3e2643dc1c82405)

15 years agoset entry->refresh_time to make ccache_regain_all_now() work correctly.
Bo Yang [Tue, 6 Jan 2009 05:12:03 +0000 (21:12 -0800)]
set entry->refresh_time to make ccache_regain_all_now() work correctly.
(cherry picked from commit 35c761988df970011722e1cc8dd5ff11dd6d5527)

15 years agos3:events: get rid of the stupid set_event_dispatch_time() function
Stefan Metzmacher [Tue, 6 Jan 2009 05:06:25 +0000 (21:06 -0800)]
s3:events: get rid of the stupid set_event_dispatch_time() function

metze
(cherry picked from commit ff8ff5379455eafdd11fbd45d31602cf2a5fb57d)

15 years agos3:events: get rid of the stupid cancel_named_event() function
Stefan Metzmacher [Tue, 6 Jan 2009 05:05:48 +0000 (21:05 -0800)]
s3:events: get rid of the stupid cancel_named_event() function

metze
(cherry picked from commit 57b419fac63baa6a2b14e8800e04af75b0a6b7cc)

15 years agos3:events: move prototypes to event.h
Stefan Metzmacher [Tue, 6 Jan 2009 05:05:20 +0000 (21:05 -0800)]
s3:events: move prototypes to event.h

metze
(cherry picked from commit 0add7303ea7cb71c070814306c7d6fc97c7c04c2)

15 years agos3:events: remove unused stuff
Stefan Metzmacher [Tue, 6 Jan 2009 04:55:24 +0000 (20:55 -0800)]
s3:events: remove unused stuff

metze
(cherry picked from commit 550e0e499a44218694e56243a4898ba7d460314d)

15 years agos3:winbindd: regain tickets for all ccache entries, when we go online
Stefan Metzmacher [Tue, 6 Jan 2009 04:54:03 +0000 (20:54 -0800)]
s3:winbindd: regain tickets for all ccache entries, when we go online

set_event_dispatch_time() is stupid by design and only handles
the first event with a given name.

metze
(cherry picked from commit e1f794a246feab1f100abd961e0e576f0b85453a)

15 years agos3:winbindd: cancel all ccache entry events and not just one
Stefan Metzmacher [Tue, 6 Jan 2009 04:40:19 +0000 (20:40 -0800)]
s3:winbindd: cancel all ccache entry events and not just one

cancel_named_event() is stupid by design and also only cancels
one single event.

metze
(cherry picked from commit d605077effaf265ea4df66fcaf9007004db61acc)

15 years agos3:winbindd: recreate the per domain check_online_event without relying on global...
Stefan Metzmacher [Tue, 6 Jan 2009 04:35:03 +0000 (20:35 -0800)]
s3:winbindd: recreate the per domain check_online_event without relying on global state

set_event_dispatch_time() is stupid by design and just picks the first
event with the given name.

metze
(cherry picked from commit bd1f723a14578792f4b8fda214096d66d57da208)

15 years agos3:winbindd: rename fd_event => winbindd_fd_event
Stefan Metzmacher [Tue, 6 Jan 2009 04:20:31 +0000 (20:20 -0800)]
s3:winbindd: rename fd_event => winbindd_fd_event

It's really confusing to have two versions of 'fd_event'

metze
(cherry picked from commit edac3f78c27a59a6c493f718b6b65ed7ef2a675d)

15 years agos3:winbindd: move WINBINDD_CCACHE_ENTRY and WINBINDD_MEMORY_CREDS to winbindd.h
Stefan Metzmacher [Tue, 6 Jan 2009 04:12:30 +0000 (20:12 -0800)]
s3:winbindd: move WINBINDD_CCACHE_ENTRY and WINBINDD_MEMORY_CREDS to winbindd.h

metze
(cherry picked from commit 5605f478f2a5682f3410d109c0be233e7527335f)

15 years agoFix broken krb5 refresh chain
Bo Yang [Tue, 6 Jan 2009 04:05:53 +0000 (20:05 -0800)]
Fix broken krb5 refresh chain

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit d6eb7f1af2f4097085a4a14e9e88327f039bdf29)

15 years agoclean event context after child is forked.
Bo Yang [Tue, 6 Jan 2009 00:19:48 +0000 (16:19 -0800)]
clean event context after child is forked.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit ada3145ffe40dfbe89f968e844bfb139a58eab5d)

15 years agoAttempt to fix crash seen with new CUPS async printcap loading code.
Jeremy Allison [Mon, 5 Jan 2009 19:42:52 +0000 (11:42 -0800)]
Attempt to fix crash seen with new CUPS async printcap loading code.
Karolin please pull for 3.3.0.
Jeremy.
(cherry picked from commit 9f5c7f55abae9278d4e7ca2f359da1b52d0409a2)

15 years agoexamples: Avoid bashism in perfcount.init.
Karolin Seeger [Mon, 5 Jan 2009 15:33:00 +0000 (16:33 +0100)]
examples: Avoid bashism in perfcount.init.

This fixes bug #6000.
Thanks to the Debian Samba package maintainers for providing the patch!
Remove trailing whitespaces.

Karolin
(cherry picked from commit 2e09746a4db4186c9d648370b9004971bc18e5c9)

15 years agoRevert "examples: Avoid bashism in perfcount.init."
Karolin Seeger [Mon, 5 Jan 2009 15:35:50 +0000 (16:35 +0100)]
Revert "examples: Avoid bashism in perfcount.init."

This reverts commit a1bf1f1819ab184682327583d05b0258db8856ef.

15 years agoWHATSNEW: Update changes since 3.3.0rc2.
Karolin Seeger [Mon, 5 Jan 2009 15:16:18 +0000 (16:16 +0100)]
WHATSNEW: Update changes since 3.3.0rc2.

Karolin
(cherry picked from commit 39f3af99add8aa1f32bc537fbcb85377d0c41111)

15 years agoFix bug 6014 -- mget shouldn't segfault without arguments
Volker Lendecke [Mon, 5 Jan 2009 14:47:19 +0000 (15:47 +0100)]
Fix bug 6014 -- mget shouldn't segfault without arguments

Thanks to kevin.paulus@mtm.kuleuven.be for the bug report

Volker
(cherry picked from commit 9c80ce9b4f3d2b130cf58610f36ed46a7e17baf4)

15 years agoexamples: Avoid bashism in perfcount.init.
Karolin Seeger [Mon, 5 Jan 2009 13:54:28 +0000 (14:54 +0100)]
examples: Avoid bashism in perfcount.init.

This fixes bug #6000.
Thanks to the Debian Samba package maintainers for providing the patch!
Remove trailing whitespaces.

Karolin
(cherry picked from commit 73875cd344608b591fa884ab99b5f3a10550c149)
(cherry picked from commit e273c07e94ee607bbf05b6fa66cf3cea13fe4502)

15 years agodocs: Document the -g option of smbclient.
Karolin Seeger [Mon, 5 Jan 2009 13:39:59 +0000 (14:39 +0100)]
docs: Document the -g option of smbclient.

This fixes bug #6013.
Thanks to the Debian Samba packages maintainers for reporting!

Karolin
(cherry picked from commit 6752d78e946b2c4278e2deba325c76fb7ffbc06a)
(cherry picked from commit e6abdbde9b67801d46c9d331045d155717e8b241)

15 years agoFix a bad memleak in vfs_full_audit
Volker Lendecke [Mon, 5 Jan 2009 12:41:39 +0000 (13:41 +0100)]
Fix a bad memleak in vfs_full_audit
(cherry picked from commit 5abbfc9c41d197a57cad6d0272c9c2dfef377f93)

15 years agoFix bug 6012: Add "get_real_filename" to full_audit
Volker Lendecke [Mon, 5 Jan 2009 11:58:23 +0000 (12:58 +0100)]
Fix bug 6012: Add "get_real_filename" to full_audit

Thanks to Hodur <coil93@gmail.com> for testing!

Volker
(cherry picked from commit 83f6ef1f5d1d0d86032d00d3337c415be746dda4)

15 years agosmbd: prevent access to root filesystem when connecting with empty service name
Michael Adam [Thu, 18 Dec 2008 17:01:55 +0000 (18:01 +0100)]
smbd: prevent access to root filesystem when connecting with empty service name

This only applies to a setup with "registry shares = yes"

Michael
(cherry picked from commit 288fa94ac7cfdf7457b5098c33fc840bed3d5410)
(cherry picked from commit e85526b184e66f86b7faa9d0a37288a09c12c19e)
(cherry picked from commit 5dfa403498c4f4a0eb05a5331b81326832ddd63f)

15 years agoFix bug #6009 - Setting "min receivefile size = 1" breaks writes.
Jeremy Allison [Sun, 4 Jan 2009 19:46:28 +0000 (11:46 -0800)]
Fix bug #6009 - Setting "min receivefile size = 1" breaks writes.
Karolin please pull for 3.3.0. Thanks !
Jeremy.
(cherry picked from commit b8fef4ce2ed627387a22dfb5be1fa59c2e486aff)

15 years agoAlternative fix for 45db33e73 and 0d443ae7931
Volker Lendecke [Fri, 2 Jan 2009 13:53:26 +0000 (14:53 +0100)]
Alternative fix for 45db33e73 and 0d443ae7931

Simo is right, we need to ask passdb first. At least this fixes a nasty to find
NT_STATUS_ACCESS_DENIED problem in the build farm for the test run I just did
on host "opi".

Michael, can you re-check if this also fixes the error you found, leading to
the two fixes?

Thanks,

Volker
(cherry picked from commit f2535d7b94cfc6bec05127576186d93531304005)

15 years agoRevert "Fix uid_to_sid mapping when the idmap cache is empty."
Volker Lendecke [Fri, 2 Jan 2009 14:02:03 +0000 (15:02 +0100)]
Revert "Fix uid_to_sid mapping when the idmap cache is empty."

This reverts commit d4bc1f8d79929dc1a1d06e92eaf85923a1848e6f.
(cherry picked from commit 605f5911febc25f40c697d4fc1097584ba49021e)

15 years agoRevert "idmap: Remove passd check from idmap_backends_unixid_to_sid()."
Volker Lendecke [Fri, 2 Jan 2009 14:01:47 +0000 (15:01 +0100)]
Revert "idmap: Remove passd check from idmap_backends_unixid_to_sid()."

This reverts commit 3d22b77f1ac5e8f83d1063d87c68e60655a3ed6b.
(cherry picked from commit 860da910633415d1a3c850ed977a6635d28a7bf2)

15 years agopackaging(RHEL): fix typo in [u]mount.cifs installation
Michael Adam [Wed, 17 Dec 2008 21:27:39 +0000 (22:27 +0100)]
packaging(RHEL): fix typo in [u]mount.cifs installation

Michael
(cherry picked from commit 835108bcf84a5f47f46d237c7a93c572348125a1)

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 71c74725bce403e36e4dc38287802c95b8d4de66)
(cherry picked from commit cfc140d3924dd6be893d242ce5df22e2128f09f8)

15 years agopackaging(RHEL): fix build of [u]mount.cifs
Michael Adam [Wed, 17 Dec 2008 17:56:34 +0000 (18:56 +0100)]
packaging(RHEL): fix build of [u]mount.cifs

mount.cifs is now built by make everything.
And it needs extra objects anyways (mtab.o),
which is why the build of mount.cifs failed.

Michael
(cherry picked from commit 96c811cf222be5463a6705feae73d6215685c5f1)

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 308dbca653ce1d689b75f9b781237c67df4233a8)
(cherry picked from commit 9745e36c011a76669aad7a0a861ba1520ef8cec3)

15 years agoWHATSNEW: Update changes since 3.3.0rc2.
Karolin Seeger [Fri, 2 Jan 2009 12:48:48 +0000 (13:48 +0100)]
WHATSNEW: Update changes since 3.3.0rc2.

Karolin
(cherry picked from commit 16b71af7699836ce834a12918a8dd7ca61c2a86a)

15 years agoVERSION: Raise version number.
Karolin Seeger [Fri, 2 Jan 2009 12:45:02 +0000 (13:45 +0100)]
VERSION: Raise version number.

Karolin

15 years agoHappy New Year!
Stefan Metzmacher [Fri, 2 Jan 2009 08:46:17 +0000 (09:46 +0100)]
Happy New Year!

metze
(cherry picked from commit e385b4175d9accc6b78f0f506d1c1f696a1dcad1)

15 years agoFix bug 5913.
Volker Lendecke [Thu, 1 Jan 2009 21:05:03 +0000 (22:05 +0100)]
Fix bug 5913.

Never seen this to be a problem, but it doesn't hurt either :-)
(cherry picked from commit 8f2d5137852fd3f2a376a7fa71f1a5c8b947bd37)

15 years agoFix warnings in make test code.
Jeremy Allison [Thu, 1 Jan 2009 03:06:00 +0000 (19:06 -0800)]
Fix warnings in make test code.
Jeremy.
(cherry picked from commit 675c4d836ec328320994bc1632a14ac5597bbdf8)

15 years agoFix all warnings with gcc4.3.
Jeremy Allison [Thu, 1 Jan 2009 01:27:52 +0000 (17:27 -0800)]
Fix all warnings with gcc4.3.
Jeremy.
(cherry picked from commit 0994b094569474d47e7b98e39438829e962a27e1)

15 years agoFix more asprintf and "ignoring return code" warnings from gcc 4.3.
Jeremy Allison [Thu, 1 Jan 2009 00:16:52 +0000 (16:16 -0800)]
Fix more asprintf and "ignoring return code" warnings from gcc 4.3.
Jeremy.
(cherry picked from commit cfee202547a536a54284a14732df2e48eef99952)

15 years agorecvfile can't be used for printing so far
Volker Lendecke [Wed, 31 Dec 2008 17:37:39 +0000 (18:37 +0100)]
recvfile can't be used for printing so far
(cherry picked from commit 3367acd7fac7758ef5eb027bcd8bcbfbb3f3c0fd)

15 years agos3:winbindd: we don't need to call messaging_reinit() twice
Stefan Metzmacher [Mon, 29 Dec 2008 15:31:57 +0000 (16:31 +0100)]
s3:winbindd: we don't need to call messaging_reinit() twice

reinit_after_fork() already calls messaging_reinit()

metze
(cherry picked from commit 429276556a4930fa1bc782904447120950073190)
(cherry picked from commit 6bd2276d426bb92e2fc195ea69aeeb4aa7a574e7)

15 years agoFix an ancient uninitialized variable read
Volker Lendecke [Tue, 30 Dec 2008 21:24:04 +0000 (22:24 +0100)]
Fix an ancient uninitialized variable read

The callers of open_file_ntcreate expect *psbuf to be filled correctly
(cherry picked from commit b0f293addb93e34107fcfd52170261885104dbb0)

15 years agoFix more "ignore return value" warnings from gcc 4.3.
Jeremy Allison [Wed, 31 Dec 2008 01:52:08 +0000 (17:52 -0800)]
Fix more "ignore return value" warnings from gcc 4.3.
Jeremy
(cherry picked from commit 16bc03070785009b06ee7a1bfea0c54e23bab470)

15 years agos3:cluster: register the client connection via CTDB_CONTROL_TCP_ADD
Stefan Metzmacher [Thu, 18 Dec 2008 14:02:42 +0000 (15:02 +0100)]
s3:cluster: register the client connection via CTDB_CONTROL_TCP_ADD

This means we correctly pass IPv6 addresses too.
(CTDB_CONTROL_TCP_CLIENT was IPv4 only)

metze
(cherry picked from commit 465176b7e2fc1370dded850a80a8fe8519e79db8)
(cherry picked from commit 6d5b415c5a0d7e0b7aae2f20ee7989ca58ec2f81)

15 years agos3:pdb_tdb: store the next rid counter in passdb.tdb instead of winbind_idmap.tdb
Stefan Metzmacher [Mon, 15 Dec 2008 18:28:27 +0000 (19:28 +0100)]
s3:pdb_tdb: store the next rid counter in passdb.tdb instead of winbind_idmap.tdb

This upgrades the TDBSAM_VERSION to 4 and SAMU_BUFFER_V4.

metze
(cherry picked from commit 7516ba860c160e8b971b6f5bc1036370169e6e8a)
(cherry picked from commit adc22887e50b6bb48f7235361460f61999965f84)

15 years agos3:passdb: add SAMU_BUFFER_V4 with no changes
Stefan Metzmacher [Tue, 16 Dec 2008 10:51:14 +0000 (11:51 +0100)]
s3:passdb: add SAMU_BUFFER_V4 with no changes

The upgrade is required because of the followin TDBSAM_VERSION
upgrade.

metze
(cherry picked from commit 671469ae7e3013809fe3995ec8f33dda9adda2ed)
(cherry picked from commit 513d7cf7dd8758045ba7666785dbada88a990ce1)

15 years agos3:passdb: make marshalling struct samu from and to a buffer more generic
Stefan Metzmacher [Mon, 15 Dec 2008 17:46:37 +0000 (18:46 +0100)]
s3:passdb: make marshalling struct samu from and to a buffer more generic

This marshalling isn't specific to tdbsam and it's
ugly to have the related functions in two different files.

metze
(cherry picked from commit 0544734309feea44e8d449737a9934231f63693d)
(cherry picked from commit d54fb8838a418493ebc7a559af4be95def97dfd9)

15 years agoFix a memory leak in cups_pull_comment_location
Volker Lendecke [Tue, 30 Dec 2008 14:47:06 +0000 (15:47 +0100)]
Fix a memory leak in cups_pull_comment_location

We allocated "request" with ippNew, so we also should ippDelete it.
(cherry picked from commit 6118aaeb2d4b164c5ed213aa2ae25ed13bfe1c22)

15 years agoFix a spinning smbd when printing
Volker Lendecke [Tue, 30 Dec 2008 13:05:26 +0000 (14:05 +0100)]
Fix a spinning smbd when printing

Without this, we end up adding more than one timed event. In the event handler
print_notify_event_send_messages() only one event will be deleted, all others
will fire indefinitely.
(cherry picked from commit dec9368e7458048b783bb2f967f578d5e094d805)

15 years agoDon't increment twice
Volker Lendecke [Mon, 29 Dec 2008 22:24:43 +0000 (23:24 +0100)]
Don't increment twice

Thanks metze :-)
(cherry picked from commit fe100673121b73cc2091726d068d9a3e53bf494e)

15 years agoSecond part of the bugfix for #5933
Volker Lendecke [Mon, 29 Dec 2008 21:06:08 +0000 (22:06 +0100)]
Second part of the bugfix for #5933

Incrementing the next vuid did not correctly overflow

Now we survive BENCH-SESSSETUP with -o 100000. Takes a while though :-)

Thanks a lot to Ofer Tal <otsmb@shmoop.org> for reporting #5933
(cherry picked from commit b99206414f6a90c9b2223a25f3ddf5290861363d)

15 years agoFirst part of bugfix for #5933
Volker Lendecke [Mon, 29 Dec 2008 21:01:57 +0000 (22:01 +0100)]
First part of bugfix for #5933

Ofer Tal <otsmb@shmoop.org> fully correctly noted that we're incrementing
num_validated_vuids twice per session setup, but decrement it only once.
Looking at sesssetup.c we always call register_initial_vuid() before
register_existing_vuid(), so there's no point in incrementing it in
register_existing_vuid().

Jeremy, please check!
(cherry picked from commit 769989008d97308d2a10675a91ae2dfdde493bab)

15 years agos3:dbwrap: fix dbwrap_store_uint32() to match dbwrap_store_int32()
Stefan Metzmacher [Wed, 17 Dec 2008 16:16:50 +0000 (17:16 +0100)]
s3:dbwrap: fix dbwrap_store_uint32() to match dbwrap_store_int32()

All callers expect 0 an success and -1 on error.

metze
(cherry picked from commit a255f9ce713b29552722ec73e4038226959e1c8e)
(cherry picked from commit 9aa543fee7ebcc95125d18868bdec7e4bf577d8a)

15 years agoAdd code to test write_data_iov a bit
Volker Lendecke [Mon, 22 Dec 2008 21:42:44 +0000 (22:42 +0100)]
Add code to test write_data_iov a bit
(cherry picked from commit 8c7552790934397c1bbb7e93eb64716a5fed31fa)

15 years agoAttempt to fix bug 5953: Make cli_send_smb_direct_writeX use writev
Volker Lendecke [Mon, 22 Dec 2008 21:32:12 +0000 (22:32 +0100)]
Attempt to fix bug 5953: Make cli_send_smb_direct_writeX use writev

It seems there are SMB servers around which can't cope with the write header
being sent in a packet of its own. With writev we keep the advantage of direct
writes, giving the kernel the chance to coalesce the write calls.
(cherry picked from commit 1cbe293e7ba16968bf0e106cb6ee723a1f31d5bb)

15 years agoMake write_data use write_data_iov
Volker Lendecke [Mon, 22 Dec 2008 21:17:59 +0000 (22:17 +0100)]
Make write_data use write_data_iov
(cherry picked from commit f77527188bdc40a77764451c2fb7bba511a1f5a2)

15 years agoAdd write_data_iov
Volker Lendecke [Mon, 22 Dec 2008 21:17:28 +0000 (22:17 +0100)]
Add write_data_iov
(cherry picked from commit efd5aa6a75c68c6fa48eaa928e652e3cacf0e18e)

15 years agoAdd sys_writev
Volker Lendecke [Sun, 21 Dec 2008 22:22:30 +0000 (23:22 +0100)]
Add sys_writev
(cherry picked from commit 886ebe3b6f7b5304ae9c185ee14a444977afac24)

15 years agoFix some nonempty blank lines
Volker Lendecke [Sun, 24 Aug 2008 10:46:26 +0000 (12:46 +0200)]
Fix some nonempty blank lines
(cherry picked from commit 010c7101e59477f0d5f3bf11c17f474ec6f79cc1)

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit c1e0d89d00885dd227b9cec719f2fb3fbc69aea3)

15 years agoFix some C++ warnings
Volker Lendecke [Sun, 24 Aug 2008 10:43:36 +0000 (12:43 +0200)]
Fix some C++ warnings
(cherry picked from commit dd9e4e6db04acf20f6ef7705955358c7ca442bbd)

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit c04b8a612c880513971ea5a03c4d0c120bfa6c4a)

15 years agoFix bug #5990 - strict allocate should be checked before ftruncate
Jeremy Allison [Thu, 25 Dec 2008 20:12:22 +0000 (12:12 -0800)]
Fix bug #5990 - strict allocate should be checked before ftruncate
reported by and based on a patch by Yasuma Takeda <yasuma@osstech.co.jp>.
Jeremy.
(cherry picked from commit 60707022622068dd5df5c7b5aa82e0d34ed544f5)

15 years agoidmap: Remove passd check from idmap_backends_unixid_to_sid().
Michael Adam [Wed, 1 Oct 2008 06:53:15 +0000 (08:53 +0200)]
idmap: Remove passd check from idmap_backends_unixid_to_sid().

As noted by Metzy, it makes no sense here to check id->sid.
What is worse, this might even be passed in uninitialized.

This still fixes the bug for me (of course), but we might need
to check, if another special handling of passdb is needed
(possibly changing from constant return code NT_STATUS_OK...)

Michael
(cherry picked from commit 651b5d6deaab4fb3cb726fafd98171c79777631c)

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 3d22b77f1ac5e8f83d1063d87c68e60655a3ed6b)

15 years agoFix uid_to_sid mapping when the idmap cache is empty.
Michael Adam [Wed, 1 Oct 2008 06:30:15 +0000 (08:30 +0200)]
Fix uid_to_sid mapping when the idmap cache is empty.

This failed for backends other than passed, since
idmap_backends_unixid_to_sid() always asked passdb first,
which returned Success no matter whether a mapping was
found or not.

One effect wast that getpwuid failed after "net cache flush".
Only after filling the cache with a getpwnam call it succeeded.

This fix makes the behaviour of idmap_backends_unixid_to_sid()
exactly the same as that of idmap_backends_sid_to_unixid()

Michael
(cherry picked from commit da7eb5e22e56ea718e393375085cf66a90afafc8)

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit d4bc1f8d79929dc1a1d06e92eaf85923a1848e6f)

15 years agoFix more asprintf warnings and some error path errors.
Jeremy Allison [Tue, 23 Dec 2008 20:10:47 +0000 (12:10 -0800)]
Fix more asprintf warnings and some error path errors.
Jeremy.
(cherry picked from commit 44ab658b6d80c66f20d80aede7fc7cd2b9a941b1)

15 years agoMore asprintf warning fixes.
Jeremy Allison [Tue, 23 Dec 2008 19:57:03 +0000 (11:57 -0800)]
More asprintf warning fixes.
Jeremy.
(cherry picked from commit b37c96a4fcf35ba2208078a53bf9484dcd31bd31)

15 years agoMore asprintf warning fixes.
Jeremy Allison [Tue, 23 Dec 2008 19:45:40 +0000 (11:45 -0800)]
More asprintf warning fixes.
Jeremy.
(cherry picked from commit badf7dc63fe96930700e7ea04d6d6f66a7a8c1f3)

15 years agoFix more asprintf errors and error code paths.
Jeremy Allison [Tue, 23 Dec 2008 19:29:02 +0000 (11:29 -0800)]
Fix more asprintf errors and error code paths.
Jeremy.
(cherry picked from commit 0f02a165e23d716dcf3791eeaa6a5afebe7a1f88)

15 years agoFix more ‘asprintf’, declared with attribute warn_unused_result.
Jeremy Allison [Tue, 23 Dec 2008 18:42:38 +0000 (10:42 -0800)]
Fix more ‘asprintf’, declared with attribute warn_unused_result.
Jeremy.
(cherry picked from commit 9ebaf67d1dce717cafd5761b2f66296712a09957)

15 years agoFix more "warning: ignoring return value of ‘asprintf’, declared with
Jeremy Allison [Tue, 23 Dec 2008 18:27:37 +0000 (10:27 -0800)]
Fix more "warning: ignoring return value of ‘asprintf’, declared with
attribute warn_unused_result"
Jeremy.
(cherry picked from commit f0c0f2bee3bb874ba841a3b73c8677cd0ba67873)

15 years agoFix another "format not a string literal and no format arguments" warning.
Jeremy Allison [Tue, 23 Dec 2008 17:49:47 +0000 (09:49 -0800)]
Fix another "format not a string literal and no format arguments" warning.
Jeremy
(cherry picked from commit fc04faf9668bf0176ffd8d5c20e65aa83d63021b)

15 years agos3: Fix stream marshalling to return the correct streaminfo status
Tim Prouty [Tue, 23 Dec 2008 17:20:06 +0000 (09:20 -0800)]
s3: Fix stream marshalling to return the correct streaminfo status

When there are enough streams on a file to fill up the max_data_count
when responding to a trans2 streaminfo, samba is returning
NT_STATUS_BUFFER_TOO_SMALL.  Windows handles this by returning
NT_STATUS_BUFFER_OVERFLOW while still sending as much of the data that
it can fit into the buffer.  When the windows client sees
BUFFER_OVERFLOW, it retries the streaminfo with a larger buffer (2x).
The windows client starts at 2K and will continue increasing the
buffer size by two until it reaches 64K.  If the streams don't fit in
64K the windows client seems to give up.

This patch fixes marshall_stream_info to overfill the buffer by 1
stream so that send_trans2_replies can properly detect the overflow
and return the correct status.
(cherry picked from commit 3643a1179df42d47c2913c7d5c6a4ec8d8b8eb9d)

15 years agoIn gcc version 4.3.2 we get warnings for functions declared with
Jeremy Allison [Tue, 23 Dec 2008 04:05:45 +0000 (20:05 -0800)]
In gcc version 4.3.2 we get warnings for functions declared with
attribute warn_unused_result. Start to fix these.
Jeremy.
(cherry picked from commit dfd983881341bfbc811199901ae3d8fe973649c1)

15 years agoFix "allow trusted domain" so it disables trusted domains.
Gerald (Jerry) Carter [Mon, 22 Dec 2008 19:06:29 +0000 (11:06 -0800)]
Fix "allow trusted domain" so it disables trusted domains.
(cherry picked from commit 2d6946bf3a3b7465c92e707ef136e34996ae90be)

15 years agoWHATSNEW: Add "ldap ssl = start tls" to the release notes.
Karolin Seeger [Sun, 21 Dec 2008 08:15:17 +0000 (09:15 +0100)]
WHATSNEW: Add "ldap ssl = start tls" to the release notes.

Karolin
(cherry picked from commit 9a94c466210097c852d7e049a57e5777dea6ad84)

15 years agos3:loadparm/docs: Set default for "ldap ssl" to "start tls".
root [Sun, 21 Dec 2008 07:55:30 +0000 (08:55 +0100)]
s3:loadparm/docs: Set default for "ldap ssl" to "start tls".

This has been discussed on samba-technical before.
3.3 and newer only!

Karolin
(cherry picked from commit a89f7c1f82b03d23a140bdee46b9a60cb8547330)

15 years agos3: loadparm: Clean-up list of parameters.
Karolin Seeger [Sun, 21 Dec 2008 07:23:39 +0000 (08:23 +0100)]
s3: loadparm: Clean-up list of parameters.

We don't need to list several combinations of lowercase and uppercase here.

Karolin
(cherry picked from commit f2f9956a8ae1f2d6b1807c848961d797549b696b)

15 years agoFix bug #5986 - Editing a stream is broken (rename problems).
Jeremy Allison [Fri, 19 Dec 2008 21:58:22 +0000 (13:58 -0800)]
Fix bug #5986 - Editing a stream is broken (rename problems).
Jeremy.
(cherry picked from commit d53aa6257d39313b1b493805a2a73774e07faf8a)

15 years agoFix a "ignoring function call result" warning
Volker Lendecke [Fri, 19 Dec 2008 20:05:19 +0000 (12:05 -0800)]
Fix a "ignoring function call result" warning
(cherry picked from commit bb168470676a610cd77cde196260611a49ddf5d1)

15 years agocorrect the description of the "ldap timeout" parameter
Björn Jacke [Fri, 19 Dec 2008 11:12:59 +0000 (12:12 +0100)]
correct the description of the "ldap timeout" parameter
(cherry picked from commit 1aff97bc48844afba5de48447fdcdcc02d163a97)
(cherry picked from commit 64656ac02cd9d46224f17f840b4e2c0a9ddf6ba9)

15 years agoComment out the parent inheritance code (this is incorrect) as was
Jeremy Allison [Thu, 18 Dec 2008 23:36:34 +0000 (15:36 -0800)]
Comment out the parent inheritance code (this is incorrect) as was
done for POSIX ACLs.
Jeremy.
(cherry picked from commit 19b6d80d6bb1d144ac0a303b09e208750b959ee6)

15 years agoFix bug #5980 - Race condition when granting level2 oplocks can cause break notify...
Jeremy Allison [Thu, 18 Dec 2008 21:28:09 +0000 (13:28 -0800)]
Fix bug #5980 - Race condition when granting level2 oplocks can cause break notify to be missed.
Jeremy.
(cherry picked from commit 61ec751fe3560b47681d414506eca934786e122d)

15 years agoFix bug #5979 - Level 2 oplocks being granted improperly,
Jeremy Allison [Thu, 18 Dec 2008 01:22:34 +0000 (17:22 -0800)]
Fix bug #5979 - Level 2 oplocks being granted improperly,
Jeremy.
(cherry picked from commit da1852f65188efc559738c2e5da295b702ad4619)

15 years agopackaging(RHEL-CTDB): fix typo in [u]mount.cifs installation
Michael Adam [Wed, 17 Dec 2008 21:27:39 +0000 (22:27 +0100)]
packaging(RHEL-CTDB): fix typo in [u]mount.cifs installation

Michael
(cherry picked from commit 835108bcf84a5f47f46d237c7a93c572348125a1)

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 801e8bbdebe2d5136faf7348294b3cb5a1d43d7e)

15 years agopackaging(RHEL-CTDB): fix build of [u]mount.cifs
Michael Adam [Wed, 17 Dec 2008 17:56:34 +0000 (18:56 +0100)]
packaging(RHEL-CTDB): fix build of [u]mount.cifs

mount.cifs is now built by make everything.
And it needs extra objects anyways (mtab.o),
which is why the build of mount.cifs failed.

Michael
(cherry picked from commit 96c811cf222be5463a6705feae73d6215685c5f1)

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 5b572dea08d804797a3265ca5fe4c09177ed768f)

15 years agopackaging(RHEL-CTDB): Fix accidential linebreak
Michael Adam [Wed, 17 Dec 2008 15:59:24 +0000 (16:59 +0100)]
packaging(RHEL-CTDB): Fix accidential linebreak

Michael
(cherry picked from commit 5cd8ff8a2aba6b1d6821d4ebb986449b03d40542)

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit e67dc7b73bbd4a7fe9973d7cd6dee052a65b09be)

15 years agoFix a valgrind error
Volker Lendecke [Wed, 17 Dec 2008 17:14:09 +0000 (18:14 +0100)]
Fix a valgrind error

Reported by naga_kishore_kommuri@yahoo.com

Derrel, please check!

Thanks,

Volker
(cherry picked from commit 3356b95f72e26ede4ab16a12c334be90b8b1a639)
(cherry picked from commit 1117be19afb71d595ce4215e4760b18ff2e93869)

15 years agos3/smb.h: Remove unused LDAP_SSL_ON.
Karolin Seeger [Wed, 17 Dec 2008 15:26:43 +0000 (16:26 +0100)]
s3/smb.h: Remove unused LDAP_SSL_ON.

LDAP_SSL_ON is not defined at all.
Ldaps can be used by specifying an ldaps URL using the "passdb backend"
parameter.

Karolin
(cherry picked from commit 0c6cf1f8793edfde924289aafbd174ce4a4fae0c)

15 years agos3/loadparm.c: Change default value for "ldap ssl".
Karolin Seeger [Wed, 17 Dec 2008 14:53:51 +0000 (15:53 +0100)]
s3/loadparm.c: Change default value for "ldap ssl".

LDAP_SSL_ON is not defined at all. That's why the actual default value
was "" for a long time. Set a more sensible default value without chnging the
default behaviour.

-----8<------------------snip--------------8<--------------
user@host:/data/git/samba/v3-0-test/source> git grep LDAP_SSL_ON | cat
include/smb.h:enum ldap_ssl_types {LDAP_SSL_ON, LDAP_SSL_OFF,
LDAP_SSL_START_TLS};
param/loadparm.c:       Globals.ldap_ssl = LDAP_SSL_ON;
----->8------------------snap-------------->8--------------

It's the same in 3.2 and 3.3 series.

Karolin
(cherry picked from commit e6d883e003d4560c55259ae1cfdf7319602f76e3)

15 years agodocs: Fix typo in man idmap_hash.
Karolin Seeger [Wed, 17 Dec 2008 15:28:59 +0000 (16:28 +0100)]
docs: Fix typo in man idmap_hash.

Karolin
(cherry picked from commit 994ef68164c12a3b0494f6491bc9f402c912600f)
(cherry picked from commit 5f7b6f6a3f31b77d133a40b8951ce78b86510135)

15 years agodocs: Update section "ldap ssl" in man smb.conf.
Karolin Seeger [Wed, 17 Dec 2008 15:18:38 +0000 (16:18 +0100)]
docs: Update section "ldap ssl" in man smb.conf.

Remove non-existent value "on".
Change default value to "no".
Add hint about ldaps.

Karolin
(cherry picked from commit 580461629bb88ce3b61770e7abfe2c942a121877)
(cherry picked from commit d74356627579fe7b9961844a77c4e6daa978d62b)

15 years agodocs: Fix some formatting issues in the "ldap ssl" section of man smb.conf.
Karolin Seeger [Wed, 17 Dec 2008 14:42:12 +0000 (15:42 +0100)]
docs: Fix some formatting issues in the "ldap ssl" section of man smb.conf.

Karolin
(cherry picked from commit 6ac36698e975649d26e3f2975c2101129c3ffe97)
(cherry picked from commit 655a1c7b05d56326d6cfffbc8e46e1d64565717a)

15 years agoTweak with pam defines of older Linux versions
Lars Müller [Wed, 17 Dec 2008 14:39:35 +0000 (15:39 +0100)]
Tweak with pam defines of older Linux versions

PAM_AUTHTOK_RECOVERY_ERR is not defined by older Linux versions (SUSE
Linux Enterprise 9 and RedHat Enterprise 4).

Patch suggested by Philipp Thomas <pth at suse dot de>.
(cherry picked from commit b6e1eb476ccd19209ed135ab8c3b7b2b10422b0e)

15 years agodocs: Fix TOC of generated HTML docs.
Karolin Seeger [Wed, 17 Dec 2008 08:17:26 +0000 (09:17 +0100)]
docs: Fix TOC of generated HTML docs.

This fixes bug #5968.
Thanks to Christian Perrier <bubulle@debian.org> for reporting!

Karolin
(cherry picked from commit 675b363b712e0b91b9b7d1189a819a36853db539)
(cherry picked from commit 3566615292f9cb2d00b03156e515274751e05969)

15 years ago(Fixed) Final part of fix for bug #5953 - smbclient crashes: cli_list_new segmentatio...
Kai Blin [Tue, 16 Dec 2008 21:42:12 +0000 (13:42 -0800)]
(Fixed) Final part of fix for bug #5953 - smbclient crashes: cli_list_new segmentation fault (with NAS-BASIC server).
(cherry picked from commit 52654119cbf15acf6c4663b171df04e9a2bc26b7)

15 years agoRevert "Final part of fix for bug #5953 - smbclient crashes: cli_list_new segmentatio...
Jeremy Allison [Tue, 16 Dec 2008 21:36:06 +0000 (13:36 -0800)]
Revert "Final part of fix for bug #5953 - smbclient crashes: cli_list_new segmentation fault (with NASBASIC server)."
Error in commit !

This reverts commit e3cb04101453762cda13f16e3e48d704761d5d67.
(cherry picked from commit 4617080b6c4b80bee9c5ebe596636229f778fa62)

15 years agoFinal part of fix for bug #5953 - smbclient crashes: cli_list_new segmentation fault...
Kai Blin [Tue, 16 Dec 2008 21:15:48 +0000 (13:15 -0800)]
Final part of fix for bug #5953 - smbclient crashes: cli_list_new segmentation fault (with NASBASIC server).
(cherry picked from commit e3cb04101453762cda13f16e3e48d704761d5d67)

15 years agocommit b520befe6f51644d20434add9864d7a2fa30aa2e
SATOH Fumiyasu [Tue, 16 Dec 2008 15:54:30 +0000 (00:54 +0900)]
commit b520befe6f51644d20434add9864d7a2fa30aa2e
Author: SATOH Fumiyasu <fumiyas@osstech.co.jp>
Date:   Wed Dec 17 00:42:25 2008 +0900

    libsmbclient: Fix SIGBUS on non-x86 CPUs

    We must align the struct smbc_dirent in the struct
    SMBC_internal_data because the struct smbc_dirent
    has numeric values that require alignment.

Signed-off-by: Derrell Lipman <derrell.lipman@unwireduniverse.com>
(cherry picked from commit 2957c03ab59735159aaf108e87a2e571f984fb5d)

15 years agonss_winbind: Solaris 64-bit fix and...
SATOH Fumiyasu [Tue, 16 Dec 2008 15:59:07 +0000 (16:59 +0100)]
nss_winbind: Solaris 64-bit fix and...

PATCH 1:
Fix gmem->numgids and gmem->maxgids breakage on Solaris 64-bit
because sizeof(int) != sizeof(long int).

PATCH 2:
This patch fixes a compile-time warning
"warning: implicit function declaration: _nss_winbind_initgroups_dyn".
(cherry picked from commit cb036772d09227f870c2fec3ecd8c3f53787dfbc)
(cherry picked from commit 085f4cdb90b12d60804001fd60659a4aa4a174fd)

15 years agodocs: "acl compatibility" is a global parameter.
Karolin Seeger [Tue, 16 Dec 2008 14:10:29 +0000 (15:10 +0100)]
docs: "acl compatibility" is a global parameter.

This fixes bug #5866.
Thanks to TAKAHASHI Motonobu <monyo@samba.gr.jp> for reporting!

Karolin
(cherry picked from commit 9e64ed018e5aa84d802b01953b481fbb07eb00aa)
(cherry picked from commit 386b0fc4bdc0822ffbc51cfee536bea23df0a755)

15 years agoAdd an entry for the "check" command to the tdbtool manpage.
Holger Hetterich [Thu, 20 Nov 2008 09:32:14 +0000 (10:32 +0100)]
Add an entry for the "check" command to the tdbtool manpage.
(cherry picked from commit c46c21cde33a9cc1de9d947de64c27052ecce988)