tprouty/samba.git
16 years agosync the most parts of librpc/ndr with samba4
Stefan Metzmacher [Thu, 8 Nov 2007 13:36:13 +0000 (14:36 +0100)]
sync the most parts of librpc/ndr with samba4

metze
(This used to be commit 201800a4c960d4f2afeb6cc760ac303df76d5e36)

16 years agoadd '_PUBLIC_' prototypes into proto.h
Stefan Metzmacher [Thu, 8 Nov 2007 13:34:02 +0000 (14:34 +0100)]
add '_PUBLIC_' prototypes into proto.h

this makes merging samba4 code easier...

metze
(This used to be commit 005909726e0121a549abf625a3b443f3a6964d84)

16 years agoadd win_errstr() as wrapper of dos_errstr().
Stefan Metzmacher [Thu, 8 Nov 2007 13:33:04 +0000 (14:33 +0100)]
add win_errstr() as wrapper of dos_errstr().

this makes merging stuff from samba4 easier

metze
(This used to be commit cfbdb133b998a704c6c167b9b4b56370f4ff666d)

16 years agowe should not ignore convert_string_talloc() failures.
Stefan Metzmacher [Thu, 8 Nov 2007 12:52:56 +0000 (13:52 +0100)]
we should not ignore convert_string_talloc() failures.

In all other places in ndr_string.c we already use False...

metze
(This used to be commit 9a201fd4c81509eb8a93087a38bb0fda69dfd7e4)

16 years agolibreplace: we need to link to make sure the functions are available
Stefan Metzmacher [Thu, 8 Nov 2007 11:18:28 +0000 (12:18 +0100)]
libreplace: we need to link to make sure the functions are available

metze
(This used to be commit 130de20d646fe14f494b021a98d6855c7b5b2a1a)

16 years agoTry to fix the build on systems without struct sockaddr_storage type
Michael Adam [Thu, 8 Nov 2007 10:46:13 +0000 (11:46 +0100)]
Try to fix the build on systems without struct sockaddr_storage type
(like hape - HPUX 11.00).

Michael
(This used to be commit f3d762737540476bab7da1bf6db047b66f53d9ae)

16 years agoConstrain "min receivefile size" to max of BUFFER_SIZE
Jeremy Allison [Thu, 8 Nov 2007 05:47:00 +0000 (21:47 -0800)]
Constrain "min receivefile size" to max of BUFFER_SIZE
(128k). Add debug error messages so we can see why
writeX large is denied. Ensure we don't allow recvfile
writes on IPC$.
Jeremy.
(This used to be commit 6bf053a6a17749a3bc73c8cc5fd490aa5f93b763)

16 years agoTry to fix the build on irix.
Michael Adam [Wed, 7 Nov 2007 21:28:26 +0000 (22:28 +0100)]
Try to fix the build on irix.
There were two callers of set_smb_read_error() in irix_oplocks.c
not converted to the new prototype.

Michael
(This used to be commit e398a8d7b60127001d309c2fd0b1f13337f9b46d)

16 years ago- check return value of ndr_push_set_switch_value()
metze [Fri, 2 Nov 2007 11:01:18 +0000 (11:01 +0000)]
- check return value of ndr_push_set_switch_value()
- fix memory leaks in error pathes

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25798 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit a0d0a06a9e39ea4fd07e9381f4b3397f403ab79d)

16 years agouse error and out logic
metze [Fri, 2 Nov 2007 10:59:43 +0000 (10:59 +0000)]
use error and out logic

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25797 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 55d01b3f5b55cab3228270c0f6c164f11b0803f5)

16 years agouse NT_STATUS_HAVE_NO_MEMORY()
metze [Fri, 2 Nov 2007 10:49:51 +0000 (10:49 +0000)]
use NT_STATUS_HAVE_NO_MEMORY()

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25796 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit be1f2f1abf15b34f8ab08d9e63637962fa762853)

16 years agouse NDR_CHECK()
metze [Fri, 2 Nov 2007 10:32:47 +0000 (10:32 +0000)]
use NDR_CHECK()

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25794 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 91ccaa8e70f1665bd759a80363cda9605399464e)

16 years agocheck the return value of ndr_push_set_switch_value()
metze [Fri, 2 Nov 2007 10:29:19 +0000 (10:29 +0000)]
check the return value of ndr_push_set_switch_value()

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25793 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit aa155b2c2936c0e9996eda0a21f137773270343a)

16 years agouse NT_STATUS_HAVE_NO_MEMORY() and NDR_CHECK()
metze [Fri, 2 Nov 2007 10:26:49 +0000 (10:26 +0000)]
use NT_STATUS_HAVE_NO_MEMORY() and NDR_CHECK()

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25792 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit f3dde8c7b73b619a54814bc6a862fa917455b624)

16 years agothe return value of ndr_pull_set_switch_value() should be checked
metze [Thu, 1 Nov 2007 10:15:13 +0000 (10:15 +0000)]
the return value of ndr_pull_set_switch_value() should be checked

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25779 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 1563a08cb07738c11ea7b68ba9e814885060b0b7)

16 years agouse NT_STATUS_HAVE_NO_MEMORY() and NDR_CHECK() macros
metze [Thu, 1 Nov 2007 10:13:36 +0000 (10:13 +0000)]
use NT_STATUS_HAVE_NO_MEMORY() and NDR_CHECK() macros

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25778 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit b542eaf825aa42b53f08c73e2b86ee9fafb33256)

16 years agoadd NDR_ERR_UNREAD_BYTES and don't use NTSTATUS directly
metze [Thu, 1 Nov 2007 09:50:24 +0000 (09:50 +0000)]
add NDR_ERR_UNREAD_BYTES and don't use NTSTATUS directly

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25777 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 52c422f4d7f8549a11d637de1abceabc1ae86497)

16 years agocreate ndr_pull_union_blob_all() and match the logic of the struct fns
metze [Thu, 1 Nov 2007 08:10:54 +0000 (08:10 +0000)]
create ndr_pull_union_blob_all() and match the logic of the struct fns

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25774 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 8ed241532a069c4207945d5f1ceb1ec817ba7976)

16 years agoFix tdbtorture build.
Jeremy Allison [Wed, 7 Nov 2007 07:13:11 +0000 (23:13 -0800)]
Fix tdbtorture build.
Jeremy.
(This used to be commit c14db81be5212dfa6fbcf8bfdcf725d7db3376ca)

16 years agoFix const warning.
Jeremy Allison [Wed, 7 Nov 2007 07:09:31 +0000 (23:09 -0800)]
Fix const warning.
Jeremy.
(This used to be commit ecc2555197860ae56726724ec824fc149d2d831c)

16 years agoKeep the tdb code in sync with Samba4.
Jeremy Allison [Wed, 7 Nov 2007 06:57:35 +0000 (22:57 -0800)]
Keep the tdb code in sync with Samba4.

Mainly this is the svn changes :

------------------------------------------------------------------------
r23238 | tridge | 2007-05-30 01:15:49 -0700 (Wed, 30 May 2007) | 6 lines

merged transaction lock changes from ctdb

this ensures that having the global lock also implies the transaction
lock

------------------------------------------------------------------------
r22832 | tridge | 2007-05-13 18:00:06 -0700 (Sun, 13 May 2007) | 3 lines

merged the latest tdb changes from ctdb to Samba4

Jeremy.
(This used to be commit ab11c0055761e97ba32a8c3ec4fa6f8763a262cd)

16 years agoFix bug where tdb lock call interrupted with
Jeremy Allison [Wed, 7 Nov 2007 05:47:57 +0000 (21:47 -0800)]
Fix bug where tdb lock call interrupted with
an alarm sig would not terminate and could lead
to runaway smbd processes.
Thanks to Dave Daugherty @ Centrify for pointing
this out to us.
Jeremy.
(This used to be commit ef8da1698371c95495add53df81a978df709c88d)

16 years agoEnsure we don't use massive writes in pipe mode.
Jeremy Allison [Tue, 6 Nov 2007 22:12:38 +0000 (14:12 -0800)]
Ensure we don't use massive writes in pipe mode.
Jeremy.
(This used to be commit 47640fb20e42f226e7ea104076fd52547bfe1abb)

16 years agoMove some access check functions that are not posix-acl specific
Michael Adam [Fri, 26 Oct 2007 17:50:55 +0000 (19:50 +0200)]
Move some access check functions that are not posix-acl specific
to a new source file of their own.

Michael
(This used to be commit 9dd18bb534bca6b5de6cad9580b48681b36c0832)

16 years agoDon't repeat fast-pathing...
Michael Adam [Thu, 25 Oct 2007 11:32:56 +0000 (13:32 +0200)]
Don't repeat fast-pathing...

Michael
(This used to be commit c61b4222d30288add216fac4da3cfaa537f5cd01)

16 years agoThis is a proposed patch for Bug #5023.
Michael Adam [Sat, 20 Oct 2007 00:17:07 +0000 (02:17 +0200)]
This is a proposed patch for Bug #5023.

The three can_* access check functions in smbd/posix_acls.c that are used in
smbd/open.c and smbd/nttrans.c explicitly called check_posix_acl_group_access()

This lead to errors with nfsv4 acls (ZFS and GPFS).

This changes the can_* functions to get the nt_acl via VFS layer and call
se_access_check on that. It also removes check_posix_acl_group_access()
which has no more callers.

NOTE: The can_* functions should really not be in smbd/posix_acls.c but
in a separate file (I propose smbd/access.c).

Michael
(This used to be commit 6f961a23de745aba5dcd4585b731e651b8cbeef4)

16 years agoAdd a const.
Michael Adam [Tue, 6 Nov 2007 05:31:24 +0000 (06:31 +0100)]
Add a const.

Michael
(This used to be commit 7b582af2107bed3b864bb408b5c9bcce4b8e4c72)

16 years agolibreplace: we should only have one location where we check for required functions
metze [Tue, 6 Nov 2007 07:01:17 +0000 (07:01 +0000)]
libreplace: we should only have one location where we check for required functions

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25864 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 760f24f10cbea7ce22acd0772fb5b125f718d129)

16 years agolibreplace: we need include <unistd.h> before nss_wrapper.h
metze [Tue, 6 Nov 2007 06:54:49 +0000 (06:54 +0000)]
libreplace: we need include <unistd.h> before nss_wrapper.h

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25863 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 20ec1f472566bbc570fa138cce5dbd0407aef530)

16 years agoFix export dynamic for HPUX.
jelmer [Tue, 6 Nov 2007 04:59:50 +0000 (04:59 +0000)]
Fix export dynamic for HPUX.

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25861 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 4d02b1344b76c6147944188161f73ad3917b8abc)

16 years agoRemove flag that causes problems on some hosts.
jelmer [Tue, 6 Nov 2007 04:26:57 +0000 (04:26 +0000)]
Remove flag that causes problems on some hosts.

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25860 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 57bea8cd02cb7964bbb64ba26b83c372f0e12b94)

16 years agoWrap native HPUX functions in dl implementation.
jelmer [Tue, 6 Nov 2007 04:26:52 +0000 (04:26 +0000)]
Wrap native HPUX functions in dl implementation.

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25859 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 0ec16729299887b4a80a7e24fbd1750632276691)

16 years agoCheck for HPUX dl functions.
jelmer [Tue, 6 Nov 2007 03:43:50 +0000 (03:43 +0000)]
Check for HPUX dl functions.

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25855 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 9f862e9faf0fa9cddfcc2f87d9f247082718b3e0)

16 years agoMove SHLIBEXT determination into a test as well.
jelmer [Tue, 6 Nov 2007 02:35:46 +0000 (02:35 +0000)]
Move SHLIBEXT determination into a test as well.

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25852 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 322cf8002bab1e449616d9fcea0bd4c9535cfe6a)

16 years agoMove system-specific ldflags checks to libreplace so they can be used by ldb.
jelmer [Tue, 6 Nov 2007 02:17:05 +0000 (02:17 +0000)]
Move system-specific ldflags checks to libreplace so they can be used by ldb.

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25851 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 63b7690335360a073dc1ae111f740a7934f1a92f)

16 years agoAdd macro for picflag.
jelmer [Tue, 6 Nov 2007 02:16:55 +0000 (02:16 +0000)]
Add macro for picflag.

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25850 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 48c70f604071fcf7c0887fe0136bdc2dda4c8ff4)

16 years agoAdd configure test for -Wl,--export-dynamic.
jelmer [Tue, 6 Nov 2007 01:05:19 +0000 (01:05 +0000)]
Add configure test for -Wl,--export-dynamic.

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25846 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 4904af51cdccd4e52d2805bd62f39276447c4646)

16 years agolibreplace: include nss_wrapper.h if NSS_WRAPPER is defined
metze [Mon, 5 Nov 2007 15:45:08 +0000 (15:45 +0000)]
libreplace: include nss_wrapper.h if NSS_WRAPPER is defined

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25838 0c0555d6-39d7-0310-84fc-f1cc0bd64818
(This used to be commit 809fee4bef66eb8b8687f88257c0d6f77d3b4063)

16 years agoEnsure we null out the address correctly.
Jeremy Allison [Tue, 6 Nov 2007 07:17:19 +0000 (23:17 -0800)]
Ensure we null out the address correctly.
Jeremy.
(This used to be commit e1fcd851ab38165eb0e959cdc02ff067614f8b28)

16 years agoFix another segfault and make smbfilter run again.
Michael Adam [Tue, 6 Nov 2007 00:09:24 +0000 (01:09 +0100)]
Fix another segfault and make smbfilter run again.
This fix is not complete yet (loop after "client closed connection")
but at least it starts again...

Micheal
(This used to be commit e2ffc6053dc9453fc49545db47374ed42e8efecd)

16 years agoFix a segfault.
Michael Adam [Tue, 6 Nov 2007 00:07:12 +0000 (01:07 +0100)]
Fix a segfault.

Michael
(This used to be commit 98225a075226e78f7ce64787dd29122fda3d6924)

16 years agoTry to fix the build. There was one forgotten caller
Michael Adam [Tue, 6 Nov 2007 00:06:06 +0000 (01:06 +0100)]
Try to fix the build. There was one forgotten caller
of receive_smb. Jeremy: please check!

Michael
(This used to be commit 1f0fcc3e4ef7526cbf0a5a5fc96708238d0efdeb)

16 years agoWhen deleting a key from the registry make sure the non-default
Günther Deschner [Mon, 5 Nov 2007 23:50:47 +0000 (00:50 +0100)]
When deleting a key from the registry make sure the non-default
security descriptor gets deleted as well.

Guenther
(This used to be commit d140d68537225b6a6a99be3d9b09354e3f6ad8c9)

16 years agoAdd two const's.
Michael Adam [Mon, 5 Nov 2007 22:23:05 +0000 (23:23 +0100)]
Add two const's.

Michael
(This used to be commit bf23c4ddff617dd3cd1e2d5cedb1b5c023356dc3)

16 years agoRemove the horror that was the global smb_rw_error.
Jeremy Allison [Mon, 5 Nov 2007 19:12:56 +0000 (11:12 -0800)]
Remove the horror that was the global smb_rw_error.
Each cli struct has it's own local copy of this variable,
so use that in client code. In the smbd server, add one
static to smbd/proccess.c and use that inside smbd. Fix
a bunch of places where smb_rw_error could be set by
calling read_data() in places where we weren't reading
from the SMB client socket (ie. winbindd).
Jeremy.
(This used to be commit 255c2adf7b6ef30932b5bb9f142ccef4a5d3d0db)

16 years agoFix a typo.
Michael Adam [Mon, 5 Nov 2007 14:16:11 +0000 (15:16 +0100)]
Fix a typo.

Michael
(This used to be commit 5721a511d8dd327717bcd9c2053c4bd08f01185c)

16 years agoIgnore testing tdb.
Günther Deschner [Mon, 5 Nov 2007 01:35:04 +0000 (02:35 +0100)]
Ignore testing tdb.

Guenther
(This used to be commit 5bf02c6cdf6fc4596827755f7d659709adb0a7d6)

16 years agoDon't alloc struct iface_struct nics[MAX_INTERFACES]; (128 entries)
Jeremy Allison [Mon, 5 Nov 2007 06:20:04 +0000 (22:20 -0800)]
Don't alloc struct iface_struct nics[MAX_INTERFACES]; (128 entries)
on the stack - use talloc.
Jeremy
(This used to be commit b5e37af251a26648b0e4f59ca548c5374399175e)

16 years agoThis should really be a cond_set_smb_read_error().
Jeremy Allison [Mon, 5 Nov 2007 06:14:19 +0000 (22:14 -0800)]
This should really be a cond_set_smb_read_error().
Jeremy.
(This used to be commit 5ab76b58c00dde89b56060482f5cdc5d0c6c56cb)

16 years agoDon't use 0 when we mean SMB_READ_OK.
Jeremy Allison [Mon, 5 Nov 2007 06:12:31 +0000 (22:12 -0800)]
Don't use 0 when we mean SMB_READ_OK.
Jeremy.
(This used to be commit 08ee4314a9e25700288f4ea1af22ee1732dfea61)

16 years agoMerge commit 'origin/v3-2-test' into branches/upstream
Günther Deschner [Mon, 5 Nov 2007 02:39:18 +0000 (03:39 +0100)]
Merge commit 'origin/v3-2-test' into branches/upstream
(This used to be commit d0bf0ad2ae9a2bff4cec8c7e801a22c624b874ae)

16 years agoRemove unnecessary code
Volker Lendecke [Thu, 1 Nov 2007 16:42:35 +0000 (17:42 +0100)]
Remove unnecessary code

SAFE_FREE checks for NULL anyway, and SMB_STRDUP panics on failure
(This used to be commit 4cdebda39b9b1790fc5c7df3dc81bfb46b047ad7)

16 years agoFix a debug message
Volker Lendecke [Tue, 30 Oct 2007 21:58:09 +0000 (22:58 +0100)]
Fix a debug message
(This used to be commit a86849e4f9512b680f26010c297cec14251dafdd)

16 years agoDisplay sec ace flags.
Günther Deschner [Fri, 26 Oct 2007 10:58:01 +0000 (12:58 +0200)]
Display sec ace flags.

Guenther
(This used to be commit 52bf835c5e9b2fa759c61bf4a7a364eeaeae6043)

16 years agoMake sure we can read SACLs from the registry.
Günther Deschner [Mon, 5 Nov 2007 01:33:58 +0000 (02:33 +0100)]
Make sure we can read SACLs from the registry.

Guenther
(This used to be commit 62d4cce4562b77403f9353d333b9553352bdf1d8)

16 years agoFix the smbmount build
Volker Lendecke [Mon, 5 Nov 2007 02:14:16 +0000 (03:14 +0100)]
Fix the smbmount build
(This used to be commit 5b8ca7ebdef5d385420c89af246c2dae737c5717)

16 years agostatic pstring removal
Volker Lendecke [Sun, 4 Nov 2007 17:15:37 +0000 (18:15 +0100)]
static pstring removal
(This used to be commit 5490e2d77233f594a42cb32eda8215014db544e3)

16 years agopstring removal
Volker Lendecke [Thu, 1 Nov 2007 16:49:31 +0000 (17:49 +0100)]
pstring removal
(This used to be commit f5468d2c9abad41cb1e9d9b9ec6a1b56564961a4)

16 years agoMake load_registry_service return the share number
Volker Lendecke [Sat, 3 Nov 2007 14:03:26 +0000 (15:03 +0100)]
Make load_registry_service return the share number
(This used to be commit 934964c90f39d588d2399f10e3738ab1b4e01290)

16 years agoForgot arg type.
Jeremy Allison [Mon, 5 Nov 2007 01:15:35 +0000 (17:15 -0800)]
Forgot arg type.
Jeremy.
(This used to be commit 46f3b04ddea4c63c6b37c7038d4bbd2ee1c9ca0c)

16 years agoDon't believe len returned from read_smb_length_return_keepalive(),
Jeremy Allison [Sun, 4 Nov 2007 23:38:43 +0000 (15:38 -0800)]
Don't believe len returned from read_smb_length_return_keepalive(),
it may be a UNIX large writeX (which wraps len in that case).
Stevef this should fix your 128k write bug.
Jeremy.
(This used to be commit de2ebffa3c99ed28a3868fd956ef45629ca855b6)

16 years agoRemove most of the remaining globals out of lib/util_sock.c.
Jeremy Allison [Sun, 4 Nov 2007 06:20:10 +0000 (23:20 -0700)]
Remove most of the remaining globals out of lib/util_sock.c.
I have a plan for dealing with the remaining..... Watch
this space.
Jeremy.
(This used to be commit 963fc7685212689f02b3adcc05b4273ee5c382d4)

16 years agoRemove more static data from lib/util_sock.c and
Jeremy Allison [Sun, 4 Nov 2007 05:34:46 +0000 (22:34 -0700)]
Remove more static data from lib/util_sock.c and
callers.
Jeremy.
(This used to be commit 35aaa36f82c70964cee5d0778eb04547b226dd3f)

16 years agoMissed one case where I need to pass down addrlen.
Jeremy Allison [Sun, 4 Nov 2007 03:27:59 +0000 (20:27 -0700)]
Missed one case where I need to pass down addrlen.
Jeremy
(This used to be commit 62b5ca3334598aec3304d21118f67702afc3854a)

16 years agoI can't get away without a 'length' arg. :-).
Jeremy Allison [Sun, 4 Nov 2007 01:41:26 +0000 (18:41 -0700)]
I can't get away without a 'length' arg. :-).
Jeremy.
(This used to be commit 95d01279a5def709d0a5d5ae7224d6286006d120)

16 years agoStop get_peer_addr() and client_addr() from using global
Jeremy Allison [Sun, 4 Nov 2007 01:15:45 +0000 (18:15 -0700)]
Stop get_peer_addr() and client_addr() from using global
statics. Part of my library cleanups.
Jeremy.
(This used to be commit e848506c858bd16706c1d7f6b4b032005512b8ac)

16 years agoRemove the smb_read_error global variable and replace
Jeremy Allison [Sat, 3 Nov 2007 22:12:42 +0000 (15:12 -0700)]
Remove the smb_read_error global variable and replace
it with accessor functions. "One global or pstring a day...." :-).
Jeremy.
(This used to be commit d50d14c300abc83b7015718ec48acc8b3227a273)

16 years agoRemove unused var noticed by metze.
Jeremy Allison [Sat, 3 Nov 2007 17:25:51 +0000 (10:25 -0700)]
Remove unused var noticed by metze.
Jeremy.
(This used to be commit ac4f897f0dec0e33e79c316340b47c2803104635)

16 years agoFix the snprintf checks, and fix a typo in pointer indirection.
Jeremy Allison [Fri, 2 Nov 2007 21:23:10 +0000 (14:23 -0700)]
Fix the snprintf checks, and fix a typo in pointer indirection.
These fixes are needed for a working getaddrinfo etc. replacement.
Fixes from Wayne Davison <wayned@samba.org> from rsync.
Jeremy.
(This used to be commit 494bf6293bedbda4b10aa2eae452377b8130cd01)

16 years agoEnsure we use the correct socklen_t values for bind() for
Jeremy Allison [Fri, 2 Nov 2007 21:22:19 +0000 (14:22 -0700)]
Ensure we use the correct socklen_t values for bind() for
Solaris.
Jeremy.
(This used to be commit 638579d75a2aa00836dc4c0c772381b775944b16)

16 years agoFix typos in calc_sa_size, noticed by jim.brown@miami.edu
Jeremy Allison [Fri, 2 Nov 2007 19:56:21 +0000 (12:56 -0700)]
Fix typos in calc_sa_size, noticed by jim.brown@miami.edu
Jeremy.
(This used to be commit 6b7ccd3efb05291f3b8779845a3842a09bb9aa07)

16 years agoChange the client library to write directly out of
Jeremy Allison [Fri, 2 Nov 2007 19:21:34 +0000 (12:21 -0700)]
Change the client library to write directly out of
the incoming buffer in the non-signed case. Speeds
up writes by over 10% or so. Complete the server
recvfile implementation.
Jeremy.
(This used to be commit 81ca5853b2475f123faab3b550f0a7b24ae3c208)

16 years agoMerge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
Jeremy Allison [Fri, 2 Nov 2007 19:06:15 +0000 (12:06 -0700)]
Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
(This used to be commit 319dfbaf1b8d08171731d4575127f4bb5255a229)

16 years agoForgot one more getnameinfo.
Jeremy Allison [Fri, 2 Nov 2007 19:05:17 +0000 (12:05 -0700)]
Forgot one more getnameinfo.
Jeremy.
(This used to be commit 619e33248d12e764e902e4fdb5fb223cb9cfea3b)

16 years agoMerge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test
Gerald (Jerry) Carter [Fri, 2 Nov 2007 18:16:40 +0000 (14:16 -0400)]
Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test
(This used to be commit 95de80218c10a72c7b28541c3c2e475e083b68f1)

16 years agoFix build breakage when not specifying --with-fhs.
Gerald (Jerry) Carter [Fri, 2 Nov 2007 18:16:06 +0000 (14:16 -0400)]
Fix build breakage when not specifying --with-fhs.
Ensure that CODEPAGEDIR, STATEDIR, and CACHEDIR have values.
(This used to be commit 10af752391be51c7381a4eaca27f29e1f2a677b3)

16 years agoArgggh. smblen doesn't include the +4, so my smb_doff calculations
Jeremy Allison [Fri, 2 Nov 2007 17:35:10 +0000 (10:35 -0700)]
Argggh. smblen doesn't include the +4, so my smb_doff calculations
shouldn't either :-).
Jeremy.
(This used to be commit c3de44b6b063e126095b30536fdcb643c70e395e)

16 years agoFix Solaris by ensuring we use the IPv4 or IPv6 length
Jeremy Allison [Fri, 2 Nov 2007 17:25:34 +0000 (10:25 -0700)]
Fix Solaris by ensuring we use the IPv4 or IPv6 length
in any getnameinfo calls.
Jeremy
(This used to be commit 4d7badb0c44f287034f58d9a412e662c0fbecdc9)

16 years agoFix state_path to take a const string, not use pstring.
Jeremy Allison [Fri, 2 Nov 2007 16:27:04 +0000 (09:27 -0700)]
Fix state_path to take a const string, not use pstring.
Jeremy.
(This used to be commit 8c73e19f51d6e3f520cf44dd22f9b9584d4b460f)

16 years agoEnsure we can't accidently do a pipe write with
Jeremy Allison [Fri, 2 Nov 2007 05:42:21 +0000 (22:42 -0700)]
Ensure we can't accidently do a pipe write with
unread bytes in the socket buffer.
Jeremy
(This used to be commit 84d22f7747126608b9460f9591bb5967d871b82d)

16 years agoBe careful and take care of the correct lengths in large
Jeremy Allison [Fri, 2 Nov 2007 05:24:39 +0000 (22:24 -0700)]
Be careful and take care of the correct lengths in large
writeX calls.
Jeremy.
(This used to be commit 2d3ff9c502105f92720131355b41e48be8d656c2)

16 years agoEnsure we detect a large writeX when using recvfile.
Jeremy Allison [Fri, 2 Nov 2007 04:51:45 +0000 (21:51 -0700)]
Ensure we detect a large writeX when using recvfile.
More changes needed to make the UNIX_LARGE_WRITEX_CAP
writes work (I'll add these tomorrow).
Jeremy.
(This used to be commit 1c71546b6152d2930b98f766311bbd161ee0ee4e)

16 years agoMerge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test
Gerald (Jerry) Carter [Fri, 2 Nov 2007 01:30:43 +0000 (21:30 -0400)]
Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test
(This used to be commit 779353b86d1699324149896f1ffa237c6ebe46ec)

16 years agoAdd brackets so as not to break the POSIX caps return.
Jeremy Allison [Fri, 2 Nov 2007 01:30:02 +0000 (18:30 -0700)]
Add brackets so as not to break the POSIX caps return.
Jeremy.
(This used to be commit 47dbddcb5361caa30ee60cf4e15bb50d557d1191)

16 years agoFix for bug 5021
Volker Lendecke [Sat, 20 Oct 2007 09:12:11 +0000 (11:12 +0200)]
Fix for bug 5021

This is a different fix than the bug reporter (Evgeniy Dushistov
<dushistov at mail.ru>, thanks!) created, but it lives without the boolean
status variable. Untested so far, but I can not add attachments to bugs right
now. But to me this looks really obvious.
(This used to be commit b481abf5914dcafe5642c4d9394d02603e905bbb)

16 years agoPatch 2 of 3 from Debian Samba packagers:
Gerald (Jerry) Carter [Thu, 1 Nov 2007 19:53:44 +0000 (15:53 -0400)]
Patch 2 of 3 from Debian Samba packagers:

The point is doing the following associations:

- non discardable state data (all TDB files that may need to be backed
  up) go to statedir
- shared data (codepage stuff) go to codepagedir

The patch *does not change* the default location for these
directories. So, there is no behaviour change when applying it.

The main change is for samba developers who have to think when dealing
with files that previously pertained to libdir whether they:
- go in statedir
- go in codepagedir
- stay in libdir
(This used to be commit d6cdbfd875bb2653e831d314726c3240beb0a96b)

16 years agosave memory
Volker Lendecke [Wed, 31 Oct 2007 14:06:22 +0000 (15:06 +0100)]
save memory

Hi!

Attached find a patch that I've wanted to check in for ages.
The whole area probably needs a major rewrite, but this is a
minimal patch that on a 32-bit box saves 1.5k per smbd per
defined share, twice as much on a 64-bit box.

Volker

From ebb80e664ecc49eb597a45cb57e1067fbae49e62 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl@sernet.de>
Date: Wed, 31 Oct 2007 15:04:34 +0100
Subject: [PATCH] Change global->copymap from bool* to a bitmap

We right now have 401 parameters, so with bool being represented as a 64-bit
integer this saves about 3k of memory per smbd per share that is defined in
smb.conf.
(This used to be commit 94f2c35a683eace7f9f3dad9748aaec93f7c534f)

16 years agoAdd missing recvfile_bytes element - noticed by Kukks.
Jeremy Allison [Thu, 1 Nov 2007 17:21:27 +0000 (10:21 -0700)]
Add missing recvfile_bytes element - noticed by Kukks.
Jeremy.
(This used to be commit 5cf2811e8e1d9e6a1114bbdff89c333d5b374282)

16 years agoPatch from Debian Samba package maintainers:
Gerald (Jerry) Carter [Thu, 1 Nov 2007 17:00:10 +0000 (13:00 -0400)]
Patch from Debian Samba package maintainers:

Patch 1 of 3:

- Patch 1 adds the new variables
- Patch 2 makes uses of them for files belonging to the "state" path
  and the "code pages" path
  This patch seemed more easily acceptable, which explains why we
  separated it from patch 3
- Patch 3 reassigns files to the "cache" path. Indeed all "debatable"
  changes have been moved to that one

The point is adding:

- a path for non discardable state data: basically all TDB files
  that may need to be backed up
- a path for shared data: mostly codepage stuff
- a path for cache data to host files such as
  browse.dat, printers.tbd, <printer>.tdb

All these are currently mixed in "libdir" (${prefix}/lib/samba by default).
The patch keeps these new paths to point to ${prefix}/lib/samba by default
and does therefore not change the software behaviour.  Used alone, it just
adds unused variables...so it can safely be used in sources without any
behaviour change and no impact on Samba developers work.
(This used to be commit b7d2fadbef044a89920da613b1aafc74a3d94e24)

16 years agoEnable building the zfsacl VFS module by specifying
Michael Adam [Thu, 1 Nov 2007 13:24:27 +0000 (14:24 +0100)]
Enable building the zfsacl VFS module by specifying
"--with-shared-modules=vfs_zfsacl" on the configure command line.

Michael
(This used to be commit 69135360648e395eda29b15625b20a877e38bdd8)

16 years agoNote when we're setting change time, not write time, and send
Jeremy Allison [Wed, 31 Oct 2007 23:32:48 +0000 (16:32 -0700)]
Note when we're setting change time, not write time, and send
message accordingly. Apart from not supporting create time we
now pass the S4 RAW-NOTIFY torture.
Jeremy.
(This used to be commit 8a77f520fa03afa60eac2aaeab4babe7dd8db4f0)

16 years agoFix some cases where file_set_dosmode was being passed
Jeremy Allison [Wed, 31 Oct 2007 22:45:45 +0000 (15:45 -0700)]
Fix some cases where file_set_dosmode was being passed
False instead of NULL. Fix more of the notifications to
be correct for Samba4 RAW-NOTIFY torture (we had missed
one when calling set_ea_dos_attribute().
Jeremy.
(This used to be commit 39d265375cf55eedddef2c4faa65398df73d5ed2)

16 years agoFix vfstest link - move socket calls into smbd/process.c
Jeremy Allison [Wed, 31 Oct 2007 21:24:52 +0000 (14:24 -0700)]
Fix vfstest link - move socket calls into smbd/process.c
not smbd/server.c
Jeremy
(This used to be commit 8fbefe18a2dc23adb0ebe488cfb37ab4a382207d)

16 years agoAdd printout of large read/write caps if detected.
Jeremy Allison [Wed, 31 Oct 2007 21:12:50 +0000 (14:12 -0700)]
Add printout of large read/write caps if detected.
Jeremy.
(This used to be commit 52f13d84955224ebbaead53d8428baade6a22fe0)

16 years agoMake explicit draining the socket on RECVFILE. Add
Jeremy Allison [Wed, 31 Oct 2007 21:01:35 +0000 (14:01 -0700)]
Make explicit draining the socket on RECVFILE. Add
capability for large UNIX write if not signing and
recvfile set. Cope with large UNIX write length on
incoming processing. Stevef - we can now test 1-16Mb
writes from CIFFS.
Jeremy.
(This used to be commit 8cf78776b0a44bd026cef3d74eb11cfb415f8303)

16 years agoHandle the disk full error case correctly.
Jeremy Allison [Wed, 31 Oct 2007 01:18:40 +0000 (18:18 -0700)]
Handle the disk full error case correctly.
Jeremy.
(This used to be commit b7088bb9c2a00d4717b9a7efa4bddc0c005f4efb)

16 years agoEnsure we don't prematurely clean out the bytes read.
Jeremy Allison [Wed, 31 Oct 2007 00:42:02 +0000 (17:42 -0700)]
Ensure we don't prematurely clean out the bytes read.
Jeremy.
(This used to be commit 247675695dfbff503b5792de62f8bb1567ea2327)

16 years agoAdd new parameter, "min receivefile size" (by default set
Jeremy Allison [Tue, 30 Oct 2007 23:22:24 +0000 (16:22 -0700)]
Add new parameter, "min receivefile size" (by default set
to zero). If non-zero, writeX calls greater than this
value will be left in the socket buffer for later handling
with recvfile (or userspace equivalent). Definition of
recvfile for your system is left as an exercise for
the reader (I'm working on getting splice working :-).
Jeremy.
(This used to be commit 11c03b75ddbcb6e36b231bb40a1773d1c550621c)

16 years agoMerge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
Jeremy Allison [Tue, 30 Oct 2007 19:55:56 +0000 (12:55 -0700)]
Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
(This used to be commit 765b37c693516757686118fffd3c80cf4d5e7344)

16 years agoOur userlevel SMBwriteX call is non-standard in that it
Jeremy Allison [Tue, 30 Oct 2007 19:54:39 +0000 (12:54 -0700)]
Our userlevel SMBwriteX call is non-standard in that it
sometimes uses a 12-word write and doesn't include a pad
byte (as Windows does). Fix this so that we are identical
to Windows clients. This will make recvfile processing
much easier to detect (as we can just read a standard
writeX header length to decide).
Jeremy.
(This used to be commit 3d3d1b806aef3617abaac46daf230ed32076e2ce)