From 4225f9a4bd5eece4d57820bbabb7b882610aa7cc Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 12 Dec 2006 14:52:13 +0000 Subject: r20116: Start merging in the work done to create the new idmap subsystem. Simo. (This used to be commit 50cd8bffeeed2cac755f75fc3d76fe41c451976b) --- source3/nsswitch/winbindd.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'source3/nsswitch/winbindd.c') diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c index 047b6c3b85..70875e08cb 100644 --- a/source3/nsswitch/winbindd.c +++ b/source3/nsswitch/winbindd.c @@ -234,11 +234,16 @@ static struct winbindd_dispatch_table { { WINBINDD_SID_TO_GID, winbindd_sid_to_gid, "SID_TO_GID" }, { WINBINDD_UID_TO_SID, winbindd_uid_to_sid, "UID_TO_SID" }, { WINBINDD_GID_TO_SID, winbindd_gid_to_sid, "GID_TO_SID" }, + { WINBINDD_SIDS_TO_XIDS, winbindd_sids_to_unixids, "SIDS_TO_XIDS" }, { WINBINDD_ALLOCATE_UID, winbindd_allocate_uid, "ALLOCATE_UID" }, { WINBINDD_ALLOCATE_GID, winbindd_allocate_gid, "ALLOCATE_GID" }, + { WINBINDD_SET_MAPPING, winbindd_set_mapping, "SET_MAPPING" }, + { WINBINDD_SET_HWM, winbindd_set_hwm, "SET_HWMS" }, /* Miscellaneous */ + { WINBINDD_DUMP_MAPS, winbindd_dump_maps, "DUMP_MAPS" }, + { WINBINDD_CHECK_MACHACC, winbindd_check_machine_acct, "CHECK_MACHACC" }, { WINBINDD_PING, winbindd_ping, "PING" }, { WINBINDD_INFO, winbindd_info, "INFO" }, @@ -877,8 +882,6 @@ static void process_loop(void) /* Main function */ -struct winbindd_state server_state; /* Server state information */ - int main(int argc, char **argv, char **envp) { pstring logfile; @@ -982,16 +985,10 @@ int main(int argc, char **argv, char **envp) namecache_enable(); - /* Check winbindd parameters are valid */ - - ZERO_STRUCT(server_state); - /* Winbind daemon initialisation */ - if ( (!winbindd_param_init()) || (!winbindd_upgrade_idmap()) || - (!idmap_init(lp_idmap_backend())) ) { - DEBUG(1, ("Could not init idmap -- netlogon proxy only\n")); - idmap_set_proxyonly(); + if ( ! NT_STATUS_IS_OK(idmap_init()) ) { + DEBUG(1, ("Could not init idmap! - Sid/[UG]id mapping will not be available\n")); } /* Unblock all signals we are interested in as they may have been -- cgit