diff options
author | Tim Potter <tpot@samba.org> | 2000-10-13 05:19:57 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2000-10-13 05:19:57 +0000 |
commit | 8c7f2fbab2f1ea754da1642d46ad3f51ffb91823 (patch) | |
tree | a3953e2415baf12290bbfcfd0230924b72a40496 /source3/nsswitch | |
parent | 330d678fbad70fabd9712c56ad15bd215f950255 (diff) | |
download | samba-8c7f2fbab2f1ea754da1642d46ad3f51ffb91823.tar.gz samba-8c7f2fbab2f1ea754da1642d46ad3f51ffb91823.tar.bz2 samba-8c7f2fbab2f1ea754da1642d46ad3f51ffb91823.zip |
Fixed merging mess.
(This used to be commit 7b8c03de1fd1461d4c65c0d7100f9519e08d1b24)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r-- | source3/nsswitch/wbinfo.c | 23 |
1 files changed, 22 insertions, 1 deletions
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 */ |