From 8c7f2fbab2f1ea754da1642d46ad3f51ffb91823 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 13 Oct 2000 05:19:57 +0000 Subject: Fixed merging mess. (This used to be commit 7b8c03de1fd1461d4c65c0d7100f9519e08d1b24) --- source3/nsswitch/wbinfo.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c index e26b0c1b26..cff2b8b69a 100644 --- a/source3/nsswitch/wbinfo.c +++ b/source3/nsswitch/wbinfo.c @@ -32,6 +32,8 @@ enum nss_status winbindd_request(int req_type, struct winbindd_request *request, struct winbindd_response *response); +/* List groups a user is a member of */ + static BOOL wbinfo_get_usergroups(char *user) { struct winbindd_request request; @@ -89,7 +91,26 @@ static BOOL wbinfo_list_domains(void) static BOOL wbinfo_check_secret(void) { - return False; + struct winbindd_response response; + BOOL result; + + ZERO_STRUCT(response); + + result = winbindd_request(WINBINDD_CHECK_MACHACC, NULL, &response) == + NSS_STATUS_SUCCESS; + + if (result) { + + if (response.data.num_entries) { + printf("Secret is good\n"); + } else { + printf("Secret is bad\n"); + } + + return True; + } + + return False; } /* Convert uid to sid */ -- cgit