summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
...
* autorid: add high_id to range config and fill it where we also fill ↵Michael Adam2014-04-252-0/+3
| | | | | | | | | | range->low_id. This corresponds to low_id for convenience and allows for computations without going back to the global config. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autorid: reserve 500 IDs at the top of the ALLOC range.Michael Adam2014-04-251-1/+4
| | | | | | | The wellknowns are now allocated into this sub-range. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autorid: reverse order of arguments of idmap_autorid_sid_to_id_alloc()Michael Adam2014-04-251-4/+5
| | | | | | | for consistency Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autorid: introduce idmap_autorid_domsid_is_for_alloc()Michael Adam2014-04-251-2/+14
| | | | | | | | | Currently, this checks if the sid is a wellknown domain sid. But the code reads more nicely and more domains might be added in the future. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autorid: factor idmap_autorid_sid_to_id() out of idmap_autorid_sids_to_unixids()Michael Adam2014-04-251-95/+76
| | | | | | | | | - reduces indentation - unifies error code paths and bumping counters - makes the code more easy to read Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autorid: make the checks for bumping num_mapped identical for alloc and rid caseMichael Adam2014-04-251-2/+2
| | | | | | | in idmap_autorid_sids_to_unixids() Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autorid: explicitly return NTSTATUS_OK in idmap_autorid_sid_to_id_alloc().Michael Adam2014-04-251-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autorid: more explicitly and reasonably set map->state in ↵Michael Adam2014-04-251-3/+5
| | | | | | | idmap_autorid_sid_to_id_alloc Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autorid: rename idmap_autorid_sid_to_id() -> idmap_autorid_sid_to_id_rid()Michael Adam2014-04-251-2/+3
| | | | | | | | For consistency. This is the function that does the calculation if the sid is treated by a rid range. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autorid: rename idmap_autorid_map_sid_to_id() -> idmap_autorid_sid_to_id_alloc()Michael Adam2014-04-251-5/+5
| | | | | | | for consistency. this is the sid->id function for the alloc range. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autorid: rename idmap_autorid_map_id_to_sid() -> idmap_autorid_id_to_sid_alloc()Michael Adam2014-04-251-3/+3
| | | | | | | | for consistency. This is the function that maps id to sid for the alloc range. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autorid: factor idmap_autorid_get_alloc_range() out of ↵Michael Adam2014-04-251-6/+17
| | | | | | | idmap_autorid_allocate_id() Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autorid: fix discard-const warning in idmap_autorid_init_hwm()Michael Adam2014-04-251-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autorid: fix uninitialized return code for successful autorid.tdb ↵Michael Adam2014-04-251-3/+1
| | | | | | | creation/opening Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autorid: improve a debug message in idmap_autorid_map_sid_to_id()Michael Adam2014-04-251-2/+2
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autorid: add debug messages to idmap_autorid_get_domainrange()Michael Adam2014-04-251-0/+4
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autorid: improve wording in a debug messageMichael Adam2014-04-251-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* autorid: remove a legacy comment from sid_to_idMichael Adam2014-04-251-5/+0
| | | | | | | | | | | With the introduction of the ID_TYPE_BOTH mapping to idmap_autorid, it is not a deficiency but a virtue of the autorid backend that it does not care about the existence or type of the sid to be mapped. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* idmap_rid: remove a legacy comment from sid_to_idMichael Adam2014-04-251-4/+0
| | | | | | | | | | | With the introduction of the ID_TYPE_BOTH mapping to idmap_rid, it is not a deficiency but a virtue of the rid backend that it does not care about the existence or type of the sid to be mapped. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* idmap_tdb_common: remove legacy comment.Michael Adam2014-04-251-5/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* idmap_tdb_common: fix a debug message in idmap_tdb_common_set_mapping()Michael Adam2014-04-251-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* idmap_tdb_common: fix a debug message in idmap_tdb_common_unixid_to_sid()Michael Adam2014-04-251-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-rpc_server: Remove ncalrpc_as_system from make_server_pipes_struct().Andreas Schneider2014-04-242-9/+4
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Apr 24 13:39:10 CEST 2014 on sn-devel-104
* s3-rpc_server: Remove ncalrpc_as_system from pipes_struct.Andreas Schneider2014-04-243-7/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-rpc_server: Use gensec for NCALRPC_AS_SYSTEM.Andreas Schneider2014-04-241-21/+0
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-rpc_server: Add special tsocket address for ncalrpc_as_system.Andreas Schneider2014-04-241-0/+22
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:rpc_client: Use gensec for NCALRPC_AS_SYSTEM.Stefan Metzmacher2014-04-242-37/+17
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-auth: Register ncalrpc_as_system gensec module.Andreas Schneider2014-04-242-2/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:rpc_server: pass everything but AUTH_TYPE_{NONE,NCALRPC_AS_SYSTEM} to gensecStefan Metzmacher2014-04-241-31/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpc_server: Call pipe_auth_verify_final() if needed.Andreas Schneider2014-04-241-0/+13
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3-rpc_server: Return the status code from gensec.Andreas Schneider2014-04-242-4/+6
| | | | | | | | We need to know the difference between NT_STATUS_OK and NT_STATUS_MORE_PROCESSING_REQUIRED. Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:rpc_server: let auth_generic_server_step() handle gensec_security == NULLStefan Metzmacher2014-04-242-35/+16
| | | | | | | This simplifies the caller, we don't need to look at the auth_type anymore. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:rpc_server: make sure we have a unix tokenStefan Metzmacher2014-04-241-0/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:rpc_server: handle everything but AUTH_TYPE_NONE as gensec in verify_finalStefan Metzmacher2014-04-241-15/+16
| | | | | | | | The NCALRPC_AS_SYSTEM doesn't use pipe_auth_verify_final() yet, so it's fine for now. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:rpc_client: pass everything to gensec by defaultStefan Metzmacher2014-04-242-68/+29
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:auth: allow special SYSTEM and ANONYMOUS handling in ↵Stefan Metzmacher2014-04-241-2/+43
| | | | | | | | | | auth3_generate_session_info() auth_ctx->generate_session_info() will be used by the SCHANNEL and NCALRPC_AS_SYSTEM gensec modules in future. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: torture - Fix racy assumption in original messaging test.Jeremy Allison2014-04-241-4/+14
| | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Apr 24 00:50:55 CEST 2014 on sn-devel-104
* s3: torture - Add required talloc frame for msgtest.cJeremy Allison2014-04-231-0/+4
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org>
* s3: winbindd: Call dgram cleanup init background setup.Jeremy Allison2014-04-231-0/+4
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3: nmbd: Call dgram cleanup init background setup.Jeremy Allison2014-04-231-0/+4
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3: smbd: Call dgram cleanup init background setup.Jeremy Allison2014-04-231-0/+4
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3: messaging: Add infrastructure to clean up orphaned sockets every 15 ↵Volker Lendecke2014-04-232-0/+52
| | | | | | | minutes as a background task. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3 : build system : Move lib/background.c from smbd_base to samba3core.Jeremy Allison2014-04-231-2/+2
| | | | | | | Allows background jobs to be run from winbindd and nmbd. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* smbd: Call the msg_ctx destructor for background jobsVolker Lendecke2014-04-231-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbcontrol: Add dgm-cleanup commandVolker Lendecke2014-04-231-0/+20
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging_dgm: Add messaging_dgm_wipeVolker Lendecke2014-04-232-0/+55
| | | | | | | This walks all sockets and wipes the left-overs Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Always clean up the child's msg_ctxVolker Lendecke2014-04-231-6/+5
| | | | | | | | | | This is a bit lazy programming, we could and possibly should do this in exit_server() in the child. But this way we make sure the cleanup works. If it only was executed for unclean exits, we might not detect failure of this code in the parent. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbcontrol: Clean up the msg_ctxVolker Lendecke2014-04-231-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* printing_cups: Call the msg_ctx destructor on exitVolker Lendecke2014-04-231-0/+1
| | | | | | | | With the new messaging, if we don't do this, we'll leave sockets around. I'm sure we will not catch everything, so a periodic cleanup will be required. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Sort notify events by timestampVolker Lendecke2014-04-231-0/+16
| | | | | | | | | | | | | This will fix the raw.notify test with the new messaging system. With the new messaging system messages come in via yet another fd that has to line up in poll next to the incoming client TCP socket. With the signal-based messaging messages were always handled before client requests. The new scheme means that notify messages might be deferred a bit (something which can happen in a cluster already now), which then means that notify_marshall_changes() will coalesce entries, which in turn makes raw.notify unhappy. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>