summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2016-01-06 17:17:24 -0800
committerKarolin Seeger <kseeger@samba.org>2016-02-24 11:38:53 +0100
commit09514d750d6fd59306bab80fb9ddeb1abe9d0b57 (patch)
treedcfdcc42afc823d6d81fc869afa4e8e226e0c93b
parente1825c8138135226fbf9ca685edd4b44aac40220 (diff)
downloadsamba-09514d750d6fd59306bab80fb9ddeb1abe9d0b57.tar.gz
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>
-rw-r--r--source3/client/client.c2
-rw-r--r--source3/libsmb/clifile.c30
-rw-r--r--source3/libsmb/proto.h6
3 files changed, 19 insertions, 19 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 00f8282153c..aa547362d40 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -3380,7 +3380,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);
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 70b769d1bd8..b353b2b8c6d 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -590,25 +590,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;
}
@@ -617,16 +617,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,
@@ -638,12 +638,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)) {
@@ -654,7 +654,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,
@@ -679,7 +679,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);
@@ -693,7 +693,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);
diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h
index 525625cd300..e20e06cf058 100644
--- a/source3/libsmb/proto.h
+++ b/source3/libsmb/proto.h
@@ -255,15 +255,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,