samba.git
12 years agos4-dsdb: fixed the defaultObjectCategory to have a full GUID
Andrew Tridgell [Wed, 13 Jul 2011 09:36:59 +0000 (19:36 +1000)]
s4-dsdb: fixed the defaultObjectCategory to have a full GUID

this fixes the DN to have a full GUID for new objects

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Jul 13 14:03:30 CEST 2011 on sn-devel-104

12 years agos4-fault: changed to use %d for PID, instead of %PID%
Andrew Tridgell [Wed, 13 Jul 2011 07:26:31 +0000 (17:26 +1000)]
s4-fault: changed to use %d for PID, instead of %PID%

this matches the s3 behaviour

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agos4-dsdb: another special case for the "member" attribute
Andrew Tridgell [Wed, 13 Jul 2011 05:58:45 +0000 (15:58 +1000)]
s4-dsdb: another special case for the "member" attribute

thanks to Matthias for his great test suite work!

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agos4-dsdb Don't process deletion of member attributes here.
Andrew Bartlett [Wed, 13 Jul 2011 05:31:19 +0000 (15:31 +1000)]
s4-dsdb Don't process deletion of member attributes here.

We don't need to compare the delete against the primaryGroupID check
here - that test is for adds.

Andrew Bartlett

12 years agodsdb: fixed special case of zero NTTIME
Andrew Tridgell [Wed, 13 Jul 2011 03:26:48 +0000 (13:26 +1000)]
dsdb: fixed special case of zero NTTIME

we can't convert 0 NTTIME via a unix time_t

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agodbcheck: use samdb_schema for getting the backlink
Andrew Tridgell [Wed, 13 Jul 2011 03:26:19 +0000 (13:26 +1000)]
dbcheck: use samdb_schema for getting the backlink

this is not available on an ldap samdb

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agoldb: added ldb_val_string_cmp()
Andrew Tridgell [Wed, 13 Jul 2011 03:25:34 +0000 (13:25 +1000)]
ldb: added ldb_val_string_cmp()

this should help fix some places where we run past the end of a string

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agoldb: use base searches for @ special DNs
Andrew Tridgell [Wed, 13 Jul 2011 03:05:19 +0000 (13:05 +1000)]
ldb: use base searches for @ special DNs

subtree searches on these DNs don't work any more

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agoldb: don't return special DNs on non-base searches
Andrew Tridgell [Wed, 13 Jul 2011 02:25:09 +0000 (12:25 +1000)]
ldb: don't return special DNs on non-base searches

to look at a special DN, give the full DN

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agoldb: don't shortcut dn comparison for mismatched special DNs
Andrew Tridgell [Wed, 13 Jul 2011 02:24:25 +0000 (12:24 +1000)]
ldb: don't shortcut dn comparison for mismatched special DNs

DNs that start with @ can't be compared via string comparison with
normal DNs

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agodbcheck: only do the provision dbcheck if there are objects to check
Andrew Tridgell [Wed, 13 Jul 2011 00:54:50 +0000 (10:54 +1000)]
dbcheck: only do the provision dbcheck if there are objects to check

when in FILL_DRS mode, there are no objects to check yet

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agos4-test: fixed usage message on renamedc.sh
Andrew Tridgell [Wed, 13 Jul 2011 00:49:45 +0000 (10:49 +1000)]
s4-test: fixed usage message on renamedc.sh

12 years agos4-provision: fixed the GUIDs in the provision using dbcheck
Andrew Tridgell [Wed, 13 Jul 2011 00:31:15 +0000 (10:31 +1000)]
s4-provision: fixed the GUIDs in the provision using dbcheck

some DNs are are not setup with GUIDs during the provision because of
circular dependencies between objects. This adds a dbcheck pass to the
provision to fix those DNs

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agos4-dsdb: fixed modify of ACLs on deleted objects
Andrew Tridgell [Wed, 13 Jul 2011 00:28:07 +0000 (10:28 +1000)]
s4-dsdb: fixed modify of ACLs on deleted objects

this is needed for the dbcheck code

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agodbcheck: only fix replPropertyMetaData if we included it in the search
Andrew Tridgell [Wed, 13 Jul 2011 00:12:48 +0000 (10:12 +1000)]
dbcheck: only fix replPropertyMetaData if we included it in the search

if we didn't find a replPropertyMetaData attribute at all then don't
try fixing it

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

12 years agodbcheck: added checks for missing and orphansed backlinks
Andrew Tridgell [Tue, 12 Jul 2011 01:26:29 +0000 (11:26 +1000)]
dbcheck: added checks for missing and orphansed backlinks

this checks for missing backlinks or backlinks without a forward link
and optionally fixes them

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agos4-dsdb: raise debug level for backlink errors
Andrew Tridgell [Tue, 12 Jul 2011 01:25:39 +0000 (11:25 +1000)]
s4-dsdb: raise debug level for backlink errors

when dbcheck is fixing missing backlinks we don't want a DEBUG 0
message

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

12 years agodbcheck: fixed ldap check with no database specified
Andrew Tridgell [Tue, 12 Jul 2011 01:12:21 +0000 (11:12 +1000)]
dbcheck: fixed ldap check with no database specified

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

12 years agodbcheck: added --reindex option
Andrew Tridgell [Tue, 12 Jul 2011 01:05:43 +0000 (11:05 +1000)]
dbcheck: added --reindex option

this allows you to force a reindex of the database

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agosamba-tool: fixed ldapcmp to run as non-root
Andrew Tridgell [Tue, 12 Jul 2011 00:41:52 +0000 (10:41 +1000)]
samba-tool: fixed ldapcmp to run as non-root

this avoids the need for access to the secrets database

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

12 years agodbcheck: added checking of backlinks
Andrew Tridgell [Mon, 11 Jul 2011 06:55:36 +0000 (16:55 +1000)]
dbcheck: added checking of backlinks

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

12 years agopydsdb: added get_backlink_from_lDAPDisplayName()
Andrew Tridgell [Mon, 11 Jul 2011 06:55:11 +0000 (16:55 +1000)]
pydsdb: added get_backlink_from_lDAPDisplayName()

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

12 years agos4-dsdb: moved checking of duplicate member entries to repl_meta_data.c
Andrew Tridgell [Mon, 11 Jul 2011 05:32:12 +0000 (15:32 +1000)]
s4-dsdb: moved checking of duplicate member entries to repl_meta_data.c

the samldb checks failed to account for the possibility of a member
being removed and added in the same modify operation. This happens
(for example) when dbcheck is fixing a SID in a DN.

The repl_meta_data.c code already has this check, it just wasn't
giving the right specialised error code for the 'member' attribute

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

12 years agos3-rpc_server: Removed no longer used functions.
Vicentiu Ciorbaru [Tue, 12 Jul 2011 16:54:45 +0000 (19:54 +0300)]
s3-rpc_server: Removed no longer used functions.

Removed winreg_printer_delete_subkeys().
Removed winreg_printer_enumvalues().

Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Jul 13 12:42:02 CEST 2011 on sn-devel-104

12 years agos3-rpc_client: Migrate to dcerpc_winreg_delete_subkeys_recursive().
Vicentiu Ciorbaru [Tue, 12 Jul 2011 16:50:57 +0000 (19:50 +0300)]
s3-rpc_client: Migrate to dcerpc_winreg_delete_subkeys_recursive().

Functions now use dcerpc_winreg_delete_subkeys_recursive() instead of the more
specific printer function winreg_printer_delete_subkeys().

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3-rpc_client: Migrate to dcerpc_winreg_enumvals() function.
Vicentiu Ciorbaru [Tue, 12 Jul 2011 16:42:15 +0000 (19:42 +0300)]
s3-rpc_client: Migrate to dcerpc_winreg_enumvals() function.

The functions that called winreg_printer_enumvalues() function now use
dcerpc_winreg_enumvals().

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3-rpc_client: Added dcerpc_winreg_delete_subkeys_recursive() function.
Vicentiu Ciorbaru [Tue, 12 Jul 2011 16:38:14 +0000 (19:38 +0300)]
s3-rpc_client: Added dcerpc_winreg_delete_subkeys_recursive() function.

This function is set to replace the more specific printer function
winreg_printer_delete_subkeys().

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agos3-rpc_client: Added dcerpc_winreg_enumvals() function.
Vicentiu Ciorbaru [Tue, 12 Jul 2011 16:37:31 +0000 (19:37 +0300)]
s3-rpc_client: Added dcerpc_winreg_enumvals() function.

The function is set to replace the more specific printer function
winreg_printer_enumvalues() function.

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agodynconfig: rework the logic to support --enable-fhs
Stefan Metzmacher [Tue, 21 Jun 2011 15:49:06 +0000 (17:49 +0200)]
dynconfig: rework the logic to support --enable-fhs

This reorders the data structure which represents the options
to build a more useful hierachy. This makes it more obvious
which defaults values are used in the 'STD' and 'FHS' flavors.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jul 13 09:33:21 CEST 2011 on sn-devel-104

12 years agodynconfig: add SambaIndentedHelpFormatter in order to support \n in option help text
Stefan Metzmacher [Tue, 21 Jun 2011 15:46:36 +0000 (17:46 +0200)]
dynconfig: add SambaIndentedHelpFormatter in order to support \n in option help text

metze

12 years agodynconfig: remember which options still have their default value
Stefan Metzmacher [Tue, 21 Jun 2011 10:09:40 +0000 (12:09 +0200)]
dynconfig: remember which options still have their default value

If the values are explicit specified on the command line, we need to
keep them.

metze

12 years agodynconfig: use an option group for the samba specific options
Stefan Metzmacher [Tue, 21 Jun 2011 10:07:17 +0000 (12:07 +0200)]
dynconfig: use an option group for the samba specific options

metze

12 years agoRevert "s4-build Change default paths and --with flags for a 4.0 release"
Stefan Metzmacher [Mon, 20 Jun 2011 16:02:04 +0000 (18:02 +0200)]
Revert "s4-build Change default paths and --with flags for a 4.0 release"

This reverts commit edd3e8b03aa0bca85d4a9a62b35471e76a1f9390.

12 years agoRevert "build: Put lockdir and cachedir in FHS-like locations by default"
Stefan Metzmacher [Mon, 20 Jun 2011 16:02:00 +0000 (18:02 +0200)]
Revert "build: Put lockdir and cachedir in FHS-like locations by default"

This reverts commit 6c9a78074a429773cefd1a3c798b7e3ad7d4c325.

12 years agoldb-tdb: Introduce a flag on ltdb_add_internal to indicate whether unique value test...
Matthieu Patou [Tue, 12 Jul 2011 15:22:35 +0000 (19:22 +0400)]
ldb-tdb: Introduce a flag on ltdb_add_internal to indicate whether unique value test should be performed or not

The function ltdb_add_internal is called either from ltdb_add or
ltdb_rename. In case of add we enforce the unique test (unless it has
been relaxed by a upper module through the
LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECK flag), but for rename as it
is translated by a delete + a add we relax the test as we can have one
or more attribute which are supposed to be single valued but that are
not (ie. when we have a couple of deleted value on a single valued
attribute), we have already done the tests on insert so make the
assumption that the values are OK.

Without this patch deleting a subnet that has been affected to more than
one site fails as the delete is in fact a rename to GUID\0DEL ... with
an attribute siteObject that has 1 active link value and 1 inactive link
value

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Wed Jul 13 02:29:20 CEST 2011 on sn-devel-104

12 years agos3:libsmb: remove unused cli_smb_inbuf()
Stefan Metzmacher [Tue, 12 Jul 2011 14:18:10 +0000 (16:18 +0200)]
s3:libsmb: remove unused cli_smb_inbuf()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jul 13 01:19:51 CEST 2011 on sn-devel-104

12 years agos3: dbwrap_ctdb.c: fix #ifdef CTDB_CONTROL_SCHEDULE_FOR_DELETION issue (bug #8303)
Björn Baumbach [Tue, 12 Jul 2011 15:32:55 +0000 (17:32 +0200)]
s3: dbwrap_ctdb.c: fix #ifdef CTDB_CONTROL_SCHEDULE_FOR_DELETION issue (bug #8303)

Check for HAVE_CTDB_CONTROL_SCHEDULE_FOR_DELETION_DECL instead of
CTDB_CONTROL_SCHEDULE_FOR_DELETION, which is an enum member and not a
define.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jul 12 18:56:30 CEST 2011 on sn-devel-104

12 years agos4:libcli/raw: s/SMBchkpth/SMBcheckpath
Stefan Metzmacher [Tue, 12 Jul 2011 07:26:53 +0000 (09:26 +0200)]
s4:libcli/raw: s/SMBchkpth/SMBcheckpath

metze

12 years agos4:winsdb: place wins.ldb in "state dir" instead of "lock dir"
Stefan Metzmacher [Tue, 12 Jul 2011 11:52:54 +0000 (13:52 +0200)]
s4:winsdb: place wins.ldb in "state dir" instead of "lock dir"

It's not only a cache as we also support static records.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jul 12 16:16:45 CEST 2011 on sn-devel-104

12 years agoselftest/Samba4: use "state dir" for persistent files
Stefan Metzmacher [Tue, 12 Jul 2011 11:14:41 +0000 (13:14 +0200)]
selftest/Samba4: use "state dir" for persistent files

metze

12 years agos4:provision: place the sysvol share under "state dir" instead of "lock dir"
Stefan Metzmacher [Tue, 12 Jul 2011 11:49:18 +0000 (13:49 +0200)]
s4:provision: place the sysvol share under "state dir" instead of "lock dir"

metze

12 years agoselftest/Samba4: setup "state dir" and "cache dir"
Stefan Metzmacher [Tue, 12 Jul 2011 11:12:50 +0000 (13:12 +0200)]
selftest/Samba4: setup "state dir" and "cache dir"

metze

12 years agos4:param: add "state dir" and "cache dir" options
Stefan Metzmacher [Tue, 12 Jul 2011 11:04:08 +0000 (13:04 +0200)]
s4:param: add "state dir" and "cache dir" options

metze

12 years agos3:libsmb: remove unused cli_oplock_handler()
Stefan Metzmacher [Tue, 12 Jul 2011 07:20:02 +0000 (09:20 +0200)]
s3:libsmb: remove unused cli_oplock_handler()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jul 12 10:53:52 CEST 2011 on sn-devel-104

12 years agos4:libcli/raw: remove SMBkeepalive
Stefan Metzmacher [Tue, 12 Jul 2011 06:57:34 +0000 (08:57 +0200)]
s4:libcli/raw: remove SMBkeepalive

metze

12 years agos4:smb_server: s/SMBkeepalive/NBSSkeepalive
Stefan Metzmacher [Tue, 12 Jul 2011 06:56:53 +0000 (08:56 +0200)]
s4:smb_server: s/SMBkeepalive/NBSSkeepalive

metze

12 years agos3:include: remove SMBkeepalive
Stefan Metzmacher [Tue, 12 Jul 2011 06:57:14 +0000 (08:57 +0200)]
s3:include: remove SMBkeepalive

metze

12 years agos3:smbd: s/SMBkeepalive/NBSSkeepalive
Stefan Metzmacher [Tue, 12 Jul 2011 06:55:58 +0000 (08:55 +0200)]
s3:smbd: s/SMBkeepalive/NBSSkeepalive

metze

12 years agos3:libsmb: s/SMBkeepalive/NBSSkeepalive
Stefan Metzmacher [Tue, 12 Jul 2011 06:55:26 +0000 (08:55 +0200)]
s3:libsmb: s/SMBkeepalive/NBSSkeepalive

metze

12 years agos3:lib: s/SMBkeepalive/NBSSkeepalive
Stefan Metzmacher [Tue, 12 Jul 2011 06:53:30 +0000 (08:53 +0200)]
s3:lib: s/SMBkeepalive/NBSSkeepalive

metze

12 years agolibcli/smb: add NBSS message types
Stefan Metzmacher [Tue, 12 Jul 2011 06:42:30 +0000 (08:42 +0200)]
libcli/smb: add NBSS message types

metze

12 years agos3:libsmb: remove unused cli->privileges
Stefan Metzmacher [Mon, 11 Jul 2011 20:08:10 +0000 (22:08 +0200)]
s3:libsmb: remove unused cli->privileges

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jul 12 09:30:49 CEST 2011 on sn-devel-104

12 years agos3:smbd: use PROTOCOL_SMB2_02 instead PROTOCOL_SMB2
Stefan Metzmacher [Mon, 11 Jul 2011 20:23:56 +0000 (22:23 +0200)]
s3:smbd: use PROTOCOL_SMB2_02 instead PROTOCOL_SMB2

metze

12 years agos3:loadparm: use PROTOCOL_SMB2_02 instead of PROTOCOL_SMB2
Stefan Metzmacher [Mon, 11 Jul 2011 20:22:49 +0000 (22:22 +0200)]
s3:loadparm: use PROTOCOL_SMB2_02 instead of PROTOCOL_SMB2

metze

12 years agolibcli/smb: add PROTOCOL_SMB2_02 constant
Stefan Metzmacher [Mon, 11 Jul 2011 20:21:43 +0000 (22:21 +0200)]
libcli/smb: add PROTOCOL_SMB2_02 constant

metze

12 years agos3:smb2_create: use smbd_calculate_access_mask() instead of smbd_check_open_rights()
Stefan Metzmacher [Sun, 10 Jul 2011 11:09:06 +0000 (13:09 +0200)]
s3:smb2_create: use smbd_calculate_access_mask() instead of smbd_check_open_rights()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jul 11 22:45:01 CEST 2011 on sn-devel-104

12 years agos3:smb2_tcon: return the correct maximal_access on the share
Stefan Metzmacher [Sun, 10 Jul 2011 11:02:11 +0000 (13:02 +0200)]
s3:smb2_tcon: return the correct maximal_access on the share

metze

12 years agos3:smbd: return the real share access mask in the SMBtconX response
Stefan Metzmacher [Mon, 11 Jul 2011 14:12:57 +0000 (16:12 +0200)]
s3:smbd: return the real share access mask in the SMBtconX response

metze

12 years agos3:smbd: use smbd_calculate_access_mask() also for fake_files
Stefan Metzmacher [Sun, 10 Jul 2011 11:59:40 +0000 (13:59 +0200)]
s3:smbd: use smbd_calculate_access_mask() also for fake_files

metze

12 years agos3:smbd: check the share level access mask in smbd_calculate_access_mask()
Stefan Metzmacher [Sun, 10 Jul 2011 11:03:51 +0000 (13:03 +0200)]
s3:smbd: check the share level access mask in smbd_calculate_access_mask()

I think we should reject invalid access early,
before we might create new files.

Also smbd_check_open_rights() is only called if the file existed.

metze

12 years agos3:smbd: make smbd_calculate_access_mask() non-static
Stefan Metzmacher [Sun, 10 Jul 2011 11:00:25 +0000 (13:00 +0200)]
s3:smbd: make smbd_calculate_access_mask() non-static

metze

12 years agos3:smbd/msdfs: let create_conn_struct() check the share security descriptor
Stefan Metzmacher [Mon, 11 Jul 2011 16:09:44 +0000 (18:09 +0200)]
s3:smbd/msdfs: let create_conn_struct() check the share security descriptor

metze

12 years agos3:winbindd_cm: make use of cli->src_ss instead of calling getsockname()
Stefan Metzmacher [Mon, 11 Jul 2011 13:12:40 +0000 (15:12 +0200)]
s3:winbindd_cm: make use of cli->src_ss instead of calling getsockname()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jul 11 19:31:14 CEST 2011 on sn-devel-104

12 years agos3:winbindd_cm: make use of cli->dest_ss instead calling getpeername()
Stefan Metzmacher [Mon, 11 Jul 2011 12:58:41 +0000 (14:58 +0200)]
s3:winbindd_cm: make use of cli->dest_ss instead calling getpeername()

metze

12 years agos3:winbindd_cm: make use of cli_state_disconnect()
Stefan Metzmacher [Mon, 11 Jul 2011 12:38:52 +0000 (14:38 +0200)]
s3:winbindd_cm: make use of cli_state_disconnect()

metze

12 years agos3:winbindd_cm: make use of cli_state_is_connected()
Stefan Metzmacher [Mon, 11 Jul 2011 12:19:55 +0000 (14:19 +0200)]
s3:winbindd_cm: make use of cli_state_is_connected()

metze

12 years agos3:auth_server: use cli_echo() to check if the server is alive
Stefan Metzmacher [Mon, 11 Jul 2011 11:56:10 +0000 (13:56 +0200)]
s3:auth_server: use cli_echo() to check if the server is alive

This works over port 139 and also 445. send_keepalive() would
only work on port 139.

metze

12 years agos3:auth_server: make use of cli_state_is_connected()
Stefan Metzmacher [Mon, 11 Jul 2011 11:55:18 +0000 (13:55 +0200)]
s3:auth_server: make use of cli_state_is_connected()

metze

12 years agos3:client: simplify readline_callback() to only use cli_echo()
Stefan Metzmacher [Mon, 11 Jul 2011 11:19:47 +0000 (13:19 +0200)]
s3:client: simplify readline_callback() to only use cli_echo()

cli_echo() already swallows NBT keepalive messages,
so there's no need to filter them in the 'smbclient' layer.

metze

12 years agos3:libsmbclient: use cli_state_is_connected() in SMBC_check_server()
Stefan Metzmacher [Mon, 11 Jul 2011 12:15:21 +0000 (14:15 +0200)]
s3:libsmbclient: use cli_state_is_connected() in SMBC_check_server()

metze

12 years agos3:libsmbclient: don't log the lowlevel fd in smbc_free_context()
Stefan Metzmacher [Mon, 11 Jul 2011 12:29:28 +0000 (14:29 +0200)]
s3:libsmbclient: don't log the lowlevel fd in smbc_free_context()

metze

12 years agos3:libsmb: add cli_state_disconnect()
Stefan Metzmacher [Mon, 11 Jul 2011 12:33:54 +0000 (14:33 +0200)]
s3:libsmb: add cli_state_disconnect()

metze

12 years agos3:libsmb: make use of cli_state_is_connected()
Stefan Metzmacher [Mon, 11 Jul 2011 14:25:18 +0000 (16:25 +0200)]
s3:libsmb: make use of cli_state_is_connected()

metze

12 years agos3:libsmb: remove unused cli_set_port()
Stefan Metzmacher [Mon, 11 Jul 2011 14:37:25 +0000 (16:37 +0200)]
s3:libsmb: remove unused cli_set_port()

metze

12 years agos3:libsmb: also remember the local socket address after connect
Stefan Metzmacher [Mon, 11 Jul 2011 12:26:23 +0000 (14:26 +0200)]
s3:libsmb: also remember the local socket address after connect

metze

12 years agos3:smb2cli_base: add my copyright
Stefan Metzmacher [Mon, 11 Jul 2011 13:14:34 +0000 (15:14 +0200)]
s3:smb2cli_base: add my copyright

metze

12 years agos3-torture: run_locktest2(): replace check_error() with check_both_error()
Björn Baumbach [Mon, 11 Jul 2011 12:23:30 +0000 (14:23 +0200)]
s3-torture: run_locktest2(): replace check_error() with check_both_error()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3-torture: run_locktest2(): replace cli_lock() with cli_lock32()
Björn Baumbach [Mon, 11 Jul 2011 12:20:14 +0000 (14:20 +0200)]
s3-torture: run_locktest2(): replace cli_lock() with cli_lock32()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3-torture: run_locktest1(): replace cli_lock() with cli_lock32()
Björn Baumbach [Mon, 11 Jul 2011 12:05:14 +0000 (14:05 +0200)]
s3-torture: run_locktest1(): replace cli_lock() with cli_lock32()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3-torture: locktest2: replace cli_lock() with cli_lock32()
Björn Baumbach [Mon, 11 Jul 2011 11:49:18 +0000 (13:49 +0200)]
s3-torture: locktest2: replace cli_lock() with cli_lock32()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3-torture: let wait_lock() use cli_lock32() instead of cli_lock()
Björn Baumbach [Mon, 11 Jul 2011 09:50:59 +0000 (11:50 +0200)]
s3-torture: let wait_lock() use cli_lock32() instead of cli_lock()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3-libsmb: let cli_lock64 return NTSTATUS instead of bool
Björn Baumbach [Mon, 11 Jul 2011 09:19:21 +0000 (11:19 +0200)]
s3-libsmb: let cli_lock64 return NTSTATUS instead of bool

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jul 11 12:48:38 CEST 2011 on sn-devel-104

12 years agos3-libsmb: introduce cli_lock32()
Björn Baumbach [Mon, 11 Jul 2011 09:13:18 +0000 (11:13 +0200)]
s3-libsmb: introduce cli_lock32()

Same like cli_lock() but return NTSTATUS instead of bool

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agodbcheck: use get_lDAPDisplayName_by_attid()
Andrew Tridgell [Mon, 11 Jul 2011 04:28:19 +0000 (14:28 +1000)]
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

12 years agodsdb: added get_lDAPDisplayName_by_attid
Andrew Tridgell [Mon, 11 Jul 2011 04:27:21 +0000 (14:27 +1000)]
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>

12 years agodbcheck: improved error checking in fixup of missing metdata
Andrew Tridgell [Mon, 11 Jul 2011 04:05:30 +0000 (14:05 +1000)]
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>

12 years agos4-provision: use samba.unix2nttime() instead of hard coding NTTIME offsets
Andrew Tridgell [Mon, 11 Jul 2011 03:45:50 +0000 (13:45 +1000)]
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>

12 years agos4-drs: do not return links pointed to unexistant objects
Matthieu Patou [Thu, 7 Jul 2011 22:06:04 +0000 (02:06 +0400)]
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>
12 years agos4-dirsync: do not return linked attribute if the target object is no more
Matthieu Patou [Thu, 7 Jul 2011 22:04:52 +0000 (02:04 +0400)]
s4-dirsync: do not return linked attribute if the target object is no more

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos4-dsdb: allow objectsid to be specified in a modification operation
Matthieu Patou [Wed, 6 Jul 2011 20:32:32 +0000 (00:32 +0400)]
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>
12 years agos4-samba-tool: dbcheck, check and fix broken metadata
Matthieu Patou [Wed, 6 Jul 2011 20:31:21 +0000 (00:31 +0400)]
s4-samba-tool: dbcheck, check and fix broken metadata

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos4-python: Add functions to get linkid and systemflags of an attribute
Matthieu Patou [Wed, 6 Jul 2011 20:29:58 +0000 (00:29 +0400)]
s4-python: Add functions to get linkid and systemflags of an attribute

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos4-dsdb: if the provision control is specified, update replication metadata even...
Matthieu Patou [Wed, 6 Jul 2011 20:27:44 +0000 (00:27 +0400)]
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>
12 years agoupgradeprovision: reduce the number of attribute that we skip
Matthieu Patou [Tue, 5 Jul 2011 17:56:30 +0000 (21:56 +0400)]
upgradeprovision: reduce the number of attribute that we skip

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos4-provision: fix the value of creation timestamp to be a MS timestamp
Matthieu Patou [Sun, 3 Jul 2011 07:15:05 +0000 (11:15 +0400)]
s4-provision: fix the value of creation timestamp to be a MS timestamp

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agos4-dsdb: when replacing linked attribute take always the new dn as the old dn might...
Matthieu Patou [Sun, 3 Jul 2011 18:21:29 +0000 (22:21 +0400)]
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>
12 years agos4-dsdb: check for single valued attribute in repl_meta_data module
Matthieu Patou [Sun, 3 Jul 2011 18:06:34 +0000 (22:06 +0400)]
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>
12 years agodbcheck: check all objects, including deleted objects
Andrew Tridgell [Mon, 11 Jul 2011 02:23:01 +0000 (12:23 +1000)]
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>

12 years agos4-dsdb: deleted objects are expected to be missing mandatory attributes
Andrew Tridgell [Mon, 11 Jul 2011 02:20:27 +0000 (12:20 +1000)]
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>

12 years agos4-dsdb: fixed crash bug in extended_dn_in
Andrew Tridgell [Mon, 11 Jul 2011 02:01:18 +0000 (12:01 +1000)]
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>