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

37332 Commits

Author SHA1 Message Date
Stefan Metzmacher
bc98d004c9 s3:libsmb: don't use cli->inbuf in cli_dfs_get_referral()
The rdata buffer returned by cli_trans() doesn't belong to
cli->inbuf, so don't use it.

metze
2011-07-06 17:18:13 +02:00
Stefan Metzmacher
af61f6fce6 s3:libsmb: fix error handling in cli_dfs_get_referral()
We should not return NT_STATUS_OK on error.

metze
2011-07-06 17:18:12 +02:00
Stefan Metzmacher
f9601a9180 s3:sharesec: return an error if get_share_security() returns NULL
This indicates an error, as it uses get_share_security_default()
if no security descriptor is configured.

Jeremy, please check.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jul  6 15:40:23 CEST 2011 on sn-devel-104
2011-07-06 15:40:23 +02:00
Michael Adam
93ad34c4ad s3:test: catch more errors in test_access_check() in the smbclient_s3 test
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Jul  6 14:07:13 CEST 2011 on sn-devel-104
2011-07-06 14:07:13 +02:00
Michael Adam
4af8615da8 s3:registry: update copyright for the registry db implementation 2011-07-06 12:55:25 +02:00
Stefan Metzmacher
310fff02a6 s3:sharesec: also initialize pgranted if get_share_security() returns NULL
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jul  6 12:54:30 CEST 2011 on sn-devel-104
2011-07-06 12:54:30 +02:00
Volker Lendecke
2dfc898d1a s3: Follow the TALLOC_FREE convention in source3
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Jul  6 11:01:05 CEST 2011 on sn-devel-104
2011-07-06 11:01:05 +02:00
Volker Lendecke
6fcb3bbdae s3: Fix Coverity ID 2586 -- NO_EFFECT
tsocket_address_bsd_sockaddr returns ssize_t, and on some systems socklen_t is
unsigned. So (len < 0) could never have turned true.

Volker
2011-07-06 09:50:02 +02:00
Volker Lendecke
7d96a4594b s3: Remove cli_errstr from cmd_posix_open
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Jul  6 09:45:11 CEST 2011 on sn-devel-104
2011-07-06 09:45:11 +02:00
Volker Lendecke
c33a5a659c s3: Fix error logic in posix_open 2011-07-06 08:35:27 +02:00
Volker Lendecke
c1fdec7efc s3: Remove a few uses of cli_errstr 2011-07-06 08:35:27 +02:00
Volker Lendecke
26782fbbf3 s3: make cli_resolve_path return NTSTATUS
This looks larger than it is. No parameters needed changing.
2011-07-06 08:35:27 +02:00
Andrew Bartlett
dd491d8d8c s3-build We no longer require to redefine _SAMBA_BUILD_ 2011-07-06 05:32:59 +02:00
Andrew Bartlett
7891848357 libcli/smb move FILE_TYPE constants in common
This allows us to remove another _SAMBA_BUILD_ conditional

Andrew Bartlett
2011-07-06 05:32:59 +02:00
Andrew Bartlett
6543987139 libcli/smb move enum protocol_types to a common header 2011-07-06 05:32:51 +02:00
Christian Ambach
9a3e2d1c02 s3:smbd fix a compile warning on AIX 5.3
use the correct alias instead of FD directly

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Tue Jul  5 19:51:42 CEST 2011 on sn-devel-104
2011-07-05 19:51:42 +02:00
Christian Ambach
14544cede5 s3:build fix autoconf build on AIX 5.3
using ZLIB_LIBS as dependency made AIX make fail trying to
find -lz as build target
2011-07-05 18:41:24 +02:00
Christian Ambach
3d6dafcce1 s3:lib fix non-empty blank lines 2011-07-05 18:41:24 +02:00
Christian Ambach
f3088d135d s3:modules fix non-empty blank lines 2011-07-05 18:41:24 +02:00
Volker Lendecke
f924913259 s3: Remove some unused variables
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Jul  5 18:40:11 CEST 2011 on sn-devel-104
2011-07-05 18:40:11 +02:00
Volker Lendecke
4deca5d728 s3: Fix bug 8102
We can't allow open with access that has been denied via the share
security descriptor

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jul  5 16:21:54 CEST 2011 on sn-devel-104
2011-07-05 16:21:53 +02:00
Volker Lendecke
720fa46f94 s3: Calculate&store the maximum share access mask
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-05 13:28:08 +02:00
Volker Lendecke
1c022d2e41 s3: Return "granted" from share_access_check
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-05 13:28:03 +02:00
Michael Adam
399c0dba01 s3:registry: remove unused function regdb_key_is_base_key()
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Jul  4 21:11:32 CEST 2011 on sn-devel-104
2011-07-04 21:11:32 +02:00
Michael Adam
86f8eb98fe s3:registry: replace use of deprecated talloc_destroy by talloc_free. 2011-07-04 20:02:10 +02:00
Michael Adam
17b091b7c7 s3:registry: remove superfluous check for success of talloc_stackframe() 2011-07-04 20:02:10 +02:00
Michael Adam
cc384c1596 s3:registry: add debug-level-10 verbosity to regdb_upgrade_v2_v3_fn() 2011-07-04 20:02:10 +02:00
Michael Adam
340be35b9b s3:registry: adapt a debug message to be more systematic 2011-07-04 20:02:10 +02:00
Michael Adam
c8c5d8c89e s3:registry: set registry version to 3 and add upgrade code
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:09 +02:00
Michael Adam
f36ee63df2 s3:registry: add db_context argument to regdb_upgrade_v1_to_v2() 2011-07-04 20:02:09 +02:00
Michael Adam
1621aab139 s3:registry: wrap the whole db upgrade in one transaction
The purpose of this is to prepare for multiple upgrade steps
to be performed in a single transaction, so that no change
at all is made to that database if one step fails.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:09 +02:00
Michael Adam
caf9c99969 s3:registry: change regdb_store_regdb_version() to take db_context argument. 2011-07-04 20:02:09 +02:00
Michael Adam
2273650ca8 s3:registry: fix a comment typo 2011-07-04 20:02:09 +02:00
Michael Adam
a8360712e1 s3:registry: remove unused regdb_delete_sorted_subkeys()
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:09 +02:00
Michael Adam
a0f83ecbb9 s3:registry: don't delete the unused subkeys cache record any more
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:09 +02:00
Michael Adam
50add4091a s3:registry: remove the code to create and search the sorted subkeys cache records
This is not needed any more.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:09 +02:00
Michael Adam
18973fa109 s3:registry: adapt the comment explaining the definition of the existence of a key.
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:09 +02:00
Michael Adam
a255630358 s3:registry: regdb_key_exists now checks only for the list-of-subkeys-record
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
9e2b2c1fcc s3:registry: rewrite init_registry_key_internal
This rewrites init_registry_key_internal() to correctly also create
base keys. It makes use of the existing create functions instead of
duplicating the code.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
747c67cf30 s3:registry: add regdb_create_basekey()
Function to create a base key in the registry db, i.e. one that
has no parent key.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
144c8d77d8 s3:registry: add regdb_create_subkey_internal() taking additional db context argument
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
15a50ef8f8 s3:registry: add new mode to regdb_store_subkey_list() for handing in NULL parent key
Standard behaviour is to concatenate parent and key path (parent\key).
This new mode allows for storing subkey lists for base keys using a NULL
parent argument.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
fc4d79d41a s3:registry: create the empty list of subkeys of the new key in regdb_create_subkey
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
322eaf1e9e s3:registry: refactor creation of subkey list out into regdb_store_subkey_list()
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
394ca1446e s3:registry: remove redundant write of zero-lentgh subkey list record
In this case, the zero-lenght list has already been written in step #2.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
eb797bd206 s3:registry: don't update the sorted subkeys cache any more in regdb_store_keys_internal2()
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
5b01a34ad7 s3:registry: don't skip base key in existence check in regdb_store_keys_internal()
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
da2e64b63f s3:registry: don't skip base keys from existence check in regdb_create_subkey()
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:07 +02:00
Michael Adam
6b99aa496f s3:registry: don't skip base keys from existence check in regdb_delete_subkey()
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:07 +02:00
Christian Ambach
ad4a10dd05 s3:smb2 fix smbd crash on premature end of smb2 conn (Bug 8286)
when smbd tries to clean up locks after a premature end of a smb2
connection, lock_db has already been freed and so it crashes

this patch changes the order in which items are freed so that
lock_db is still around when it is needed

Jeremy, Metze, please check

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Mon Jul  4 20:00:26 CEST 2011 on sn-devel-104
2011-07-04 20:00:26 +02:00
Volker Lendecke
0bec150ab1 s3: Fix an enum/int mixup
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Jul  4 18:47:59 CEST 2011 on sn-devel-104
2011-07-04 18:47:59 +02:00
Stefan Metzmacher
7c96e96e98 s3:smb2_server: there's no reason to check the session id twice on a smb2_tcon request
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jul  4 17:34:13 CEST 2011 on sn-devel-104
2011-07-04 17:34:13 +02:00
Stefan Metzmacher
601b138e92 s3:smb2_create: call 'return' after smbd_server_connection_terminate()
This is not strictly needed in the fork process model, but we hopefully
support other models in future.

metze
2011-07-04 16:21:45 +02:00
Andrew Bartlett
e17ab20227 s3-build add tevent depencency on libsmb
This may assist the build on FreeBSD 8.2

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Jul  4 16:19:10 CEST 2011 on sn-devel-104
2011-07-04 16:19:10 +02:00
Günther Deschner
ff94539f27 s3-printing: open up a winreg pipe handle for the migration code.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Jul  4 15:06:41 CEST 2011 on sn-devel-104
2011-07-04 15:06:41 +02:00
Andrew Bartlett
0ac4f64928 s3-build link passdb modules against libpassdb
This ensures that they don't include a duplicate copy of
pdb_interface.c functions, because they will instead link the library.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Jul  4 12:24:50 CEST 2011 on sn-devel-104
2011-07-04 12:24:50 +02:00
Andrew Bartlett
6b97a3b1ff s3-build allow_undefined_symbols=False is the default now 2011-07-04 19:03:52 +10:00
Andrew Bartlett
5d4b197418 s3-auth libauth no longer requires undefined symbols 2011-07-04 18:58:32 +10:00
Andrew Bartlett
c599d075cb s3-lib Move event_add_idle() to source3/lib/events.c
This allows libauth not to depend on smbd_base.

Andrew Bartlett
2011-07-04 18:53:59 +10:00
Andrew Bartlett
b8b504a484 s3-samr Send IP address only to PAM remote hostname hook on password set
The previous behaviour was to attempt to do a reverse hostname lookup,
where enabled.  This new behaviour matches the new behaviour in the
modules called by auth stack.

Andrew Bartlett
2011-07-04 18:28:46 +10:00
Andreas Schneider
2a01842da8 s3: RIP 'struct client_address'.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:45 +10:00
Andreas Schneider
2bcbeea05e s3-rpc_server: Remove client_id and server_id from pipes struct.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:43 +10:00
Andreas Schneider
aee04ef330 s3-smbd: Remove client_address from smbd_server_connection struct.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:40 +10:00
Andreas Schneider
b2511a280a s3-smbd: Remove obsolete smbd_set_server_fd().
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:36 +10:00
Andreas Schneider
cbec251f9a s3-vfs: Replace client_id in exand msdfs.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:34 +10:00
Andreas Schneider
c0f1c179b9 s3-vfs: Replace client_id in smbta.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:32 +10:00
Andreas Schneider
2f92ffb1a4 s3-smbd: Replace client_id in smbd session setup.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:30 +10:00
Andreas Schneider
ea2917c7a2 s3-smbd: Replace client_id in smbd session.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:28 +10:00
Andreas Schneider
73d28912a4 s3-smbd: Replace client_id in smbd service.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:26 +10:00
Andreas Schneider
ae05a7aec6 s3-smbd: Replace client_id in smbd reply.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:24 +10:00
Andreas Schneider
ad0f765a09 s3-smbd: Exit cleanly if we can't create an address string.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:21 +10:00
Andreas Schneider
d99acd26a2 s3-smbd: Replace client_id in smbd connection.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:18 +10:00
Andreas Schneider
a513086c2a s3-smbd: Replace client_id in smbd process.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:16 +10:00
Andreas Schneider
726b6c6e52 s3-epmapper: Replace server_id in the epmapper.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:14 +10:00
Andreas Schneider
784035fd53 s3-spoolss: Replace client_id in the spoolss server.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:12 +10:00
Andreas Schneider
5f228fff2a s3-samr: Replace client_id in samr server.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:10 +10:00
Andreas Schneider
f0361924fb s3-rpc_server: Replace client_id in dcerpc gssapi server.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:08 +10:00
Andreas Schneider
7acaf405e4 s3-rpc_server: Remove unused client_id in srv_pipe.c.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:06 +10:00
Andreas Schneider
66badc1740 s3-auth: Remove global smbd_server_conn from auth_unix.c.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:04 +10:00
Andreas Schneider
7e46a84bb7 s3-auth: Pass the remote_address down to user_info.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:02 +10:00
Andreas Schneider
45f70db010 s3-auth: Added remote_address to ntlmssp server.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:28:00 +10:00
Andreas Schneider
541f3cf639 s3-rpc_server: Migrate rpc function to tsocket_address.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:27:58 +10:00
Andreas Schneider
6ac68a803e s3-rpc_server: Add local and remote address to pipes struct.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:27:57 +10:00
Andreas Schneider
c663dfff88 s3-util: Add a get_remote_hostname() function.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:27:55 +10:00
Andreas Schneider
6b86590342 s3-auth: Only reload the config file.
We only need to reload the config file. This removes a dependency to
smbd.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:27:53 +10:00
Volker Lendecke
80838491e6 s3: Make cli_cm_open return NTSTATUS
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jul  3 23:57:53 CEST 2011 on sn-devel-104
2011-07-03 23:57:53 +02:00
Volker Lendecke
714e1014c5 s3: Make cli_cm_connect return NTSTATUS 2011-07-03 22:45:26 +02:00
Volker Lendecke
7ca63fb8fe s3: Make "do_connect" return NTSTATUS 2011-07-03 22:45:26 +02:00
Volker Lendecke
3414182af0 s3: Remove a use of cli_errstr 2011-07-03 22:45:25 +02:00
Volker Lendecke
4569a3a75a s3: Remove a use of cli_errstr 2011-07-03 22:45:25 +02:00
Volker Lendecke
8238d89823 s3: Remove a use of cli_errstr 2011-07-03 22:45:25 +02:00
Volker Lendecke
cfbd339b4a s3: Remove a use of cli_errstr 2011-07-03 22:45:25 +02:00
Volker Lendecke
e5ad524902 s3: Remove two uses of cli_errstr
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jul  3 12:43:32 CEST 2011 on sn-devel-104
2011-07-03 12:43:32 +02:00
Volker Lendecke
c3a6e9b7ce s3: RAP errors are WERROR 2011-07-03 11:31:29 +02:00
Volker Lendecke
c0d168392f s3: Remove some bogus error mappings
The old cli_session_request that used this is gone
2011-07-03 11:31:29 +02:00
Volker Lendecke
d2b1671fb3 s3: Remove a use of cli_errstr
All code above that might have failed sets result
2011-07-03 11:31:29 +02:00
Volker Lendecke
c31871264c s3: Allow NULL for arg pwritten in cli_write_andx 2011-07-03 11:31:29 +02:00
Volker Lendecke
25df2fe8e2 S3: Fix some nonempty blank lines 2011-07-03 11:31:29 +02:00
Volker Lendecke
e2498b1110 s3: Read symlink information in smbclient "allinfo" 2011-07-03 11:31:29 +02:00
Volker Lendecke
79d27e28ad s3: Fix symlink_reparse_buffer_parse 2011-07-03 11:31:29 +02:00