1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

CVE-2015-7560: s3: libsmb: Rename cli_posix_getfaclXX() functions to cli_posix_getacl() as they operate on pathnames.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Jeremy Allison 2016-01-06 17:17:24 -08:00 committed by Stefan Metzmacher
parent 77b3d5b2a8
commit e7e23e9647
3 changed files with 19 additions and 19 deletions

View File

@ -3376,7 +3376,7 @@ static int cmd_getfacl(void)
return 1;
}
status = cli_posix_getfacl(targetcli, targetname, ctx, &rb_size, &retbuf);
status = cli_posix_getacl(targetcli, targetname, ctx, &rb_size, &retbuf);
if (!NT_STATUS_IS_OK(status)) {
d_printf("%s getfacl file %s\n",
nt_errstr(status), src);

View File

@ -587,25 +587,25 @@ NTSTATUS cli_posix_hardlink(struct cli_state *cli,
}
/****************************************************************************
Do a POSIX getfacl (UNIX extensions).
Do a POSIX getacl - pathname based ACL get (UNIX extensions).
****************************************************************************/
struct getfacl_state {
struct getacl_state {
uint32_t num_data;
uint8_t *data;
};
static void cli_posix_getfacl_done(struct tevent_req *subreq);
static void cli_posix_getacl_done(struct tevent_req *subreq);
struct tevent_req *cli_posix_getfacl_send(TALLOC_CTX *mem_ctx,
struct tevent_req *cli_posix_getacl_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct cli_state *cli,
const char *fname)
{
struct tevent_req *req = NULL, *subreq = NULL;
struct getfacl_state *state = NULL;
struct getacl_state *state = NULL;
req = tevent_req_create(mem_ctx, &state, struct getfacl_state);
req = tevent_req_create(mem_ctx, &state, struct getacl_state);
if (req == NULL) {
return NULL;
}
@ -614,16 +614,16 @@ struct tevent_req *cli_posix_getfacl_send(TALLOC_CTX *mem_ctx,
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
tevent_req_set_callback(subreq, cli_posix_getfacl_done, req);
tevent_req_set_callback(subreq, cli_posix_getacl_done, req);
return req;
}
static void cli_posix_getfacl_done(struct tevent_req *subreq)
static void cli_posix_getacl_done(struct tevent_req *subreq)
{
struct tevent_req *req = tevent_req_callback_data(
subreq, struct tevent_req);
struct getfacl_state *state = tevent_req_data(
req, struct getfacl_state);
struct getacl_state *state = tevent_req_data(
req, struct getacl_state);
NTSTATUS status;
status = cli_qpathinfo_recv(subreq, state, &state->data,
@ -635,12 +635,12 @@ static void cli_posix_getfacl_done(struct tevent_req *subreq)
tevent_req_done(req);
}
NTSTATUS cli_posix_getfacl_recv(struct tevent_req *req,
NTSTATUS cli_posix_getacl_recv(struct tevent_req *req,
TALLOC_CTX *mem_ctx,
size_t *prb_size,
char **retbuf)
{
struct getfacl_state *state = tevent_req_data(req, struct getfacl_state);
struct getacl_state *state = tevent_req_data(req, struct getacl_state);
NTSTATUS status;
if (tevent_req_is_nterror(req, &status)) {
@ -651,7 +651,7 @@ NTSTATUS cli_posix_getfacl_recv(struct tevent_req *req,
return NT_STATUS_OK;
}
NTSTATUS cli_posix_getfacl(struct cli_state *cli,
NTSTATUS cli_posix_getacl(struct cli_state *cli,
const char *fname,
TALLOC_CTX *mem_ctx,
size_t *prb_size,
@ -676,7 +676,7 @@ NTSTATUS cli_posix_getfacl(struct cli_state *cli,
goto fail;
}
req = cli_posix_getfacl_send(frame,
req = cli_posix_getacl_send(frame,
ev,
cli,
fname);
@ -689,7 +689,7 @@ NTSTATUS cli_posix_getfacl(struct cli_state *cli,
goto fail;
}
status = cli_posix_getfacl_recv(req, mem_ctx, prb_size, retbuf);
status = cli_posix_getacl_recv(req, mem_ctx, prb_size, retbuf);
fail:
TALLOC_FREE(frame);

View File

@ -252,15 +252,15 @@ NTSTATUS cli_posix_hardlink(struct cli_state *cli,
const char *newname);
uint32_t unix_perms_to_wire(mode_t perms);
mode_t wire_perms_to_unix(uint32_t perms);
struct tevent_req *cli_posix_getfacl_send(TALLOC_CTX *mem_ctx,
struct tevent_req *cli_posix_getacl_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct cli_state *cli,
const char *fname);
NTSTATUS cli_posix_getfacl_recv(struct tevent_req *req,
NTSTATUS cli_posix_getacl_recv(struct tevent_req *req,
TALLOC_CTX *mem_ctx,
size_t *prb_size,
char **retbuf);
NTSTATUS cli_posix_getfacl(struct cli_state *cli,
NTSTATUS cli_posix_getacl(struct cli_state *cli,
const char *fname,
TALLOC_CTX *mem_ctx,
size_t *prb_size,