diff options
Diffstat (limited to 'source4/nsswitch/wbinfo.c')
-rw-r--r-- | source4/nsswitch/wbinfo.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/source4/nsswitch/wbinfo.c b/source4/nsswitch/wbinfo.c index a67b0512a2..46e4668dbe 100644 --- a/source4/nsswitch/wbinfo.c +++ b/source4/nsswitch/wbinfo.c @@ -45,7 +45,7 @@ static char winbind_separator_int(BOOL strict) /* Send off request */ - if (winbindd_request(WINBINDD_INFO, NULL, &response) != + if (winbindd_request_response(WINBINDD_INFO, NULL, &response) != NSS_STATUS_SUCCESS) { d_fprintf(stderr, "could not obtain winbind separator!\n"); if (strict) { @@ -84,7 +84,7 @@ static const char *get_winbind_domain(void) /* Send off request */ - if (winbindd_request(WINBINDD_DOMAIN_NAME, NULL, &response) != + if (winbindd_request_response(WINBINDD_DOMAIN_NAME, NULL, &response) != NSS_STATUS_SUCCESS) { d_fprintf(stderr, "could not obtain winbind domain name!\n"); @@ -136,7 +136,7 @@ static BOOL wbinfo_get_userinfo(char *user) fstrcpy(request.data.username, user); - result = winbindd_request(WINBINDD_GETPWNAM, &request, &response); + result = winbindd_request_response(WINBINDD_GETPWNAM, &request, &response); if (result != NSS_STATUS_SUCCESS) return False; @@ -165,7 +165,7 @@ static BOOL wbinfo_get_uidinfo(int uid) request.data.uid = uid; - result = winbindd_request(WINBINDD_GETPWUID, &request, &response); + result = winbindd_request_response(WINBINDD_GETPWUID, &request, &response); if (result != NSS_STATUS_SUCCESS) return False; @@ -196,7 +196,7 @@ static BOOL wbinfo_get_groupinfo(char *group) fstrcpy(request.data.groupname, group); - result = winbindd_request(WINBINDD_GETGRNAM, &request, + result = winbindd_request_response(WINBINDD_GETGRNAM, &request, &response); if ( result != NSS_STATUS_SUCCESS) @@ -226,7 +226,7 @@ static BOOL wbinfo_get_usergroups(char *user) fstrcpy(request.data.username, user); - result = winbindd_request(WINBINDD_GETGROUPS, &request, &response); + result = winbindd_request_response(WINBINDD_GETGROUPS, &request, &response); if (result != NSS_STATUS_SUCCESS) return False; @@ -255,7 +255,7 @@ static BOOL wbinfo_get_usersids(char *user_sid) /* Send request */ fstrcpy(request.data.sid, user_sid); - result = winbindd_request(WINBINDD_GETUSERSIDS, &request, &response); + result = winbindd_request_response(WINBINDD_GETUSERSIDS, &request, &response); if (result != NSS_STATUS_SUCCESS) return False; @@ -283,7 +283,7 @@ static BOOL wbinfo_get_userdomgroups(const char *user_sid) /* Send request */ fstrcpy(request.data.sid, user_sid); - result = winbindd_request(WINBINDD_GETUSERDOMGROUPS, &request, + result = winbindd_request_response(WINBINDD_GETUSERDOMGROUPS, &request, &response); if (result != NSS_STATUS_SUCCESS) @@ -311,7 +311,7 @@ static BOOL wbinfo_wins_byname(char *name) fstrcpy(request.data.winsreq, name); - if (winbindd_request(WINBINDD_WINS_BYNAME, &request, &response) != + if (winbindd_request_response(WINBINDD_WINS_BYNAME, &request, &response) != NSS_STATUS_SUCCESS) { return False; } @@ -337,7 +337,7 @@ static BOOL wbinfo_wins_byip(char *ip) fstrcpy(request.data.winsreq, ip); - if (winbindd_request(WINBINDD_WINS_BYIP, &request, &response) != + if (winbindd_request_response(WINBINDD_WINS_BYIP, &request, &response) != NSS_STATUS_SUCCESS) { return False; } @@ -363,7 +363,7 @@ static BOOL wbinfo_list_domains(BOOL list_all_domains) request.data.list_all_domains = list_all_domains; - if (winbindd_request(WINBINDD_LIST_TRUSTDOM, &request, &response) != + if (winbindd_request_response(WINBINDD_LIST_TRUSTDOM, &request, &response) != NSS_STATUS_SUCCESS) return False; @@ -414,7 +414,7 @@ static BOOL wbinfo_show_sequence(const char *domain) /* Send request */ - if (winbindd_request(WINBINDD_SHOW_SEQUENCE, &request, &response) != + if (winbindd_request_response(WINBINDD_SHOW_SEQUENCE, &request, &response) != NSS_STATUS_SUCCESS) return False; @@ -446,7 +446,7 @@ static BOOL wbinfo_domain_info(const char *domain_name) /* Send request */ - if (winbindd_request(WINBINDD_DOMAIN_INFO, &request, &response) != + if (winbindd_request_response(WINBINDD_DOMAIN_INFO, &request, &response) != NSS_STATUS_SUCCESS) return False; @@ -483,7 +483,7 @@ static BOOL wbinfo_getdcname(const char *domain_name) /* Send request */ - if (winbindd_request(WINBINDD_GETDCNAME, &request, &response) != + if (winbindd_request_response(WINBINDD_GETDCNAME, &request, &response) != NSS_STATUS_SUCCESS) { d_fprintf(stderr, "Could not get dc name for %s\n", domain_name); return False; @@ -505,7 +505,7 @@ static BOOL wbinfo_check_secret(void) ZERO_STRUCT(response); - result = winbindd_request(WINBINDD_CHECK_MACHACC, NULL, &response); + result = winbindd_request_response(WINBINDD_CHECK_MACHACC, NULL, &response); d_printf("checking the trust secret via RPC calls %s\n", (result == NSS_STATUS_SUCCESS) ? "succeeded" : "failed"); @@ -532,7 +532,7 @@ static BOOL wbinfo_uid_to_sid(uid_t uid) request.data.uid = uid; - if (winbindd_request(WINBINDD_UID_TO_SID, &request, &response) != + if (winbindd_request_response(WINBINDD_UID_TO_SID, &request, &response) != NSS_STATUS_SUCCESS) return False; @@ -557,7 +557,7 @@ static BOOL wbinfo_gid_to_sid(gid_t gid) request.data.gid = gid; - if (winbindd_request(WINBINDD_GID_TO_SID, &request, &response) != + if (winbindd_request_response(WINBINDD_GID_TO_SID, &request, &response) != NSS_STATUS_SUCCESS) return False; @@ -582,7 +582,7 @@ static BOOL wbinfo_sid_to_uid(char *sid) fstrcpy(request.data.sid, sid); - if (winbindd_request(WINBINDD_SID_TO_UID, &request, &response) != + if (winbindd_request_response(WINBINDD_SID_TO_UID, &request, &response) != NSS_STATUS_SUCCESS) return False; @@ -605,7 +605,7 @@ static BOOL wbinfo_sid_to_gid(char *sid) fstrcpy(request.data.sid, sid); - if (winbindd_request(WINBINDD_SID_TO_GID, &request, &response) != + if (winbindd_request_response(WINBINDD_SID_TO_GID, &request, &response) != NSS_STATUS_SUCCESS) return False; @@ -630,7 +630,7 @@ static BOOL wbinfo_lookupsid(char *sid) fstrcpy(request.data.sid, sid); - if (winbindd_request(WINBINDD_LOOKUPSID, &request, &response) != + if (winbindd_request_response(WINBINDD_LOOKUPSID, &request, &response) != NSS_STATUS_SUCCESS) return False; @@ -674,7 +674,7 @@ static BOOL wbinfo_lookupname(char *name) parse_wbinfo_domain_user(name, request.data.name.dom_name, request.data.name.name); - if (winbindd_request(WINBINDD_LOOKUPNAME, &request, &response) != + if (winbindd_request_response(WINBINDD_LOOKUPNAME, &request, &response) != NSS_STATUS_SUCCESS) return False; @@ -687,7 +687,7 @@ static BOOL wbinfo_lookupname(char *name) /* Authenticate a user with a plaintext password */ -static BOOL wbinfo_auth_krb5(char *username, const char *cctype, uint32 flags) +static BOOL wbinfo_auth_krb5(char *username, const char *cctype, uint32_t flags) { struct winbindd_request request; struct winbindd_response response; @@ -715,7 +715,7 @@ static BOOL wbinfo_auth_krb5(char *username, const char *cctype, uint32 flags) request.data.auth.uid = geteuid(); - result = winbindd_request(WINBINDD_PAM_AUTH, &request, &response); + result = winbindd_request_response(WINBINDD_PAM_AUTH, &request, &response); /* Display response */ @@ -770,7 +770,7 @@ static BOOL wbinfo_auth(char *username) } else fstrcpy(request.data.auth.user, username); - result = winbindd_request(WINBINDD_PAM_AUTH, &request, &response); + result = winbindd_request_response(WINBINDD_PAM_AUTH, &request, &response); /* Display response */ @@ -877,7 +877,7 @@ static BOOL wbinfo_auth_crap(char *username) request.data.auth_crap.nt_resp_len = 24; } - result = winbindd_request(WINBINDD_PAM_AUTH_CRAP, &request, &response); + result = winbindd_request_response(WINBINDD_PAM_AUTH_CRAP, &request, &response); /* Display response */ @@ -915,7 +915,7 @@ static BOOL print_domain_users(const char *domain) fstrcpy( request.domain_name, domain ); } - if (winbindd_request(WINBINDD_LIST_USERS, &request, &response) != + if (winbindd_request_response(WINBINDD_LIST_USERS, &request, &response) != NSS_STATUS_SUCCESS) return False; @@ -953,7 +953,7 @@ static BOOL print_domain_groups(const char *domain) fstrcpy( request.domain_name, domain ); } - if (winbindd_request(WINBINDD_LIST_GROUPS, &request, &response) != + if (winbindd_request_response(WINBINDD_LIST_GROUPS, &request, &response) != NSS_STATUS_SUCCESS) return False; @@ -976,7 +976,7 @@ static BOOL wbinfo_ping(void) { NSS_STATUS result; - result = winbindd_request(WINBINDD_PING, NULL, NULL); + result = winbindd_request_response(WINBINDD_PING, NULL, NULL); /* Display response */ @@ -1231,7 +1231,7 @@ int main(int argc, char **argv, char **envp) break; } case 'K': { - uint32 flags = WBFLAG_PAM_KRB5 | + uint32_t flags = WBFLAG_PAM_KRB5 | WBFLAG_PAM_CACHED_LOGIN | WBFLAG_PAM_FALLBACK_AFTER_KRB5 | WBFLAG_PAM_INFO3_TEXT; |