summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-06-24 20:25:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:58:00 -0500
commit19ca97a70f6b7b41d251eaa76e4d3c980c6eedff (patch)
tree18d7d81e2c1aa7cf9325899b7e8fc90b41c14c8b /source3/nsswitch
parent8387af752f81e26f1c141f6053bf6d106f0af5eb (diff)
downloadsamba-19ca97a70f6b7b41d251eaa76e4d3c980c6eedff.tar.gz
samba-19ca97a70f6b7b41d251eaa76e4d3c980c6eedff.tar.bz2
samba-19ca97a70f6b7b41d251eaa76e4d3c980c6eedff.zip
r7882: Looks like a large patch - but what it actually does is make Samba
safe for using our headers and linking with C++ modules. Stops us from using C++ reserved keywords in our code. Jeremy (This used to be commit 9506b8e145982b1160a2f0aee5c9b7a54980940a)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/wb_client.c24
-rw-r--r--source3/nsswitch/wb_common.c6
-rw-r--r--source3/nsswitch/wbinfo.c48
-rw-r--r--source3/nsswitch/winbind_client.h2
-rw-r--r--source3/nsswitch/winbind_nss_linux.c38
-rw-r--r--source3/nsswitch/winbindd.c48
-rw-r--r--source3/nsswitch/winbindd.h6
-rw-r--r--source3/nsswitch/winbindd_ads.c10
-rw-r--r--source3/nsswitch/winbindd_async.c367
-rw-r--r--source3/nsswitch/winbindd_dual.c58
-rw-r--r--source3/nsswitch/winbindd_group.c24
-rw-r--r--source3/nsswitch/winbindd_misc.c12
-rw-r--r--source3/nsswitch/winbindd_sid.c60
-rw-r--r--source3/nsswitch/winbindd_user.c24
-rw-r--r--source3/nsswitch/winbindd_util.c34
-rw-r--r--source3/nsswitch/winbindd_wins.c6
-rw-r--r--source3/nsswitch/wins.c6
17 files changed, 386 insertions, 387 deletions
diff --git a/source3/nsswitch/wb_client.c b/source3/nsswitch/wb_client.c
index 32ac4319a0..db56cf0444 100644
--- a/source3/nsswitch/wb_client.c
+++ b/source3/nsswitch/wb_client.c
@@ -28,7 +28,7 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
-NSS_STATUS winbindd_request(int req_type,
+NSS_STATUS winbindd_request_response(int req_type,
struct winbindd_request *request,
struct winbindd_response *response);
@@ -52,7 +52,7 @@ BOOL winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid,
fstrcpy(request.data.name.dom_name, dom_name);
fstrcpy(request.data.name.name, name);
- if ((result = winbindd_request(WINBINDD_LOOKUPNAME, &request,
+ if ((result = winbindd_request_response(WINBINDD_LOOKUPNAME, &request,
&response)) == NSS_STATUS_SUCCESS) {
if (!string_to_sid(sid, response.data.sid.sid))
return False;
@@ -83,7 +83,7 @@ BOOL winbind_lookup_sid(const DOM_SID *sid,
/* Make request */
- result = winbindd_request(WINBINDD_LOOKUPSID, &request, &response);
+ result = winbindd_request_response(WINBINDD_LOOKUPSID, &request, &response);
/* Copy out result */
@@ -121,7 +121,7 @@ BOOL winbind_sid_to_uid(uid_t *puid, const DOM_SID *sid)
/* Make request */
- result = winbindd_request(WINBINDD_SID_TO_UID, &request, &response);
+ result = winbindd_request_response(WINBINDD_SID_TO_UID, &request, &response);
/* Copy out result */
@@ -152,7 +152,7 @@ BOOL winbind_uid_to_sid(DOM_SID *sid, uid_t uid)
/* Make request */
- result = winbindd_request(WINBINDD_UID_TO_SID, &request, &response);
+ result = winbindd_request_response(WINBINDD_UID_TO_SID, &request, &response);
/* Copy out result */
@@ -188,7 +188,7 @@ BOOL winbind_sid_to_gid(gid_t *pgid, const DOM_SID *sid)
/* Make request */
- result = winbindd_request(WINBINDD_SID_TO_GID, &request, &response);
+ result = winbindd_request_response(WINBINDD_SID_TO_GID, &request, &response);
/* Copy out result */
@@ -219,7 +219,7 @@ BOOL winbind_gid_to_sid(DOM_SID *sid, gid_t gid)
/* Make request */
- result = winbindd_request(WINBINDD_GID_TO_SID, &request, &response);
+ result = winbindd_request_response(WINBINDD_GID_TO_SID, &request, &response);
/* Copy out result */
@@ -246,7 +246,7 @@ BOOL winbind_allocate_rid(uint32 *rid)
/* Make request */
- result = winbindd_request(WINBINDD_ALLOCATE_RID, &request, &response);
+ result = winbindd_request_response(WINBINDD_ALLOCATE_RID, &request, &response);
if (result != NSS_STATUS_SUCCESS)
return False;
@@ -270,7 +270,7 @@ BOOL winbind_allocate_rid_and_gid(uint32 *rid, gid_t *gid)
/* Make request */
- result = winbindd_request(WINBINDD_ALLOCATE_RID_AND_GID, &request,
+ result = winbindd_request_response(WINBINDD_ALLOCATE_RID_AND_GID, &request,
&response);
if (result != NSS_STATUS_SUCCESS)
@@ -299,7 +299,7 @@ static int wb_getgroups(const char *user, gid_t **groups)
ZERO_STRUCT(response);
- result = winbindd_request(WINBINDD_GETGROUPS, &request, &response);
+ result = winbindd_request_response(WINBINDD_GETGROUPS, &request, &response);
if (result == NSS_STATUS_SUCCESS) {
@@ -415,7 +415,7 @@ BOOL winbind_ping( void )
{
NSS_STATUS result;
- result = winbindd_request(WINBINDD_PING, NULL, NULL);
+ result = winbindd_request_response(WINBINDD_PING, NULL, NULL);
return result == NSS_STATUS_SUCCESS;
}
@@ -450,5 +450,5 @@ NSS_STATUS wb_is_trusted_domain(const char *domain)
fstrcpy(request.domain_name, domain);
- return winbindd_request(WINBINDD_DOMAIN_INFO, &request, &response);
+ return winbindd_request_response(WINBINDD_DOMAIN_INFO, &request, &response);
}
diff --git a/source3/nsswitch/wb_common.c b/source3/nsswitch/wb_common.c
index d2e8b9cc6a..b6f617eb95 100644
--- a/source3/nsswitch/wb_common.c
+++ b/source3/nsswitch/wb_common.c
@@ -316,14 +316,14 @@ int winbind_open_pipe_sock(void)
/* version-check the socket */
- if ((winbindd_request(WINBINDD_INTERFACE_VERSION, &request, &response) != NSS_STATUS_SUCCESS) || (response.data.interface_version != WINBIND_INTERFACE_VERSION)) {
+ if ((winbindd_request_response(WINBINDD_INTERFACE_VERSION, &request, &response) != NSS_STATUS_SUCCESS) || (response.data.interface_version != WINBIND_INTERFACE_VERSION)) {
close_sock();
return -1;
}
/* try and get priv pipe */
- if (winbindd_request(WINBINDD_PRIV_PIPE_DIR, &request, &response) == NSS_STATUS_SUCCESS) {
+ if (winbindd_request_response(WINBINDD_PRIV_PIPE_DIR, &request, &response) == NSS_STATUS_SUCCESS) {
int fd;
if ((fd = winbind_named_pipe_sock(response.extra_data)) != -1) {
close(winbindd_fd);
@@ -584,7 +584,7 @@ NSS_STATUS winbindd_get_response(struct winbindd_response *response)
/* Handle simple types of requests */
-NSS_STATUS winbindd_request(int req_type,
+NSS_STATUS winbindd_request_response(int req_type,
struct winbindd_request *request,
struct winbindd_response *response)
{
diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c
index 8407bb1e3a..34b2d6c929 100644
--- a/source3/nsswitch/wbinfo.c
+++ b/source3/nsswitch/wbinfo.c
@@ -43,7 +43,7 @@ static char winbind_separator(void)
/* Send off request */
- if (winbindd_request(WINBINDD_INFO, NULL, &response) !=
+ if (winbindd_request_response(WINBINDD_INFO, NULL, &response) !=
NSS_STATUS_SUCCESS) {
d_printf("could not obtain winbind separator!\n");
/* HACK: (this module should not call lp_ funtions) */
@@ -71,7 +71,7 @@ static const char *get_winbind_domain(void)
/* Send off request */
- if (winbindd_request(WINBINDD_DOMAIN_NAME, NULL, &response) !=
+ if (winbindd_request_response(WINBINDD_DOMAIN_NAME, NULL, &response) !=
NSS_STATUS_SUCCESS) {
d_printf("could not obtain winbind domain name!\n");
@@ -123,7 +123,7 @@ static BOOL wbinfo_get_usergroups(char *user)
fstrcpy(request.data.username, user);
- result = winbindd_request(WINBINDD_GETGROUPS, &request, &response);
+ result = winbindd_request_response(WINBINDD_GETGROUPS, &request, &response);
if (result != NSS_STATUS_SUCCESS)
return False;
@@ -151,7 +151,7 @@ static BOOL wbinfo_get_usersids(char *user_sid)
/* Send request */
fstrcpy(request.data.sid, user_sid);
- result = winbindd_request(WINBINDD_GETUSERSIDS, &request, &response);
+ result = winbindd_request_response(WINBINDD_GETUSERSIDS, &request, &response);
if (result != NSS_STATUS_SUCCESS)
return False;
@@ -178,7 +178,7 @@ static BOOL wbinfo_get_userdomgroups(const char *user_sid)
/* Send request */
fstrcpy(request.data.sid, user_sid);
- result = winbindd_request(WINBINDD_GETUSERDOMGROUPS, &request,
+ result = winbindd_request_response(WINBINDD_GETUSERDOMGROUPS, &request,
&response);
if (result != NSS_STATUS_SUCCESS)
@@ -207,7 +207,7 @@ static BOOL wbinfo_wins_byname(char *name)
fstrcpy(request.data.winsreq, name);
- if (winbindd_request(WINBINDD_WINS_BYNAME, &request, &response) !=
+ if (winbindd_request_response(WINBINDD_WINS_BYNAME, &request, &response) !=
NSS_STATUS_SUCCESS) {
return False;
}
@@ -233,7 +233,7 @@ static BOOL wbinfo_wins_byip(char *ip)
fstrcpy(request.data.winsreq, ip);
- if (winbindd_request(WINBINDD_WINS_BYIP, &request, &response) !=
+ if (winbindd_request_response(WINBINDD_WINS_BYIP, &request, &response) !=
NSS_STATUS_SUCCESS) {
return False;
}
@@ -255,7 +255,7 @@ static BOOL wbinfo_list_domains(void)
/* Send request */
- if (winbindd_request(WINBINDD_LIST_TRUSTDOM, NULL, &response) !=
+ if (winbindd_request_response(WINBINDD_LIST_TRUSTDOM, NULL, &response) !=
NSS_STATUS_SUCCESS)
return False;
@@ -298,7 +298,7 @@ static BOOL wbinfo_show_sequence(const char *domain)
/* Send request */
- if (winbindd_request(WINBINDD_SHOW_SEQUENCE, &request, &response) !=
+ if (winbindd_request_response(WINBINDD_SHOW_SEQUENCE, &request, &response) !=
NSS_STATUS_SUCCESS)
return False;
@@ -327,7 +327,7 @@ static BOOL wbinfo_domain_info(const char *domain_name)
/* Send request */
- if (winbindd_request(WINBINDD_DOMAIN_INFO, &request, &response) !=
+ if (winbindd_request_response(WINBINDD_DOMAIN_INFO, &request, &response) !=
NSS_STATUS_SUCCESS)
return False;
@@ -364,7 +364,7 @@ static BOOL wbinfo_getdcname(const char *domain_name)
/* Send request */
- if (winbindd_request(WINBINDD_GETDCNAME, &request, &response) !=
+ if (winbindd_request_response(WINBINDD_GETDCNAME, &request, &response) !=
NSS_STATUS_SUCCESS) {
d_printf("Could not get dc name for %s\n", domain_name);
return False;
@@ -386,7 +386,7 @@ static BOOL wbinfo_check_secret(void)
ZERO_STRUCT(response);
- result = winbindd_request(WINBINDD_CHECK_MACHACC, NULL, &response);
+ result = winbindd_request_response(WINBINDD_CHECK_MACHACC, NULL, &response);
d_printf("checking the trust secret via RPC calls %s\n",
(result == NSS_STATUS_SUCCESS) ? "succeeded" : "failed");
@@ -413,7 +413,7 @@ static BOOL wbinfo_uid_to_sid(uid_t uid)
request.data.uid = uid;
- if (winbindd_request(WINBINDD_UID_TO_SID, &request, &response) !=
+ if (winbindd_request_response(WINBINDD_UID_TO_SID, &request, &response) !=
NSS_STATUS_SUCCESS)
return False;
@@ -438,7 +438,7 @@ static BOOL wbinfo_gid_to_sid(gid_t gid)
request.data.gid = gid;
- if (winbindd_request(WINBINDD_GID_TO_SID, &request, &response) !=
+ if (winbindd_request_response(WINBINDD_GID_TO_SID, &request, &response) !=
NSS_STATUS_SUCCESS)
return False;
@@ -463,7 +463,7 @@ static BOOL wbinfo_sid_to_uid(char *sid)
fstrcpy(request.data.sid, sid);
- if (winbindd_request(WINBINDD_SID_TO_UID, &request, &response) !=
+ if (winbindd_request_response(WINBINDD_SID_TO_UID, &request, &response) !=
NSS_STATUS_SUCCESS)
return False;
@@ -486,7 +486,7 @@ static BOOL wbinfo_sid_to_gid(char *sid)
fstrcpy(request.data.sid, sid);
- if (winbindd_request(WINBINDD_SID_TO_GID, &request, &response) !=
+ if (winbindd_request_response(WINBINDD_SID_TO_GID, &request, &response) !=
NSS_STATUS_SUCCESS)
return False;
@@ -523,7 +523,7 @@ static BOOL wbinfo_lookupsid(char *sid)
fstrcpy(request.data.sid, sid);
- if (winbindd_request(WINBINDD_LOOKUPSID, &request, &response) !=
+ if (winbindd_request_response(WINBINDD_LOOKUPSID, &request, &response) !=
NSS_STATUS_SUCCESS)
return False;
@@ -551,7 +551,7 @@ static BOOL wbinfo_lookupname(char *name)
parse_wbinfo_domain_user(name, request.data.name.dom_name,
request.data.name.name);
- if (winbindd_request(WINBINDD_LOOKUPNAME, &request, &response) !=
+ if (winbindd_request_response(WINBINDD_LOOKUPNAME, &request, &response) !=
NSS_STATUS_SUCCESS)
return False;
@@ -586,7 +586,7 @@ static BOOL wbinfo_auth(char *username)
} else
fstrcpy(request.data.auth.user, username);
- result = winbindd_request(WINBINDD_PAM_AUTH, &request, &response);
+ result = winbindd_request_response(WINBINDD_PAM_AUTH, &request, &response);
/* Display response */
@@ -684,7 +684,7 @@ static BOOL wbinfo_auth_crap(char *username)
request.data.auth_crap.nt_resp_len = 24;
}
- result = winbindd_request(WINBINDD_PAM_AUTH_CRAP, &request, &response);
+ result = winbindd_request_response(WINBINDD_PAM_AUTH_CRAP, &request, &response);
/* Display response */
@@ -728,7 +728,7 @@ static BOOL wbinfo_klog(char *username)
request.flags |= WBFLAG_PAM_AFS_TOKEN;
- result = winbindd_request(WINBINDD_PAM_AUTH, &request, &response);
+ result = winbindd_request_response(WINBINDD_PAM_AUTH, &request, &response);
/* Display response */
@@ -780,7 +780,7 @@ static BOOL print_domain_users(const char *domain)
fstrcpy( request.domain_name, domain );
}
- if (winbindd_request(WINBINDD_LIST_USERS, &request, &response) !=
+ if (winbindd_request_response(WINBINDD_LIST_USERS, &request, &response) !=
NSS_STATUS_SUCCESS)
return False;
@@ -818,7 +818,7 @@ static BOOL print_domain_groups(const char *domain)
fstrcpy( request.domain_name, domain );
}
- if (winbindd_request(WINBINDD_LIST_GROUPS, &request, &response) !=
+ if (winbindd_request_response(WINBINDD_LIST_GROUPS, &request, &response) !=
NSS_STATUS_SUCCESS)
return False;
@@ -933,7 +933,7 @@ static BOOL wbinfo_ping(void)
{
NSS_STATUS result;
- result = winbindd_request(WINBINDD_PING, NULL, NULL);
+ result = winbindd_request_response(WINBINDD_PING, NULL, NULL);
/* Display response */
diff --git a/source3/nsswitch/winbind_client.h b/source3/nsswitch/winbind_client.h
index 4de2d57cc7..ec20cd78ef 100644
--- a/source3/nsswitch/winbind_client.h
+++ b/source3/nsswitch/winbind_client.h
@@ -5,7 +5,7 @@ void init_request(struct winbindd_request *req,int rq_type);
NSS_STATUS winbindd_send_request(int req_type,
struct winbindd_request *request);
NSS_STATUS winbindd_get_response(struct winbindd_response *response);
-NSS_STATUS winbindd_request(int req_type,
+NSS_STATUS winbindd_request_response(int req_type,
struct winbindd_request *request,
struct winbindd_response *response);
int winbind_open_pipe_sock(void);
diff --git a/source3/nsswitch/winbind_nss_linux.c b/source3/nsswitch/winbind_nss_linux.c
index d8d4f93676..c0b8bf3a75 100644
--- a/source3/nsswitch/winbind_nss_linux.c
+++ b/source3/nsswitch/winbind_nss_linux.c
@@ -303,7 +303,7 @@ _nss_winbind_setpwent(void)
free_response(&getpwent_response);
}
- return winbindd_request(WINBINDD_SETPWENT, NULL, NULL);
+ return winbindd_request_response(WINBINDD_SETPWENT, NULL, NULL);
}
/* Close ntdom password database "file pointer" */
@@ -320,7 +320,7 @@ _nss_winbind_endpwent(void)
free_response(&getpwent_response);
}
- return winbindd_request(WINBINDD_ENDPWENT, NULL, NULL);
+ return winbindd_request_response(WINBINDD_ENDPWENT, NULL, NULL);
}
/* Fetch the next password entry from ntdom password database */
@@ -355,7 +355,7 @@ _nss_winbind_getpwent_r(struct passwd *result, char *buffer,
request.data.num_entries = MAX_GETPWENT_USERS;
- ret = winbindd_request(WINBINDD_GETPWENT, &request,
+ ret = winbindd_request_response(WINBINDD_GETPWENT, &request,
&getpwent_response);
if (ret == NSS_STATUS_SUCCESS) {
@@ -425,7 +425,7 @@ _nss_winbind_getpwuid_r(uid_t uid, struct passwd *result, char *buffer,
request.data.uid = uid;
- ret = winbindd_request(WINBINDD_GETPWUID, &request, &response);
+ ret = winbindd_request_response(WINBINDD_GETPWUID, &request, &response);
if (ret == NSS_STATUS_SUCCESS) {
ret = fill_pwent(result, &response.data.pw,
@@ -487,7 +487,7 @@ _nss_winbind_getpwnam_r(const char *name, struct passwd *result, char *buffer,
request.data.username
[sizeof(request.data.username) - 1] = '\0';
- ret = winbindd_request(WINBINDD_GETPWNAM, &request, &response);
+ ret = winbindd_request_response(WINBINDD_GETPWNAM, &request, &response);
if (ret == NSS_STATUS_SUCCESS) {
ret = fill_pwent(result, &response.data.pw, &buffer,
@@ -543,7 +543,7 @@ _nss_winbind_setgrent(void)
free_response(&getgrent_response);
}
- return winbindd_request(WINBINDD_SETGRENT, NULL, NULL);
+ return winbindd_request_response(WINBINDD_SETGRENT, NULL, NULL);
}
/* Close "file pointer" for ntdom group database */
@@ -560,7 +560,7 @@ _nss_winbind_endgrent(void)
free_response(&getgrent_response);
}
- return winbindd_request(WINBINDD_ENDGRENT, NULL, NULL);
+ return winbindd_request_response(WINBINDD_ENDGRENT, NULL, NULL);
}
/* Get next entry from ntdom group database */
@@ -597,7 +597,7 @@ winbind_getgrent(enum winbindd_cmd cmd,
request.data.num_entries = MAX_GETGRENT_USERS;
- ret = winbindd_request(cmd, &request,
+ ret = winbindd_request_response(cmd, &request,
&getgrent_response);
if (ret == NSS_STATUS_SUCCESS) {
@@ -700,7 +700,7 @@ _nss_winbind_getgrnam_r(const char *name,
request.data.groupname
[sizeof(request.data.groupname) - 1] = '\0';
- ret = winbindd_request(WINBINDD_GETGRNAM, &request, &response);
+ ret = winbindd_request_response(WINBINDD_GETGRNAM, &request, &response);
if (ret == NSS_STATUS_SUCCESS) {
ret = fill_grent(result, &response.data.gr,
@@ -762,7 +762,7 @@ _nss_winbind_getgrgid_r(gid_t gid,
request.data.gid = gid;
- ret = winbindd_request(WINBINDD_GETGRGID, &request, &response);
+ ret = winbindd_request_response(WINBINDD_GETGRGID, &request, &response);
if (ret == NSS_STATUS_SUCCESS) {
@@ -821,7 +821,7 @@ _nss_winbind_initgroups_dyn(char *user, gid_t group, long int *start,
strncpy(request.data.username, user,
sizeof(request.data.username) - 1);
- ret = winbindd_request(WINBINDD_GETGROUPS, &request, &response);
+ ret = winbindd_request_response(WINBINDD_GETGROUPS, &request, &response);
if (ret == NSS_STATUS_SUCCESS) {
int num_gids = response.data.num_entries;
@@ -897,7 +897,7 @@ _nss_winbind_getusersids(const char *user_sid, char **group_sids,
strncpy(request.data.sid, user_sid,sizeof(request.data.sid) - 1);
request.data.sid[sizeof(request.data.sid) - 1] = '\0';
- ret = winbindd_request(WINBINDD_GETUSERSIDS, &request, &response);
+ ret = winbindd_request_response(WINBINDD_GETUSERSIDS, &request, &response);
if (ret != NSS_STATUS_SUCCESS) {
goto done;
@@ -940,7 +940,7 @@ _nss_winbind_nametosid(const char *name, char **sid, char *buffer,
sizeof(request.data.name.name) - 1);
request.data.name.name[sizeof(request.data.name.name) - 1] = '\0';
- ret = winbindd_request(WINBINDD_LOOKUPNAME, &request, &response);
+ ret = winbindd_request_response(WINBINDD_LOOKUPNAME, &request, &response);
if (ret != NSS_STATUS_SUCCESS) {
*errnop = errno = EINVAL;
goto failed;
@@ -981,7 +981,7 @@ _nss_winbind_sidtoname(const char *sid, char **name, char *buffer,
/* we need to fetch the separator first time through */
if (!sep_char) {
- ret = winbindd_request(WINBINDD_INFO, &request, &response);
+ ret = winbindd_request_response(WINBINDD_INFO, &request, &response);
if (ret != NSS_STATUS_SUCCESS) {
*errnop = errno = EINVAL;
goto failed;
@@ -996,7 +996,7 @@ _nss_winbind_sidtoname(const char *sid, char **name, char *buffer,
sizeof(request.data.sid) - 1);
request.data.sid[sizeof(request.data.sid) - 1] = '\0';
- ret = winbindd_request(WINBINDD_LOOKUPSID, &request, &response);
+ ret = winbindd_request_response(WINBINDD_LOOKUPSID, &request, &response);
if (ret != NSS_STATUS_SUCCESS) {
*errnop = errno = EINVAL;
goto failed;
@@ -1043,7 +1043,7 @@ _nss_winbind_sidtouid(const char *sid, uid_t *uid, int *errnop)
strncpy(request.data.sid, sid, sizeof(request.data.sid) - 1);
request.data.sid[sizeof(request.data.sid) - 1] = '\0';
- ret = winbindd_request(WINBINDD_SID_TO_UID, &request, &response);
+ ret = winbindd_request_response(WINBINDD_SID_TO_UID, &request, &response);
if (ret != NSS_STATUS_SUCCESS) {
*errnop = errno = EINVAL;
goto failed;
@@ -1073,7 +1073,7 @@ _nss_winbind_sidtogid(const char *sid, gid_t *gid, int *errnop)
strncpy(request.data.sid, sid, sizeof(request.data.sid) - 1);
request.data.sid[sizeof(request.data.sid) - 1] = '\0';
- ret = winbindd_request(WINBINDD_SID_TO_GID, &request, &response);
+ ret = winbindd_request_response(WINBINDD_SID_TO_GID, &request, &response);
if (ret != NSS_STATUS_SUCCESS) {
*errnop = errno = EINVAL;
goto failed;
@@ -1103,7 +1103,7 @@ _nss_winbind_uidtosid(uid_t uid, char **sid, char *buffer,
request.data.uid = uid;
- ret = winbindd_request(WINBINDD_UID_TO_SID, &request, &response);
+ ret = winbindd_request_response(WINBINDD_UID_TO_SID, &request, &response);
if (ret != NSS_STATUS_SUCCESS) {
*errnop = errno = EINVAL;
goto failed;
@@ -1142,7 +1142,7 @@ _nss_winbind_gidtosid(gid_t gid, char **sid, char *buffer,
request.data.gid = gid;
- ret = winbindd_request(WINBINDD_GID_TO_SID, &request, &response);
+ ret = winbindd_request_response(WINBINDD_GID_TO_SID, &request, &response);
if (ret != NSS_STATUS_SUCCESS) {
*errnop = errno = EINVAL;
goto failed;
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index 5e38a84d65..078aeeb059 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -392,7 +392,7 @@ static void rw_callback(struct fd_event *event, int flags)
if (done <= 0) {
event->flags = 0;
- event->finished(event->private, False);
+ event->finished(event->private_data, False);
return;
}
}
@@ -404,7 +404,7 @@ static void rw_callback(struct fd_event *event, int flags)
if (done <= 0) {
event->flags = 0;
- event->finished(event->private, False);
+ event->finished(event->private_data, False);
return;
}
}
@@ -413,7 +413,7 @@ static void rw_callback(struct fd_event *event, int flags)
if (event->done == event->length) {
event->flags = 0;
- event->finished(event->private, True);
+ event->finished(event->private_data, True);
}
}
@@ -423,8 +423,8 @@ static void rw_callback(struct fd_event *event, int flags)
*/
void setup_async_read(struct fd_event *event, void *data, size_t length,
- void (*finished)(void *private, BOOL success),
- void *private)
+ void (*finished)(void *private_data, BOOL success),
+ void *private_data)
{
SMB_ASSERT(event->flags == 0);
event->data = data;
@@ -432,13 +432,13 @@ void setup_async_read(struct fd_event *event, void *data, size_t length,
event->done = 0;
event->handler = rw_callback;
event->finished = finished;
- event->private = private;
+ event->private_data = private_data;
event->flags = EVENT_FD_READ;
}
void setup_async_write(struct fd_event *event, void *data, size_t length,
- void (*finished)(void *private, BOOL success),
- void *private)
+ void (*finished)(void *private_data, BOOL success),
+ void *private_data)
{
SMB_ASSERT(event->flags == 0);
event->data = data;
@@ -446,7 +446,7 @@ void setup_async_write(struct fd_event *event, void *data, size_t length,
event->done = 0;
event->handler = rw_callback;
event->finished = finished;
- event->private = private;
+ event->private_data = private_data;
event->flags = EVENT_FD_WRITE;
}
@@ -460,17 +460,17 @@ void setup_async_write(struct fd_event *event, void *data, size_t length,
* to call request_finished which schedules sending the response.
*/
-static void request_len_recv(void *private, BOOL success);
-static void request_recv(void *private, BOOL success);
+static void request_len_recv(void *private_data, BOOL success);
+static void request_recv(void *private_data, BOOL success);
static void request_finished(struct winbindd_cli_state *state);
-void request_finished_cont(void *private, BOOL success);
-static void response_main_sent(void *private, BOOL success);
-static void response_extra_sent(void *private, BOOL success);
+void request_finished_cont(void *private_data, BOOL success);
+static void response_main_sent(void *private_data, BOOL success);
+static void response_extra_sent(void *private_data, BOOL success);
-static void response_extra_sent(void *private, BOOL success)
+static void response_extra_sent(void *private_data, BOOL success)
{
struct winbindd_cli_state *state =
- talloc_get_type_abort(private, struct winbindd_cli_state);
+ talloc_get_type_abort(private_data, struct winbindd_cli_state);
if (state->mem_ctx != NULL) {
talloc_destroy(state->mem_ctx);
@@ -488,10 +488,10 @@ static void response_extra_sent(void *private, BOOL success)
request_len_recv, state);
}
-static void response_main_sent(void *private, BOOL success)
+static void response_main_sent(void *private_data, BOOL success)
{
struct winbindd_cli_state *state =
- talloc_get_type_abort(private, struct winbindd_cli_state);
+ talloc_get_type_abort(private_data, struct winbindd_cli_state);
if (!success) {
state->finished = True;
@@ -534,10 +534,10 @@ void request_ok(struct winbindd_cli_state *state)
request_finished(state);
}
-void request_finished_cont(void *private, BOOL success)
+void request_finished_cont(void *private_data, BOOL success)
{
struct winbindd_cli_state *state =
- talloc_get_type_abort(private, struct winbindd_cli_state);
+ talloc_get_type_abort(private_data, struct winbindd_cli_state);
if (success)
request_ok(state);
@@ -545,10 +545,10 @@ void request_finished_cont(void *private, BOOL success)
request_error(state);
}
-static void request_recv(void *private, BOOL success)
+static void request_recv(void *private_data, BOOL success)
{
struct winbindd_cli_state *state =
- talloc_get_type_abort(private, struct winbindd_cli_state);
+ talloc_get_type_abort(private_data, struct winbindd_cli_state);
if (!success) {
state->finished = True;
@@ -558,10 +558,10 @@ static void request_recv(void *private, BOOL success)
process_request(state);
}
-static void request_len_recv(void *private, BOOL success)
+static void request_len_recv(void *private_data, BOOL success)
{
struct winbindd_cli_state *state =
- talloc_get_type_abort(private, struct winbindd_cli_state);
+ talloc_get_type_abort(private_data, struct winbindd_cli_state);
if (!success) {
state->finished = True;
diff --git a/source3/nsswitch/winbindd.h b/source3/nsswitch/winbindd.h
index d000168b1f..378120c80b 100644
--- a/source3/nsswitch/winbindd.h
+++ b/source3/nsswitch/winbindd.h
@@ -43,8 +43,8 @@ struct fd_event {
void (*handler)(struct fd_event *fde, int flags);
void *data;
size_t length, done;
- void (*finished)(void *private, BOOL success);
- void *private;
+ void (*finished)(void *private_data, BOOL success);
+ void *private_data;
};
struct winbindd_cli_state {
@@ -163,7 +163,7 @@ struct winbindd_domain {
/* Private data for the backends (used for connection cache) */
- void *private;
+ void *private_data;
/* A working DC */
fstring dcname;
diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c
index 0f4dee4f4a..c807ec59a5 100644
--- a/source3/nsswitch/winbindd_ads.c
+++ b/source3/nsswitch/winbindd_ads.c
@@ -39,8 +39,8 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain)
ADS_STRUCT *ads;
ADS_STATUS status;
- if (domain->private) {
- ads = (ADS_STRUCT *)domain->private;
+ if (domain->private_data) {
+ ads = (ADS_STRUCT *)domain->private_data;
/* check for a valid structure */
@@ -54,7 +54,7 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain)
ads->is_mine = True;
ads_destroy( &ads );
ads_kdestroy("MEMORY:winbind_ccache");
- domain->private = NULL;
+ domain->private_data = NULL;
}
}
@@ -101,7 +101,7 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain)
ads->is_mine = False;
- domain->private = (void *)ads;
+ domain->private_data = (void *)ads;
return ads;
}
@@ -767,7 +767,7 @@ static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32 *seq)
through since ads_USN() has already done
that indirectly */
- domain->private = NULL;
+ domain->private_data = NULL;
}
return ads_ntstatus(rc);
}
diff --git a/source3/nsswitch/winbindd_async.c b/source3/nsswitch/winbindd_async.c
index 9ac2acafd0..d227177ec1 100644
--- a/source3/nsswitch/winbindd_async.c
+++ b/source3/nsswitch/winbindd_async.c
@@ -44,32 +44,32 @@ struct do_async_state {
void (*cont)(TALLOC_CTX *mem_ctx,
BOOL success,
struct winbindd_response *response,
- void *c, void *private);
- void *c, *private;
+ void *c, void *private_data);
+ void *c, *private_data;
};
-static void do_async_recv(void *private, BOOL success)
+static void do_async_recv(void *private_data, BOOL success)
{
struct do_async_state *state =
- talloc_get_type_abort(private, struct do_async_state);
+ talloc_get_type_abort(private_data, struct do_async_state);
state->cont(state->mem_ctx, success, &state->response,
- state->c, state->private);
+ state->c, state->private_data);
}
static void do_async(TALLOC_CTX *mem_ctx, struct winbindd_child *child,
const struct winbindd_request *request,
void (*cont)(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private),
- void *c, void *private)
+ void *c, void *private_data),
+ void *c, void *private_data)
{
struct do_async_state *state;
state = TALLOC_P(mem_ctx, struct do_async_state);
if (state == NULL) {
DEBUG(0, ("talloc failed\n"));
- cont(mem_ctx, False, NULL, c, private);
+ cont(mem_ctx, False, NULL, c, private_data);
return;
}
@@ -78,7 +78,7 @@ static void do_async(TALLOC_CTX *mem_ctx, struct winbindd_child *child,
state->request.length = sizeof(state->request);
state->cont = cont;
state->c = c;
- state->private = private;
+ state->private_data = private_data;
async_request(mem_ctx, child, &state->request,
&state->response, do_async_recv, state);
@@ -88,15 +88,15 @@ static void do_async_domain(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
const struct winbindd_request *request,
void (*cont)(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private),
- void *c, void *private)
+ void *c, void *private_data),
+ void *c, void *private_data)
{
struct do_async_state *state;
state = TALLOC_P(mem_ctx, struct do_async_state);
if (state == NULL) {
DEBUG(0, ("talloc failed\n"));
- cont(mem_ctx, False, NULL, c, private);
+ cont(mem_ctx, False, NULL, c, private_data);
return;
}
@@ -105,7 +105,7 @@ static void do_async_domain(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
state->request.length = sizeof(state->request);
state->cont = cont;
state->c = c;
- state->private = private;
+ state->private_data = private_data;
async_domain_request(mem_ctx, domain, &state->request,
&state->response, do_async_recv, state);
@@ -113,29 +113,29 @@ static void do_async_domain(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
static void idmap_set_mapping_recv(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private)
+ void *c, void *private_data)
{
void (*cont)(void *priv, BOOL succ) = c;
if (!success) {
DEBUG(5, ("Could not trigger idmap_set_mapping\n"));
- cont(private, False);
+ cont(private_data, False);
return;
}
if (response->result != WINBINDD_OK) {
DEBUG(5, ("idmap_set_mapping returned an error\n"));
- cont(private, False);
+ cont(private_data, False);
return;
}
- cont(private, True);
+ cont(private_data, True);
}
void idmap_set_mapping_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
unid_t id, int id_type,
- void (*cont)(void *private, BOOL success),
- void *private)
+ void (*cont)(void *private_data, BOOL success),
+ void *private_data)
{
struct winbindd_request request;
ZERO_STRUCT(request);
@@ -148,7 +148,7 @@ void idmap_set_mapping_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
sid_to_string(request.data.dual_idmapset.sid, sid);
do_async(mem_ctx, idmap_child(), &request, idmap_set_mapping_recv,
- cont, private);
+ cont, private_data);
}
enum winbindd_result winbindd_dual_idmapset(struct winbindd_domain *domain,
@@ -175,11 +175,11 @@ enum winbindd_result winbindd_dual_idmapset(struct winbindd_domain *domain,
static void idmap_sid2uid_recv(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private);
+ void *c, void *private_data);
void idmap_sid2uid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid, BOOL alloc,
- void (*cont)(void *private, BOOL success, uid_t uid),
- void *private)
+ void (*cont)(void *private_data, BOOL success, uid_t uid),
+ void *private_data)
{
struct winbindd_request request;
ZERO_STRUCT(request);
@@ -187,7 +187,7 @@ void idmap_sid2uid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid, BOOL alloc,
sid_to_string(request.data.dual_sid2id.sid, sid);
request.data.dual_sid2id.alloc = alloc;
do_async(mem_ctx, idmap_child(), &request, idmap_sid2uid_recv,
- cont, private);
+ cont, private_data);
}
enum winbindd_result winbindd_dual_sid2uid(struct winbindd_domain *domain,
@@ -217,40 +217,40 @@ enum winbindd_result winbindd_dual_sid2uid(struct winbindd_domain *domain,
static void idmap_sid2uid_recv(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private)
+ void *c, void *private_data)
{
void (*cont)(void *priv, BOOL succ, uid_t uid) = c;
if (!success) {
DEBUG(5, ("Could not trigger sid2uid\n"));
- cont(private, False, 0);
+ cont(private_data, False, 0);
return;
}
if (response->result != WINBINDD_OK) {
DEBUG(5, ("sid2uid returned an error\n"));
- cont(private, False, 0);
+ cont(private_data, False, 0);
return;
}
- cont(private, True, response->data.uid);
+ cont(private_data, True, response->data.uid);
}
static void uid2name_recv(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private);
+ void *c, void *private_data);
void winbindd_uid2name_async(TALLOC_CTX *mem_ctx, uid_t uid,
- void (*cont)(void *private, BOOL success,
+ void (*cont)(void *private_data, BOOL success,
const char *name),
- void *private)
+ void *private_data)
{
struct winbindd_request request;
ZERO_STRUCT(request);
request.cmd = WINBINDD_DUAL_UID2NAME;
request.data.uid = uid;
do_async(mem_ctx, idmap_child(), &request, uid2name_recv,
- cont, private);
+ cont, private_data);
}
enum winbindd_result winbindd_dual_uid2name(struct winbindd_domain *domain,
@@ -274,40 +274,40 @@ enum winbindd_result winbindd_dual_uid2name(struct winbindd_domain *domain,
static void uid2name_recv(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private)
+ void *c, void *private_data)
{
void (*cont)(void *priv, BOOL succ, const char *name) = c;
if (!success) {
DEBUG(5, ("Could not trigger uid2name\n"));
- cont(private, False, NULL);
+ cont(private_data, False, NULL);
return;
}
if (response->result != WINBINDD_OK) {
DEBUG(5, ("uid2name returned an error\n"));
- cont(private, False, NULL);
+ cont(private_data, False, NULL);
return;
}
- cont(private, True, response->data.name.name);
+ cont(private_data, True, response->data.name.name);
}
static void name2uid_recv(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private);
+ void *c, void *private_data);
static void winbindd_name2uid_async(TALLOC_CTX *mem_ctx, const char *name,
- void (*cont)(void *private, BOOL success,
+ void (*cont)(void *private_data, BOOL success,
uid_t uid),
- void *private)
+ void *private_data)
{
struct winbindd_request request;
ZERO_STRUCT(request);
request.cmd = WINBINDD_DUAL_NAME2UID;
fstrcpy(request.data.username, name);
do_async(mem_ctx, idmap_child(), &request, name2uid_recv,
- cont, private);
+ cont, private_data);
}
enum winbindd_result winbindd_dual_name2uid(struct winbindd_domain *domain,
@@ -333,32 +333,32 @@ enum winbindd_result winbindd_dual_name2uid(struct winbindd_domain *domain,
static void name2uid_recv(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private)
+ void *c, void *private_data)
{
void (*cont)(void *priv, BOOL succ, uid_t uid) = c;
if (!success) {
DEBUG(5, ("Could not trigger name2uid\n"));
- cont(private, False, 0);
+ cont(private_data, False, 0);
return;
}
if (response->result != WINBINDD_OK) {
DEBUG(5, ("name2uid returned an error\n"));
- cont(private, False, 0);
+ cont(private_data, False, 0);
return;
}
- cont(private, True, response->data.uid);
+ cont(private_data, True, response->data.uid);
}
static void idmap_sid2gid_recv(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private);
+ void *c, void *private_data);
void idmap_sid2gid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid, BOOL alloc,
- void (*cont)(void *private, BOOL success, gid_t gid),
- void *private)
+ void (*cont)(void *private_data, BOOL success, gid_t gid),
+ void *private_data)
{
struct winbindd_request request;
ZERO_STRUCT(request);
@@ -366,7 +366,7 @@ void idmap_sid2gid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid, BOOL alloc,
sid_to_string(request.data.dual_sid2id.sid, sid);
request.data.dual_sid2id.alloc = alloc;
do_async(mem_ctx, idmap_child(), &request, idmap_sid2gid_recv,
- cont, private);
+ cont, private_data);
}
enum winbindd_result winbindd_dual_sid2gid(struct winbindd_domain *domain,
@@ -396,57 +396,57 @@ enum winbindd_result winbindd_dual_sid2gid(struct winbindd_domain *domain,
static void idmap_sid2gid_recv(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private)
+ void *c, void *private_data)
{
void (*cont)(void *priv, BOOL succ, gid_t gid) = c;
if (!success) {
DEBUG(5, ("Could not trigger sid2gid\n"));
- cont(private, False, 0);
+ cont(private_data, False, 0);
return;
}
if (response->result != WINBINDD_OK) {
DEBUG(5, ("sid2gid returned an error\n"));
- cont(private, False, 0);
+ cont(private_data, False, 0);
return;
}
- cont(private, True, response->data.gid);
+ cont(private_data, True, response->data.gid);
}
static void gid2name_recv(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private)
+ void *c, void *private_data)
{
void (*cont)(void *priv, BOOL succ, const char *name) = c;
if (!success) {
DEBUG(5, ("Could not trigger gid2name\n"));
- cont(private, False, NULL);
+ cont(private_data, False, NULL);
return;
}
if (response->result != WINBINDD_OK) {
DEBUG(5, ("gid2name returned an error\n"));
- cont(private, False, NULL);
+ cont(private_data, False, NULL);
return;
}
- cont(private, True, response->data.name.name);
+ cont(private_data, True, response->data.name.name);
}
void winbindd_gid2name_async(TALLOC_CTX *mem_ctx, gid_t gid,
- void (*cont)(void *private, BOOL success,
+ void (*cont)(void *private_data, BOOL success,
const char *name),
- void *private)
+ void *private_data)
{
struct winbindd_request request;
ZERO_STRUCT(request);
request.cmd = WINBINDD_DUAL_GID2NAME;
request.data.gid = gid;
do_async(mem_ctx, idmap_child(), &request, gid2name_recv,
- cont, private);
+ cont, private_data);
}
enum winbindd_result winbindd_dual_gid2name(struct winbindd_domain *domain,
@@ -467,19 +467,19 @@ enum winbindd_result winbindd_dual_gid2name(struct winbindd_domain *domain,
static void name2gid_recv(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private);
+ void *c, void *private_data);
static void winbindd_name2gid_async(TALLOC_CTX *mem_ctx, const char *name,
- void (*cont)(void *private, BOOL success,
+ void (*cont)(void *private_data, BOOL success,
gid_t gid),
- void *private)
+ void *private_data)
{
struct winbindd_request request;
ZERO_STRUCT(request);
request.cmd = WINBINDD_DUAL_NAME2GID;
fstrcpy(request.data.groupname, name);
do_async(mem_ctx, idmap_child(), &request, name2gid_recv,
- cont, private);
+ cont, private_data);
}
enum winbindd_result winbindd_dual_name2gid(struct winbindd_domain *domain,
@@ -505,55 +505,55 @@ enum winbindd_result winbindd_dual_name2gid(struct winbindd_domain *domain,
static void name2gid_recv(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private)
+ void *c, void *private_data)
{
void (*cont)(void *priv, BOOL succ, gid_t gid) = c;
if (!success) {
DEBUG(5, ("Could not trigger name2gid\n"));
- cont(private, False, 0);
+ cont(private_data, False, 0);
return;
}
if (response->result != WINBINDD_OK) {
DEBUG(5, ("name2gid returned an error\n"));
- cont(private, False, 0);
+ cont(private_data, False, 0);
return;
}
- cont(private, True, response->data.gid);
+ cont(private_data, True, response->data.gid);
}
static void lookupsid_recv(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private)
+ void *c, void *private_data)
{
void (*cont)(void *priv, BOOL succ, const char *dom_name,
const char *name, enum SID_NAME_USE type) = c;
if (!success) {
DEBUG(5, ("Could not trigger lookupsid\n"));
- cont(private, False, NULL, NULL, SID_NAME_UNKNOWN);
+ cont(private_data, False, NULL, NULL, SID_NAME_UNKNOWN);
return;
}
if (response->result != WINBINDD_OK) {
DEBUG(5, ("lookupsid returned an error\n"));
- cont(private, False, NULL, NULL, SID_NAME_UNKNOWN);
+ cont(private_data, False, NULL, NULL, SID_NAME_UNKNOWN);
return;
}
- cont(private, True, response->data.name.dom_name,
+ cont(private_data, True, response->data.name.dom_name,
response->data.name.name, response->data.name.type);
}
void winbindd_lookupsid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
- void (*cont)(void *private, BOOL success,
+ void (*cont)(void *private_data, BOOL success,
const char *dom_name,
const char *name,
enum SID_NAME_USE type),
- void *private)
+ void *private_data)
{
struct winbindd_domain *domain;
struct winbindd_request request;
@@ -562,7 +562,7 @@ void winbindd_lookupsid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
if (domain == NULL) {
DEBUG(5, ("Could not find domain for sid %s\n",
sid_string_static(sid)));
- cont(private, False, NULL, NULL, SID_NAME_UNKNOWN);
+ cont(private_data, False, NULL, NULL, SID_NAME_UNKNOWN);
return;
}
@@ -571,7 +571,7 @@ void winbindd_lookupsid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
fstrcpy(request.data.sid, sid_string_static(sid));
do_async_domain(mem_ctx, domain, &request, lookupsid_recv,
- cont, private);
+ cont, private_data);
}
enum winbindd_result winbindd_dual_lookupsid(struct winbindd_domain *domain,
@@ -611,7 +611,7 @@ enum winbindd_result winbindd_dual_lookupsid(struct winbindd_domain *domain,
static void lookupname_recv(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private)
+ void *c, void *private_data)
{
void (*cont)(void *priv, BOOL succ, const DOM_SID *sid,
enum SID_NAME_USE type) = c;
@@ -619,32 +619,32 @@ static void lookupname_recv(TALLOC_CTX *mem_ctx, BOOL success,
if (!success) {
DEBUG(5, ("Could not trigger lookup_name\n"));
- cont(private, False, NULL, SID_NAME_UNKNOWN);
+ cont(private_data, False, NULL, SID_NAME_UNKNOWN);
return;
}
if (response->result != WINBINDD_OK) {
DEBUG(5, ("lookup_name returned an error\n"));
- cont(private, False, NULL, SID_NAME_UNKNOWN);
+ cont(private_data, False, NULL, SID_NAME_UNKNOWN);
return;
}
if (!string_to_sid(&sid, response->data.sid.sid)) {
DEBUG(0, ("Could not convert string %s to sid\n",
response->data.sid.sid));
- cont(private, False, NULL, SID_NAME_UNKNOWN);
+ cont(private_data, False, NULL, SID_NAME_UNKNOWN);
return;
}
- cont(private, True, &sid, response->data.sid.type);
+ cont(private_data, True, &sid, response->data.sid.type);
}
void winbindd_lookupname_async(TALLOC_CTX *mem_ctx, const char *dom_name,
const char *name,
- void (*cont)(void *private, BOOL success,
+ void (*cont)(void *private_data, BOOL success,
const DOM_SID *sid,
enum SID_NAME_USE type),
- void *private)
+ void *private_data)
{
struct winbindd_request request;
struct winbindd_domain *domain;
@@ -653,7 +653,7 @@ void winbindd_lookupname_async(TALLOC_CTX *mem_ctx, const char *dom_name,
if (domain == NULL) {
DEBUG(5, ("Could not find domain for name %s\n", dom_name));
- cont(private, False, NULL, SID_NAME_UNKNOWN);
+ cont(private_data, False, NULL, SID_NAME_UNKNOWN);
return;
}
@@ -663,7 +663,7 @@ void winbindd_lookupname_async(TALLOC_CTX *mem_ctx, const char *dom_name,
fstrcpy(request.data.name.name, name);
do_async_domain(mem_ctx, domain, &request, lookupname_recv,
- cont, private);
+ cont, private_data);
}
enum winbindd_result winbindd_dual_lookupname(struct winbindd_domain *domain,
@@ -756,7 +756,7 @@ static BOOL parse_sidlist(TALLOC_CTX *mem_ctx, char *sidstr,
static void getsidaliases_recv(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private)
+ void *c, void *private_data)
{
void (*cont)(void *priv, BOOL succ,
DOM_SID *aliases, int num_aliases) = c;
@@ -766,13 +766,13 @@ static void getsidaliases_recv(TALLOC_CTX *mem_ctx, BOOL success,
if (!success) {
DEBUG(5, ("Could not trigger getsidaliases\n"));
- cont(private, success, NULL, 0);
+ cont(private_data, success, NULL, 0);
return;
}
if (response->result != WINBINDD_OK) {
DEBUG(5, ("getsidaliases returned an error\n"));
- cont(private, False, NULL, 0);
+ cont(private_data, False, NULL, 0);
return;
}
@@ -780,47 +780,47 @@ static void getsidaliases_recv(TALLOC_CTX *mem_ctx, BOOL success,
if (aliases_str == NULL) {
DEBUG(10, ("getsidaliases return 0 SIDs\n"));
- cont(private, True, NULL, 0);
+ cont(private_data, True, NULL, 0);
return;
}
if (!parse_sidlist(mem_ctx, aliases_str, &sids, &num_sids)) {
DEBUG(0, ("Could not parse sids\n"));
- cont(private, False, NULL, 0);
+ cont(private_data, False, NULL, 0);
return;
}
SAFE_FREE(response->extra_data);
- cont(private, True, sids, num_sids);
+ cont(private_data, True, sids, num_sids);
}
void winbindd_getsidaliases_async(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
const DOM_SID *sids, int num_sids,
- void (*cont)(void *private,
+ void (*cont)(void *private_data,
BOOL success,
const DOM_SID *aliases,
int num_aliases),
- void *private)
+ void *private_data)
{
struct winbindd_request request;
char *sidstr = NULL;
char *keystr;
if (num_sids == 0) {
- cont(private, True, NULL, 0);
+ cont(private_data, True, NULL, 0);
return;
}
if (!print_sidlist(mem_ctx, sids, num_sids, &sidstr)) {
- cont(private, False, NULL, 0);
+ cont(private_data, False, NULL, 0);
return;
}
keystr = cache_store_request_data(mem_ctx, sidstr);
if (keystr == NULL) {
- cont(private, False, NULL, 0);
+ cont(private_data, False, NULL, 0);
return;
}
@@ -830,7 +830,7 @@ void winbindd_getsidaliases_async(struct winbindd_domain *domain,
fstrcpy(request.data.dual_sidaliases.cache_key, keystr);
do_async_domain(mem_ctx, domain, &request, getsidaliases_recv,
- cont, private);
+ cont, private_data);
}
enum winbindd_result winbindd_dual_getsidaliases(struct winbindd_domain *domain,
@@ -912,22 +912,22 @@ struct gettoken_state {
struct winbindd_domain *builtin_domain;
DOM_SID *sids;
int num_sids;
- void (*cont)(void *private, BOOL success, DOM_SID *sids, int num_sids);
- void *private;
+ void (*cont)(void *private_data, BOOL success, DOM_SID *sids, int num_sids);
+ void *private_data;
};
static void gettoken_recvdomgroups(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private);
-static void gettoken_recvaliases(void *private, BOOL success,
+ void *c, void *private_data);
+static void gettoken_recvaliases(void *private_data, BOOL success,
const DOM_SID *aliases,
int num_aliases);
void winbindd_gettoken_async(TALLOC_CTX *mem_ctx, const DOM_SID *user_sid,
- void (*cont)(void *private, BOOL success,
+ void (*cont)(void *private_data, BOOL success,
DOM_SID *sids, int num_sids),
- void *private)
+ void *private_data)
{
struct winbindd_domain *domain;
struct winbindd_request request;
@@ -936,7 +936,7 @@ void winbindd_gettoken_async(TALLOC_CTX *mem_ctx, const DOM_SID *user_sid,
state = TALLOC_P(mem_ctx, struct gettoken_state);
if (state == NULL) {
DEBUG(0, ("talloc failed\n"));
- cont(private, False, NULL, 0);
+ cont(private_data, False, NULL, 0);
return;
}
@@ -945,13 +945,13 @@ void winbindd_gettoken_async(TALLOC_CTX *mem_ctx, const DOM_SID *user_sid,
state->alias_domain = find_our_domain();
state->builtin_domain = find_builtin_domain();
state->cont = cont;
- state->private = private;
+ state->private_data = private_data;
domain = find_domain_from_sid_noinit(user_sid);
if (domain == NULL) {
DEBUG(5, ("Could not find domain from SID %s\n",
sid_string_static(user_sid)));
- cont(private, False, NULL, 0);
+ cont(private_data, False, NULL, 0);
return;
}
@@ -965,15 +965,15 @@ void winbindd_gettoken_async(TALLOC_CTX *mem_ctx, const DOM_SID *user_sid,
static void gettoken_recvdomgroups(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private)
+ void *c, void *private_data)
{
struct gettoken_state *state =
- talloc_get_type_abort(private, struct gettoken_state);
+ talloc_get_type_abort(private_data, struct gettoken_state);
char *sids_str;
if (!success) {
DEBUG(10, ("Could not get domain groups\n"));
- state->cont(state->private, False, NULL, 0);
+ state->cont(state->private_data, False, NULL, 0);
return;
}
@@ -981,7 +981,7 @@ static void gettoken_recvdomgroups(TALLOC_CTX *mem_ctx, BOOL success,
if (sids_str == NULL) {
DEBUG(10, ("Received no domain groups\n"));
- state->cont(state->private, True, NULL, 0);
+ state->cont(state->private_data, True, NULL, 0);
return;
}
@@ -994,7 +994,7 @@ static void gettoken_recvdomgroups(TALLOC_CTX *mem_ctx, BOOL success,
if (!parse_sidlist(mem_ctx, sids_str, &state->sids,
&state->num_sids)) {
DEBUG(0, ("Could not parse sids\n"));
- state->cont(state->private, False, NULL, 0);
+ state->cont(state->private_data, False, NULL, 0);
return;
}
@@ -1002,7 +1002,7 @@ static void gettoken_recvdomgroups(TALLOC_CTX *mem_ctx, BOOL success,
if (state->alias_domain == NULL) {
DEBUG(10, ("Don't expand domain local groups\n"));
- state->cont(state->private, True, state->sids,
+ state->cont(state->private_data, True, state->sids,
state->num_sids);
return;
}
@@ -1012,16 +1012,16 @@ static void gettoken_recvdomgroups(TALLOC_CTX *mem_ctx, BOOL success,
gettoken_recvaliases, state);
}
-static void gettoken_recvaliases(void *private, BOOL success,
+static void gettoken_recvaliases(void *private_data, BOOL success,
const DOM_SID *aliases,
int num_aliases)
{
- struct gettoken_state *state = private;
+ struct gettoken_state *state = private_data;
int i;
if (!success) {
DEBUG(10, ("Could not receive domain local groups\n"));
- state->cont(state->private, False, NULL, 0);
+ state->cont(state->private_data, False, NULL, 0);
return;
}
@@ -1039,7 +1039,7 @@ static void gettoken_recvaliases(void *private, BOOL success,
return;
}
- state->cont(state->private, True, state->sids, state->num_sids);
+ state->cont(state->private_data, True, state->sids, state->num_sids);
}
struct sid2uid_state {
@@ -1047,22 +1047,22 @@ struct sid2uid_state {
DOM_SID sid;
char *username;
uid_t uid;
- void (*cont)(void *private, BOOL success, uid_t uid);
- void *private;
+ void (*cont)(void *private_data, BOOL success, uid_t uid);
+ void *private_data;
};
-static void sid2uid_lookup_sid_recv(void *private, BOOL success,
+static void sid2uid_lookup_sid_recv(void *private_data, BOOL success,
const char *dom_name, const char *name,
enum SID_NAME_USE type);
-static void sid2uid_noalloc_recv(void *private, BOOL success, uid_t uid);
-static void sid2uid_alloc_recv(void *private, BOOL success, uid_t uid);
-static void sid2uid_name2uid_recv(void *private, BOOL success, uid_t uid);
-static void sid2uid_set_mapping_recv(void *private, BOOL success);
+static void sid2uid_noalloc_recv(void *private_data, BOOL success, uid_t uid);
+static void sid2uid_alloc_recv(void *private_data, BOOL success, uid_t uid);
+static void sid2uid_name2uid_recv(void *private_data, BOOL success, uid_t uid);
+static void sid2uid_set_mapping_recv(void *private_data, BOOL success);
void winbindd_sid2uid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
- void (*cont)(void *private, BOOL success,
+ void (*cont)(void *private_data, BOOL success,
uid_t uid),
- void *private)
+ void *private_data)
{
struct sid2uid_state *state;
NTSTATUS result;
@@ -1070,7 +1070,7 @@ void winbindd_sid2uid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
if (idmap_proxyonly()) {
DEBUG(10, ("idmap proxy only\n"));
- cont(private, False, 0);
+ cont(private_data, False, 0);
return;
}
@@ -1079,43 +1079,43 @@ void winbindd_sid2uid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
result = idmap_sid_to_uid(sid, &uid, ID_QUERY_ONLY|ID_CACHE_ONLY);
if (NT_STATUS_IS_OK(result)) {
- cont(private, True, uid);
+ cont(private_data, True, uid);
return;
}
state = TALLOC_P(mem_ctx, struct sid2uid_state);
if (state == NULL) {
DEBUG(0, ("talloc failed\n"));
- cont(private, False, 0);
+ cont(private_data, False, 0);
return;
}
state->mem_ctx = mem_ctx;
state->sid = *sid;
state->cont = cont;
- state->private = private;
+ state->private_data = private_data;
/* Let's see if it's really a user before allocating a uid */
winbindd_lookupsid_async(mem_ctx, sid, sid2uid_lookup_sid_recv, state);
}
-static void sid2uid_lookup_sid_recv(void *private, BOOL success,
+static void sid2uid_lookup_sid_recv(void *private_data, BOOL success,
const char *dom_name, const char *name,
enum SID_NAME_USE type)
{
struct sid2uid_state *state =
- talloc_get_type_abort(private, struct sid2uid_state);
+ talloc_get_type_abort(private_data, struct sid2uid_state);
if (!success) {
DEBUG(5, ("Could not trigger lookup_sid\n"));
- state->cont(state->private, False, 0);
+ state->cont(state->private_data, False, 0);
return;
}
if ((type != SID_NAME_USER) && (type != SID_NAME_COMPUTER)) {
DEBUG(5, ("SID is not a user\n"));
- state->cont(state->private, False, 0);
+ state->cont(state->private_data, False, 0);
return;
}
@@ -1127,15 +1127,15 @@ static void sid2uid_lookup_sid_recv(void *private, BOOL success,
sid2uid_noalloc_recv, state);
}
-static void sid2uid_noalloc_recv(void *private, BOOL success, uid_t uid)
+static void sid2uid_noalloc_recv(void *private_data, BOOL success, uid_t uid)
{
struct sid2uid_state *state =
- talloc_get_type_abort(private, struct sid2uid_state);
+ talloc_get_type_abort(private_data, struct sid2uid_state);
if (success) {
DEBUG(10, ("found uid for sid %s in remote backend\n",
sid_string_static(&state->sid)));
- state->cont(state->private, True, uid);
+ state->cont(state->private_data, True, uid);
return;
}
@@ -1155,30 +1155,30 @@ static void sid2uid_noalloc_recv(void *private, BOOL success, uid_t uid)
sid2uid_alloc_recv, state);
}
-static void sid2uid_alloc_recv(void *private, BOOL success, uid_t uid)
+static void sid2uid_alloc_recv(void *private_data, BOOL success, uid_t uid)
{
struct sid2uid_state *state =
- talloc_get_type_abort(private, struct sid2uid_state);
+ talloc_get_type_abort(private_data, struct sid2uid_state);
if (!success) {
DEBUG(5, ("Could not allocate uid\n"));
- state->cont(state->private, False, 0);
+ state->cont(state->private_data, False, 0);
return;
}
- state->cont(state->private, True, uid);
+ state->cont(state->private_data, True, uid);
}
-static void sid2uid_name2uid_recv(void *private, BOOL success, uid_t uid)
+static void sid2uid_name2uid_recv(void *private_data, BOOL success, uid_t uid)
{
struct sid2uid_state *state =
- talloc_get_type_abort(private, struct sid2uid_state);
+ talloc_get_type_abort(private_data, struct sid2uid_state);
unid_t id;
if (!success) {
DEBUG(5, ("Could not find uid for name %s\n",
state->username));
- state->cont(state->private, False, 0);
+ state->cont(state->private_data, False, 0);
return;
}
@@ -1189,19 +1189,19 @@ static void sid2uid_name2uid_recv(void *private, BOOL success, uid_t uid)
sid2uid_set_mapping_recv, state);
}
-static void sid2uid_set_mapping_recv(void *private, BOOL success)
+static void sid2uid_set_mapping_recv(void *private_data, BOOL success)
{
struct sid2uid_state *state =
- talloc_get_type_abort(private, struct sid2uid_state);
+ talloc_get_type_abort(private_data, struct sid2uid_state);
if (!success) {
DEBUG(5, ("Could not set ID mapping for sid %s\n",
sid_string_static(&state->sid)));
- state->cont(state->private, False, 0);
+ state->cont(state->private_data, False, 0);
return;
}
- state->cont(state->private, True, state->uid);
+ state->cont(state->private_data, True, state->uid);
}
struct sid2gid_state {
@@ -1209,22 +1209,22 @@ struct sid2gid_state {
DOM_SID sid;
char *groupname;
gid_t gid;
- void (*cont)(void *private, BOOL success, gid_t gid);
- void *private;
+ void (*cont)(void *private_data, BOOL success, gid_t gid);
+ void *private_data;
};
-static void sid2gid_lookup_sid_recv(void *private, BOOL success,
+static void sid2gid_lookup_sid_recv(void *private_data, BOOL success,
const char *dom_name, const char *name,
enum SID_NAME_USE type);
-static void sid2gid_noalloc_recv(void *private, BOOL success, gid_t gid);
-static void sid2gid_alloc_recv(void *private, BOOL success, gid_t gid);
-static void sid2gid_name2gid_recv(void *private, BOOL success, gid_t gid);
-static void sid2gid_set_mapping_recv(void *private, BOOL success);
+static void sid2gid_noalloc_recv(void *private_data, BOOL success, gid_t gid);
+static void sid2gid_alloc_recv(void *private_data, BOOL success, gid_t gid);
+static void sid2gid_name2gid_recv(void *private_data, BOOL success, gid_t gid);
+static void sid2gid_set_mapping_recv(void *private_data, BOOL success);
void winbindd_sid2gid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
- void (*cont)(void *private, BOOL success,
+ void (*cont)(void *private_data, BOOL success,
gid_t gid),
- void *private)
+ void *private_data)
{
struct sid2gid_state *state;
NTSTATUS result;
@@ -1232,7 +1232,7 @@ void winbindd_sid2gid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
if (idmap_proxyonly()) {
DEBUG(10, ("idmap proxy only\n"));
- cont(private, False, 0);
+ cont(private_data, False, 0);
return;
}
@@ -1241,44 +1241,44 @@ void winbindd_sid2gid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
result = idmap_sid_to_gid(sid, &gid, ID_QUERY_ONLY|ID_CACHE_ONLY);
if (NT_STATUS_IS_OK(result)) {
- cont(private, True, gid);
+ cont(private_data, True, gid);
return;
}
state = TALLOC_P(mem_ctx, struct sid2gid_state);
if (state == NULL) {
DEBUG(0, ("talloc failed\n"));
- cont(private, False, 0);
+ cont(private_data, False, 0);
return;
}
state->mem_ctx = mem_ctx;
state->sid = *sid;
state->cont = cont;
- state->private = private;
+ state->private_data = private_data;
/* Let's see if it's really a user before allocating a gid */
winbindd_lookupsid_async(mem_ctx, sid, sid2gid_lookup_sid_recv, state);
}
-static void sid2gid_lookup_sid_recv(void *private, BOOL success,
+static void sid2gid_lookup_sid_recv(void *private_data, BOOL success,
const char *dom_name, const char *name,
enum SID_NAME_USE type)
{
struct sid2gid_state *state =
- talloc_get_type_abort(private, struct sid2gid_state);
+ talloc_get_type_abort(private_data, struct sid2gid_state);
if (!success) {
DEBUG(5, ("Could not trigger lookup_sid\n"));
- state->cont(state->private, False, 0);
+ state->cont(state->private_data, False, 0);
return;
}
if (((type != SID_NAME_DOM_GRP) && (type != SID_NAME_ALIAS) &&
(type != SID_NAME_WKN_GRP))) {
DEBUG(5, ("SID is not a group\n"));
- state->cont(state->private, False, 0);
+ state->cont(state->private_data, False, 0);
return;
}
@@ -1290,15 +1290,15 @@ static void sid2gid_lookup_sid_recv(void *private, BOOL success,
sid2gid_noalloc_recv, state);
}
-static void sid2gid_noalloc_recv(void *private, BOOL success, gid_t gid)
+static void sid2gid_noalloc_recv(void *private_data, BOOL success, gid_t gid)
{
struct sid2gid_state *state =
- talloc_get_type_abort(private, struct sid2gid_state);
+ talloc_get_type_abort(private_data, struct sid2gid_state);
if (success) {
DEBUG(10, ("found gid for sid %s in remote backend\n",
sid_string_static(&state->sid)));
- state->cont(state->private, True, gid);
+ state->cont(state->private_data, True, gid);
return;
}
@@ -1318,30 +1318,30 @@ static void sid2gid_noalloc_recv(void *private, BOOL success, gid_t gid)
sid2gid_alloc_recv, state);
}
-static void sid2gid_alloc_recv(void *private, BOOL success, gid_t gid)
+static void sid2gid_alloc_recv(void *private_data, BOOL success, gid_t gid)
{
struct sid2gid_state *state =
- talloc_get_type_abort(private, struct sid2gid_state);
+ talloc_get_type_abort(private_data, struct sid2gid_state);
if (!success) {
DEBUG(5, ("Could not allocate gid\n"));
- state->cont(state->private, False, 0);
+ state->cont(state->private_data, False, 0);
return;
}
- state->cont(state->private, True, gid);
+ state->cont(state->private_data, True, gid);
}
-static void sid2gid_name2gid_recv(void *private, BOOL success, gid_t gid)
+static void sid2gid_name2gid_recv(void *private_data, BOOL success, gid_t gid)
{
struct sid2gid_state *state =
- talloc_get_type_abort(private, struct sid2gid_state);
+ talloc_get_type_abort(private_data, struct sid2gid_state);
unid_t id;
if (!success) {
DEBUG(5, ("Could not find gid for name %s\n",
state->groupname));
- state->cont(state->private, False, 0);
+ state->cont(state->private_data, False, 0);
return;
}
@@ -1352,52 +1352,51 @@ static void sid2gid_name2gid_recv(void *private, BOOL success, gid_t gid)
sid2gid_set_mapping_recv, state);
}
-static void sid2gid_set_mapping_recv(void *private, BOOL success)
+static void sid2gid_set_mapping_recv(void *private_data, BOOL success)
{
struct sid2gid_state *state =
- talloc_get_type_abort(private, struct sid2gid_state);
+ talloc_get_type_abort(private_data, struct sid2gid_state);
if (!success) {
DEBUG(5, ("Could not set ID mapping for sid %s\n",
sid_string_static(&state->sid)));
- state->cont(state->private, False, 0);
+ state->cont(state->private_data, False, 0);
return;
}
- state->cont(state->private, True, state->gid);
+ state->cont(state->private_data, True, state->gid);
}
static void query_user_recv(TALLOC_CTX *mem_ctx, BOOL success,
struct winbindd_response *response,
- void *c, void *private)
+ void *c, void *private_data)
{
void (*cont)(void *priv, BOOL succ, const char *acct_name,
const char *full_name, uint32 group_rid) = c;
if (!success) {
DEBUG(5, ("Could not trigger query_user\n"));
- cont(private, False, NULL, NULL, -1);
+ cont(private_data, False, NULL, NULL, -1);
return;
}
- cont(private, True, response->data.user_info.acct_name,
+ cont(private_data, True, response->data.user_info.acct_name,
response->data.user_info.full_name,
response->data.user_info.group_rid);
}
void query_user_async(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
const DOM_SID *sid,
- void (*cont)(void *private, BOOL success,
+ void (*cont)(void *private_data, BOOL success,
const char *acct_name,
const char *full_name,
uint32 group_rid),
- void *private)
+ void *private_data)
{
struct winbindd_request request;
ZERO_STRUCT(request);
request.cmd = WINBINDD_DUAL_USERINFO;
sid_to_string(request.data.sid, sid);
do_async_domain(mem_ctx, domain, &request, query_user_recv,
- cont, private);
+ cont, private_data);
}
-
diff --git a/source3/nsswitch/winbindd_dual.c b/source3/nsswitch/winbindd_dual.c
index 2b0ce8c14d..46b3ce2258 100644
--- a/source3/nsswitch/winbindd_dual.c
+++ b/source3/nsswitch/winbindd_dual.c
@@ -259,19 +259,19 @@ struct winbindd_async_request {
struct winbindd_child *child;
struct winbindd_request *request;
struct winbindd_response *response;
- void (*continuation)(void *private, BOOL success);
- void *private;
+ void (*continuation)(void *private_data, BOOL success);
+ void *private_data;
};
-static void async_request_sent(void *private, BOOL success);
-static void async_reply_recv(void *private, BOOL success);
+static void async_request_sent(void *private_data, BOOL success);
+static void async_reply_recv(void *private_data, BOOL success);
static void schedule_async_request(struct winbindd_child *child);
void async_request(TALLOC_CTX *mem_ctx, struct winbindd_child *child,
struct winbindd_request *request,
struct winbindd_response *response,
- void (*continuation)(void *private, BOOL success),
- void *private)
+ void (*continuation)(void *private_data, BOOL success),
+ void *private_data)
{
struct winbindd_async_request *state, *tmp;
@@ -281,7 +281,7 @@ void async_request(TALLOC_CTX *mem_ctx, struct winbindd_child *child,
if (state == NULL) {
DEBUG(0, ("talloc failed\n"));
- continuation(private, False);
+ continuation(private_data, False);
return;
}
@@ -290,7 +290,7 @@ void async_request(TALLOC_CTX *mem_ctx, struct winbindd_child *child,
state->request = request;
state->response = response;
state->continuation = continuation;
- state->private = private;
+ state->private_data = private_data;
DLIST_ADD_END(child->requests, state, tmp);
@@ -299,17 +299,17 @@ void async_request(TALLOC_CTX *mem_ctx, struct winbindd_child *child,
return;
}
-static void async_request_sent(void *private, BOOL success)
+static void async_request_sent(void *private_data, BOOL success)
{
struct winbindd_async_request *state =
- talloc_get_type_abort(private, struct winbindd_async_request);
+ talloc_get_type_abort(private_data, struct winbindd_async_request);
if (!success) {
DEBUG(5, ("Could not send async request\n"));
state->response->length = sizeof(struct winbindd_response);
state->response->result = WINBINDD_ERROR;
- state->continuation(state->private, False);
+ state->continuation(state->private_data, False);
return;
}
@@ -321,10 +321,10 @@ static void async_request_sent(void *private, BOOL success)
async_reply_recv, state);
}
-static void async_reply_recv(void *private, BOOL success)
+static void async_reply_recv(void *private_data, BOOL success)
{
struct winbindd_async_request *state =
- talloc_get_type_abort(private, struct winbindd_async_request);
+ talloc_get_type_abort(private_data, struct winbindd_async_request);
struct winbindd_child *child = state->child;
state->response->length = sizeof(struct winbindd_response);
@@ -343,7 +343,7 @@ static void async_reply_recv(void *private, BOOL success)
schedule_async_request(child);
- state->continuation(state->private, True);
+ state->continuation(state->private_data, True);
}
static BOOL fork_domain_child(struct winbindd_child *child);
@@ -366,7 +366,7 @@ static void schedule_async_request(struct winbindd_child *child)
while (request != NULL) {
/* request might be free'd in the continuation */
struct winbindd_async_request *next = request->next;
- request->continuation(request->private, False);
+ request->continuation(request->private_data, False);
request = next;
}
return;
@@ -383,31 +383,31 @@ struct domain_request_state {
struct winbindd_domain *domain;
struct winbindd_request *request;
struct winbindd_response *response;
- void (*continuation)(void *private, BOOL success);
- void *private;
+ void (*continuation)(void *private_data, BOOL success);
+ void *private_data;
};
-static void domain_init_recv(void *private, BOOL success);
+static void domain_init_recv(void *private_data, BOOL success);
void async_domain_request(TALLOC_CTX *mem_ctx,
struct winbindd_domain *domain,
struct winbindd_request *request,
struct winbindd_response *response,
- void (*continuation)(void *private, BOOL success),
- void *private)
+ void (*continuation)(void *private_data, BOOL success),
+ void *private_data)
{
struct domain_request_state *state;
if (domain->initialized) {
async_request(mem_ctx, &domain->child, request, response,
- continuation, private);
+ continuation, private_data);
return;
}
state = TALLOC_P(mem_ctx, struct domain_request_state);
if (state == NULL) {
DEBUG(0, ("talloc failed\n"));
- continuation(private, False);
+ continuation(private_data, False);
return;
}
@@ -416,15 +416,15 @@ void async_domain_request(TALLOC_CTX *mem_ctx,
state->request = request;
state->response = response;
state->continuation = continuation;
- state->private = private;
+ state->private_data = private_data;
init_child_connection(domain, domain_init_recv, state);
}
-static void recvfrom_child(void *private, BOOL success)
+static void recvfrom_child(void *private_data, BOOL success)
{
struct winbindd_cli_state *state =
- talloc_get_type_abort(private, struct winbindd_cli_state);
+ talloc_get_type_abort(private_data, struct winbindd_cli_state);
enum winbindd_result result = state->response.result;
/* This is an optimization: The child has written directly to the
@@ -456,20 +456,20 @@ void sendto_domain(struct winbindd_cli_state *state,
recvfrom_child, state);
}
-static void domain_init_recv(void *private, BOOL success)
+static void domain_init_recv(void *private_data, BOOL success)
{
struct domain_request_state *state =
- talloc_get_type_abort(private, struct domain_request_state);
+ talloc_get_type_abort(private_data, struct domain_request_state);
if (!success) {
DEBUG(5, ("Domain init returned an error\n"));
- state->continuation(state->private, False);
+ state->continuation(state->private_data, False);
return;
}
async_request(state->mem_ctx, &state->domain->child,
state->request, state->response,
- state->continuation, state->private);
+ state->continuation, state->private_data);
}
struct winbindd_child_dispatch_table {
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c
index 65ae0bbf25..eb2adde98b 100644
--- a/source3/nsswitch/winbindd_group.c
+++ b/source3/nsswitch/winbindd_group.c
@@ -905,11 +905,11 @@ struct getgroups_state {
int num_token_gids;
};
-static void getgroups_usersid_recv(void *private, BOOL success,
+static void getgroups_usersid_recv(void *private_data, BOOL success,
const DOM_SID *sid, enum SID_NAME_USE type);
-static void getgroups_tokensids_recv(void *private, BOOL success,
+static void getgroups_tokensids_recv(void *private_data, BOOL success,
DOM_SID *token_sids, int num_token_sids);
-static void getgroups_sid2gid_recv(void *private, BOOL success, gid_t gid);
+static void getgroups_sid2gid_recv(void *private_data, BOOL success, gid_t gid);
void winbindd_getgroups(struct winbindd_cli_state *state)
{
@@ -967,10 +967,10 @@ void winbindd_getgroups(struct winbindd_cli_state *state)
getgroups_usersid_recv, s);
}
-static void getgroups_usersid_recv(void *private, BOOL success,
+static void getgroups_usersid_recv(void *private_data, BOOL success,
const DOM_SID *sid, enum SID_NAME_USE type)
{
- struct getgroups_state *s = private;
+ struct getgroups_state *s = private_data;
if ((!success) ||
((type != SID_NAME_USER) && (type != SID_NAME_COMPUTER))) {
@@ -984,10 +984,10 @@ static void getgroups_usersid_recv(void *private, BOOL success,
getgroups_tokensids_recv, s);
}
-static void getgroups_tokensids_recv(void *private, BOOL success,
+static void getgroups_tokensids_recv(void *private_data, BOOL success,
DOM_SID *token_sids, int num_token_sids)
{
- struct getgroups_state *s = private;
+ struct getgroups_state *s = private_data;
/* We need at least the user sid and the primary group in the token,
* otherwise it's an error */
@@ -1007,9 +1007,9 @@ static void getgroups_tokensids_recv(void *private, BOOL success,
getgroups_sid2gid_recv(s, False, 0);
}
-static void getgroups_sid2gid_recv(void *private, BOOL success, gid_t gid)
+static void getgroups_sid2gid_recv(void *private_data, BOOL success, gid_t gid)
{
- struct getgroups_state *s = private;
+ struct getgroups_state *s = private_data;
if (success)
add_gid_to_array_unique(NULL, gid,
@@ -1048,7 +1048,7 @@ static void getgroups_sid2gid_recv(void *private, BOOL success, gid_t gid)
results.
*/
-static void getusersids_recv(void *private, BOOL success, DOM_SID *sids,
+static void getusersids_recv(void *private_data, BOOL success, DOM_SID *sids,
int num_sids);
void winbindd_getusersids(struct winbindd_cli_state *state)
@@ -1076,10 +1076,10 @@ void winbindd_getusersids(struct winbindd_cli_state *state)
state);
}
-static void getusersids_recv(void *private, BOOL success, DOM_SID *sids,
+static void getusersids_recv(void *private_data, BOOL success, DOM_SID *sids,
int num_sids)
{
- struct winbindd_cli_state *state = private;
+ struct winbindd_cli_state *state = private_data;
char *ret = NULL;
unsigned ofs, ret_size = 0;
int i;
diff --git a/source3/nsswitch/winbindd_misc.c b/source3/nsswitch/winbindd_misc.c
index 7a02c8f629..6f72a0e2c6 100644
--- a/source3/nsswitch/winbindd_misc.c
+++ b/source3/nsswitch/winbindd_misc.c
@@ -219,7 +219,7 @@ struct sequence_state {
char *extra_data;
};
-static void sequence_recv(void *private, BOOL success);
+static void sequence_recv(void *private_data, BOOL success);
void winbindd_show_sequence(struct winbindd_cli_state *state)
{
@@ -279,9 +279,9 @@ void winbindd_show_sequence(struct winbindd_cli_state *state)
sequence_recv, seq);
}
-static void sequence_recv(void *private, BOOL success)
+static void sequence_recv(void *private_data, BOOL success)
{
- struct sequence_state *state = private;
+ struct sequence_state *state = private_data;
uint32 seq = DOM_SEQUENCE_NONE;
if ((success) && (state->response->result == WINBINDD_OK))
@@ -345,7 +345,7 @@ struct domain_info_state {
struct winbindd_cli_state *cli_state;
};
-static void domain_info_init_recv(void *private, BOOL success);
+static void domain_info_init_recv(void *private_data, BOOL success);
void winbindd_domain_info(struct winbindd_cli_state *state)
{
@@ -400,9 +400,9 @@ void winbindd_domain_info(struct winbindd_cli_state *state)
request_ok(state);
}
-static void domain_info_init_recv(void *private, BOOL success)
+static void domain_info_init_recv(void *private_data, BOOL success)
{
- struct domain_info_state *istate = private;
+ struct domain_info_state *istate = private_data;
struct winbindd_cli_state *state = istate->cli_state;
struct winbindd_domain *domain = istate->domain;
diff --git a/source3/nsswitch/winbindd_sid.c b/source3/nsswitch/winbindd_sid.c
index 9bad2a6d41..2685e98555 100644
--- a/source3/nsswitch/winbindd_sid.c
+++ b/source3/nsswitch/winbindd_sid.c
@@ -28,7 +28,7 @@
/* Convert a string */
-static void lookupsid_recv(void *private, BOOL success,
+static void lookupsid_recv(void *private_data, BOOL success,
const char *dom_name, const char *name,
enum SID_NAME_USE type);
@@ -51,12 +51,12 @@ void winbindd_lookupsid(struct winbindd_cli_state *state)
winbindd_lookupsid_async(state->mem_ctx, &sid, lookupsid_recv, state);
}
-static void lookupsid_recv(void *private, BOOL success,
+static void lookupsid_recv(void *private_data, BOOL success,
const char *dom_name, const char *name,
enum SID_NAME_USE type)
{
struct winbindd_cli_state *state =
- talloc_get_type_abort(private, struct winbindd_cli_state);
+ talloc_get_type_abort(private_data, struct winbindd_cli_state);
if (!success) {
DEBUG(5, ("lookupsid returned an error\n"));
@@ -74,7 +74,7 @@ static void lookupsid_recv(void *private, BOOL success,
* Look up the SID for a qualified name.
**/
-static void lookupname_recv(void *private, BOOL success,
+static void lookupname_recv(void *private_data, BOOL success,
const DOM_SID *sid, enum SID_NAME_USE type);
void winbindd_lookupname(struct winbindd_cli_state *state)
@@ -106,11 +106,11 @@ void winbindd_lookupname(struct winbindd_cli_state *state)
lookupname_recv, state);
}
-static void lookupname_recv(void *private, BOOL success,
+static void lookupname_recv(void *private_data, BOOL success,
const DOM_SID *sid, enum SID_NAME_USE type)
{
struct winbindd_cli_state *state =
- talloc_get_type_abort(private, struct winbindd_cli_state);
+ talloc_get_type_abort(private_data, struct winbindd_cli_state);
if (!success) {
DEBUG(5, ("lookupname returned an error\n"));
@@ -139,7 +139,7 @@ struct winbindd_child *idmap_child(void)
/* Convert a sid to a uid. We assume we only have one rid attached to the
sid. */
-static void sid2uid_recv(void *private, BOOL success, uid_t uid);
+static void sid2uid_recv(void *private_data, BOOL success, uid_t uid);
void winbindd_sid_to_uid(struct winbindd_cli_state *state)
{
@@ -178,10 +178,10 @@ void winbindd_sid_to_uid(struct winbindd_cli_state *state)
winbindd_sid2uid_async(state->mem_ctx, &sid, sid2uid_recv, state);
}
-static void sid2uid_recv(void *private, BOOL success, uid_t uid)
+static void sid2uid_recv(void *private_data, BOOL success, uid_t uid)
{
struct winbindd_cli_state *state =
- talloc_get_type_abort(private, struct winbindd_cli_state);
+ talloc_get_type_abort(private_data, struct winbindd_cli_state);
if (!success) {
DEBUG(5, ("Could not convert sid %s\n",
@@ -197,7 +197,7 @@ static void sid2uid_recv(void *private, BOOL success, uid_t uid)
/* Convert a sid to a gid. We assume we only have one rid attached to the
sid.*/
-static void sid2gid_recv(void *private, BOOL success, gid_t gid);
+static void sid2gid_recv(void *private_data, BOOL success, gid_t gid);
void winbindd_sid_to_gid(struct winbindd_cli_state *state)
{
@@ -236,10 +236,10 @@ void winbindd_sid_to_gid(struct winbindd_cli_state *state)
winbindd_sid2gid_async(state->mem_ctx, &sid, sid2gid_recv, state);
}
-static void sid2gid_recv(void *private, BOOL success, gid_t gid)
+static void sid2gid_recv(void *private_data, BOOL success, gid_t gid)
{
struct winbindd_cli_state *state =
- talloc_get_type_abort(private, struct winbindd_cli_state);
+ talloc_get_type_abort(private_data, struct winbindd_cli_state);
if (!success) {
DEBUG(5, ("Could not convert sid %s\n",
@@ -262,12 +262,12 @@ struct uid2sid_state {
enum SID_NAME_USE type;
};
-static void uid2sid_uid2name_recv(void *private, BOOL success,
+static void uid2sid_uid2name_recv(void *private_data, BOOL success,
const char *username);
-static void uid2sid_lookupname_recv(void *private, BOOL success,
+static void uid2sid_lookupname_recv(void *private_data, BOOL success,
const DOM_SID *sid,
enum SID_NAME_USE type);
-static void uid2sid_idmap_set_mapping_recv(void *private, BOOL success);
+static void uid2sid_idmap_set_mapping_recv(void *private_data, BOOL success);
void winbindd_uid_to_sid(struct winbindd_cli_state *state)
{
@@ -326,11 +326,11 @@ void winbindd_uid_to_sid(struct winbindd_cli_state *state)
uid2sid_uid2name_recv, uid2sid_state);
}
-static void uid2sid_uid2name_recv(void *private, BOOL success,
+static void uid2sid_uid2name_recv(void *private_data, BOOL success,
const char *username)
{
struct uid2sid_state *state =
- talloc_get_type_abort(private, struct uid2sid_state);
+ talloc_get_type_abort(private_data, struct uid2sid_state);
DEBUG(10, ("uid2sid: uid %lu has name %s\n",
(unsigned long)state->uid, username));
@@ -347,11 +347,11 @@ static void uid2sid_uid2name_recv(void *private, BOOL success,
uid2sid_lookupname_recv, state);
}
-static void uid2sid_lookupname_recv(void *private, BOOL success,
+static void uid2sid_lookupname_recv(void *private_data, BOOL success,
const DOM_SID *sid, enum SID_NAME_USE type)
{
struct uid2sid_state *state =
- talloc_get_type_abort(private, struct uid2sid_state);
+ talloc_get_type_abort(private_data, struct uid2sid_state);
unid_t id;
if ((!success) || (type != SID_NAME_USER)) {
@@ -367,10 +367,10 @@ static void uid2sid_lookupname_recv(void *private, BOOL success,
uid2sid_idmap_set_mapping_recv, state );
}
-static void uid2sid_idmap_set_mapping_recv(void *private, BOOL success)
+static void uid2sid_idmap_set_mapping_recv(void *private_data, BOOL success)
{
struct uid2sid_state *state =
- talloc_get_type_abort(private, struct uid2sid_state);
+ talloc_get_type_abort(private_data, struct uid2sid_state);
/* don't fail if we can't store it */
@@ -389,12 +389,12 @@ struct gid2sid_state {
enum SID_NAME_USE type;
};
-static void gid2sid_gid2name_recv(void *private, BOOL success,
+static void gid2sid_gid2name_recv(void *private_data, BOOL success,
const char *groupname);
-static void gid2sid_lookupname_recv(void *private, BOOL success,
+static void gid2sid_lookupname_recv(void *private_data, BOOL success,
const DOM_SID *sid,
enum SID_NAME_USE type);
-static void gid2sid_idmap_set_mapping_recv(void *private, BOOL success);
+static void gid2sid_idmap_set_mapping_recv(void *private_data, BOOL success);
void winbindd_gid_to_sid(struct winbindd_cli_state *state)
{
@@ -453,11 +453,11 @@ void winbindd_gid_to_sid(struct winbindd_cli_state *state)
gid2sid_gid2name_recv, gid2sid_state);
}
-static void gid2sid_gid2name_recv(void *private, BOOL success,
+static void gid2sid_gid2name_recv(void *private_data, BOOL success,
const char *username)
{
struct gid2sid_state *state =
- talloc_get_type_abort(private, struct gid2sid_state);
+ talloc_get_type_abort(private_data, struct gid2sid_state);
DEBUG(10, ("gid2sid: gid %lu has name %s\n",
(unsigned long)state->gid, username));
@@ -474,11 +474,11 @@ static void gid2sid_gid2name_recv(void *private, BOOL success,
gid2sid_lookupname_recv, state);
}
-static void gid2sid_lookupname_recv(void *private, BOOL success,
+static void gid2sid_lookupname_recv(void *private_data, BOOL success,
const DOM_SID *sid, enum SID_NAME_USE type)
{
struct gid2sid_state *state =
- talloc_get_type_abort(private, struct gid2sid_state);
+ talloc_get_type_abort(private_data, struct gid2sid_state);
unid_t id;
if ((!success) ||
@@ -495,9 +495,9 @@ static void gid2sid_lookupname_recv(void *private, BOOL success,
gid2sid_idmap_set_mapping_recv, state );
}
-static void gid2sid_idmap_set_mapping_recv(void *private, BOOL success)
+static void gid2sid_idmap_set_mapping_recv(void *private_data, BOOL success)
{
- struct gid2sid_state *state = private;
+ struct gid2sid_state *state = private_data;
/* don't fail if we can't store it */
diff --git a/source3/nsswitch/winbindd_user.c b/source3/nsswitch/winbindd_user.c
index 82ab79eb4c..576ceaea23 100644
--- a/source3/nsswitch/winbindd_user.c
+++ b/source3/nsswitch/winbindd_user.c
@@ -157,11 +157,11 @@ struct getpwsid_state {
gid_t gid;
};
-static void getpwsid_queryuser_recv(void *private, BOOL success,
+static void getpwsid_queryuser_recv(void *private_data, BOOL success,
const char *acct_name,
const char *full_name, uint32 group_rid);
-static void getpwsid_sid2uid_recv(void *private, BOOL success, uid_t uid);
-static void getpwsid_sid2gid_recv(void *private, BOOL success, gid_t gid);
+static void getpwsid_sid2uid_recv(void *private_data, BOOL success, uid_t uid);
+static void getpwsid_sid2gid_recv(void *private_data, BOOL success, gid_t gid);
static void winbindd_getpwsid(struct winbindd_cli_state *state,
const DOM_SID *sid)
@@ -192,12 +192,12 @@ static void winbindd_getpwsid(struct winbindd_cli_state *state,
request_error(state);
}
-static void getpwsid_queryuser_recv(void *private, BOOL success,
+static void getpwsid_queryuser_recv(void *private_data, BOOL success,
const char *acct_name,
const char *full_name, uint32 group_rid)
{
struct getpwsid_state *s =
- talloc_get_type_abort(private, struct getpwsid_state);
+ talloc_get_type_abort(private_data, struct getpwsid_state);
if (!success) {
DEBUG(5, ("Could not query user %s\\%s\n", s->domain->name,
@@ -215,10 +215,10 @@ static void getpwsid_queryuser_recv(void *private, BOOL success,
getpwsid_sid2uid_recv, s);
}
-static void getpwsid_sid2uid_recv(void *private, BOOL success, uid_t uid)
+static void getpwsid_sid2uid_recv(void *private_data, BOOL success, uid_t uid)
{
struct getpwsid_state *s =
- talloc_get_type_abort(private, struct getpwsid_state);
+ talloc_get_type_abort(private_data, struct getpwsid_state);
if (!success) {
DEBUG(5, ("Could not query user's %s\\%s uid\n",
@@ -232,10 +232,10 @@ static void getpwsid_sid2uid_recv(void *private, BOOL success, uid_t uid)
getpwsid_sid2gid_recv, s);
}
-static void getpwsid_sid2gid_recv(void *private, BOOL success, gid_t gid)
+static void getpwsid_sid2gid_recv(void *private_data, BOOL success, gid_t gid)
{
struct getpwsid_state *s =
- talloc_get_type_abort(private, struct getpwsid_state);
+ talloc_get_type_abort(private_data, struct getpwsid_state);
struct winbindd_pw *pw;
fstring output_username;
char *homedir;
@@ -297,7 +297,7 @@ static void getpwsid_sid2gid_recv(void *private, BOOL success, gid_t gid)
/* Return a password structure from a username. */
-static void getpwnam_name2sid_recv(void *private, BOOL success,
+static void getpwnam_name2sid_recv(void *private_data, BOOL success,
const DOM_SID *sid, enum SID_NAME_USE type);
void winbindd_getpwnam(struct winbindd_cli_state *state)
@@ -343,10 +343,10 @@ void winbindd_getpwnam(struct winbindd_cli_state *state)
getpwnam_name2sid_recv, state);
}
-static void getpwnam_name2sid_recv(void *private, BOOL success,
+static void getpwnam_name2sid_recv(void *private_data, BOOL success,
const DOM_SID *sid, enum SID_NAME_USE type)
{
- struct winbindd_cli_state *state = private;
+ struct winbindd_cli_state *state = private_data;
if (!success) {
DEBUG(5, ("Could not lookup name for user %s\n",
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index 21ae4611c2..2be1520250 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -177,7 +177,7 @@ struct trustdom_state {
struct winbindd_response *response;
};
-static void trustdom_recv(void *private, BOOL success);
+static void trustdom_recv(void *private_data, BOOL success);
static void add_trusted_domains( struct winbindd_domain *domain )
{
@@ -213,11 +213,11 @@ static void add_trusted_domains( struct winbindd_domain *domain )
trustdom_recv, state);
}
-static void trustdom_recv(void *private, BOOL success)
+static void trustdom_recv(void *private_data, BOOL success)
{
extern struct winbindd_methods cache_methods;
struct trustdom_state *state =
- talloc_get_type_abort(private, struct trustdom_state);
+ talloc_get_type_abort(private_data, struct trustdom_state);
struct winbindd_response *response = state->response;
char *p;
@@ -311,17 +311,17 @@ struct init_child_state {
struct winbindd_domain *domain;
struct winbindd_request *request;
struct winbindd_response *response;
- void (*continuation)(void *private, BOOL success);
- void *private;
+ void (*continuation)(void *private_data, BOOL success);
+ void *private_data;
};
-static void init_child_recv(void *private, BOOL success);
-static void init_child_getdc_recv(void *private, BOOL success);
+static void init_child_recv(void *private_data, BOOL success);
+static void init_child_getdc_recv(void *private_data, BOOL success);
enum winbindd_result init_child_connection(struct winbindd_domain *domain,
- void (*continuation)(void *private,
+ void (*continuation)(void *private_data,
BOOL success),
- void *private)
+ void *private_data)
{
TALLOC_CTX *mem_ctx;
struct winbindd_request *request;
@@ -340,7 +340,7 @@ enum winbindd_result init_child_connection(struct winbindd_domain *domain,
if ((request == NULL) || (response == NULL) || (state == NULL)) {
DEBUG(0, ("talloc failed\n"));
- continuation(private, False);
+ continuation(private_data, False);
return WINBINDD_ERROR;
}
@@ -351,7 +351,7 @@ enum winbindd_result init_child_connection(struct winbindd_domain *domain,
state->request = request;
state->response = response;
state->continuation = continuation;
- state->private = private;
+ state->private_data = private_data;
if (domain->primary) {
/* The primary domain has to find the DC name itself */
@@ -376,10 +376,10 @@ enum winbindd_result init_child_connection(struct winbindd_domain *domain,
return WINBINDD_PENDING;
}
-static void init_child_getdc_recv(void *private, BOOL success)
+static void init_child_getdc_recv(void *private_data, BOOL success)
{
struct init_child_state *state =
- talloc_get_type_abort(private, struct init_child_state);
+ talloc_get_type_abort(private_data, struct init_child_state);
const char *dcname = "";
DEBUG(10, ("Received getdcname response\n"));
@@ -398,17 +398,17 @@ static void init_child_getdc_recv(void *private, BOOL success)
init_child_recv, state);
}
-static void init_child_recv(void *private, BOOL success)
+static void init_child_recv(void *private_data, BOOL success)
{
struct init_child_state *state =
- talloc_get_type_abort(private, struct init_child_state);
+ talloc_get_type_abort(private_data, struct init_child_state);
DEBUG(5, ("Received child initialization response for domain %s\n",
state->domain->name));
if ((!success) || (state->response->result != WINBINDD_OK)) {
DEBUG(3, ("Could not init child\n"));
- state->continuation(state->private, False);
+ state->continuation(state->private_data, False);
talloc_destroy(state->mem_ctx);
return;
}
@@ -429,7 +429,7 @@ static void init_child_recv(void *private, BOOL success)
state->domain->initialized = 1;
if (state->continuation != NULL)
- state->continuation(state->private, True);
+ state->continuation(state->private_data, True);
talloc_destroy(state->mem_ctx);
}
diff --git a/source3/nsswitch/winbindd_wins.c b/source3/nsswitch/winbindd_wins.c
index 2e03becd5a..2cb835b373 100644
--- a/source3/nsswitch/winbindd_wins.c
+++ b/source3/nsswitch/winbindd_wins.c
@@ -65,12 +65,12 @@ static int wins_lookup_open_socket_in(void)
}
-static struct node_status *lookup_byaddr_backend(char *addr, int *count)
+static NODE_STATUS_STRUCT *lookup_byaddr_backend(char *addr, int *count)
{
int fd;
struct in_addr ip;
struct nmb_name nname;
- struct node_status *status;
+ NODE_STATUS_STRUCT *status;
fd = wins_lookup_open_socket_in();
if (fd == -1)
@@ -136,7 +136,7 @@ void winbindd_wins_byip(struct winbindd_cli_state *state)
{
fstring response;
int i, count, maxlen, size;
- struct node_status *status;
+ NODE_STATUS_STRUCT *status;
/* Ensure null termination */
state->request.data.winsreq[sizeof(state->request.data.winsreq)-1]='\0';
diff --git a/source3/nsswitch/wins.c b/source3/nsswitch/wins.c
index 8d26fc5297..6d4f6cfa26 100644
--- a/source3/nsswitch/wins.c
+++ b/source3/nsswitch/wins.c
@@ -128,12 +128,12 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count)
#ifdef HAVE_NS_API_H
-static struct node_status *lookup_byaddr_backend(char *addr, int *count)
+static NODE_STATUS_STRUCT *lookup_byaddr_backend(char *addr, int *count)
{
int fd;
struct in_addr ip;
struct nmb_name nname;
- struct node_status *status;
+ NODE_STATUS_STRUCT *status;
if (!initialised) {
nss_wins_init();
@@ -166,7 +166,7 @@ int lookup(nsd_file_t *rq)
char *key;
char *addr;
struct in_addr *ip_list;
- struct node_status *status;
+ NODE_STATUS_STRUCT *status;
int i, count, len, size;
char response[1024];
BOOL found = False;