CVE-2015-7560: s3: libsmb: Rename cli_posix_getfaclXX() functions to cli_posix_getacl...
authorJeremy Allison <jra@samba.org>
Thu, 7 Jan 2016 01:17:24 +0000 (17:17 -0800)
committerKarolin Seeger <kseeger@samba.org>
Wed, 24 Feb 2016 10:38:53 +0000 (11:38 +0100)
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>
source3/client/client.c
source3/libsmb/clifile.c
source3/libsmb/proto.h

index 00f8282153cca877a0984b39feb9cbf41dcac865..aa547362d40cd27d034e714bc4aa71a9daba3bd8 100644 (file)
@@ -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);
index 70b769d1bd84d7c2eb0f104d86a8f797819db4c3..b353b2b8c6d5b5217c53ad3c0126dfd56a9d68fa 100644 (file)
@@ -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);
index 525625cd30098afaa96dac94bb96d52b8564d0c1..e20e06cf058c65b22835171c698d0ca40b5a4941 100644 (file)
@@ -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,