summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-07-03 22:41:23 +0200
committerVolker Lendecke <vl@samba.org>2010-07-03 22:42:52 +0200
commite17ce247a3575ca868bc6e69a6491ff033551443 (patch)
tree490f02e8cc60ca31969f8ed5faaf27009a207af8 /nsswitch
parent6dc1c708760b887a5b195f860cd0a02cfcfffadd (diff)
downloadsamba-e17ce247a3575ca868bc6e69a6491ff033551443.tar.gz
samba-e17ce247a3575ca868bc6e69a6491ff033551443.tar.bz2
samba-e17ce247a3575ca868bc6e69a6491ff033551443.zip
wbinfo: Fix error messages
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/wbinfo.c106
1 files changed, 53 insertions, 53 deletions
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index a277ede75b..0369d40145 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -172,7 +172,7 @@ static bool wbinfo_get_userinfo(char *user)
wbc_status = wbcGetpwnam(user, &pwd);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcGetpwnam: %s",
+ d_fprintf(stderr, "failed to call wbcGetpwnam: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -197,7 +197,7 @@ static bool wbinfo_get_uidinfo(int uid)
wbc_status = wbcGetpwuid(uid, &pwd);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcGetpwuid: %s",
+ d_fprintf(stderr, "failed to call wbcGetpwuid: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -223,7 +223,7 @@ static bool wbinfo_get_user_sidinfo(const char *sid_str)
wbc_status = wbcStringToSid(sid_str, &sid);
wbc_status = wbcGetpwsid(&sid, &pwd);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcGetpwsid: %s",
+ d_fprintf(stderr, "failed to call wbcGetpwsid: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -250,7 +250,7 @@ static bool wbinfo_get_groupinfo(const char *group)
wbc_status = wbcGetgrnam(group, &grp);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcGetgrnam: %s",
+ d_fprintf(stderr, "failed to call wbcGetgrnam: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -281,7 +281,7 @@ static bool wbinfo_get_gidinfo(int gid)
wbc_status = wbcGetgrgid(gid, &grp);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcGetgrgid: %s",
+ d_fprintf(stderr, "failed to call wbcGetgrgid: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -316,7 +316,7 @@ static bool wbinfo_get_usergroups(const char *user)
wbc_status = wbcGetGroups(user, &num_groups, &groups);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcGetGroups: %s",
+ d_fprintf(stderr, "failed to call wbcGetGroups: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -343,14 +343,14 @@ static bool wbinfo_get_usersids(const char *user_sid_str)
wbc_status = wbcStringToSid(user_sid_str, &user_sid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcStringToSid: %s",
+ d_fprintf(stderr, "failed to call wbcStringToSid: %s\n",
wbcErrorString(wbc_status));
return false;
}
wbc_status = wbcLookupUserSids(&user_sid, false, &num_sids, &sids);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcLookupUserSids: %s",
+ d_fprintf(stderr, "failed to call wbcLookupUserSids: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -359,8 +359,8 @@ static bool wbinfo_get_usersids(const char *user_sid_str)
char *str = NULL;
wbc_status = wbcSidToString(&sids[i], &str);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcSidToString: %s",
- wbcErrorString(wbc_status));
+ d_fprintf(stderr, "failed to call wbcSidToString: "
+ "%s\n", wbcErrorString(wbc_status));
wbcFreeMemory(sids);
return false;
}
@@ -384,14 +384,14 @@ static bool wbinfo_get_userdomgroups(const char *user_sid_str)
wbc_status = wbcStringToSid(user_sid_str, &user_sid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcSidToString: %s",
+ d_fprintf(stderr, "failed to call wbcSidToString: %s\n",
wbcErrorString(wbc_status));
return false;
}
wbc_status = wbcLookupUserSids(&user_sid, true, &num_sids, &sids);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcLookupUserSids: %s",
+ d_fprintf(stderr, "failed to call wbcLookupUserSids: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -400,8 +400,8 @@ static bool wbinfo_get_userdomgroups(const char *user_sid_str)
char *str = NULL;
wbc_status = wbcSidToString(&sids[i], &str);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcSidToString: %s",
- wbcErrorString(wbc_status));
+ d_fprintf(stderr, "failed to call wbcSidToString: "
+ "%s\n", wbcErrorString(wbc_status));
wbcFreeMemory(sids);
return false;
}
@@ -481,7 +481,7 @@ static bool wbinfo_wins_byname(const char *name)
wbc_status = wbcResolveWinsByName(name, &ip);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcResolveWinsByName: %s",
+ d_fprintf(stderr, "failed to call wbcResolveWinsByName: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -504,7 +504,7 @@ static bool wbinfo_wins_byip(const char *ip)
wbc_status = wbcResolveWinsByIP(ip, &name);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcResolveWinsByIP: %s",
+ d_fprintf(stderr, "failed to call wbcResolveWinsByIP: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -530,7 +530,7 @@ static bool wbinfo_list_domains(bool list_all_domains, bool verbose)
wbc_status = wbcListTrusts(&domain_list, &num_domains);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcListTrusts: %s",
+ d_fprintf(stderr, "failed to call wbcListTrusts: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -618,7 +618,7 @@ static bool wbinfo_show_onlinestatus(const char *domain)
wbc_status = wbcListTrusts(&domain_list, &num_domains);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcListTrusts: %s",
+ d_fprintf(stderr, "failed to call wbcListTrusts: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -660,14 +660,14 @@ static bool wbinfo_domain_info(const char *domain)
wbc_status = wbcDomainInfo(domain, &dinfo);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcDomainInfo: %s",
+ d_fprintf(stderr, "failed to call wbcDomainInfo: %s\n",
wbcErrorString(wbc_status));
return false;
}
wbc_status = wbcSidToString(&dinfo->sid, &sid_str);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcSidToString: %s",
+ d_fprintf(stderr, "failed to call wbcSidToString: %s\n",
wbcErrorString(wbc_status));
wbcFreeMemory(dinfo);
return false;
@@ -778,8 +778,8 @@ static bool wbinfo_check_secret(const char *domain)
wbcFreeMemory(error);
}
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcCheckTrustCredentials: %s",
- wbcErrorString(wbc_status));
+ d_fprintf(stderr, "failed to call wbcCheckTrustCredentials: "
+ "%s\n", wbcErrorString(wbc_status));
return false;
}
@@ -812,8 +812,8 @@ static bool wbinfo_change_secret(const char *domain)
wbcFreeMemory(error);
}
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcChangeTrustCredentials: %s",
- wbcErrorString(wbc_status));
+ d_fprintf(stderr, "failed to call wbcChangeTrustCredentials: "
+ "%s\n", wbcErrorString(wbc_status));
return false;
}
@@ -838,7 +838,7 @@ static bool wbinfo_ping_dc(void)
wbcFreeMemory(error);
}
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcPingDc: %s",
+ d_fprintf(stderr, "failed to call wbcPingDc: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -858,14 +858,14 @@ static bool wbinfo_uid_to_sid(uid_t uid)
wbc_status = wbcUidToSid(uid, &sid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcUidToSid: %s",
+ d_fprintf(stderr, "failed to call wbcUidToSid: %s\n",
wbcErrorString(wbc_status));
return false;
}
wbc_status = wbcSidToString(&sid, &sid_str);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcSidToString: %s",
+ d_fprintf(stderr, "failed to call wbcSidToString: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -891,14 +891,14 @@ static bool wbinfo_gid_to_sid(gid_t gid)
wbc_status = wbcGidToSid(gid, &sid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcGidToSid: %s",
+ d_fprintf(stderr, "failed to call wbcGidToSid: %s\n",
wbcErrorString(wbc_status));
return false;
}
wbc_status = wbcSidToString(&sid, &sid_str);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcSidToString: %s",
+ d_fprintf(stderr, "failed to call wbcSidToString: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -924,14 +924,14 @@ static bool wbinfo_sid_to_uid(const char *sid_str)
wbc_status = wbcStringToSid(sid_str, &sid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcStringToSid: %s",
+ d_fprintf(stderr, "failed to call wbcStringToSid: %s\n",
wbcErrorString(wbc_status));
return false;
}
wbc_status = wbcSidToUid(&sid, &uid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcSidToUid: %s",
+ d_fprintf(stderr, "failed to call wbcSidToUid: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -953,14 +953,14 @@ static bool wbinfo_sid_to_gid(const char *sid_str)
wbc_status = wbcStringToSid(sid_str, &sid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcStringToSid: %s",
+ d_fprintf(stderr, "failed to call wbcStringToSid: %s\n",
wbcErrorString(wbc_status));
return false;
}
wbc_status = wbcSidToGid(&sid, &gid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcSidToGid: %s",
+ d_fprintf(stderr, "failed to call wbcSidToGid: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -981,7 +981,7 @@ static bool wbinfo_allocate_uid(void)
wbc_status = wbcAllocateUid(&uid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcAllocateUid: %s",
+ d_fprintf(stderr, "failed to call wbcAllocateUid: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -1002,7 +1002,7 @@ static bool wbinfo_allocate_gid(void)
wbc_status = wbcAllocateGid(&gid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcAllocateGid: %s",
+ d_fprintf(stderr, "failed to call wbcAllocateGid: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -1023,14 +1023,14 @@ static bool wbinfo_set_uid_mapping(uid_t uid, const char *sid_str)
wbc_status = wbcStringToSid(sid_str, &sid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcStringToSid: %s",
+ d_fprintf(stderr, "failed to call wbcStringToSid: %s\n",
wbcErrorString(wbc_status));
return false;
}
wbc_status = wbcSetUidMapping(uid, &sid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcSetUidMapping: %s",
+ d_fprintf(stderr, "failed to call wbcSetUidMapping: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -1052,14 +1052,14 @@ static bool wbinfo_set_gid_mapping(gid_t gid, const char *sid_str)
wbc_status = wbcStringToSid(sid_str, &sid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcStringToSid: %s",
+ d_fprintf(stderr, "failed to call wbcStringToSid: %s\n",
wbcErrorString(wbc_status));
return false;
}
wbc_status = wbcSetGidMapping(gid, &sid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcSetGidMapping: %s",
+ d_fprintf(stderr, "failed to call wbcSetGidMapping: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -1081,14 +1081,14 @@ static bool wbinfo_remove_uid_mapping(uid_t uid, const char *sid_str)
wbc_status = wbcStringToSid(sid_str, &sid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcStringToSid: %s",
+ d_fprintf(stderr, "failed to call wbcStringToSid: %s\n",
wbcErrorString(wbc_status));
return false;
}
wbc_status = wbcRemoveUidMapping(uid, &sid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcRemoveUidMapping: %s",
+ d_fprintf(stderr, "failed to call wbcRemoveUidMapping: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -1110,14 +1110,14 @@ static bool wbinfo_remove_gid_mapping(gid_t gid, const char *sid_str)
wbc_status = wbcStringToSid(sid_str, &sid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcStringToSid: %s",
+ d_fprintf(stderr, "failed to call wbcStringToSid: %s\n",
wbcErrorString(wbc_status));
return false;
}
wbc_status = wbcRemoveGidMapping(gid, &sid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcRemoveGidMapping: %s",
+ d_fprintf(stderr, "failed to call wbcRemoveGidMapping: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -1144,14 +1144,14 @@ static bool wbinfo_lookupsid(const char *sid_str)
wbc_status = wbcStringToSid(sid_str, &sid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcStringToSid: %s",
+ d_fprintf(stderr, "failed to call wbcStringToSid: %s\n",
wbcErrorString(wbc_status));
return false;
}
wbc_status = wbcLookupSid(&sid, &domain, &name, &type);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcLookupSid: %s",
+ d_fprintf(stderr, "failed to call wbcLookupSid: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -1178,14 +1178,14 @@ static bool wbinfo_lookupsid_fullname(const char *sid_str)
wbc_status = wbcStringToSid(sid_str, &sid);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcStringToSid: %s",
+ d_fprintf(stderr, "failed to call wbcStringToSid: %s\n",
wbcErrorString(wbc_status));
return false;
}
wbc_status = wbcGetDisplayName(&sid, &domain, &name, &type);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcGetDisplayName: %s",
+ d_fprintf(stderr, "failed to call wbcGetDisplayName: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -1305,14 +1305,14 @@ static bool wbinfo_lookupname(const char *full_name)
wbc_status = wbcLookupName(domain_name, account_name,
&sid, &type);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcLookupName: %s",
+ d_fprintf(stderr, "failed to call wbcLookupName: %s\n",
wbcErrorString(wbc_status));
return false;
}
wbc_status = wbcSidToString(&sid, &sid_str);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcSidToString: %s",
+ d_fprintf(stderr, "failed to call wbcSidToString: %s\n",
wbcErrorString(wbc_status));
return false;
}
@@ -1401,7 +1401,7 @@ static bool wbinfo_auth_krb5(char *username, const char *cctype, uint32_t flags)
(uint8_t *)&flags,
sizeof(flags));
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcAddNamedBlob: %s",
+ d_fprintf(stderr, "failed to call wbcAddNamedBlob: %s\n",
wbcErrorString(wbc_status));
goto done;
}
@@ -1413,7 +1413,7 @@ static bool wbinfo_auth_krb5(char *username, const char *cctype, uint32_t flags)
(uint8_t *)&uid,
sizeof(uid));
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcAddNamedBlob: %s",
+ d_fprintf(stderr, "failed to call wbcAddNamedBlob: %s\n",
wbcErrorString(wbc_status));
goto done;
}
@@ -1425,7 +1425,7 @@ static bool wbinfo_auth_krb5(char *username, const char *cctype, uint32_t flags)
(uint8_t *)local_cctype,
strlen(cctype)+1);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcAddNamedBlob: %s",
+ d_fprintf(stderr, "failed to call wbcAddNamedBlob: %s\n",
wbcErrorString(wbc_status));
goto done;
}
@@ -1848,7 +1848,7 @@ static bool print_domain_groups(const char *domain)
wbc_status = wbcListGroups(domain, &num_groups, &groups);
if (!WBC_ERROR_IS_OK(wbc_status)) {
- d_fprintf(stderr, "failed to call wbcListGroups: %s",
+ d_fprintf(stderr, "failed to call wbcListGroups: %s\n",
wbcErrorString(wbc_status));
return false;
}