1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
Commit Graph

81441 Commits

Author SHA1 Message Date
Jeremy Allison
f81fd1ccc3 Try and fix the autoconf build on Solaris/Nexenta/etc.
Their AC_TRY_RUN doesn't include any current CPPFLAGS. Make
the set[res]uid checks independent of this. Needs a small
change to the waf build in order to code with the change.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Jun 30 00:32:36 CEST 2012 on sn-devel-104
2012-06-30 00:32:36 +02:00
Jeremy Allison
d91bf0d428 Fix typo in configure.in check for USE_LINUX_THREAD_CREDENTIALS. 2012-06-29 12:13:52 -07:00
Stefan Metzmacher
7d1395536b s3:smbd: make use of smbXsrv_open for smb1/2/3
This makes sure we generate unique persistent file ids,
which are stored in smbXsrv_open_global.tdb.

Pair-Programmed-With: Michael Adam <obnox@samba.org>

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jun 29 21:01:11 CEST 2012 on sn-devel-104
2012-06-29 21:01:11 +02:00
Stefan Metzmacher
f7762e2730 s3:smbd: add smbXsrv_open* infrastructure
Pair-Programmed-With: Michael Adam <obnox@samba.org>

metze
2012-06-29 19:11:04 +02:00
Stefan Metzmacher
9c8e2b5af0 s3:smbXsrv.idl: add smbXsrv_open* structures
struct smbXsrv_open will represent a SMB 1 or SMB 2
open file handle, while 'files_struct' will be changed
to handle just the protocol independent glue for the SMB_VFS layer.

Note: the format is not stable yet, we need to add more things
      when we start to support durable handles.

metze
2012-06-29 19:11:04 +02:00
Björn Jacke
86d586d873 s3:configure: fix numerous compile warnings about implicit declaration of 'exit'
use return instead of exit in configure tests to fix those warnings:

warning: incompatible implicit declaration of built-in function 'exit'

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Jun 29 19:08:54 CEST 2012 on sn-devel-104
2012-06-29 19:08:54 +02:00
Björn Jacke
143b711c23 s3: fix the logic in bsd_statvfs 2012-06-29 17:19:21 +02:00
Gregor Beck
ec737d9604 s3:cclean avoid segfault in case of ctdb missbehaviour
Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Jun 29 17:06:05 CEST 2012 on sn-devel-104
2012-06-29 17:06:05 +02:00
Gregor Beck
fef41956b9 s3:cclean: fix memory allocation
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-29 15:21:23 +02:00
Gregor Beck
9e53a0209b packaging(RHEL-CTDB): package cclean tool
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-29 15:21:22 +02:00
Gregor Beck
250ebe7550 packaging(RHEL-CTDB): make makespec.sh aware of new location of version.h
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-29 15:21:21 +02:00
Michael Adam
01863df25d s3_dbrwap_ctdb: improve a comment in db_ctdb_can_use_local_record()
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2012-06-29 15:21:21 +02:00
Michael Adam
b46977e4f6 s3:dbwrap_ctdb: fix a comment in db_ctdb_fetch()
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2012-06-29 15:21:20 +02:00
Michael Adam
92808a6005 s3:dbwrap_ctdb: expand the comment for the db_ctdb_can_use_local_copy() function
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2012-06-29 15:21:19 +02:00
Michael Adam
0a5f363333 s3:dbwrap_ctdb: rename db_ctdb_own_record() -> db_ctdb_can_use_local_copy()
This matches the function's intention much closer, since it
also tests whether we have a valid local read only copy.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2012-06-29 15:21:19 +02:00
Michael Adam
d6abf79247 s3:dbrwap_ctdb: remove commented out legacy code 2012-06-29 15:21:18 +02:00
Michael Adam
9d11277337 s3:dbwrap_ctdb: fix fetch/fetch_locked when samba is built against old ctdb
The introduction of read only copies has broken the algorithm for
deteting whether we can use the local record copy for fetch_locked
and fetch: For fetch locked the new code always uses the local copy
if there is one...

This patch re-establish the original algorithm for the build against
a ctdb without read only record copies.

Reported-by: Gregor Beck <gbeck@sernet.de>
2012-06-29 15:21:17 +02:00
Stefan Metzmacher
19941a9054 lib/ccan: readd execinfo dependency to failtest
metze

Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-29 15:21:15 +02:00
Stefan Metzmacher
cbf44e8d2f libcli/smb: add SMB2_CAP_DIRECTORY_LEASING to SMB2_CAP_ALL
metze

Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-29 15:21:12 +02:00
Stefan Metzmacher
3c3ed70690 lib/util: fix fd leak in anonymous_shared_allocate() if MAP_ANON is not available
metze
2012-06-29 15:21:10 +02:00
Stefan Metzmacher
1a622fe641 s3:smb2_server: remove max_charge check in smbd_smb2_request_verify_creditcharge()
The client can send any credit charge value, it's ok to send more than needed.

metze

Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-29 15:21:08 +02:00
Björn Jacke
f4a189392c s3:build: tell linker to use corefoundation on all darwin releases
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Jun 29 14:43:39 CEST 2012 on sn-devel-104
2012-06-29 14:43:39 +02:00
Björn Jacke
b526a0d673 s3: merge bsd_statvfs and darwin_statvfs 2012-06-29 12:47:23 +02:00
Rusty Russell
f3862b9171 ccan: we're subsystems, not a library.
Don't expose a libccan.so; it would produce clashes if someone else
does the same thing.  Unfortunately, if we just change it from a
SAMBA_LIBRARY to a SAMBA_SUBSYSTEM, it doesn't create a static library
as we'd like, but links all the object files in.  This means we get
many duplicates (eg. everyone gets a copy of tally, even though only
ntdb wants it).

So, the solution is twofold:
1) Make the ccan modules separate.
2) Make the ccan modules SAMBA_SUBSYSTEMs not SAMBA_LIBRARYs so we don't
   build shared libraries which we can't share.
3) Make the places which uses ccan explicit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date(master): Fri Jun 29 06:22:44 CEST 2012 on sn-devel-104
2012-06-29 06:22:44 +02:00
Jeremy Allison
485787f0df Move back to using per-thread credentials on Linux. Fixes the glibc native AIO lost wakeup problem.
See this post:

https://lists.samba.org/archive/samba-technical/2012-June/085101.html

for details.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jun 29 03:57:45 CEST 2012 on sn-devel-104
2012-06-29 03:57:45 +02:00
Jeremy Allison
821bd95156 Replace all uses of setXX[ug]id() and setgroups with samba_setXX[ug]id() calls.
Will allow thread-specific credentials to be added by modifying
the central definitions. Deliberately left the setXX[ug]id()
call in popt as this is not used in Samba.
2012-06-28 17:15:16 -07:00
Jeremy Allison
7630fe50bd Add missing setresgid() wrapper. 2012-06-28 17:15:16 -07:00
Stefan Metzmacher
ded2cb8f27 docs-xml: document "server max protocol" "SMB2" selects PROTOCOL_SMB2_10
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jun 29 02:07:17 CEST 2012 on sn-devel-104
2012-06-29 02:07:17 +02:00
Stefan Metzmacher
dc66e63d5f s3:param: change "server max protocol" to "SMB2" (SMB2_10)
metze
2012-06-29 00:14:57 +02:00
Stefan Metzmacher
a5b62a60cc lib/param: let "SMB2" select PROTOCOL_SMB2_10
metze
2012-06-29 00:14:57 +02:00
Stefan Metzmacher
34a9892ec1 s3:smb2_server: make the logic in smbd_smb2_request_verify_creditcharge() simpler
We just need a max_charge variable to make the algorithm independent
of multi_credit support.

metze
2012-06-29 00:14:56 +02:00
Stefan Metzmacher
967f2c44b3 s3:smb2_server: simplify smbd_smb2_request_verify_creditcharge() a bit.
A credit charge of 0 is really not a special case, it just means the same
as 1.

metze
2012-06-29 00:14:56 +02:00
Stefan Metzmacher
5b7f5d02b5 s3:smb2_negprot: support SMB2_CAP_LARGE_MTU on everything but port 139
In future we'll have other transports like RDMA.
This makes NBT (tcp port 139) special instead of port 445.

metze
2012-06-29 00:14:56 +02:00
Stefan Metzmacher
1db83d2b37 s3:smb2_server: grant extra credits for multi-credit requests
metze
2012-06-29 00:14:55 +02:00
Stefan Metzmacher
648b959b13 s3:smb2_server: implement credit granting similar to windows
This makes it much easier to compare traces.

metze
2012-06-29 00:14:55 +02:00
Stefan Metzmacher
82dc0b33b9 s3:smb2_server: make sure sequence numbers don't wrap at UINT64_MAX
metze
2012-06-29 00:14:54 +02:00
Stefan Metzmacher
ee8ae459ae s3:smb2_server: make sure we don't grant more credits than we allow
If the client hasn't consumed the lowest seqnum, but the distance
between lowest and highest seqnum has reached max credits.

In that case we should stop granting credits.

metze
2012-06-29 00:14:54 +02:00
Stefan Metzmacher
4fe41c0bb1 s3:smb2_server: check the credit_charge against the already granted credits
metze
2012-06-29 00:14:54 +02:00
Stefan Metzmacher
984fdaf914 s3:smb2_server: split out a smb2_validate_sequence_number() function
metze
2012-06-29 00:14:53 +02:00
Stefan Metzmacher
d6e7a76461 s3:smb2_server: clear sequence window if we got the lowest sequence id
Otherwise we'll never consume sequence id '0'.

metze
2012-06-29 00:14:53 +02:00
Stefan Metzmacher
bd6d415cae s3:smb2_server: fix calculation of the next bitmap_offset
metze
2012-06-29 00:14:52 +02:00
Stefan Metzmacher
d1ee774ed0 s3:smb2_server: remove unused and confusing DEFAULT_SMB2_MAX_CREDIT_BITMAP_FACTOR
metze
2012-06-29 00:14:52 +02:00
Stefan Metzmacher
925994e42e s3:smb2_server: call smbd_smb2_request_validate() also in smbd_smb2_first_negprot()
We need to consume message_id 0, for SMB1 negprot starts.

metze
2012-06-29 00:14:51 +02:00
Stefan Metzmacher
0b8eac9b79 s3:smb2_server: start the connection with one credit granted to the client
metze
2012-06-29 00:14:51 +02:00
Björn Jacke
7560b1cea6 s3: fine tune and clean up statvfs tests
This should also fix the build on Tru64. Tru64 has a POSIX compliant statvfs()
function while most *BSD systems ignore POSIX.

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Thu Jun 28 23:07:23 CEST 2012 on sn-devel-104
2012-06-28 23:07:23 +02:00
Björn Baumbach
f6ac6b8f3c docs-xml: fix typos and format in smb.conf server max protocol man 2012-06-28 21:19:17 +02:00
Björn Baumbach
11fc75fcb5 packaging(RHEL-CTDB): fix build dependencies
Building manual pages needs rsync for copying built mans.
source3/script/installmo.sh calls msgfmt, thats part of gettext.
2012-06-28 21:19:17 +02:00
Andrew Bartlett
a29bf4acf5 selftest: run pdbtest against s3dc as well
This validates the password expiry, account disable in the s3 auth code
and the save/restore of values in tdbsam.

It also provides the first test of some net sam set subcommands.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Jun 28 20:39:38 CEST 2012 on sn-devel-104
2012-06-28 20:39:38 +02:00
Andrew Bartlett
30fd88ed65 selftest: use a loop rather than declare tests for both dc and s3dc 2012-06-28 18:46:23 +02:00
Andrew Bartlett
15b9198644 librpc/ndr: Initilaise the remainder of struct dom_sid after a pull
This copes with the fact that r->sub_auths is a fixed-size array, not
an allocated pointer, and so will still have some bytes no filled in
if the sid did not have a MAX_SUB_AUTHS sub-authorities.

Andrew Bartlett
2012-06-28 18:46:23 +02:00