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

33790 Commits

Author SHA1 Message Date
Volker Lendecke
f35811bfe0 s3: Use sconn->client_id in session_claim 2010-08-20 21:28:44 +02:00
Stefan Metzmacher
5d7c27cb5b s3:librpc: make dcerpc_read_ncacn_packet_send/recv() available
metze
2010-08-20 18:09:26 +02:00
Stefan Metzmacher
922f33521e s3:Makefile.in: use python with -u to disable stdin/out caching
metze
2010-08-20 18:09:23 +02:00
Stefan Metzmacher
c9621a8c00 s3:winbindd: fix error handling in wb_next_grent_fetch_done()
We should not use 'result' uninitialized.

metze
2010-08-20 14:23:41 +02:00
Michael Adam
34092c11b4 s3:loadparm: make lp_load_ex static. We have wrappers for external callers. 2010-08-20 11:14:06 +02:00
Jim McDonough
0ec0095d1a s3-libsmbclient Convert dos error codes to NTstatus in async libsmbclient.
DOS error codes were being lost with the conversion to async
libsmbclient.  If we're passing around NTSTATUS internally,
let's just convert it when we get it.

DOS ACCESS_DENIED on nautilus was not prompting for other credentials,
because it was not being mapped.
2010-08-19 15:49:31 -04:00
Simo Sorce
cbe9f879af s3-ads: Fix wrong test in if statement 2010-08-19 11:28:12 -04:00
Günther Deschner
861566c6d0 s3-waf: fix the build.
Guenther
2010-08-19 15:24:51 +02:00
Günther Deschner
4349027b63 s3-cli: fix uninitialized variable.
Volker, please check.

Guenther
2010-08-19 14:08:06 +02:00
Günther Deschner
28ba023b4c s3-idmap: fix uninitialized variable in idmap_tdb_sids_to_unixids_action().
Michael, please check.

Guenther
2010-08-19 14:08:06 +02:00
Günther Deschner
f6ac919a91 s3-libsmb: fix some uninitialized variables.
Volker, please check.

Guenther
2010-08-19 12:36:23 +02:00
Surbhi Palande
9b8f7a2a01 -ENOTSUP translates to NT_STATUS_NOT_SUPPORTED
https://launchpad.net/bugs/276472

This patch adds the translation of Unix Error code -ENOTSUP to NT Error Code
NT_STATUS_NOT_SUPPORTED. The absense of this translation wrongly sends back to
the client a STATUS_DENIED message in samba3.

Signed-off-by: Surbhi Palande <surbhi.palande@canonical.com>
2010-08-19 12:11:26 +02:00
Volker Lendecke
ba706d696b s3: Remove smb_pam_accountcheck from the auth modules
We go through the same check in auth/auth.c line 287 after the module has done
its job. So we don't have to do that check twice.
2010-08-19 11:54:36 +02:00
Jeremy Allison
da2554117e Fix bug 7626 - Typo in configure samba_cv__CC_NEGATIVE_ENUM_VALUES two underscores.
Noticed by bj@sernet.de.
2010-08-18 16:25:15 -07:00
Jeremy Allison
34230608df Fix bug 7563 - Creation of symlink using smbclient is buggy.
Fix semantics of symlink. "oldpath" should be an untouched blob,
"newpath" should fit the share path semantics.

Jeremy.
2010-08-18 15:51:43 -07:00
Volker Lendecke
8f7bf85c40 s3: Remove an unused variable 2010-08-18 17:13:48 +02:00
Simo Sorce
1ab17f13a2 s3-ads: Remove unused wrapper and make function static 2010-08-18 09:37:56 -04:00
Volker Lendecke
d7c8fb21bb s3: async cli_list 2010-08-18 15:14:02 +02:00
Volker Lendecke
77761d9adc s3: Add cli_flush 2010-08-18 15:14:02 +02:00
Simo Sorce
71dfa62b61 s3-ads: cleanup ads_keytab_list() 2010-08-18 07:47:10 -04:00
Simo Sorce
64d8300a56 s3-ads: cleanup ads_keytab_create_default() 2010-08-18 07:47:10 -04:00
Simo Sorce
3a9912370d s3-ads: cleanup ads_keytab_add_entry() 2010-08-18 07:47:10 -04:00
Simo Sorce
d6d1ed8bdf s3-ads: Split, simplify and cleanup keytab functions
add helper function for both smb_krb5_kt_add_entry_ext() and
ads_keytab_flush()
2010-08-18 07:47:09 -04:00
Volker Lendecke
b9353c65c0 s3: Fix serverid_register_msg_flags
Thanks, Andreas, for pointing this out! (How drunk have I been?...)
2010-08-18 13:33:24 +02:00
Andreas Schneider
937da4d141 s3-lib: Fixed a possible crash bug.
Volker please check!
2010-08-18 12:08:47 +02:00
Andreas Schneider
555b175212 s3-printing: Added function to update the queue. 2010-08-18 11:43:18 +02:00
Andreas Schneider
7e9d6021c9 s3-printing: Rename jobs_changed functions to jobs_added. 2010-08-18 11:43:17 +02:00
Volker Lendecke
536d4d48bf s3: Fix an uninitialized variable 2010-08-18 11:18:24 +02:00
Volker Lendecke
a847f13d7b s3: Use pipe_struct->client_id->name for pjob.clientmachine 2010-08-18 11:18:24 +02:00
Volker Lendecke
29093bc000 s3: Move initializing pjob.clientname to print_job_start() 2010-08-18 11:18:23 +02:00
Volker Lendecke
4b5e252354 s3: Add "client_id" to pipes_struct 2010-08-18 11:18:23 +02:00
Volker Lendecke
6d10684556 s3: Remove unneeded "client_address" from connection_struct 2010-08-18 11:18:23 +02:00
Volker Lendecke
7b6835ec1d s3: Add smbd_server_connection->client_id 2010-08-18 11:18:22 +02:00
Volker Lendecke
ac7b63384d s3: Lift smbd_server_fd from reload_services() 2010-08-18 11:18:21 +02:00
Günther Deschner
59289d4fa9 s3-build: only include smb_signing.h where needed.
Guenther
2010-08-18 09:20:13 +02:00
Andrew Bartlett
5a2f6c9700 s3:selftest This test does not fail anymore (Samba4's smbtorture has been fixed) 2010-08-18 16:21:32 +10:00
Volker Lendecke
26ff858934 s3: Remove smbd_server_fd() from session_claim 2010-08-17 22:52:03 +02:00
Volker Lendecke
f8ecec21e2 s3: Remove smbd_server_fd() from read_smb_length() 2010-08-17 22:44:04 +02:00
Volker Lendecke
840b0f523b s3: Move read_smb_length() to smbd/reply.c 2010-08-17 22:44:04 +02:00
Volker Lendecke
e65197e56f s3: Remove smbd_server_fd from receive_smb_raw
This is only called from client code
2010-08-17 22:44:03 +02:00
Volker Lendecke
a58cea0026 s3: Lift smbd_server_fd() from receive_smb_raw_talloc 2010-08-17 22:44:03 +02:00
Volker Lendecke
1f0afe1aed s3: Lift smbd_server_fd() from read_smb_length_return_keepalive 2010-08-17 22:44:03 +02:00
Volker Lendecke
7d164498db s3: Lift smbd_server_fd() from read_data()
All callers have appropriate debug messages themselves
2010-08-17 22:44:03 +02:00
Volker Lendecke
9671547d17 s3: Lift smbd_server_fd() from read_fd_with_timeout() 2010-08-17 22:44:03 +02:00
Volker Lendecke
c360822226 s3: Directly call write_data from print_job_write() 2010-08-17 15:31:49 +02:00
Volker Lendecke
3aba8e9b7e s3: Remove unused "pos" arg from print_job_write 2010-08-17 15:31:49 +02:00
Andreas Schneider
feb22e0897 s3-samr: Correctly fix the transition from enum to uint32_t.
What type an enum is depends on the implementation, the compiler and
probably the compiler options. sizeof(enum) is normally not sizeof(int)!
2010-08-17 13:48:05 +02:00
Günther Deschner
16ad1bbb4e s3-dcerpc: try to fix the non gssapi build.
Guenther
2010-08-17 13:18:34 +02:00
Günther Deschner
36cfadcf6a s3-dcerpc: fix c++ build warning.
Guenther
2010-08-17 13:06:36 +02:00
Günther Deschner
35052d71d3 s3-dcerpc: fix uninitialized variable in cli_get_session_key().
Simo, please check.

Guenther
2010-08-17 13:06:13 +02:00
Günther Deschner
ff17516732 s3-util: remove unused variable.
Guenther
2010-08-17 13:04:32 +02:00
Simo Sorce
0a89722671 s3-ads: Remove unused function and file 2010-08-17 06:48:56 -04:00
Stefan Metzmacher
aca7b22e96 s3:winbindd: don't ignore 'result' in wb_dsgetdcname_done()
Ignoring it could cause a segfault in winbindd_getdcname_recv()

metze
2010-08-17 12:46:53 +02:00
Volker Lendecke
40ae8b74b6 s3: Remove smbd_server_fd() from write_data()
This completely removes the DEBUG(0, ..) error message from write_data(). I've
gone through all callers of write_data() and made sure that they have their own
equivalent error message printing.
2010-08-17 12:46:53 +02:00
Simo Sorce
f40ef7e24c s3-dcerpc: Use common send functions for ntlmssp too
Remove unused function.
2010-08-17 06:33:14 -04:00
Simo Sorce
86914b8fab s3-dcerpc: properly implement gse/spnego_get_session_key 2010-08-17 06:33:13 -04:00
Simo Sorce
26a3ba60e6 s3-dcerpc: Check data and return appropriate error 2010-08-17 06:33:13 -04:00
Simo Sorce
9b8c7d47f9 s3-dcerpc: Remove unused function 2010-08-17 06:33:13 -04:00
Simo Sorce
7b12513d12 s3-dcerpc: make a few local functions as static 2010-08-17 06:33:13 -04:00
Simo Sorce
9a9a38c666 Change debug statements to use __location__ 2010-08-17 06:33:13 -04:00
Simo Sorce
72a0098415 s3-dcerpc: Pull packet in the caller, before validation 2010-08-17 06:33:13 -04:00
Simo Sorce
558320cf58 Add my (c) 2010-08-17 06:33:13 -04:00
Andreas Schneider
1791d05335 s3-samr: Fixed some build warnings. 2010-08-17 11:44:49 +02:00
Volker Lendecke
68e86969fa s3: Remove smbd_server_fd() from smbd_process 2010-08-16 22:39:25 +02:00
Volker Lendecke
0bd39c73be s3: Remove smbd_server_fd() from smbd_echo_loop 2010-08-16 22:39:25 +02:00
Volker Lendecke
2cd643865d s3: Remove smbd_server_fd() from smbd_echo_reader 2010-08-16 22:39:25 +02:00
Volker Lendecke
a23483310d s3: Remove smbd_server_fd() from smbd_echo_reply 2010-08-16 22:39:25 +02:00
Volker Lendecke
bb867df269 s3: Remove smbd_server_fd() from keepalive_fn 2010-08-16 22:39:25 +02:00
Volker Lendecke
a2bf46e9ec s3: Remove smbd_server_fd() from smbd_server_connection_handler 2010-08-16 22:39:25 +02:00
Volker Lendecke
8e7a92bc24 s3: Remove smbd_server_fd() from smbd_server_connection_read_handler 2010-08-16 22:39:25 +02:00
Volker Lendecke
6737c3dd32 s3: Remove smbd_server_fd() from chain_reply 2010-08-16 22:39:25 +02:00
Volker Lendecke
b9d052c728 s3: Remove smbd_server_fd() from construct_reply 2010-08-16 22:39:24 +02:00
Volker Lendecke
61989a9e54 s3: Remove smbd_server_fd() from switch_message 2010-08-16 22:39:24 +02:00
Volker Lendecke
ee796255ce s3: Remove smbd_server_fd() from smbd_server_connection_loop_once 2010-08-16 22:39:24 +02:00
Volker Lendecke
95b232a008 s3: Remove smbd_server_fd() from receive_smb_raw_talloc_partial_read 2010-08-16 22:39:24 +02:00
Volker Lendecke
4a27c10903 s3: Remove smbd_server_fd() from make_connection 2010-08-16 22:39:24 +02:00
Volker Lendecke
897d09174d s3: Remove smbd_server_fd() from share_sanity_checks 2010-08-16 22:39:24 +02:00
Volker Lendecke
05604b315b s3: Remove smbd_server_fd() from setup_new_vc_session 2010-08-16 22:39:24 +02:00
Volker Lendecke
a98604d7f2 s3: Remove smbd_server_fd() from make_connection_snum 2010-08-16 22:39:24 +02:00
Volker Lendecke
910e3df7dd s3: Remove smbd_server_fd() from reply_echo 2010-08-16 22:39:23 +02:00
Volker Lendecke
495bb1efb3 s3: Remove smbd_server_fd() from reply_writebraw 2010-08-16 22:39:23 +02:00
Volker Lendecke
36cfc1d145 s3: Remove smbd_server_fd() from send_file_readX 2010-08-16 22:39:23 +02:00
Volker Lendecke
209b3aee1c s3: Remove smbd_server_fd() from send_file_readbraw 2010-08-16 22:39:23 +02:00
Volker Lendecke
cc5f838319 s3: Remove smbd_server_fd() from reply_readbraw_error 2010-08-16 22:39:23 +02:00
Volker Lendecke
59645506a0 s3: Remove smbd_server_fd() from sendfile_short_send 2010-08-16 22:39:23 +02:00
Volker Lendecke
6f85247494 s3: Remove smbd_server_fd() from fake_sendfile 2010-08-16 22:39:23 +02:00
Volker Lendecke
3e28c05e98 s3: Remove smbd_server_fd from netbios_session_retarget 2010-08-16 22:39:22 +02:00
Volker Lendecke
2d571fdddb s3: Remove smbd_server_fd from vfs_pwrite_data 2010-08-16 22:39:22 +02:00
Volker Lendecke
30ce02299b s3: Remove smbd_server_fd from vfs_write_data 2010-08-16 22:39:22 +02:00
Volker Lendecke
a92efa0e47 s3: Remove smbd_server_fd from send_trans2_replies 2010-08-16 22:39:17 +02:00
Volker Lendecke
50b3ee57e2 s3: Remove smbd_server_fd from smbd_initialize_smb2 2010-08-16 22:39:17 +02:00
Volker Lendecke
0e12c216dc s3: Remove smbd_server_fd from reply_special 2010-08-16 22:39:17 +02:00
Volker Lendecke
7a1c32c98a s3: Remove smbd_server_fd from pipe_write_done 2010-08-16 22:39:16 +02:00
Volker Lendecke
7c0c7f3337 s3: Remove smbd_server_fd from send_break_message_smb1 2010-08-16 22:39:16 +02:00
Volker Lendecke
e34c5e235d s3: Remove smbd_server_fd from api_dcerpc_cmd_read/write_done 2010-08-16 22:39:16 +02:00
Volker Lendecke
215d803cdb s3: Remove smbd_server_fd from send_trans_reply 2010-08-16 22:39:16 +02:00
Volker Lendecke
9878fa6f72 s3: Remove smbd_server_fd from send_nt_replies 2010-08-16 22:39:16 +02:00
Volker Lendecke
774bae74d1 s3: Remove smbd_server_fd from blocking_lock_reply_error 2010-08-16 22:39:16 +02:00
Volker Lendecke
9115beb88c s3: Remove smbd_server_fd from generic_blocking_lock_error 2010-08-16 22:39:16 +02:00
Volker Lendecke
c9458a756c s3: Remove smbd_server_fd from handle_aio_read/write_complete 2010-08-16 22:39:16 +02:00
Volker Lendecke
bda7c70bc0 s3: Remove smbd_server_fd from schedule_aio_write_and_X 2010-08-16 22:39:16 +02:00
Volker Lendecke
2f53d1deb7 s3: Add "sock" to smbd_server_connection 2010-08-16 22:39:16 +02:00
Andreas Schneider
7644fbdff9 s3-waf: Added missing client option to pidl list for wbint. 2010-08-16 21:40:04 +02:00
Volker Lendecke
0827e52b4e s3: Simplify the logic of check_access by an early return 2010-08-16 21:33:22 +02:00
Volker Lendecke
17150dfa9a s3: Lift smbd_server_fd() from read_target_host 2010-08-16 21:33:22 +02:00
Andreas Schneider
1b022d1d3d s3-waf: Try to fix the idl build. 2010-08-16 21:31:31 +02:00
Andreas Schneider
5af3177dbd s3-waf: Create a variable for LIBNDR_NTPRINTING_SRC. 2010-08-16 21:31:31 +02:00
Andreas Schneider
45c7f83ccb s3-waf: Fixed the rpc_client build. 2010-08-16 21:31:31 +02:00
Andreas Schneider
f036b449db s3-waf: Fixed the build. 2010-08-16 20:18:54 +02:00
Jim McDonough
efd822982e s3-printing: fix BUG 7280 - auto printers not loading with registry
config
2010-08-16 14:07:44 -04:00
Günther Deschner
c80d4cb6fe s3-selftest: fix make oldtest (testparm_s3 tests use $LOCAL_PATH).
Guenther
2010-08-16 16:42:09 +02:00
Stefan Metzmacher
760948a5d4 s3:winbindd: remove rpc_pipe_client references from winbind_dual_ndr code
metze
2010-08-16 14:30:21 +02:00
Stefan Metzmacher
13c744fa30 s3:winbindd: use dcerpc_wbint_* functions instead of rpccli_wbint_*
metze
2010-08-16 14:30:21 +02:00
Stefan Metzmacher
2ccaa23558 s3:winbindd: add binding_handle to struct winbindd_child
metze
2010-08-16 14:30:20 +02:00
Stefan Metzmacher
e79c8098d6 s3:include: remove unused dispatch* fn pointers from rpc_pipe_client
metze
2010-08-16 14:30:19 +02:00
Stefan Metzmacher
7f2343be12 s3:winbindd: remove unused wb_ndr_dispatch* functions
metze
2010-08-16 14:30:19 +02:00
Stefan Metzmacher
12379097ab s3:rpc_server: remove unused rpc_pipe_internal_dispatch()
metze
2010-08-16 14:30:18 +02:00
Stefan Metzmacher
745f63fd1e s3:rpc_client: remove unused cli_do_rpc_ndr* functions
metze
2010-08-16 14:30:18 +02:00
Stefan Metzmacher
dd16d3b2d6 s3:rpc_client: remove unused rpc_pipe_open_local()
metze
2010-08-16 14:30:17 +02:00
Volker Lendecke
d418f9f11a s3-printing: Lift the use of smbd_server_fd from job_submit.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-08-16 14:02:19 +02:00
Günther Deschner
dc2313d1e8 s3-param: also remove lp_update_encrypted from loadparm.
Andreas, please check.

Guenther
2010-08-16 13:42:23 +02:00
Volker Lendecke
13d1e39e47 s3: Fix some type-punned warnings 2010-08-16 13:36:27 +02:00
Günther Deschner
731604d8ae s3-smbtorture: fix printf statement in ioctl test.
Guenther
2010-08-16 13:30:50 +02:00
Volker Lendecke
976e1b46ef s3: Remove an unused struct definition 2010-08-16 13:26:18 +02:00
Volker Lendecke
96ae457023 s3: Remove get_client_fd() 2010-08-16 13:13:10 +02:00
Andreas Schneider
66b6a8cf62 s3-auth: Remove obsolete 'update encrypted' option. 2010-08-16 12:48:27 +02:00
Günther Deschner
f03ac22770 s3-selftest: add samba3.posix_s3.rpc.spoolss.notify to knownfail list.
Guenther
2010-08-16 12:23:20 +02:00
Günther Deschner
f24c99fba0 s3-build: always check for python.
This should fix make test. Metze, please check.

Guenther
2010-08-16 12:23:08 +02:00
Volker Lendecke
08b628efe4 s3: Remove some unused code 2010-08-15 15:15:59 +02:00
Andreas Schneider
3d447e0160 s3-test: Try to fix the build farm subunit parsing. 2010-08-15 13:17:36 +02:00
Volker Lendecke
98187fe309 s3: Increase debug level for shutdown_other_smbds 2010-08-15 09:50:13 +02:00
Volker Lendecke
02002a52f2 s3: Add debugs to shutdown_other_smbds 2010-08-15 09:50:12 +02:00
Volker Lendecke
13a4922ae6 s3: Remove a conn NULL check from claim_connection
We've already dereferenced conn before
2010-08-14 12:27:17 +02:00
Volker Lendecke
19280b65a5 s3: Fix an uninitialized variable 2010-08-14 10:08:45 +02:00
Andrew Bartlett
4f8ef205ac s3:auth Add error paths for invalid password_state values
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-08-14 11:58:13 +10:00
Andrew Bartlett
70211ea6a3 s3:auth Change winbindd -> auth interface to more standard structures
This removes conversions to and from the source3 varient of the
server_info structure when replaced in s3compat, and presents a tidier
interface to winbindd in any case.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-08-14 11:58:13 +10:00
Andrew Bartlett
b1b9752506 s3:auth Change 'make_user_info' to be talloc based
This is an ideal candidate, as it already uses a free function.  It
now uses talloc destructors to clear the passwords if required.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-08-14 11:58:13 +10:00
Andrew Bartlett
e66f6e715f s3:auth Whitespace fixes after auth merge 2010-08-14 11:58:13 +10:00
Andrew Bartlett
23994e1b53 s3:auth Make Samba3 use the new common struct auth_usersupplied_info
This common structure will make it much easier to produce an auth
module for s3compat that calls Samba4's auth subsystem.

In order the make the link work properly (and not map twice), we mark
both that we did try and map the user, as well as if we changed the
user during the mapping.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-08-14 11:58:13 +10:00
Michael Adam
60eae5a134 s3:idmap: fix sid_to_unixid for builtin and own domain.
The old idmap code created a new mapping if asking the backends failed.
Now with the new layering, if passdb (which is used for our own domain
and builtin), then we need to continue and ask the backends, giving
tdb or whatever the default backend is a chance to create a mapping.
2010-08-14 02:10:57 +02:00
Michael Adam
9f60eb8c1b s3:idmap: fix spacing/indentation 2010-08-14 02:10:57 +02:00
Michael Adam
a739cb5944 s3:idmap_ldap: use idmap_rw_new_mapping in idmap_ldap_new_mapping 2010-08-14 02:10:57 +02:00
Michael Adam
a7ba9064d6 s3:idmap_ldap: add idmap_rw_ops to idmap_ldap_context and init in db_init() 2010-08-14 02:10:57 +02:00
Michael Adam
6659ac11de s3:idmap_tdb: use idmap_rw_new_mapping in idmap_tdb_new_mapping 2010-08-14 02:10:57 +02:00
Michael Adam
5a82cffb8b s3:idmap_tdb: add idmap_rw_ops to idmap_tdb_context and initialize them in init_db 2010-08-14 02:10:57 +02:00
Michael Adam
3f3cff9127 s3:idmap_tdb2: use idmap_rw_new_mapping in idmap_tdb2_new_mapping 2010-08-14 02:10:57 +02:00
Michael Adam
e82ef14008 s3:idmap_tdb2: add rw_ops to idmap_tdb2_context and initialize in idmap_tdb2_db_init 2010-08-14 02:10:56 +02:00
Michael Adam
307e5b239a s3:idmap: add abstract idmap_rw new_mapping mechanism without registering backends 2010-08-14 02:10:56 +02:00
Michael Adam
9897647584 s3:idmap_ad: untangle two assignments from checks 2010-08-14 02:10:56 +02:00
Michael Adam
264910b06f s3:idmap_ad: remove unused filter_low_id and filter_high_id from idmap_ad_context
The filter range from the idmap_domain is used now.
2010-08-14 02:10:56 +02:00
Michael Adam
d515d7fe49 s3:idmap_ad: use range from idmap_domain in idmap_ad_sids_to_unixids() 2010-08-14 02:10:56 +02:00
Michael Adam
96607d9543 s3:idmap_ad: use range from idmap_domain in idmap_ad_unixids_to_sids() 2010-08-14 02:10:55 +02:00
Michael Adam
f07049495d s3:idmap_rid: remove a comment that does not apply in that place.
Probably got copied from a different location.
2010-08-14 02:10:55 +02:00
Michael Adam
a758228367 s3:idmap_rid: remove unused domain_name from the idmap_rid_context. 2010-08-14 02:10:55 +02:00
Michael Adam
2916b302f3 s3:idmap_rid: remove range from idmap_rid_context()
Now, the idmap_domain range that is centrally parsed is used.
2010-08-14 02:10:55 +02:00
Michael Adam
ac63c50684 s3:idmap_rid: use range from idmap_domain in idmap_rid_sid_to_id() 2010-08-14 02:10:55 +02:00
Michael Adam
cda44b9e8e s3:idmap_rid: use ranges from idmap_domain struct in idmap_rid_id_to_sid() 2010-08-14 02:10:55 +02:00
Michael Adam
a6f58b76cc s3:idmap_rid: remove unused talloc context var from idmap_rid_sids_to_unixids() 2010-08-14 02:10:55 +02:00
Michael Adam
376e2bcc6e s3:idmap_rid: remove unused talloc context arg from idmap_rid_sid_to_id() 2010-08-14 02:10:54 +02:00
Michael Adam
597292a819 s3:idmap_rid: remove unused talloc context var from idmap_rid_unixids_to_sids() 2010-08-14 02:10:54 +02:00
Michael Adam
62833871bc s3:idmap_rid: remove unused talloc ctx argument from idmap_rid_id_to_sid() 2010-08-14 02:10:54 +02:00
Michael Adam
622bda8a67 s3:idmap_rid: untangle assignment from check in idmap_rid_initialize() 2010-08-14 02:10:54 +02:00
Michael Adam
a896ba07bb s3:idmap_ldap: add my (C) 2010-08-14 02:10:54 +02:00
Michael Adam
58cb5163f2 s3:idmap_ldap: create mappings for unmapped sids in idmap_ldap_sids_to_unixids() 2010-08-14 02:10:54 +02:00
Michael Adam
26c82596d9 s3:idmap_ldap: add a idmap_ldap_new_mapping().
High level function to create a new mapping for an unmapped sid.
This builds logic that used to reside in the top level idmap code
in the backend.
2010-08-14 02:10:54 +02:00
Michael Adam
4ed6f315d9 s3:idmap_ldap: add idmap_ldap_get_new_id() to allocate a new id given a domain
Currently this only works with the default domain, calling out
to idmap_ldap_allocate_id(). In the future this will be extended
to also work for non-default domains.
2010-08-14 02:10:54 +02:00
Michael Adam
5f77570bb6 s3:idmap_ldap: move idmap_ldap_set_mapping() further up. 2010-08-14 02:10:53 +02:00
Michael Adam
3e71eaeca0 s3:idmap_ldap: make idmap_ldap_alloc_context a member of idmap_ldap_context
this hides this beneath the idmap structure and removes a global variable
2010-08-14 02:10:53 +02:00
Michael Adam
523b94f180 s3:idmap_ldap: call idmap_ldap_alloc_init from idmap_ldap_init.
The alloc subsystem is now subordinate to the idmap system.
2010-08-14 02:10:53 +02:00
Michael Adam
c854261867 s3:idmap_ldap: remove the (now unused) range from idmap_ldap_alloc_context 2010-08-14 02:10:53 +02:00
Michael Adam
3f39921e7e s3:idmap_ldap: use ranges from idmap domain in idmap_ldap_allocate_id()
Second step in removing the idmap range from the idmap_ldap_alloc_context.
2010-08-14 02:10:53 +02:00
Michael Adam
5518bcb840 s3:idmap_ldap: add idmap_domain arg to idmap_ldap_alloc_init and verify_idpool
First step in removing idmap ranges from the idmap_ldap_alloc_context.
The range from the domain is to be used now.
2010-08-14 02:10:53 +02:00
Michael Adam
1cf27374ab s3:idmap_ldap: remove unused filter range from struct idmap_ldap_context 2010-08-14 02:10:53 +02:00
Michael Adam
5bb4a94c6c s3:idmap_ldap: don't load ranges - they have been loaded into struct idmap_domain 2010-08-14 02:10:52 +02:00
Michael Adam
634cd2e045 s3:idmap_ldap: use filter range from idmap domain, not idmap_ldap_context 2010-08-14 02:10:52 +02:00
Michael Adam
3a5f86216b s3:idmap_ldap: re-implement allocate_id in idmap methods. 2010-08-14 02:10:52 +02:00
Michael Adam
5bb5b69b0f s3:idmap_tdb: add my (C) 2010-08-14 02:10:52 +02:00
Michael Adam
78979c6420 s3:idmap_tdb: properly initialize the idmap_tdb context with zero 2010-08-14 02:10:52 +02:00
Michael Adam
9c3d4dff82 s3:idmap_tdb: prevent opening the idmap db more than once. 2010-08-14 02:10:52 +02:00
Michael Adam
66a38d8612 s3:idmap_tdb: rewrite sids_to_unixids to create mappings for unmapped sids. 2010-08-14 02:10:52 +02:00
Michael Adam
4f2bb1a259 s3:idmap_tdb: add a idmap_tdb_new_mapping().
High level function to create a new mapping for an unmapped sid.
This builds logic that used to reside in the top level idmap code
in the backend. To be called inside a transaction to guarantee
atomicity of the operation.
2010-08-14 02:10:51 +02:00
Michael Adam
47387b3ebb s3:idmap_tdb: move the set_mapping code up 2010-08-14 02:10:51 +02:00
Michael Adam
2b2a8f9b3b s3:idmap_tdb: use transaction wrapper for idmap_tdb_set_mapping(). 2010-08-14 02:10:51 +02:00
Michael Adam
b0615e4757 s3:idmap_tdb: remove unused struct idmap_tdb_state. 2010-08-14 02:10:51 +02:00
Michael Adam
28535349bd s3:idmap_tdb: remove unused idmap_alloc_db 2010-08-14 02:10:51 +02:00
Michael Adam
9010194972 s3:idmap_tdb: remove unused idmap_tdb_alloc_close(). 2010-08-14 02:10:51 +02:00
Michael Adam
2e4a0382f5 s3:idmap_tdb: give idmap_domain arg to idmap_tdb_allocate_id and use ctx->db
instead of alloc_db
2010-08-14 02:10:50 +02:00
Michael Adam
4301a81c99 s3:idmap_tdb: call idmap_tdb_init_hwm() from idmap_tdb_open_db(). 2010-08-14 02:10:50 +02:00
Michael Adam
1039506493 s3:idmap_tdb: move idmap_tdb_init_hwm up. 2010-08-14 02:10:50 +02:00
Michael Adam
f739ccb1b9 s3:idmap_tdb: remove unused idmap_tdb_load_ranges()
The idmap_tdb_state (which should actually be called idmap_tdb_alloc_context)
is being removed since the alloc part is combined with the id mapping part.
2010-08-14 02:10:50 +02:00
Michael Adam
b1285a5cb3 s3:idmap_tdb: have idmap_tdb_open_db take an idmap_domain struct as argument
the other arguments are not needed any more and are removed.
2010-08-14 02:10:49 +02:00
Michael Adam
53856fc8b0 s3:idmap_tdb: rename idmap_tdb_alloc_init->idmap_tdb_init_hwm and use db from idmap_tdb_context
instead of the special idmap_alloc_db
2010-08-14 02:10:49 +02:00
Michael Adam
384e35f8a7 s3:idmap_tdb: move definition of struct idmap_tdb_context up. 2010-08-14 02:10:47 +02:00
Michael Adam
db38972583 s3:idmap_tdb: remove filter_low_id,filter_high_id from idmap_tdb_context
These are now taken from the idmap_domain struct.
2010-08-14 02:10:47 +02:00
Michael Adam
3315f2cf9b s3:idmap_tdb: add idmap domain arg to idmap_tdb_upgrade and use domain range 2010-08-14 02:10:47 +02:00
Michael Adam
6d66018187 s3:idmap_tdb: use filter from idmap_domain rather than from idmap_tdb_context 2010-08-14 02:10:47 +02:00
Michael Adam
053e4510cd s3:idmap_tdb: give idmap domain argument to idmap_tdb_sid_to_id
instead of idmap_tdb_context. This is in preparation of using the
filter from the idmap_domain struct.
2010-08-14 02:10:47 +02:00
Michael Adam
f7a5f0987c s3:idmap_tdb: give idmap domain argument to idmap_tdb_id_to_sid
instead of idmap_tdb_context. This is in preparation of using the
filter from the idmap_domain struct.
2010-08-14 02:10:47 +02:00
Michael Adam
0f248169d9 s3:idmap_tdb: implement allocate_id in idmap methods for tdb backend 2010-08-14 02:10:46 +02:00
Michael Adam
2b9ad09ae7 s3:idmap_tdb: add idmap_tdb_get_new_id() to allocate a new id given a domain
Currently this only works with the default domain, calling out
to idmap_tdb_allocate_id(). In the future this will be extended
to also work for non-default domains.
2010-08-14 02:10:46 +02:00
Michael Adam
9e8df7403a s3:idmap_tdb: convert idmap_tdb_allocate_id() to use transaction wrappers 2010-08-14 02:10:46 +02:00
Michael Adam
85e9b35993 s3:idmap_tdb: remove an extra blank line 2010-08-14 02:10:46 +02:00
Michael Adam
aad8756dae s3:idmap_tdb2: add my (C) 2010-08-14 02:10:46 +02:00
Michael Adam
dac9f73ccd s3:idmap_tdb2: move idmap_tdb2_new_mapping() up. spare a prototype. 2010-08-14 02:10:46 +02:00
Michael Adam
627b9aa4b7 s3:idmap_tdb2: get rid of an extra variable in idmap_tdb2_db_init(). 2010-08-14 02:10:46 +02:00
Michael Adam
d27992e708 s3:idmap_tdb2: move idmap_tdb2_set_mapping() up to its _action callback. 2010-08-14 02:10:45 +02:00
Michael Adam
3bc40a0979 s3:idmap_tdb2: use the right talloc context for db_open in idmap_tdb2_open_db() 2010-08-14 02:10:45 +02:00
Michael Adam
39079acc57 s3:idmap_tdb2: don't check whether sid is already mapped in idmap_tdb2_new_mapping().
idmap_tdb2_new_mapping() is called from inside a transaction only
with sids, that have been verified not to be mapped directly before
that in the same transaction.
2010-08-14 02:10:45 +02:00
Michael Adam
1a52e0d25b s3:idmap_tdb2: add the db_context to the idmap_tdb2_context
this removes the idmap_tdb2 global variable
2010-08-14 02:10:45 +02:00
Michael Adam
83ad3cdf69 s3:idmap_tdb2: talloc_zero (instead of talloc) the idmap_tdb2_context 2010-08-14 02:10:45 +02:00
Michael Adam
c08a45ebd9 s3:idmap_tdb2: rename idmap_tdb2_alloc_load -> idmap_tdb2_init_hwm 2010-08-14 02:10:45 +02:00
Michael Adam
41cead6a31 s3:idmap_tdb2: move idmap_tdb2_alloc_load() up to reduce need for prototype 2010-08-14 02:10:45 +02:00
Michael Adam
2c549be359 s3:idmap_tdb2: remove unused idmap_tdb2_state and idmap_tdb2_load_ranges 2010-08-14 02:10:44 +02:00
Michael Adam
fd81228ed8 s3:idmap_tdb2: give idmap_tdb2_alloc_load() and idmap domain arguemnt
and use the ranges from the idmap domain for checking the HWM values
2010-08-14 02:10:44 +02:00
Michael Adam
bd4cc44c7d s3:idmap_tdb2: add an idmap_domain struct argument to idmap_tdb2_open_db() 2010-08-14 02:10:44 +02:00
Michael Adam
871945ae19 s3:idmap_tdb2: remove filter_low_id and filter_high_id from idmap_tdb2_context
Now these are taken from the idmap_domain struct.
2010-08-14 02:10:44 +02:00
Michael Adam
2842389e55 s3:idmap_tdb2: don't parse config and fill filter_low_id and filter_high_id
into idmap_tdb2_context in idmap_tdb2_db_init().
Now these are taken from the idmap_domain struct instead.
2010-08-14 02:10:44 +02:00
Michael Adam
6a70e7da58 s3:idmap_tdb2: honour the "idmap read only" flag in the tdb2 module.
Note that this will not prevent the idmap script from writing its
mappings to the database, but no new unix ids will be allocated via
the allocator and hence no new mappings will be autogenerated.
2010-08-14 02:10:43 +02:00
Michael Adam
d5c3cb5a8a s3:idmap_tdb2: use range from idmap_domain in idmap_tdb2_allocate_id 2010-08-14 02:10:43 +02:00
Michael Adam
4b10036da8 s3:idmap_tdb2: use filter from idmap_domain rather than from idmap_tdb2_context 2010-08-14 02:10:43 +02:00
Michael Adam
77096b9a26 s3:idmap_tdb2: pass idmap_domain (not idmap_tdb2_context) to idmap_tdb2_sid_to_id 2010-08-14 02:10:43 +02:00
Michael Adam
863212ad0e s3:idmap_tdb2: pass idmap_domain instead of idmap_tdb2_context to idmap_tdb2_unixids_to_sids
The reason for this will become apparent later: The ranges are being moved to
the idmap_domain: They are universal.
2010-08-14 02:10:43 +02:00
Michael Adam
bb8a4415c8 s3:idmap_tdb2: also support idmap script for named domains
this can be configured via "idmap config DOMAIN : script = foobar"
2010-08-14 02:10:43 +02:00
Michael Adam
f27858548e s3:idmap_tdb2: move the idmap script from idmap_tdb2_state to idmap_tdb2_context
The state (aka idmap_tdb2_alloc_context) is being removed.
The (global) idmap script was wrong there anyways.
It belongs to the per-domain context.
2010-08-14 02:10:43 +02:00
Michael Adam
834008c2cd s3:idmap_tdb2: remove use of idmap_tdb2_state from idmap_tdb2_allocate_id
idmap_tdb2_state should actually be called idmap_tdb2_alloc_context.
This is being removed as the idmap and allocation is moved together.
We use the idmap_tdb2_context * that is sitting in dom->private_data.
This contains the same ranges as those in the state anyways.
Later, when we can also allocate for named domains, this will become
necessary anyways.
2010-08-14 02:10:43 +02:00
Michael Adam
1dfb20d029 s3:idmap_tdb2: move definition of struct idmap_tdb2_context up. 2010-08-14 02:10:42 +02:00
Michael Adam
5b264561e7 s3:idmap_tdb2: open the db after loading the ranges in idmap_tdb2_db_init(). 2010-08-14 02:10:42 +02:00
Michael Adam
8da3d7c39b s3:idmap_tdb2: add allocation of new mappings to idmap_tdb2_sids_to_unixids
This moves the new_mapping feature inside the tdb2 backend to make creations
of mappings atomic.

Note: The new internal function idmap_tdb2_get_new_id() that is used to allocate
a new unix id is prepared to function for multiple explicitly configured idmap
domains, but currently it does only work for the default domain. The extended
allocation support requires extension of the data base format to store multiple
counters (per domain). This will be added in a later step (TODO!).
2010-08-14 02:10:42 +02:00
Michael Adam
36017ecebf s3:idmap_tdb2: re-implement allocated_id in idmap methods. 2010-08-14 02:10:42 +02:00
Michael Adam
1cd1dff756 s3:idmap: add idmap_unix_id_is_in_range() for checking an id against an idmap range 2010-08-14 02:10:42 +02:00
Michael Adam
212627e9c0 s3:idmap: don't check range for passdb idmap domain 2010-08-14 02:10:42 +02:00
Michael Adam
24ff45ff4d s3:idmap: parse ranges and "read only" in idmap_init_domain(). 2010-08-14 02:10:42 +02:00
Michael Adam
dc4d838401 s3:idmap: add a read_only flag to the idmap_domain struct.
This will be used to mark "allocating backends" (tdb, tdb2, ldap) read-only.
2010-08-14 02:10:41 +02:00
Michael Adam
10c50f74d0 s3:idmap: add low_id and high_id to the idmap_domain struct
This global data will replace the backend-specific filter_low_id
and filter_high_id. The presence of a range is generic to all
idmap configs.
2010-08-14 02:10:41 +02:00
Michael Adam
502d00e463 s3:net: remove the "net idmap secret alloc" functionality.
This is now not available any more, since allocation is moved
below the id mapping layer. The functionality could be
reintroduced on a per domain basis as an e.g
"net idmap secret <domain> alloc" command.
2010-08-14 02:10:41 +02:00
Michael Adam
6d9f4d6d36 s3:loadparm: add new boolean parameter "idmap read only"
This will be used to be able to put the default idmap config
read only. This can make sense for instance with the tdb2
idmap backend and using the idmap script feature.
2010-08-14 02:10:40 +02:00
Michael Adam
c62f7c7a0b s3:loadparm: remove parameter "idmap alloc backend" 2010-08-14 02:10:40 +02:00
Michael Adam
7dd8339ca1 s3:idmap: remove unused definition of idmap_alloc_methods.
Allocation is now completely handled in the allocating backends.
2010-08-14 02:10:40 +02:00
Michael Adam
3a2487e66b s3:idmap: remove idmap_alloc_context from idmap.c
The registering of alloc backends is being removed.
The idmap backends are responsible for initializing
their alloc code on their own if necessary.

No list of alloc backends is maintained any more in the top level.
2010-08-14 02:10:40 +02:00
Michael Adam
12a0ab3c96 s3:idmap: remove the alloc methods list from idmap.c
The registering of alloc backends is being removed.
The idmap backends are responsible for initializing
their alloc code on their own if necessary.

No list of alloc backends is maintained any more in the top level.
2010-08-14 02:10:39 +02:00
Michael Adam
a423f5151d s3:idmap: remove unused get_alloc_methods(). 2010-08-14 02:10:39 +02:00
Michael Adam
75a6c24459 s3:idmap: remove unused smb_register_idmap_alloc().
The registering of alloc backends is being removed.
The idmap backends are responsible for initializing
their alloc code on their own if necessary.
2010-08-14 02:10:39 +02:00
Michael Adam
f96575d6db s3:idmap_ldap: remove unused idmap_ldap_alloc_methods. 2010-08-14 02:10:39 +02:00
Michael Adam
0369eb5555 s3:idmap_ldap: remoce unused idmap_alloc_ldap_init 2010-08-14 02:10:39 +02:00
Michael Adam
0dfe400d64 s3:idmap_ldap: don't call idmap_alloc_ldap_init in idmap_ldap_init
The registering of alloc backends is being removed.
The idmap backends are responsible for initializing
their alloc code on their own if necessary.
2010-08-14 02:10:39 +02:00
Michael Adam
bc59660fc1 s3:idmap_tdb: remove unused idmap_alloc_methods 2010-08-14 02:10:39 +02:00
Michael Adam
5e317beadb s3:idmap_tdb: remove unused idmap_alloc_tdb_init() 2010-08-14 02:10:38 +02:00
Michael Adam
dd4adc1721 s3:idmap_tdb: don't call idmap_alloc_tdb_init in idmap_tdb_init
The registering of alloc backends is being removed.
The idmap backends are responsible for initializing
their alloc code on their own if necessary.
2010-08-14 02:10:38 +02:00
Michael Adam
77e41c0ad4 s3:idmap_tdb2: remove unused idmap_tdb2_alloc_init(). 2010-08-14 02:10:38 +02:00
Michael Adam
261663389b s3:idmap_tdb2: remove unused idmap_tdb2_alloc_close(). 2010-08-14 02:10:38 +02:00