1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00
Commit Graph

74301 Commits

Author SHA1 Message Date
Stefan Metzmacher
896f105ed4 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
2011-07-11 21:33:20 +02:00
Stefan Metzmacher
ce66d4e4a8 s3:smbd: make smbd_calculate_access_mask() non-static
metze
2011-07-11 21:23:08 +02:00
Stefan Metzmacher
18f967a248 s3:smbd/msdfs: let create_conn_struct() check the share security descriptor
metze
2011-07-11 21:23:08 +02:00
Stefan Metzmacher
7c10b5e033 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
2011-07-11 19:31:13 +02:00
Stefan Metzmacher
cf4832d010 s3:winbindd_cm: make use of cli->dest_ss instead calling getpeername()
metze
2011-07-11 18:18:30 +02:00
Stefan Metzmacher
7a795ffeb4 s3:winbindd_cm: make use of cli_state_disconnect()
metze
2011-07-11 18:18:29 +02:00
Stefan Metzmacher
0791a4d5be s3:winbindd_cm: make use of cli_state_is_connected()
metze
2011-07-11 18:18:29 +02:00
Stefan Metzmacher
1f50d04a5c 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
2011-07-11 18:18:28 +02:00
Stefan Metzmacher
8c29afe14e s3:auth_server: make use of cli_state_is_connected()
metze
2011-07-11 18:18:28 +02:00
Stefan Metzmacher
6ec26f0c1a 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
2011-07-11 18:18:27 +02:00
Stefan Metzmacher
a2e248f270 s3:libsmbclient: use cli_state_is_connected() in SMBC_check_server()
metze
2011-07-11 18:18:27 +02:00
Stefan Metzmacher
e7c9319cac s3:libsmbclient: don't log the lowlevel fd in smbc_free_context()
metze
2011-07-11 18:18:27 +02:00
Stefan Metzmacher
7bba81f69d s3:libsmb: add cli_state_disconnect()
metze
2011-07-11 18:18:26 +02:00
Stefan Metzmacher
fa60a299f5 s3:libsmb: make use of cli_state_is_connected()
metze
2011-07-11 18:18:23 +02:00
Stefan Metzmacher
2b70c0f4f3 s3:libsmb: remove unused cli_set_port()
metze
2011-07-11 16:39:15 +02:00
Stefan Metzmacher
893d137f3f s3:libsmb: also remember the local socket address after connect
metze
2011-07-11 16:39:15 +02:00
Stefan Metzmacher
a2300094db s3:smb2cli_base: add my copyright
metze
2011-07-11 16:35:11 +02:00
Björn Baumbach
50e2785f5e s3-torture: run_locktest2(): replace check_error() with check_both_error()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-11 16:35:11 +02:00
Björn Baumbach
e14e6747ae s3-torture: run_locktest2(): replace cli_lock() with cli_lock32()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-11 16:35:11 +02:00
Björn Baumbach
c9f604543b s3-torture: run_locktest1(): replace cli_lock() with cli_lock32()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-11 16:35:10 +02:00
Björn Baumbach
23b417b4c0 s3-torture: locktest2: replace cli_lock() with cli_lock32()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-11 16:35:10 +02:00
Björn Baumbach
b6e9866c54 s3-torture: let wait_lock() use cli_lock32() instead of cli_lock()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-11 16:35:10 +02:00
Björn Baumbach
f2c5a0afd2 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
2011-07-11 12:48:38 +02:00
Björn Baumbach
57194d8c5d s3-libsmb: introduce cli_lock32()
Same like cli_lock() but return NTSTATUS instead of bool

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-11 11:36:50 +02:00
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