summaryrefslogtreecommitdiffstats
path: root/src/sss_client
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2014-12-19 11:21:41 +0100
committerJakub Hrozek <jhrozek@redhat.com>2015-01-13 21:00:32 +0100
commit78774f416af48cb0e27a7adec2fdf2e04c08976c (patch)
treec115446c0eb73a773ea4f2f9160e4f45c34336f2 /src/sss_client
parent90fe0ef10c7851fb92d69ae08290756a2e6c5b2d (diff)
downloadsssd-78774f416af48cb0e27a7adec2fdf2e04c08976c.tar.gz
sssd-78774f416af48cb0e27a7adec2fdf2e04c08976c.tar.xz
sssd-78774f416af48cb0e27a7adec2fdf2e04c08976c.zip
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>
Diffstat (limited to 'src/sss_client')
-rw-r--r--src/sss_client/libwbclient/wbc_pam_sssd.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/sss_client/libwbclient/wbc_pam_sssd.c b/src/sss_client/libwbclient/wbc_pam_sssd.c
index 893a5c16c..174cf1310 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;
}