1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-06 13:18:07 +03:00
Commit Graph

224 Commits

Author SHA1 Message Date
Volker Lendecke
d38e1d13ea s3: Remove "mem_ctx" from lookup_cached_name() 2010-09-09 06:19:24 +02:00
Volker Lendecke
4e4228bd5d s3: Remove unused arg "user_sid" from winbindd_store_creds
All callers have passed in NULL
2010-09-09 06:19:23 +02:00
Volker Lendecke
7372a50a03 s3: Remove unused winbindd_update_creds_by_sid 2010-09-09 06:19:23 +02:00
Volker Lendecke
a0de3fc690 s3: Remove unused winbindd_dual_show_sequence() 2010-09-09 06:19:23 +02:00
Volker Lendecke
e2b63996e8 s3: Make winbind_add_failed_connection_entry static 2010-09-08 21:10:18 +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
Michael Adam
3b56f7f6b5 s3:winbind: remove the method REMOVE_MAPPING from winbind's API
Michael
2010-08-14 02:10:34 +02:00
Michael Adam
474020b1ae s3:winbind: remove the method SET_MAPPING from winbind's API
Michael
2010-08-14 02:10:33 +02:00
Michael Adam
66e67c1bad s3:winbind: remove SET_HWM from winbind's API. 2010-08-14 02:10:31 +02:00
Günther Deschner
e7a6a3ec0d s3: avoid global include of ads.h.
Guenther
2010-08-05 00:32:02 +02:00
Günther Deschner
0da5e15378 s3-winbindd: route samr chgpwd ops for own domain over internal samr pipe as well.
Guenther
2010-07-07 16:49:26 +02:00
Simo Sorce
cbda0369a8 s3:winbindd use common server context functions 2010-06-10 17:30:45 -04:00
Andrew Bartlett
61eb56be4e s3:winbind tidy up connecting the winbind sockets.
By putting this code inline in winbindd_setup_listeners() we remove 2
static variables and simplify the code.

By putting the get_winbind_priv_pipe_dir() in the same file, we allow
it to be reimplemented in s3compat.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-05-31 21:36:55 +02:00
Andrew Bartlett
e5ebc52e9f Revert "s3:winbindd Split helper functions to allow s3compat to call them"
I'm experimenting with a different entry point

This reverts commit f5c0f90da5.
2010-05-31 21:36:55 +02:00
Andrew Bartlett
8d6f88b469 s3:winbind Kill amusing but un-used winbindd_kill_all_clients
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-05-28 18:08:28 +02:00
Andrew Bartlett
cba7f8b827 s3:dom_sid Global replace of DOM_SID with struct dom_sid
This matches the structure that new code is being written to,
and removes one more of the old-style named structures, and
the need to know that is is just an alias for struct dom_sid.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:39:59 +02:00
Andrew Bartlett
72e65a0521 s3:winbindd Provide a winbindd_register_handlers() helper function for s3compat
This function provides a useful entry point for s3compat to set things
up in winbindd.

Andrew Bartlett
2010-05-13 10:12:27 +10:00
Andrew Bartlett
f5c0f90da5 s3:winbindd Split helper functions to allow s3compat to call them
This provides a more useful entry point for s3compat.

Andrew Bartlett
2010-05-13 10:12:27 +10:00
Andrew Bartlett
7f70b53dd6 s3:Winbindd Move winbindd_event_context to a different file
This allows this function to be easily replaced in s3compat

Andrew Bartlett
2010-05-13 10:12:26 +10:00
Volker Lendecke
fd3eeb3878 s3: async_domain_request is no longer used 2010-04-25 12:32:02 +02:00
Volker Lendecke
dbb7db6c25 s3: sendto_domain() is lo longer used 2010-04-24 11:12:19 +02:00
Volker Lendecke
f2f0fed8aa s3: Convert WINBINDD_PAM_CHNG_PSWD_AUTH_CRAP to the new async API 2010-04-23 23:41:04 +02:00
Volker Lendecke
56b4aa3266 s3: Move the in-memory ccache to the parent
None of this blocks, so there is no reason to keep this in
a winbind child process
2010-04-19 14:27:24 +02:00
Volker Lendecke
45eeed2893 s3: Convert WINBINDD_PAM_LOGOFF to the new async API 2010-04-19 14:27:20 +02:00
Volker Lendecke
518a4f5423 s3: Convert WINBINDD_PAM_CHAUTHTOK to the new async API 2010-04-19 14:27:20 +02:00
Volker Lendecke
d869e7a0d8 s3: Convert WINBINDD_PAM_AUTH_CRAP to the new async API 2010-04-19 14:27:19 +02:00
Volker Lendecke
61ec0f571a s3: Convert WINBINDD_PAM_AUTH to the new async API 2010-04-19 14:27:19 +02:00
Volker Lendecke
3d5732fc13 s3: Remove the separate "child" argument from setup_domain_child() 2010-04-08 15:12:42 +02:00
Volker Lendecke
6d9b2e62cb s3: Make check_info3_in_group static 2010-03-31 21:03:07 +02:00
Volker Lendecke
cf4a8f7639 s3-winbind: Make append_auth_data() static 2010-03-31 21:03:06 +02:00
Volker Lendecke
89c785c47a s3: Fix a long-standing problem with recycled PIDs
When a samba server process dies hard, it has no chance to clean up its entries
in locking.tdb, brlock.tdb, connections.tdb and sessionid.tdb.

For locking.tdb and brlock.tdb Samba is robust by checking every time we read
an entry from the database if the corresponding process still exists. If it
does not exist anymore, the entry is deleted. This is not 100% failsafe though:
On systems with a limited PID space there is a non-zero chance that between the
smbd's death and the fresh access, the PID is recycled by another long-running
process. This renders all files that had been locked by the killed smbd
potentially unusable until the new process also dies.

This patch is supposed to fix the problem the following way: Every process ID
in every database is augmented by a random 64-bit number that is stored in a
serverid.tdb. Whenever we need to check if a process still exists we know its
PID and the 64-bit number. We look up the PID in serverid.tdb and compare the
64-bit number. If it's the same, the process still is a valid smbd holding the
lock. If it is different, a new smbd has taken over.

I believe this is safe against an smbd that has died hard and the PID has been
taken over by a non-samba process. This process would not have registered
itself with a fresh 64-bit number in serverid.tdb, so the old one still exists
in serverid.tdb. We protect against this case by the parent smbd taking care of
deregistering PIDs from serverid.tdb and the fact that serverid.tdb is
CLEAR_IF_FIRST.

CLEAR_IF_FIRST does not work in a cluster, so the automatic cleanup does not
work when all smbds are restarted. For this, "net serverid wipe" has to be run
before smbd starts up. As a convenience, "net serverid wipedbs" also cleans up
sessionid.tdb and connections.tdb.

While there, this also cleans up overloading connections.tdb with all the
process entries just for messaging_send_all().

Volker
2010-03-10 16:07:10 +01:00
Volker Lendecke
5c40aa59d7 s3: Remove unused count_all_current_connections() 2010-02-28 20:45:21 +01:00
Bo Yang
9fed9011ff s3: Don't invalidate cache for uninitialized domains.
Signed-off-by: Bo Yang <boyang@samba.org>
2010-02-09 17:06:14 +08:00
Volker Lendecke
7d18d058a1 s3: Add wbinfo --ccache-save
With this command you can give winbind your password for later use by
the automatic ntlm_auth
2010-01-24 20:32:16 +01:00
Volker Lendecke
22a4a000ce s3: Make free_domain_list() static 2010-01-02 12:09:05 +01:00
Volker Lendecke
d05e17f875 s3: Introduce domain_is_forest_root() helper function
Hopefully this makes the flag tests a bit more understandable
2010-01-02 12:09:05 +01:00
Volker Lendecke
634d084517 s3: Replace IS_DOMAIN_OFFLINE by a function 2009-12-26 12:26:07 +01:00
Volker Lendecke
03617df24d s3: winbindd_cli_state->getgrent_state is no longer used 2009-12-26 12:26:06 +01:00
Volker Lendecke
6dc924fcf3 s3: Remove some unused code 2009-12-23 12:02:19 +01:00
Volker Lendecke
40d4c31999 s3: Remove unused sendto_child() 2009-12-23 11:42:31 +01:00
Volker Lendecke
9b6b01aab6 s3:winbind: Add a lower-cost alternative to wbinfo -t: wbinfo --ping-dc
This just does a NULL RPC call through an existing NETLOGON connection. If
someone knows an operation that "just works" and does not return NOT_SUPPORTED,
please tell me :-)
2009-12-21 23:23:52 +01:00
Volker Lendecke
e7468fb129 s3: Shrink winbindd_proto.h a bit 2009-12-21 16:27:20 +01:00
Volker Lendecke
d534a5be49 s3: Remove unused get_sam_group_entries 2009-12-21 16:27:19 +01:00
Volker Lendecke
0a130daf74 s3: Remove unused winbindd_dual_getsidaliases 2009-12-21 16:27:19 +01:00
Volker Lendecke
9568c762ac s3: Remove unused winbindd_dual_getuserdomgroups 2009-12-21 16:27:19 +01:00
Volker Lendecke
958fdaf5c3 s3: Remove unused winbindd_dual_getdcname 2009-12-21 16:27:19 +01:00
Volker Lendecke
4f434e07e9 s3: Remove unused winbindd_dual_lookupname 2009-12-21 16:27:19 +01:00
Volker Lendecke
74b1a026d4 s3: Remove unused winbindd_dual_lookupsid 2009-12-21 16:27:19 +01:00
Volker Lendecke
a8875c5724 s3: Remove some unused dual functions 2009-12-21 16:27:19 +01:00
Volker Lendecke
4b84d75399 s3: Remove unused do_async 2009-12-21 16:27:19 +01:00
Volker Lendecke
3f98c2c7ab s3: Remove unused winbindd_gid2sid_async 2009-12-21 16:27:18 +01:00
Volker Lendecke
93bcc348d2 s3: Remove unused winbindd_uid2sid_async 2009-12-21 16:27:18 +01:00
Volker Lendecke
fb77442c2d s3: Remove unused winbindd_sid2gid_async 2009-12-21 16:27:18 +01:00
Volker Lendecke
d40edae331 s3: Remove unused winbindd_sid2uid_async 2009-12-21 16:27:18 +01:00
Volker Lendecke
2591a524c0 s3: Remove unused query_user_async 2009-12-21 16:27:18 +01:00
Volker Lendecke
5156fa8c74 s3: Remove unused winbindd_getsidaliases_async 2009-12-21 16:27:18 +01:00
Volker Lendecke
0c3e3b7ab0 s3: Remove unused winbindd_lookupname_async 2009-12-21 16:27:18 +01:00
Volker Lendecke
ebcb28ca73 s3: Remove unused winbindd_lookupsid_async 2009-12-21 16:27:18 +01:00
Volker Lendecke
3e3214fd91 s3:winbind: Move fillup_pw_field() as static to wb_fill_pwent.c 2009-10-17 17:13:02 +02:00
Günther Deschner
a3306e352d s3-winbindd: add wbint_ChangeMachineAccount implementation.
Guenther
2009-10-13 12:42:44 +02:00
Volker Lendecke
dc8538b405 s3:winbind: Make check_info3_in_group, sanitize its memory handling 2009-09-28 17:54:20 +02:00
Volker Lendecke
f18d0b036c s3:winbind: Make "check_request_flags" publically available 2009-09-28 17:54:20 +02:00
Volker Lendecke
def5bf57c5 s3:winbind: Sanitize the args for find_auth_domain: It only needs the flags 2009-09-28 17:54:20 +02:00
Volker Lendecke
93db77adcb s3:winbind: Make append_data publically available as append_auth_data 2009-09-28 17:54:20 +02:00
Günther Deschner
58f2deb940 s3-winbindd: add cm_connect_lsa_tcp().
Guenther
2009-09-22 11:38:06 +02:00
Günther Deschner
99c3fc1958 s3-winbindd: add and use winbindd_lookup_names().
Guenther
2009-09-17 08:54:31 +02:00
Günther Deschner
f0b52b8c31 s3-winbindd: add and use winbindd_lookup_sids().
Guenther
2009-09-17 08:54:19 +02:00
Volker Lendecke
04ea250aeb s3:winbind: Convert WINBINDD_SET_HWM to the new API 2009-09-07 01:28:32 +02:00
Volker Lendecke
4ad330d522 s3:winbind: Convert WINBINDD_REMOVE_MAPPING to the new API 2009-09-07 01:28:32 +02:00
Volker Lendecke
7159060450 s3:winbind: Convert WINBINDD_SET_MAPPING to the new API 2009-09-07 01:28:32 +02:00
Volker Lendecke
d9b7fd59b0 s3:winbind: Convert WINBINDD_CHECK_MACHACC to the new API 2009-09-07 01:28:32 +02:00
Volker Lendecke
1abf692312 s3:winbind: Make the pam_auth subfunctions static 2009-09-05 17:00:21 +02:00
Volker Lendecke
0cae043b0c w3:winbind: Convert WINBINDD_ALLOCATE_GID to the new API 2009-08-30 09:48:28 +02:00
Volker Lendecke
9e7c6f12fd w3:winbind: Convert WINBINDD_ALLOCATE_UID to the new API 2009-08-30 09:48:28 +02:00
Volker Lendecke
2774a02f64 s3:winbind: Convert WINBINDD_LIST_GROUPS to the new API 2009-08-29 19:53:46 +02:00
Volker Lendecke
6b474c56a5 s3:winbind: Convert WINBINDD_LIST_USERS to the new API 2009-08-29 19:53:29 +02:00
Volker Lendecke
e47491e83c s3:winbind: Convert the getgrent functions to the new API 2009-08-29 19:42:27 +02:00
Volker Lendecke
10e9df2975 s3:winbind: Add async wb_next_grent 2009-08-29 19:42:27 +02:00
Volker Lendecke
50d9fb42fc w3:winbind: Convert WINBINDD_LOOKUPRIDS to the new API 2009-08-29 19:42:26 +02:00
Volker Lendecke
425239caee s3:winbind: Convert the GETDCNAME routines to the new API 2009-08-29 19:42:26 +02:00
Volker Lendecke
15312e7310 s3:winbind: Add async wb_dsgetdcname 2009-08-29 19:42:26 +02:00
Volker Lendecke
244bb7f163 s3:winbind: Convert winbindd_dsgetdcname to the new API 2009-08-29 19:42:26 +02:00
Volker Lendecke
9c30a8dc6f s3:winbind: Convert the GETPWENT routines to the new API 2009-08-29 19:42:26 +02:00
Volker Lendecke
6e2bf7e234 s3:winbind: Add async next_pwent 2009-08-29 19:42:26 +02:00
Volker Lendecke
91588e6e8f s3:winbind: Add async fill_pwent 2009-08-29 19:42:26 +02:00
Volker Lendecke
c325ba89cf s3:winbind: Add async query_user_list 2009-08-29 19:42:26 +02:00
Volker Lendecke
1d8d3fd7c3 s3:winbind: Convert WINBINDD_GETUSERSIDS to the new API 2009-08-27 15:04:09 +02:00
Volker Lendecke
2f16bf5445 s3:winbind: Factor out wcache_store_seqnum() 2009-08-27 15:04:09 +02:00
Volker Lendecke
f3d71d3e8c s3:winbind: Add a generic cache for NDR based parent-child requests 2009-08-27 15:04:09 +02:00
Volker Lendecke
2c23e7dc5a s3:winbind: The get[gr|pw]end functions need access to the client state 2009-08-16 13:28:14 +02:00
Volker Lendecke
459233e630 s3:winbind: Convert WINBINDD_GETGRNAM to the new API 2009-08-16 12:39:08 +02:00
Volker Lendecke
a511a87519 s3:winbind: Convert WINBINDD_GETGRGID to the new API 2009-08-16 12:39:07 +02:00
Volker Lendecke
3f3f49d5e2 s3:winbind: Add winbindd_print_groupmem
This converts a talloc_dict retrieved from wb_group_members to the string
that the pipe protocol expects
2009-08-16 12:39:02 +02:00
Volker Lendecke
27dd290d3f s3:winbind: Make fill_grent publically available 2009-08-16 12:38:19 +02:00
Volker Lendecke
886e183b0e s3:winbind: Add const to normalize_name_map 2009-08-16 12:38:19 +02:00
Volker Lendecke
c83bf9cd7e s3:winbind: Add async wb_getgrsid 2009-08-16 12:38:19 +02:00
Volker Lendecke
8a683f4896 s3:winbind: Add async wb_group_members 2009-08-16 12:38:19 +02:00
Volker Lendecke
3d46eaf411 s3:winbind: Make wcache_lookup_groupmem available publically 2009-08-16 12:38:19 +02:00
Volker Lendecke
0f64bb5b7e s3:winbind: Convert winbindd_show_sequence to the new API 2009-08-16 10:38:24 +02:00
Volker Lendecke
e54503e82f s3:winbind: Add async wb_seqnums
This is something that would have been very difficult with the old style of
async requests: Send the request to all children simultaneously.
2009-08-16 10:38:24 +02:00