netapi: use "buffer" in libnetapi.
authorGünther Deschner <gd@samba.org>
Fri, 18 Jul 2008 21:33:08 +0000 (23:33 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 30 Jul 2008 14:43:47 +0000 (16:43 +0200)
Guenther
(This used to be commit 80957bc1bc1462a2478b3eea64f5cb7a84d08677)

source3/lib/netapi/group.c
source3/lib/netapi/libnetapi.c
source3/lib/netapi/libnetapi.h
source3/lib/netapi/localgroup.c
source3/lib/netapi/serverinfo.c

index 04ffb7c8074fe450bf2a84ed65a52c0923f19359..c1c55c8a316577493db69a76acdf46dd133eae99 100644 (file)
@@ -49,22 +49,22 @@ WERROR NetGroupAdd_r(struct libnetapi_ctx *ctx,
        ZERO_STRUCT(domain_handle);
        ZERO_STRUCT(group_handle);
 
-       if (!r->in.buf) {
+       if (!r->in.buffer) {
                return WERR_INVALID_PARAM;
        }
 
        switch (r->in.level) {
                case 0:
-                       info0 = (struct GROUP_INFO_0 *)r->in.buf;
+                       info0 = (struct GROUP_INFO_0 *)r->in.buffer;
                        break;
                case 1:
-                       info1 = (struct GROUP_INFO_1 *)r->in.buf;
+                       info1 = (struct GROUP_INFO_1 *)r->in.buffer;
                        break;
                case 2:
-                       info2 = (struct GROUP_INFO_2 *)r->in.buf;
+                       info2 = (struct GROUP_INFO_2 *)r->in.buffer;
                        break;
                case 3:
-                       info3 = (struct GROUP_INFO_3 *)r->in.buf;
+                       info3 = (struct GROUP_INFO_3 *)r->in.buffer;
                        break;
                default:
                        werr = WERR_UNKNOWN_LEVEL;
@@ -478,7 +478,7 @@ WERROR NetGroupSetInfo_r(struct libnetapi_ctx *ctx,
 
        switch (r->in.level) {
                case 0:
-                       g0 = (struct GROUP_INFO_0 *)r->in.buf;
+                       g0 = (struct GROUP_INFO_0 *)r->in.buffer;
                        init_lsa_String(&info.name, g0->grpi0_name);
                        status = rpccli_samr_SetGroupInfo(pipe_cli, ctx,
                                                          &group_handle,
@@ -486,7 +486,7 @@ WERROR NetGroupSetInfo_r(struct libnetapi_ctx *ctx,
                                                          &info);
                        break;
                case 1:
-                       g1 = (struct GROUP_INFO_1 *)r->in.buf;
+                       g1 = (struct GROUP_INFO_1 *)r->in.buffer;
                        init_lsa_String(&info.description, g1->grpi1_comment);
                        status = rpccli_samr_SetGroupInfo(pipe_cli, ctx,
                                                          &group_handle,
@@ -494,7 +494,7 @@ WERROR NetGroupSetInfo_r(struct libnetapi_ctx *ctx,
                                                          &info);
                        break;
                case 2:
-                       g2 = (struct GROUP_INFO_2 *)r->in.buf;
+                       g2 = (struct GROUP_INFO_2 *)r->in.buffer;
                        init_lsa_String(&info.description, g2->grpi2_comment);
                        status = rpccli_samr_SetGroupInfo(pipe_cli, ctx,
                                                          &group_handle,
@@ -511,7 +511,7 @@ WERROR NetGroupSetInfo_r(struct libnetapi_ctx *ctx,
                                                          &info);
                        break;
                case 3:
-                       g3 = (struct GROUP_INFO_3 *)r->in.buf;
+                       g3 = (struct GROUP_INFO_3 *)r->in.buffer;
                        init_lsa_String(&info.description, g3->grpi3_comment);
                        status = rpccli_samr_SetGroupInfo(pipe_cli, ctx,
                                                          &group_handle,
@@ -528,7 +528,7 @@ WERROR NetGroupSetInfo_r(struct libnetapi_ctx *ctx,
                                                          &info);
                        break;
                case 1002:
-                       g1002 = (struct GROUP_INFO_1002 *)r->in.buf;
+                       g1002 = (struct GROUP_INFO_1002 *)r->in.buffer;
                        init_lsa_String(&info.description, g1002->grpi1002_comment);
                        status = rpccli_samr_SetGroupInfo(pipe_cli, ctx,
                                                          &group_handle,
@@ -536,7 +536,7 @@ WERROR NetGroupSetInfo_r(struct libnetapi_ctx *ctx,
                                                          &info);
                        break;
                case 1005:
-                       g1005 = (struct GROUP_INFO_1005 *)r->in.buf;
+                       g1005 = (struct GROUP_INFO_1005 *)r->in.buffer;
                        info.attributes.attributes = g1005->grpi1005_attributes;
                        status = rpccli_samr_SetGroupInfo(pipe_cli, ctx,
                                                          &group_handle,
@@ -739,7 +739,7 @@ WERROR NetGroupGetInfo_r(struct libnetapi_ctx *ctx,
        werr = map_group_info_to_buffer(ctx, r->in.level,
                                        group_info_all ? &info->all : &info->all2,
                                        domain_sid, rids.ids[0],
-                                       r->out.buf);
+                                       r->out.buffer);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
        }
index 1ebe338f6cdfad603b32bc65ff6c7975c874caa8..7e9e094df46ea0c428ccfd85b898ab1720326fd6 100644 (file)
@@ -783,7 +783,7 @@ NET_API_STATUS NetQueryDisplayInformation(const char * server_name /* [in] [uniq
 
 NET_API_STATUS NetGroupAdd(const char * server_name /* [in] */,
                           uint32_t level /* [in] */,
-                          uint8_t *buf /* [in] [ref] */,
+                          uint8_t *buffer /* [in] [ref] */,
                           uint32_t *parm_err /* [out] [ref] */)
 {
        struct NetGroupAdd r;
@@ -799,7 +799,7 @@ NET_API_STATUS NetGroupAdd(const char * server_name /* [in] */,
        /* In parameters */
        r.in.server_name = server_name;
        r.in.level = level;
-       r.in.buf = buf;
+       r.in.buffer = buffer;
 
        /* Out parameters */
        r.out.parm_err = parm_err;
@@ -925,7 +925,7 @@ NET_API_STATUS NetGroupEnum(const char * server_name /* [in] */,
 NET_API_STATUS NetGroupSetInfo(const char * server_name /* [in] */,
                               const char * group_name /* [in] */,
                               uint32_t level /* [in] */,
-                              uint8_t *buf /* [in] [ref] */,
+                              uint8_t *buffer /* [in] [ref] */,
                               uint32_t *parm_err /* [out] [ref] */)
 {
        struct NetGroupSetInfo r;
@@ -942,7 +942,7 @@ NET_API_STATUS NetGroupSetInfo(const char * server_name /* [in] */,
        r.in.server_name = server_name;
        r.in.group_name = group_name;
        r.in.level = level;
-       r.in.buf = buf;
+       r.in.buffer = buffer;
 
        /* Out parameters */
        r.out.parm_err = parm_err;
@@ -973,7 +973,7 @@ NET_API_STATUS NetGroupSetInfo(const char * server_name /* [in] */,
 NET_API_STATUS NetGroupGetInfo(const char * server_name /* [in] */,
                               const char * group_name /* [in] */,
                               uint32_t level /* [in] */,
-                              uint8_t **buf /* [out] [ref] */)
+                              uint8_t **buffer /* [out] [ref] */)
 {
        struct NetGroupGetInfo r;
        struct libnetapi_ctx *ctx = NULL;
@@ -991,7 +991,7 @@ NET_API_STATUS NetGroupGetInfo(const char * server_name /* [in] */,
        r.in.level = level;
 
        /* Out parameters */
-       r.out.buf = buf;
+       r.out.buffer = buffer;
 
        if (DEBUGLEVEL >= 10) {
                NDR_PRINT_IN_DEBUG(NetGroupGetInfo, &r);
@@ -1106,7 +1106,7 @@ NET_API_STATUS NetGroupDelUser(const char * server_name /* [in] */,
 
 NET_API_STATUS NetLocalGroupAdd(const char * server_name /* [in] */,
                                uint32_t level /* [in] */,
-                               uint8_t *buf /* [in] [ref] */,
+                               uint8_t *buffer /* [in] [ref] */,
                                uint32_t *parm_err /* [out] [ref] */)
 {
        struct NetLocalGroupAdd r;
@@ -1122,7 +1122,7 @@ NET_API_STATUS NetLocalGroupAdd(const char * server_name /* [in] */,
        /* In parameters */
        r.in.server_name = server_name;
        r.in.level = level;
-       r.in.buf = buf;
+       r.in.buffer = buffer;
 
        /* Out parameters */
        r.out.parm_err = parm_err;
@@ -1195,7 +1195,7 @@ NET_API_STATUS NetLocalGroupDel(const char * server_name /* [in] */,
 NET_API_STATUS NetLocalGroupGetInfo(const char * server_name /* [in] */,
                                    const char * group_name /* [in] */,
                                    uint32_t level /* [in] */,
-                                   uint8_t **buf /* [out] [ref] */)
+                                   uint8_t **buffer /* [out] [ref] */)
 {
        struct NetLocalGroupGetInfo r;
        struct libnetapi_ctx *ctx = NULL;
@@ -1213,7 +1213,7 @@ NET_API_STATUS NetLocalGroupGetInfo(const char * server_name /* [in] */,
        r.in.level = level;
 
        /* Out parameters */
-       r.out.buf = buf;
+       r.out.buffer = buffer;
 
        if (DEBUGLEVEL >= 10) {
                NDR_PRINT_IN_DEBUG(NetLocalGroupGetInfo, &r);
@@ -1241,7 +1241,7 @@ NET_API_STATUS NetLocalGroupGetInfo(const char * server_name /* [in] */,
 NET_API_STATUS NetLocalGroupSetInfo(const char * server_name /* [in] */,
                                    const char * group_name /* [in] */,
                                    uint32_t level /* [in] */,
-                                   uint8_t *buf /* [in] [ref] */,
+                                   uint8_t *buffer /* [in] [ref] */,
                                    uint32_t *parm_err /* [out] [ref] */)
 {
        struct NetLocalGroupSetInfo r;
@@ -1258,7 +1258,7 @@ NET_API_STATUS NetLocalGroupSetInfo(const char * server_name /* [in] */,
        r.in.server_name = server_name;
        r.in.group_name = group_name;
        r.in.level = level;
-       r.in.buf = buf;
+       r.in.buffer = buffer;
 
        /* Out parameters */
        r.out.parm_err = parm_err;
@@ -1340,7 +1340,7 @@ NET_API_STATUS NetLocalGroupEnum(const char * server_name /* [in] */,
 ****************************************************************/
 
 NET_API_STATUS NetRemoteTOD(const char * server_name /* [in] */,
-                           uint8_t **buf /* [out] [ref] */)
+                           uint8_t **buffer /* [out] [ref] */)
 {
        struct NetRemoteTOD r;
        struct libnetapi_ctx *ctx = NULL;
@@ -1356,7 +1356,7 @@ NET_API_STATUS NetRemoteTOD(const char * server_name /* [in] */,
        r.in.server_name = server_name;
 
        /* Out parameters */
-       r.out.buf = buf;
+       r.out.buffer = buffer;
 
        if (DEBUGLEVEL >= 10) {
                NDR_PRINT_IN_DEBUG(NetRemoteTOD, &r);
index 774a0ac2694e56388d88e84d1976f048d2673b09..001040096d1183ff743b75aeb654a083cf1e8261 100644 (file)
@@ -138,7 +138,7 @@ WERROR NetQueryDisplayInformation_l(struct libnetapi_ctx *ctx,
                                    struct NetQueryDisplayInformation *r);
 NET_API_STATUS NetGroupAdd(const char * server_name /* [in] */,
                           uint32_t level /* [in] */,
-                          uint8_t *buf /* [in] [ref] */,
+                          uint8_t *buffer /* [in] [ref] */,
                           uint32_t *parm_err /* [out] [ref] */);
 WERROR NetGroupAdd_r(struct libnetapi_ctx *ctx,
                     struct NetGroupAdd *r);
@@ -164,7 +164,7 @@ WERROR NetGroupEnum_l(struct libnetapi_ctx *ctx,
 NET_API_STATUS NetGroupSetInfo(const char * server_name /* [in] */,
                               const char * group_name /* [in] */,
                               uint32_t level /* [in] */,
-                              uint8_t *buf /* [in] [ref] */,
+                              uint8_t *buffer /* [in] [ref] */,
                               uint32_t *parm_err /* [out] [ref] */);
 WERROR NetGroupSetInfo_r(struct libnetapi_ctx *ctx,
                         struct NetGroupSetInfo *r);
@@ -173,7 +173,7 @@ WERROR NetGroupSetInfo_l(struct libnetapi_ctx *ctx,
 NET_API_STATUS NetGroupGetInfo(const char * server_name /* [in] */,
                               const char * group_name /* [in] */,
                               uint32_t level /* [in] */,
-                              uint8_t **buf /* [out] [ref] */);
+                              uint8_t **buffer /* [out] [ref] */);
 WERROR NetGroupGetInfo_r(struct libnetapi_ctx *ctx,
                         struct NetGroupGetInfo *r);
 WERROR NetGroupGetInfo_l(struct libnetapi_ctx *ctx,
@@ -194,7 +194,7 @@ WERROR NetGroupDelUser_l(struct libnetapi_ctx *ctx,
                         struct NetGroupDelUser *r);
 NET_API_STATUS NetLocalGroupAdd(const char * server_name /* [in] */,
                                uint32_t level /* [in] */,
-                               uint8_t *buf /* [in] [ref] */,
+                               uint8_t *buffer /* [in] [ref] */,
                                uint32_t *parm_err /* [out] [ref] */);
 WERROR NetLocalGroupAdd_r(struct libnetapi_ctx *ctx,
                          struct NetLocalGroupAdd *r);
@@ -209,7 +209,7 @@ WERROR NetLocalGroupDel_l(struct libnetapi_ctx *ctx,
 NET_API_STATUS NetLocalGroupGetInfo(const char * server_name /* [in] */,
                                    const char * group_name /* [in] */,
                                    uint32_t level /* [in] */,
-                                   uint8_t **buf /* [out] [ref] */);
+                                   uint8_t **buffer /* [out] [ref] */);
 WERROR NetLocalGroupGetInfo_r(struct libnetapi_ctx *ctx,
                              struct NetLocalGroupGetInfo *r);
 WERROR NetLocalGroupGetInfo_l(struct libnetapi_ctx *ctx,
@@ -217,7 +217,7 @@ WERROR NetLocalGroupGetInfo_l(struct libnetapi_ctx *ctx,
 NET_API_STATUS NetLocalGroupSetInfo(const char * server_name /* [in] */,
                                    const char * group_name /* [in] */,
                                    uint32_t level /* [in] */,
-                                   uint8_t *buf /* [in] [ref] */,
+                                   uint8_t *buffer /* [in] [ref] */,
                                    uint32_t *parm_err /* [out] [ref] */);
 WERROR NetLocalGroupSetInfo_r(struct libnetapi_ctx *ctx,
                              struct NetLocalGroupSetInfo *r);
@@ -235,7 +235,7 @@ WERROR NetLocalGroupEnum_r(struct libnetapi_ctx *ctx,
 WERROR NetLocalGroupEnum_l(struct libnetapi_ctx *ctx,
                           struct NetLocalGroupEnum *r);
 NET_API_STATUS NetRemoteTOD(const char * server_name /* [in] */,
-                           uint8_t **buf /* [out] [ref] */);
+                           uint8_t **buffer /* [out] [ref] */);
 WERROR NetRemoteTOD_r(struct libnetapi_ctx *ctx,
                      struct NetRemoteTOD *r);
 WERROR NetRemoteTOD_l(struct libnetapi_ctx *ctx,
index 57067621b7421174a3f6785a70ed22fa1ea226e4..a0a122d74b61551f97b9d275afa264aaf6d280e8 100644 (file)
@@ -138,17 +138,17 @@ WERROR NetLocalGroupAdd_r(struct libnetapi_ctx *ctx,
 
        const char *alias_name = NULL;
 
-       if (!r->in.buf) {
+       if (!r->in.buffer) {
                return WERR_INVALID_PARAM;
        }
 
        switch (r->in.level) {
                case 0:
-                       info0 = (struct LOCALGROUP_INFO_0 *)r->in.buf;
+                       info0 = (struct LOCALGROUP_INFO_0 *)r->in.buffer;
                        alias_name = info0->lgrpi0_name;
                        break;
                case 1:
-                       info1 = (struct LOCALGROUP_INFO_1 *)r->in.buf;
+                       info1 = (struct LOCALGROUP_INFO_1 *)r->in.buffer;
                        alias_name = info1->lgrpi1_name;
                        break;
                default:
@@ -546,7 +546,7 @@ WERROR NetLocalGroupGetInfo_r(struct libnetapi_ctx *ctx,
                                        r->in.group_name,
                                        &alias_info->all,
                                        r->in.level, &entries_read,
-                                       r->out.buf);
+                                       r->out.buffer);
 
  done:
        if (!cli) {
@@ -713,7 +713,7 @@ WERROR NetLocalGroupSetInfo_r(struct libnetapi_ctx *ctx,
 
  set_alias:
 
-       werr = map_buffer_to_alias_info(ctx, r->in.level, r->in.buf,
+       werr = map_buffer_to_alias_info(ctx, r->in.level, r->in.buffer,
                                        &alias_level, &alias_info);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
index a591d3753abd63c4e32d97d322ffb858d09772f1..622b8d425d2cd694fb46b30ed2d053d1a5c16a8b 100644 (file)
@@ -238,9 +238,9 @@ WERROR NetRemoteTOD_r(struct libnetapi_ctx *ctx,
                goto done;
        }
 
-       *r->out.buf = (uint8_t *)talloc_memdup(ctx, info,
-                       sizeof(struct srvsvc_NetRemoteTODInfo));
-       W_ERROR_HAVE_NO_MEMORY(*r->out.buf);
+       *r->out.buffer = (uint8_t *)talloc_memdup(ctx, info,
+                         sizeof(struct srvsvc_NetRemoteTODInfo));
+       W_ERROR_HAVE_NO_MEMORY(*r->out.buffer);
 
  done:
        return werr;