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