|
|
905b4d |
From 082e13dba488ebb2b948d6a362095153714b669f Mon Sep 17 00:00:00 2001
|
|
|
905b4d |
From: Sumit Bose <sbose@redhat.com>
|
|
|
905b4d |
Date: Fri, 19 Dec 2014 11:21:41 +0100
|
|
|
905b4d |
Subject: [PATCH] libwbclient: initialize some return values
|
|
|
905b4d |
|
|
|
905b4d |
Some callers of libwbclient functions expects the return values are
|
|
|
905b4d |
initialized even it the functions returns an error. This patch adds some
|
|
|
905b4d |
initializations to meet this requirement.
|
|
|
905b4d |
|
|
|
905b4d |
Resolves https://fedorahosted.org/sssd/ticket/2537
|
|
|
905b4d |
|
|
|
905b4d |
Reviewed-by: Pavel Reichl <preichl@redhat.com>
|
|
|
905b4d |
---
|
|
|
905b4d |
src/sss_client/libwbclient/wbc_pam_sssd.c | 36 +++++++++++++++++++++++++++++++
|
|
|
905b4d |
1 file changed, 36 insertions(+)
|
|
|
905b4d |
|
|
|
905b4d |
diff --git a/src/sss_client/libwbclient/wbc_pam_sssd.c b/src/sss_client/libwbclient/wbc_pam_sssd.c
|
|
|
905b4d |
index 893a5c16cf0e020e0570ea838d96fa82292373fa..174cf1310fad0243036fe591978cc89700903896 100644
|
|
|
905b4d |
--- a/src/sss_client/libwbclient/wbc_pam_sssd.c
|
|
|
905b4d |
+++ b/src/sss_client/libwbclient/wbc_pam_sssd.c
|
|
|
905b4d |
@@ -45,6 +45,10 @@ wbcErr wbcAuthenticateUserEx(const struct wbcAuthUserParams *params,
|
|
|
905b4d |
struct wbcAuthUserInfo **info,
|
|
|
905b4d |
struct wbcAuthErrorInfo **error)
|
|
|
905b4d |
{
|
|
|
905b4d |
+ if (error != NULL) {
|
|
|
905b4d |
+ *error = NULL;
|
|
|
905b4d |
+ }
|
|
|
905b4d |
+
|
|
|
905b4d |
WBC_SSSD_NOT_IMPLEMENTED;
|
|
|
905b4d |
}
|
|
|
905b4d |
|
|
|
905b4d |
@@ -52,6 +56,10 @@ wbcErr wbcAuthenticateUserEx(const struct wbcAuthUserParams *params,
|
|
|
905b4d |
wbcErr wbcCheckTrustCredentials(const char *domain,
|
|
|
905b4d |
struct wbcAuthErrorInfo **error)
|
|
|
905b4d |
{
|
|
|
905b4d |
+ if (error != NULL) {
|
|
|
905b4d |
+ *error = NULL;
|
|
|
905b4d |
+ }
|
|
|
905b4d |
+
|
|
|
905b4d |
WBC_SSSD_NOT_IMPLEMENTED;
|
|
|
905b4d |
}
|
|
|
905b4d |
|
|
|
905b4d |
@@ -59,6 +67,10 @@ wbcErr wbcCheckTrustCredentials(const char *domain,
|
|
|
905b4d |
wbcErr wbcChangeTrustCredentials(const char *domain,
|
|
|
905b4d |
struct wbcAuthErrorInfo **error)
|
|
|
905b4d |
{
|
|
|
905b4d |
+ if (error != NULL) {
|
|
|
905b4d |
+ *error = NULL;
|
|
|
905b4d |
+ }
|
|
|
905b4d |
+
|
|
|
905b4d |
WBC_SSSD_NOT_IMPLEMENTED;
|
|
|
905b4d |
}
|
|
|
905b4d |
|
|
|
905b4d |
@@ -102,6 +114,14 @@ wbcErr wbcChangeUserPasswordEx(const struct wbcChangePasswordParams *params,
|
|
|
905b4d |
enum wbcPasswordChangeRejectReason *reject_reason,
|
|
|
905b4d |
struct wbcUserPasswordPolicyInfo **policy)
|
|
|
905b4d |
{
|
|
|
905b4d |
+ if (error != NULL) {
|
|
|
905b4d |
+ *error = NULL;
|
|
|
905b4d |
+ }
|
|
|
905b4d |
+
|
|
|
905b4d |
+ if (policy != NULL) {
|
|
|
905b4d |
+ *policy = NULL;
|
|
|
905b4d |
+ }
|
|
|
905b4d |
+
|
|
|
905b4d |
WBC_SSSD_NOT_IMPLEMENTED;
|
|
|
905b4d |
}
|
|
|
905b4d |
|
|
|
905b4d |
@@ -129,6 +149,18 @@ wbcErr wbcLogonUser(const struct wbcLogonUserParams *params,
|
|
|
905b4d |
struct wbcAuthErrorInfo **error,
|
|
|
905b4d |
struct wbcUserPasswordPolicyInfo **policy)
|
|
|
905b4d |
{
|
|
|
905b4d |
+ if (info != NULL) {
|
|
|
905b4d |
+ *info = NULL;
|
|
|
905b4d |
+ }
|
|
|
905b4d |
+
|
|
|
905b4d |
+ if (error != NULL) {
|
|
|
905b4d |
+ *error = NULL;
|
|
|
905b4d |
+ }
|
|
|
905b4d |
+
|
|
|
905b4d |
+ if (policy != NULL) {
|
|
|
905b4d |
+ *policy = NULL;
|
|
|
905b4d |
+ }
|
|
|
905b4d |
+
|
|
|
905b4d |
WBC_SSSD_NOT_IMPLEMENTED;
|
|
|
905b4d |
}
|
|
|
905b4d |
|
|
|
905b4d |
@@ -137,6 +169,10 @@ wbcErr wbcCredentialCache(struct wbcCredentialCacheParams *params,
|
|
|
905b4d |
struct wbcCredentialCacheInfo **info,
|
|
|
905b4d |
struct wbcAuthErrorInfo **error)
|
|
|
905b4d |
{
|
|
|
905b4d |
+ if (error != NULL) {
|
|
|
905b4d |
+ *error = NULL;
|
|
|
905b4d |
+ }
|
|
|
905b4d |
+
|
|
|
905b4d |
WBC_SSSD_NOT_IMPLEMENTED;
|
|
|
905b4d |
}
|
|
|
905b4d |
|
|
|
905b4d |
--
|
|
|
905b4d |
1.9.3
|
|
|
905b4d |
|