1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

26911 Commits

Author SHA1 Message Date
Stefan Metzmacher
0d221a3f0a mapping_tdb: use the correct sid for the key creation
metze
2008-04-01 14:04:21 +02:00
Stefan Metzmacher
16d18df0d0 mapping_tdb: use db_open_trans()
metze
2008-04-01 14:04:21 +02:00
Volker Lendecke
d702ed73c1 Protect group_mapping.tdb ops with transactions
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-04-01 14:04:21 +02:00
Stefan Metzmacher
d4826a0136 pdb_tdb: use != 0 instead off == -1 for dbwrap functions
metze
2008-04-01 14:04:20 +02:00
Stefan Metzmacher
9322442510 passdb: guard pdb_generate_sam_sid() with a transaction
This prevents possible races with some dbwrap backends

metze
2008-04-01 14:04:20 +02:00
Stefan Metzmacher
986bc7e8b2 passdb/secrets: add secrets_db_ctx() to get the db_context
metze
2008-04-01 14:04:20 +02:00
Stefan Metzmacher
983fd58805 regdb: let regdb_fetch_keys() handle NULL and failure cases in the same way and return -1
metze
2008-04-01 14:04:20 +02:00
Stefan Metzmacher
c214107bd9 regdb: get the seqnum before the record, to not miss something
metze
2008-04-01 14:04:20 +02:00
Stefan Metzmacher
924acd7f69 regdb: use dbwrap->fetch() instead of fetch_locked() for readonly access"
This is the fixed version of commit 5c28c74aa06a82559f498373b3d6e9892d5c2cbe.

metze
2008-04-01 14:04:20 +02:00
Michael Adam
1cb3b2f065 test: make registry tests more portable: protect some grep patterns in ' '.
Michael
2008-04-01 13:43:30 +02:00
Michael Adam
5c1b7ee5c1 test: make registry tests more portable: use 'printf "%s"' instead of 'echo -e'
Michael
2008-04-01 13:43:30 +02:00
Jeremy Allison
da2c19c481 Ok, final move of this code :-). I think I've found the correct
place for it now where it will cause minimal disruption (only
call the extra message_dispatch just before reading the next
smb off the wire).
Jeremy.
2008-03-31 17:01:27 -07:00
Jeremy Allison
26a74d01bb Move the message_dispatch() call after the check for errno on
the select return. We don't want the call to message_dispatch
to mess up the errno value.
Jeremy.
2008-03-31 16:56:21 -07:00
Jeremy Allison
a7499e994a Reduce the race condition in Samba4 in RAW-RENAME test. We rename a file
using trans2 setfileinfo on one connection, and then check the
file name has changed on the other. In Samba we achieve this by
sending a local message to the other process. This change causes
us to re-scan for incoming messages after we've woken up from the
select (which is cheap if there are no pending messages). This reduces
the race significantly. Volker please review.
Jeremy.
2008-03-31 16:46:20 -07:00
Günther Deschner
3cb1cdee93 Fix build of rpcclient.
Guenther
2008-04-01 00:32:23 +02:00
Günther Deschner
c40522cfe9 Fix build warning.
Guenther
2008-04-01 00:26:33 +02:00
Günther Deschner
8b4eac0ab1 Fix SRVSVC NetShareInfo level 502 client-side.
Guenther
2008-04-01 00:26:32 +02:00
Günther Deschner
776facabf6 Fix SRVSVC ShareInfo level 502 server side handling.
Guenther
2008-04-01 00:26:32 +02:00
Günther Deschner
3adf82554a Re-run make idl.
Guenther
2008-04-01 00:26:32 +02:00
Günther Deschner
da7f006539 Fix IDL for srvsvc_NetShareInfo502. It does indeed contain a sec_desc_buf.
Guenther
2008-04-01 00:26:32 +02:00
Günther Deschner
b4d944e724 Fix SRVSVC ShareInfo max_users handling server side.
Guenther
2008-04-01 00:26:32 +02:00
Günther Deschner
1b6083449f Re-run make idl.
Guenther
2008-04-01 00:26:32 +02:00
Günther Deschner
29c4279256 Use uint32 in max_users field in SRVSVC ShareInfo levels consistently.
Guenther
2008-04-01 00:26:32 +02:00
Günther Deschner
2fd90b62d7 Fix _srvsvc_NetShareSetInfo.
Guenther
2008-04-01 00:26:32 +02:00
Michael Adam
fa5968a26b test: add test script for testing "net registry".
Michael
2008-04-01 00:09:59 +02:00
Jeff Layton
e03d1dfdb8 mount.cifs: fix several problems when mounting subdirectories of shares (try 2)
This patch is the second patch to attempt to fix up some of the problems
with mounting subdirectories of shares. The earlier patch didn't handle
this correctly when POSIX extensions were enabled. This one does.

This is a bit of a confusing area since the different components of
a service string have different rules:

1) hostname: no '/' (slash) or '\' (backslash) is allowed to be
	     embedded within the string

2) sharename: same rules as hostname

3) prefixpath: '\' *is* allowed to be embedded in a path component,
	       iff POSIX extensions are enabled. Otherwise, neither
	       character is allowed.

The idea here is to allow either character to act as a delimiter when we
know that the character can't be anything but a delimiter (namely
everywhere up to the start of the prefixpath). The patch will convert
any '\' unconditionally to '/' in the UNC portion of the string.

However, inside the prefixpath, we can't make assumptions about what
constitutes a delimiter because POSIX allows for embedded '\'
characters. So there we don't attempt to do any conversion, and pass the
prefixpath to the kernel as is. Once the kernel determines whether POSIX
extensions are enabled, it can then convert the path if needed and it's
able to do so. A patch to handle this has already been committed to the
cifs-2.6 git tree.

This patch also fixes an annoyance. When you mount a subdir of a share,
mount.cifs munges the device string so that you can't tell what the
prefixpath is. So if I mount:

	//server/share/p1/p2/p3

..then /proc/mounts and mtab will show only:

	//server/share

Finally, it also tries to apply some consistent rules to the uppercasing
of strings.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2008-03-31 16:05:20 -04:00
Gerald W. Carter
0c94918fb5 Patch from Nicholas Brealey <nick@brealey.org> to distinguish between WinXP and WinXP64.
Defines a new value for the %a variable when detecting a Windows XP 64-bit client.
2008-03-31 14:34:43 -05:00
Günther Deschner
c4f248df8e Re-add support for the samr parameters string.
(dialin settings, terminal server settings, etc.)

Guenther
2008-03-31 20:55:40 +02:00
Günther Deschner
35a70c65be Re-run make idl.
Guenther
2008-03-31 20:55:40 +02:00
Günther Deschner
98606c667a The parameters string (aka munged dial string) in samr is not a normal lsa_String.
Guenther
2008-03-31 20:55:40 +02:00
Günther Deschner
8f6f0d1601 Add init_samr_parameters_string().
Guenther
2008-03-31 20:55:40 +02:00
Gerald W. Carter
3414eac439 Fix enumeration of forest trusts from our root domain.
Do not overwrite the domain->domain_flags when setting infomation
in set_dc_type_and_flags_connect().
2008-03-31 13:40:58 -05:00
Gerald W. Carter
b68caaa81b DIsplay the short domain name in "wbinfo -m " by default.
This fixes wbinfo -m to make preexisting behavior.
Also adds the dns domain to the --verbose output.
2008-03-31 13:40:58 -05:00
Steven Danneman
e7827bb6af Augmented "wbinfo -m" to list additional information about the type, direction, and transitivty of trusts.
* added several helper functions to convert the trust_flags field in the
winbindd_tdc_domain to more useful administrator ideas of trust type, trust
direction, and trust transitivity.

* converted winbindd_list_trusted_domains() to enumerate the trusted domain
cache, instead of the domain list, and return additional trust information to
the calling process

* modified wbinfo to pretty print this additional trust information when a new
--verbose switch is given with -m.  Thus "wbinfo -m" and "wbinfo -all-domains"
output as before, but "wbinfo --verbose -m" prints extra trust info.

* updated some comments and fixed typos
2008-03-31 13:40:58 -05:00
Steven Danneman
6aac972d79 Forest root trust flags won't overwrite child trust flags
* changed the behavior of winbind_ads.c:trusted_domains() to not overwrite
existing trust information if we're joined to a child domain, and querying the
forest root domain.  Previously if we were joined to a child domain, we'd
request all known trust information from this child domain (our primary domain)
and store it in the tdc.  We'd then request all trust information from our tree
root (to get the forests we transitively trust) and overwrite the existing trust
information we already had from the perspective of the tree root.

* updated several comments and fixed typos
2008-03-31 13:40:58 -05:00
Michael Adam
d775194e9c test: add (and unify) sectioning output of subtests in tests_all.sh
Michael
2008-03-31 17:22:03 +02:00
Michael Adam
bf4af79f05 test: add possibility to select tests to run via tests_all.sh (make test)
This allows to select the tests to run with tests_all.sh by setting
the environment variable "RUNTESTS". Example:

RUNTESTS="smbclient_s3_encrypted wbinfo_s3" make test

Michael
2008-03-31 17:22:03 +02:00
Michael Adam
ad1fbadf81 test: in tests_all.sh, wrap calls to test scripts into shell functions.
This is in preparation for enabling running only selected test scripts
through "make test".

Michael
2008-03-31 17:22:02 +02:00
Michael Adam
04b48984bb registry: reg_deletevalue should return error, when the value does not exist.
Michael
2008-03-31 17:22:02 +02:00
Stefan Metzmacher
960c069a23 wbinfo: use wbcAllocateGid()
metze
2008-03-31 12:17:37 +02:00
Stefan Metzmacher
a7d735df29 wbinfo: use wbcAllocateUid()
metze
2008-03-31 12:17:37 +02:00
Stefan Metzmacher
43df48bdca wbinfo: use wbcSidToGid()
metze
2008-03-31 12:17:36 +02:00
Stefan Metzmacher
a25b39cac1 wbinfo: use wbcSidToUid()
metze
2008-03-31 12:17:36 +02:00
Stefan Metzmacher
9936d861a1 wbinfo: use wbcGitToSid()
metze
2008-03-31 12:17:35 +02:00
Stefan Metzmacher
4766ebf7ac wbinfo: use wbcUidToSid()
metze
2008-03-31 12:17:35 +02:00
Stefan Metzmacher
9a2f0b2192 wbinfo: use wbcPing()
metze
2008-03-31 12:17:34 +02:00
Michael Adam
4d0a5d5c93 build: fix configure option --with-static-libs=libXYZ
This should not prevent building but linking of shared lib for
subsystem XYZ (example --with-static-libs=libtdb).

m4 quotation is tricky...

Michael
2008-03-31 11:58:35 +02:00
Michael Adam
5c28c74aa0 Revert "regdb: use dbwrap->fetch() instead of fetch_locked() for readonly access"
This reverts commit 4e2be189e97f653b75bd88135a631ce0f42db267.

Metze, this broke the registry (reg_api layer), but I don't yet know
exactly how and why. By the way, the locks there had the purpose of
fetching the seqnum that really matches the data.

This needs some more thought / debugging. But I wanted to have
the tree in a working state again.

Michael
2008-03-30 03:05:34 +02:00
Volker Lendecke
75eb30884a Fix a segfault (an uninitialized variable) 2008-03-29 13:28:37 +01:00
Michael Adam
6d3fc63bfa winbindd_cache: add missing validation function for pwinfo cache entry
Michael
2008-03-29 02:10:41 +01:00