svn commit: samba r19848 - in branches/SAMBA_3_0/source/librpc:
gen_ndr idl
jelmer at samba.org
jelmer at samba.org
Wed Nov 22 18:57:07 GMT 2006
Author: jelmer
Date: 2006-11-22 18:57:07 +0000 (Wed, 22 Nov 2006)
New Revision: 19848
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19848
Log:
Sync with Samba4 - no top-level unique pointers.
Modified:
branches/SAMBA_3_0/source/librpc/gen_ndr/cli_unixinfo.c
branches/SAMBA_3_0/source/librpc/gen_ndr/cli_unixinfo.h
branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_unixinfo.c
branches/SAMBA_3_0/source/librpc/gen_ndr/unixinfo.h
branches/SAMBA_3_0/source/librpc/idl/unixinfo.idl
Changeset:
Modified: branches/SAMBA_3_0/source/librpc/gen_ndr/cli_unixinfo.c
===================================================================
--- branches/SAMBA_3_0/source/librpc/gen_ndr/cli_unixinfo.c 2006-11-22 18:40:27 UTC (rev 19847)
+++ branches/SAMBA_3_0/source/librpc/gen_ndr/cli_unixinfo.c 2006-11-22 18:57:07 UTC (rev 19848)
@@ -37,7 +37,7 @@
return r.out.result;
}
-NTSTATUS rpccli_unixinfo_UidToSid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint64_t uid, struct dom_sid **sid)
+NTSTATUS rpccli_unixinfo_UidToSid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint64_t uid, struct dom_sid *sid)
{
struct unixinfo_UidToSid r;
NTSTATUS status;
@@ -62,7 +62,7 @@
}
/* Return variables */
- *sid = r.out.sid;
+ *sid = *r.out.sid;
/* Return result */
return r.out.result;
@@ -99,7 +99,7 @@
return r.out.result;
}
-NTSTATUS rpccli_unixinfo_GidToSid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint64_t gid, struct dom_sid **sid)
+NTSTATUS rpccli_unixinfo_GidToSid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint64_t gid, struct dom_sid *sid)
{
struct unixinfo_GidToSid r;
NTSTATUS status;
@@ -124,7 +124,7 @@
}
/* Return variables */
- *sid = r.out.sid;
+ *sid = *r.out.sid;
/* Return result */
return r.out.result;
Modified: branches/SAMBA_3_0/source/librpc/gen_ndr/cli_unixinfo.h
===================================================================
--- branches/SAMBA_3_0/source/librpc/gen_ndr/cli_unixinfo.h 2006-11-22 18:40:27 UTC (rev 19847)
+++ branches/SAMBA_3_0/source/librpc/gen_ndr/cli_unixinfo.h 2006-11-22 18:57:07 UTC (rev 19848)
@@ -2,8 +2,8 @@
#ifndef __CLI_UNIXINFO__
#define __CLI_UNIXINFO__
NTSTATUS rpccli_unixinfo_SidToUid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct dom_sid sid, uint64_t *uid);
-NTSTATUS rpccli_unixinfo_UidToSid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint64_t uid, struct dom_sid **sid);
+NTSTATUS rpccli_unixinfo_UidToSid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint64_t uid, struct dom_sid *sid);
NTSTATUS rpccli_unixinfo_SidToGid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct dom_sid sid, uint64_t *gid);
-NTSTATUS rpccli_unixinfo_GidToSid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint64_t gid, struct dom_sid **sid);
+NTSTATUS rpccli_unixinfo_GidToSid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint64_t gid, struct dom_sid *sid);
NTSTATUS rpccli_unixinfo_GetPWUid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t *count, uint64_t *uids, struct unixinfo_GetPWUidInfo **infos);
#endif /* __CLI_UNIXINFO__ */
Modified: branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_unixinfo.c
===================================================================
--- branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_unixinfo.c 2006-11-22 18:40:27 UTC (rev 19847)
+++ branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_unixinfo.c 2006-11-22 18:57:07 UTC (rev 19848)
@@ -128,10 +128,8 @@
NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.uid));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.sid));
- if (r->out.sid) {
- NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
- }
+ if (r->out.sid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NT_STATUS_OK;
@@ -139,26 +137,22 @@
NTSTATUS ndr_pull_unixinfo_UidToSid(struct ndr_pull *ndr, int flags, struct unixinfo_UidToSid *r)
{
- uint32_t _ptr_sid;
TALLOC_CTX *_mem_save_sid_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.uid));
+ NDR_PULL_ALLOC(ndr, r->out.sid);
+ ZERO_STRUCTP(r->out.sid);
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
- if (_ptr_sid) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.sid);
- } else {
- r->out.sid = NULL;
}
- if (r->out.sid) {
- _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, 0);
- NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
- }
+ _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
return NT_STATUS_OK;
@@ -182,9 +176,7 @@
ndr->depth++;
ndr_print_ptr(ndr, "sid", r->out.sid);
ndr->depth++;
- if (r->out.sid) {
- ndr_print_dom_sid(ndr, "sid", r->out.sid);
- }
+ ndr_print_dom_sid(ndr, "sid", r->out.sid);
ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
@@ -260,10 +252,8 @@
NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.gid));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.sid));
- if (r->out.sid) {
- NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
- }
+ if (r->out.sid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NT_STATUS_OK;
@@ -271,26 +261,22 @@
NTSTATUS ndr_pull_unixinfo_GidToSid(struct ndr_pull *ndr, int flags, struct unixinfo_GidToSid *r)
{
- uint32_t _ptr_sid;
TALLOC_CTX *_mem_save_sid_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.gid));
+ NDR_PULL_ALLOC(ndr, r->out.sid);
+ ZERO_STRUCTP(r->out.sid);
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
- if (_ptr_sid) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.sid);
- } else {
- r->out.sid = NULL;
}
- if (r->out.sid) {
- _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, 0);
- NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
- }
+ _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
return NT_STATUS_OK;
@@ -314,9 +300,7 @@
ndr->depth++;
ndr_print_ptr(ndr, "sid", r->out.sid);
ndr->depth++;
- if (r->out.sid) {
- ndr_print_dom_sid(ndr, "sid", r->out.sid);
- }
+ ndr_print_dom_sid(ndr, "sid", r->out.sid);
ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
Modified: branches/SAMBA_3_0/source/librpc/gen_ndr/unixinfo.h
===================================================================
--- branches/SAMBA_3_0/source/librpc/gen_ndr/unixinfo.h 2006-11-22 18:40:27 UTC (rev 19847)
+++ branches/SAMBA_3_0/source/librpc/gen_ndr/unixinfo.h 2006-11-22 18:57:07 UTC (rev 19848)
@@ -30,7 +30,7 @@
} in;
struct {
- struct dom_sid *sid;/* [unique] */
+ struct dom_sid *sid;/* [ref] */
NTSTATUS result;
} out;
@@ -56,7 +56,7 @@
} in;
struct {
- struct dom_sid *sid;/* [unique] */
+ struct dom_sid *sid;/* [ref] */
NTSTATUS result;
} out;
Modified: branches/SAMBA_3_0/source/librpc/idl/unixinfo.idl
===================================================================
--- branches/SAMBA_3_0/source/librpc/idl/unixinfo.idl 2006-11-22 18:40:27 UTC (rev 19847)
+++ branches/SAMBA_3_0/source/librpc/idl/unixinfo.idl 2006-11-22 18:57:07 UTC (rev 19848)
@@ -16,14 +16,14 @@
/* Function: 0x00 */
NTSTATUS unixinfo_SidToUid (
[in] dom_sid sid,
- [out,ref] hyper *uid
+ [out] hyper *uid
);
/******************/
/* Function: 0x01 */
NTSTATUS unixinfo_UidToSid (
[in] hyper uid,
- [out,unique] dom_sid *sid
+ [out] dom_sid *sid
);
/******************/
@@ -37,7 +37,7 @@
/* Function: 0x03 */
NTSTATUS unixinfo_GidToSid (
[in] hyper gid,
- [out,unique] dom_sid *sid
+ [out] dom_sid *sid
);
typedef struct {
More information about the samba-cvs
mailing list