#include "replace.h"
#include "libwbclient.h"
+#include "../winbind_client.h"
/* Authenticate a username/password pair */
wbcErr wbcAuthenticateUser(const char *username,
}
done:
- if (response.extra_data.data)
- free(response.extra_data.data);
+ winbindd_free_response(&response);
talloc_free(request.extra_data.data);
}
done:
- if (response.extra_data.data)
- free(response.extra_data.data);
+ winbindd_free_response(&response);
return wbc_status;
}
#include "replace.h"
#include "libwbclient.h"
+#include "../winbind_client.h"
/** @brief The maximum number of pwent structs to get from winbindd
*
BAIL_ON_PTR_ERROR(*grp, wbc_status);
done:
- if (response.extra_data.data)
- free(response.extra_data.data);
+ winbindd_free_response(&response);
return wbc_status;
}
BAIL_ON_PTR_ERROR(*grp, wbc_status);
done:
- if (response.extra_data.data)
- free(response.extra_data.data);
+ winbindd_free_response(&response);
return wbc_status;
}
if (pw_cache_size > 0) {
pw_cache_idx = pw_cache_size = 0;
- if (pw_response.extra_data.data) {
- free(pw_response.extra_data.data);
- }
+ winbindd_free_response(&pw_response);
}
ZERO_STRUCT(pw_response);
if (pw_cache_size > 0) {
pw_cache_idx = pw_cache_size = 0;
- if (pw_response.extra_data.data) {
- free(pw_response.extra_data.data);
- }
+ winbindd_free_response(&pw_response);
}
wbc_status = wbcRequestResponse(WINBINDD_ENDPWENT,
pw_cache_idx = 0;
- if (pw_response.extra_data.data) {
- free(pw_response.extra_data.data);
- ZERO_STRUCT(pw_response);
- }
+ winbindd_free_response(&pw_response);
ZERO_STRUCT(request);
request.data.num_entries = MAX_GETPWENT_USERS;
if (gr_cache_size > 0) {
gr_cache_idx = gr_cache_size = 0;
- if (gr_response.extra_data.data) {
- free(gr_response.extra_data.data);
- }
+ winbindd_free_response(&gr_response);
}
ZERO_STRUCT(gr_response);
if (gr_cache_size > 0) {
gr_cache_idx = gr_cache_size = 0;
- if (gr_response.extra_data.data) {
- free(gr_response.extra_data.data);
- }
+ winbindd_free_response(&gr_response);
}
wbc_status = wbcRequestResponse(WINBINDD_ENDGRENT,
gr_cache_idx = 0;
- if (gr_response.extra_data.data) {
- free(gr_response.extra_data.data);
- ZERO_STRUCT(gr_response);
- }
+ winbindd_free_response(&gr_response);
ZERO_STRUCT(request);
request.data.num_entries = MAX_GETGRENT_GROUPS;
gr_cache_idx = 0;
- if (gr_response.extra_data.data) {
- free(gr_response.extra_data.data);
- ZERO_STRUCT(gr_response);
- }
+ winbindd_free_response(&gr_response);
+ ZERO_STRUCT(gr_response);
ZERO_STRUCT(request);
request.data.num_entries = MAX_GETGRENT_GROUPS;
wbc_status = WBC_ERR_SUCCESS;
done:
- if (response.extra_data.data) {
- free(response.extra_data.data);
- }
+ winbindd_free_response(&response);
if (groups) {
talloc_free(groups);
}
#include "replace.h"
#include "libwbclient.h"
-
+#include "../winbind_client.h"
/* Convert a binary SID to a character string */
wbcErr wbcSidToString(const struct wbcDomainSid *sid,
wbc_status = WBC_ERR_SUCCESS;
done:
- if (response.extra_data.data) {
- free(response.extra_data.data);
- }
+ winbindd_free_response(&response);
if (WBC_ERROR_IS_OK(wbc_status)) {
*pp_domain_name = domain_name;
wbc_status = WBC_ERR_SUCCESS;
done:
- if (response.extra_data.data) {
- free(response.extra_data.data);
- }
+ winbindd_free_response(&response);
if (sids) {
talloc_free(sids);
}
if (extra_data) {
talloc_free(extra_data);
}
- if (response.extra_data.data) {
- free(response.extra_data.data);
- }
+ winbindd_free_response(&response);
if (rids) {
talloc_free(rids);
}
wbc_status = WBC_ERR_SUCCESS;
done:
- if (response.extra_data.data) {
- free(response.extra_data.data);
- }
+ winbindd_free_response(&response);
if (users) {
talloc_free(users);
}
wbc_status = WBC_ERR_SUCCESS;
done:
- if (response.extra_data.data) {
- free(response.extra_data.data);
- }
+ winbindd_free_response(&response);
if (groups) {
talloc_free(groups);
}