mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
s3:winbind: remove SET_HWM from winbind's API.
This commit is contained in:
parent
ec33a624a3
commit
66e67c1bad
@ -117,7 +117,6 @@ enum winbindd_cmd {
|
|||||||
WINBINDD_ALLOCATE_GID,
|
WINBINDD_ALLOCATE_GID,
|
||||||
WINBINDD_SET_MAPPING,
|
WINBINDD_SET_MAPPING,
|
||||||
WINBINDD_REMOVE_MAPPING,
|
WINBINDD_REMOVE_MAPPING,
|
||||||
WINBINDD_SET_HWM,
|
|
||||||
|
|
||||||
/* Miscellaneous other stuff */
|
/* Miscellaneous other stuff */
|
||||||
|
|
||||||
@ -169,7 +168,6 @@ enum winbindd_cmd {
|
|||||||
WINBINDD_DUAL_GID2SID,
|
WINBINDD_DUAL_GID2SID,
|
||||||
WINBINDD_DUAL_SET_MAPPING,
|
WINBINDD_DUAL_SET_MAPPING,
|
||||||
WINBINDD_DUAL_REMOVE_MAPPING,
|
WINBINDD_DUAL_REMOVE_MAPPING,
|
||||||
WINBINDD_DUAL_SET_HWM,
|
|
||||||
|
|
||||||
/* Wrapper around possibly blocking unix nss calls */
|
/* Wrapper around possibly blocking unix nss calls */
|
||||||
WINBINDD_DUAL_USERINFO,
|
WINBINDD_DUAL_USERINFO,
|
||||||
|
@ -1302,7 +1302,6 @@ WINBINDD_OBJ1 = \
|
|||||||
winbindd/winbindd_ping_dc.o \
|
winbindd/winbindd_ping_dc.o \
|
||||||
winbindd/winbindd_set_mapping.o \
|
winbindd/winbindd_set_mapping.o \
|
||||||
winbindd/winbindd_remove_mapping.o \
|
winbindd/winbindd_remove_mapping.o \
|
||||||
winbindd/winbindd_set_hwm.o \
|
|
||||||
winbindd/winbindd_pam_auth.o \
|
winbindd/winbindd_pam_auth.o \
|
||||||
winbindd/winbindd_pam_auth_crap.o \
|
winbindd/winbindd_pam_auth_crap.o \
|
||||||
winbindd/winbindd_pam_chauthtok.o \
|
winbindd/winbindd_pam_chauthtok.o \
|
||||||
|
@ -171,9 +171,4 @@ interface wbint
|
|||||||
[in] wbint_IdType type,
|
[in] wbint_IdType type,
|
||||||
[in] hyper id
|
[in] hyper id
|
||||||
);
|
);
|
||||||
|
|
||||||
NTSTATUS wbint_SetHWM(
|
|
||||||
[in] wbint_IdType type,
|
|
||||||
[in] hyper id
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
@ -547,8 +547,6 @@ static struct winbindd_async_dispatch_table async_priv_table[] = {
|
|||||||
winbindd_set_mapping_send, winbindd_set_mapping_recv },
|
winbindd_set_mapping_send, winbindd_set_mapping_recv },
|
||||||
{ WINBINDD_REMOVE_MAPPING, "SET_MAPPING",
|
{ WINBINDD_REMOVE_MAPPING, "SET_MAPPING",
|
||||||
winbindd_remove_mapping_send, winbindd_remove_mapping_recv },
|
winbindd_remove_mapping_send, winbindd_remove_mapping_recv },
|
||||||
{ WINBINDD_SET_HWM, "SET_HWM",
|
|
||||||
winbindd_set_hwm_send, winbindd_set_hwm_recv },
|
|
||||||
{ WINBINDD_CHANGE_MACHACC, "CHANGE_MACHACC",
|
{ WINBINDD_CHANGE_MACHACC, "CHANGE_MACHACC",
|
||||||
winbindd_change_machine_acct_send, winbindd_change_machine_acct_recv },
|
winbindd_change_machine_acct_send, winbindd_change_machine_acct_recv },
|
||||||
{ WINBINDD_PAM_AUTH_CRAP, "PAM_AUTH_CRAP",
|
{ WINBINDD_PAM_AUTH_CRAP, "PAM_AUTH_CRAP",
|
||||||
|
@ -607,26 +607,3 @@ NTSTATUS _wbint_RemoveMapping(struct pipes_struct *p,
|
|||||||
|
|
||||||
return idmap_remove_mapping(&map);
|
return idmap_remove_mapping(&map);
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS _wbint_SetHWM(struct pipes_struct *p, struct wbint_SetHWM *r)
|
|
||||||
{
|
|
||||||
struct unixid id;
|
|
||||||
NTSTATUS status;
|
|
||||||
|
|
||||||
id.id = r->in.id;
|
|
||||||
|
|
||||||
switch (r->in.type) {
|
|
||||||
case WBINT_ID_TYPE_UID:
|
|
||||||
id.type = ID_TYPE_UID;
|
|
||||||
status = idmap_set_uid_hwm(&id);
|
|
||||||
break;
|
|
||||||
case WBINT_ID_TYPE_GID:
|
|
||||||
id.type = ID_TYPE_GID;
|
|
||||||
status = idmap_set_gid_hwm(&id);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
status = NT_STATUS_INVALID_PARAMETER;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
@ -830,13 +830,6 @@ struct tevent_req *winbindd_remove_mapping_send(TALLOC_CTX *mem_ctx,
|
|||||||
NTSTATUS winbindd_remove_mapping_recv(struct tevent_req *req,
|
NTSTATUS winbindd_remove_mapping_recv(struct tevent_req *req,
|
||||||
struct winbindd_response *response);
|
struct winbindd_response *response);
|
||||||
|
|
||||||
struct tevent_req *winbindd_set_hwm_send(TALLOC_CTX *mem_ctx,
|
|
||||||
struct tevent_context *ev,
|
|
||||||
struct winbindd_cli_state *cli,
|
|
||||||
struct winbindd_request *request);
|
|
||||||
NTSTATUS winbindd_set_hwm_recv(struct tevent_req *req,
|
|
||||||
struct winbindd_response *response);
|
|
||||||
|
|
||||||
struct tevent_req *winbindd_pam_auth_send(TALLOC_CTX *mem_ctx,
|
struct tevent_req *winbindd_pam_auth_send(TALLOC_CTX *mem_ctx,
|
||||||
struct tevent_context *ev,
|
struct tevent_context *ev,
|
||||||
struct winbindd_cli_state *cli,
|
struct winbindd_cli_state *cli,
|
||||||
|
@ -1,95 +0,0 @@
|
|||||||
/*
|
|
||||||
Unix SMB/CIFS implementation.
|
|
||||||
async implementation of WINBINDD_SET_HWM
|
|
||||||
Copyright (C) Volker Lendecke 2009
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "includes.h"
|
|
||||||
#include "winbindd.h"
|
|
||||||
#include "librpc/gen_ndr/cli_wbint.h"
|
|
||||||
|
|
||||||
struct winbindd_set_hwm_state {
|
|
||||||
uint8_t dummy;
|
|
||||||
};
|
|
||||||
|
|
||||||
static void winbindd_set_hwm_done(struct tevent_req *subreq);
|
|
||||||
|
|
||||||
struct tevent_req *winbindd_set_hwm_send(TALLOC_CTX *mem_ctx,
|
|
||||||
struct tevent_context *ev,
|
|
||||||
struct winbindd_cli_state *cli,
|
|
||||||
struct winbindd_request *request)
|
|
||||||
{
|
|
||||||
struct tevent_req *req, *subreq;
|
|
||||||
struct winbindd_set_hwm_state *state;
|
|
||||||
struct winbindd_child *child;
|
|
||||||
enum wbint_IdType type;
|
|
||||||
|
|
||||||
req = tevent_req_create(mem_ctx, &state,
|
|
||||||
struct winbindd_set_hwm_state);
|
|
||||||
if (req == NULL) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
DEBUG(3, ("set_hwm %d\n", (int)request->data.dual_idmapset.id));
|
|
||||||
|
|
||||||
switch (request->data.dual_idmapset.type) {
|
|
||||||
case ID_TYPE_UID:
|
|
||||||
type = WBINT_ID_TYPE_UID;
|
|
||||||
break;
|
|
||||||
case ID_TYPE_GID:
|
|
||||||
type = WBINT_ID_TYPE_GID;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
|
|
||||||
return tevent_req_post(req, ev);
|
|
||||||
}
|
|
||||||
|
|
||||||
child = idmap_child();
|
|
||||||
|
|
||||||
subreq = rpccli_wbint_SetHWM_send(state, ev, child->rpccli, type,
|
|
||||||
request->data.dual_idmapset.id);
|
|
||||||
if (tevent_req_nomem(subreq, req)) {
|
|
||||||
return tevent_req_post(req, ev);
|
|
||||||
}
|
|
||||||
tevent_req_set_callback(subreq, winbindd_set_hwm_done, req);
|
|
||||||
return req;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void winbindd_set_hwm_done(struct tevent_req *subreq)
|
|
||||||
{
|
|
||||||
struct tevent_req *req = tevent_req_callback_data(
|
|
||||||
subreq, struct tevent_req);
|
|
||||||
struct winbindd_set_hwm_state *state = tevent_req_data(
|
|
||||||
req, struct winbindd_set_hwm_state);
|
|
||||||
NTSTATUS status, result;
|
|
||||||
|
|
||||||
status = rpccli_wbint_SetHWM_recv(subreq, state, &result);
|
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
|
||||||
tevent_req_nterror(req, status);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!NT_STATUS_IS_OK(result)) {
|
|
||||||
tevent_req_nterror(req, result);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
tevent_req_done(req);
|
|
||||||
}
|
|
||||||
|
|
||||||
NTSTATUS winbindd_set_hwm_recv(struct tevent_req *req,
|
|
||||||
struct winbindd_response *response)
|
|
||||||
{
|
|
||||||
return tevent_req_simple_recv_ntstatus(req);
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user