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

74327 Commits

Author SHA1 Message Date
Andrew Tridgell
330c00a14d dbcheck: use get_lDAPDisplayName_by_attid()
this is better than doing a schema search inside the dbcheck code

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Jul 11 07:43:18 CEST 2011 on sn-devel-104
2011-07-11 07:43:18 +02:00
Andrew Tridgell
02562a0ca9 dsdb: added get_lDAPDisplayName_by_attid
this allows conversion from a DRS attribute ID to a LDAP display name

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-11 14:32:45 +10:00
Andrew Tridgell
082a9cc728 dbcheck: improved error checking in fixup of missing metdata
when fixing missing attributes in replPropertyMetaData, allow user to
confirm changes, and check for exceptions

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-11 14:32:45 +10:00
Andrew Tridgell
396beee776 s4-provision: use samba.unix2nttime() instead of hard coding NTTIME offsets
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-11 14:32:45 +10:00
Matthieu Patou
723fc5fadd s4-drs: do not return links pointed to unexistant objects
When an object is deleted, link pointed to it are marked as inactive.
When the same object is purged we do not remmove the link pointed to it
(we can't know them) so they stay in the database, it turns to be a
problem for Windows 2008.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:45 +10:00
Matthieu Patou
4a4c748d2b s4-dirsync: do not return linked attribute if the target object is no more
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:45 +10:00
Matthieu Patou
74530d6453 s4-dsdb: allow objectsid to be specified in a modification operation
if we have the provision control, it's used by dbcheck

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:45 +10:00
Matthieu Patou
61fc7f285e s4-samba-tool: dbcheck, check and fix broken metadata
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:44 +10:00
Matthieu Patou
bbd4e27745 s4-python: Add functions to get linkid and systemflags of an attribute
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:44 +10:00
Matthieu Patou
ab77df800e s4-dsdb: if the provision control is specified, update replication metadata even if the data hasn't change
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:44 +10:00
Matthieu Patou
e3fef4db0f upgradeprovision: reduce the number of attribute that we skip
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:44 +10:00
Matthieu Patou
c3106a6091 s4-provision: fix the value of creation timestamp to be a MS timestamp
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:44 +10:00
Matthieu Patou
6ec46309c3 s4-dsdb: when replacing linked attribute take always the new dn as the old dn might be broken
The usual use case is that you have a not complete linked attribute (ie.
without the SID) if we keep using the old dn, then the SID will never be
added.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:44 +10:00
Matthieu Patou
3764b93b7c s4-dsdb: check for single valued attribute in repl_meta_data module
This is needed because we can have more than 1 value in a single valued
attribute as we store also deleted values. So we do the check in repl_meta_data
and then indicate LDB to do the check.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11 14:32:44 +10:00
Andrew Tridgell
e14725c8fe dbcheck: check all objects, including deleted objects
this makes dbcheck search over all objects, deleted or not. This
matters because when another DC replicates from this DC it replicates
the deleted objects as well, so invalid attributes in deleted objects
can cause problems on the new DC (for example, windows can get stuck
or even crash during the replication)

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-11 14:32:44 +10:00
Andrew Tridgell
6f6cda72fc s4-dsdb: deleted objects are expected to be missing mandatory attributes
the objectclass_attrs validation that an object contains all mandatory
attributes is incorrect for deleted objects, as they get stripped of
some mandatory attributes when deleted (for example, objectCategory
gets stripped)

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-11 14:32:44 +10:00
Andrew Tridgell
da75e031c3 s4-dsdb: fixed crash bug in extended_dn_in
when extended_dn_in fails to resolve a GUID extended DN component, the
debug code assumed that it was a search operation, and accessed
ac->req->op.search.base, which is not valid for non-search DN
expansions.

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-11 14:32:44 +10:00
Andrew Tridgell
faec2588f5 dbcheck: added confirm_all support for remaining checks
this allows the user to choose all/none for all the remaining database
checks

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-11 14:32:44 +10:00
Andrew Tridgell
059941b6e7 dbcheck: use specified DB schema for non-LDAP URLs
when connecting to a local database with -H we can use that databases
schema

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-11 14:32:44 +10:00
Stefan Metzmacher
86b7b5cd96 socket_wrapper: make sure interfaces are in the valid range on bind()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Jul 10 18:24:14 CEST 2011 on sn-devel-104
2011-07-10 18:24:14 +02:00
Stefan Metzmacher
1be5a9b1fd s4:lib/socket: iface_list_wildcard() should only return "::" if we have ipv6 interfaces
If glibc has IPv6 support, but it's not enabled in the running kernel
we should not try to listen on "::".

metze
2011-07-10 17:11:14 +02:00
Stefan Metzmacher
957876e76c s3:smb2cli_tcon: use tevent_req_oom()
metze
2011-07-10 17:11:14 +02:00
Volker Lendecke
fd240b546e s3: Fix Coverity ID 2587,2588: CHECKED_RETURN
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jul 10 10:36:11 CEST 2011 on sn-devel-104
2011-07-10 10:36:11 +02:00
Stefan Metzmacher
244c856cbf s3:smb2cli_base: ask for the next response if there're still pending requests
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Jul  9 13:55:04 CEST 2011 on sn-devel-104
2011-07-09 13:55:04 +02:00
Stefan Metzmacher
8b4a3681e5 s3:smb2cli_base: make use of tevent_req_defer_callback()
In order to notify requests of transport layer errors,
we need to defer the triggering of the callbacks,
otherwise we may crash, if one of the callbacks
destroys the cli_state.

metze
2011-07-09 12:40:28 +02:00
Stefan Metzmacher
facc110c79 s3:smb2cli_base: fix memory hierachy in smb2cli_req_recv()
We need to use talloc_reference() if there're more than one
response, but we use it in a way that the caller can't
call talloc_free() or talloc_unlink() on it.

metze
2011-07-09 12:40:28 +02:00
Stefan Metzmacher
504d092aa7 s3:smb2cli_base: call smb2cli_req_unset_pending() before tevent_req_done()
metze
2011-07-09 12:40:27 +02:00
Stefan Metzmacher
242ca5dba3 s3:smb2cli_base: unset the destructor in smb2cli_req_unset_pending()
metze
2011-07-09 12:40:27 +02:00
Stefan Metzmacher
c55bfc0733 s3:smb2cli_base: keep the order of pending requests
metze
2011-07-09 12:40:27 +02:00
Stefan Metzmacher
a9f03f1982 s3:smb2cli_base: rename 'result' => 'req' in smb2cli_req_create()
metze
2011-07-09 12:40:26 +02:00
Stefan Metzmacher
4768fc6704 tevent: change version to 0.9.13 after adding tevent_req_defer_callback()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Jul  9 12:16:44 CEST 2011 on sn-devel-104
2011-07-09 12:16:44 +02:00
Stefan Metzmacher
e5827a4007 tevent: add tevent_req_defer_callback()
metze
2011-07-09 11:02:42 +02:00
Stefan Metzmacher
2a1ebeae19 tevent: fix comments for tevent_req_post()
metze
2011-07-09 11:02:41 +02:00
Jeremy Allison
fe3992541d Move smbd_smb2_request_check_tcon() smbd_smb2_request_check_session() next to their only user and make them static. Add comments.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Jul  8 21:01:40 CEST 2011 on sn-devel-104
2011-07-08 21:01:40 +02:00
Günther Deschner
f4add4fbf5 s3-waf: split out LIBCLI_WINREG_INTERNAL as LIBCLI_WINREG was pulling in rpc server code in undesired places.
Andreas, please check.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Jul  8 18:34:44 CEST 2011 on sn-devel-104
2011-07-08 18:34:43 +02:00
David Disseldorp
2a02f1c4af winreg: Ensure server return status is set on success
Currently cli_winreg.c functions only set the returned server werror
status on failure, if the server request succeeds the value remains
uninitialised.

Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Fri Jul  8 16:32:39 CEST 2011 on sn-devel-104
2011-07-08 16:32:39 +02:00
David Disseldorp
1271066200 winreg: Use the ntstatus return code for client side errors
cli_winreg.c functions indicate status to the caller in two ways. The
ntstatus return code indicates client side errors, the pwerr argument
carries the server response error code.

Many functions are filling the pwerr argument on client side error, this
change removes these cases.

Signed-off-by: Andreas Schneider <asn@samba.org>
2011-07-08 15:22:27 +02:00
Stefan Metzmacher
d6cd1ee032 s3:libsmb: remove unused cli->inbuf and cli->bufsize
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jul  8 15:21:46 CEST 2011 on sn-devel-104
2011-07-08 15:21:46 +02:00
Stefan Metzmacher
fccc607a5d s3:client: use an inbuf on the stack in readline_callback()
metze
2011-07-08 14:09:11 +02:00
Stefan Metzmacher
fc7359befb s3:libsmb: clistr_pull_talloc() doesn't need base_ptr and flags2 with STR_ASCII
interpret_short_filename() always parses OEM_Strings (in DOS charset).

metze
2011-07-08 14:09:10 +02:00
Stefan Metzmacher
7d757d6ac3 s3:libsmb: remove unused smb_dos_errstr()
metze
2011-07-08 14:09:10 +02:00
Stefan Metzmacher
83301d8b5a s3:libsmb/smberr: make global const arrays static
metze
2011-07-08 14:09:10 +02:00
Stefan Metzmacher
235aedae50 s3:libsmb: don't use the cli->inbuf to store the last error
We keep the raw error in cli->raw_status now, until we fixed all
caller to get the NTSTATUS from the function calls.

metze
2011-07-08 14:09:09 +02:00
Stefan Metzmacher
0342b69f36 s3:torture: use cli_is_nt/dos_error() in run_error_map_extract()
Callers should avoid using cli->inbuf directly!

metze
2011-07-08 14:09:09 +02:00
Stefan Metzmacher
2c160224c2 s3:libsmb: don't call cli_set_error() in cli_echo()
cli_smb_recv() already does it.

metze
2011-07-08 14:09:09 +02:00
Stefan Metzmacher
f0e6e5c37d s3:libsmb: remove unused enum smb_read_errors infrastructure
metze
2011-07-08 14:09:08 +02:00
Stefan Metzmacher
2b8e148084 s3:client: close the socket if receive_smb_raw() fails
metze
2011-07-08 14:09:08 +02:00
Stefan Metzmacher
0ecd15abe6 s3:client: use cli_nt_error() in order to avoid cli_errstr()
metze
2011-07-08 14:09:08 +02:00
Stefan Metzmacher
f5b0bbf108 s3:client: avoid cli_errstr() where we already have an NTSTATUS
metze
2011-07-08 14:09:07 +02:00
Stefan Metzmacher
5cc279eb34 s3:clitar: avoid usage of cli_errstr()
metze
2011-07-08 14:09:07 +02:00