diff options
Diffstat (limited to 'source4/librpc')
-rw-r--r-- | source4/librpc/config.mk | 68 | ||||
-rw-r--r-- | source4/librpc/idl/unixinfo.idl | 4 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc.c | 8 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc_util.c | 3 |
4 files changed, 53 insertions, 30 deletions
diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk index 2fdef41b2a..7abc693960 100644 --- a/source4/librpc/config.mk +++ b/source4/librpc/config.mk @@ -4,8 +4,7 @@ VERSION = 0.0.1 SO_VERSION = 0 PC_FILE = ndr.pc -PUBLIC_HEADERS = ndr/libndr.h -PUBLIC_PROTO_HEADER = ndr/libndr_proto.h +PRIVATE_PROTO_HEADER = ndr/libndr_proto.h OBJ_FILES = \ ndr/ndr.o \ ndr/ndr_basic.o \ @@ -16,6 +15,8 @@ PUBLIC_DEPENDENCIES = LIBSAMBA-ERRORS LIBTALLOC LIBSAMBA-UTIL CHARSET EXT_NSL \ # End SUBSYSTEM LIBNDR ################################################ +PUBLIC_HEADERS += librpc/ndr/libndr.h + ################################# # Start BINARY ndrdump [BINARY::ndrdump] @@ -29,11 +30,12 @@ PRIVATE_DEPENDENCIES = \ POPT_SAMBA \ NDR_TABLE \ LIBSAMBA-ERRORS -MANPAGE = tools/ndrdump.1 # FIXME: ndrdump shouldn't have to depend on RPC... # End BINARY ndrdump ################################# +MANPAGES += librpc/tools/ndrdump.1 + ################################################ # Start SUBSYSTEM NDR_COMPRESSION [SUBSYSTEM::NDR_COMPRESSION] @@ -46,9 +48,10 @@ PUBLIC_DEPENDENCIES = LIBCOMPRESSION LIBSAMBA-ERRORS LIBNDR [SUBSYSTEM::NDR_SECURITY] OBJ_FILES = gen_ndr/ndr_security.o ndr/ndr_sec_helper.o -PUBLIC_HEADERS = gen_ndr/security.h PUBLIC_DEPENDENCIES = NDR_MISC LIBSECURITY +PUBLIC_HEADERS += librpc/gen_ndr/security.h + [SUBSYSTEM::NDR_AUDIOSRV] OBJ_FILES = gen_ndr/ndr_audiosrv.o PUBLIC_DEPENDENCIES = LIBNDR @@ -79,18 +82,20 @@ PUBLIC_DEPENDENCIES = LIBNDR NDR_SECURITY [SUBSYSTEM::NDR_MISC] OBJ_FILES = gen_ndr/ndr_misc.o ndr/ndr_misc.o -PUBLIC_HEADERS = gen_ndr/misc.h gen_ndr/ndr_misc.h PUBLIC_DEPENDENCIES = LIBNDR +PUBLIC_HEADERS += librpc/gen_ndr/misc.h librpc/gen_ndr/ndr_misc.h + [SUBSYSTEM::NDR_ROT] OBJ_FILES = gen_ndr/ndr_rot.o PUBLIC_DEPENDENCIES = LIBNDR NDR_ORPC [SUBSYSTEM::NDR_LSA] OBJ_FILES = gen_ndr/ndr_lsa.o -PUBLIC_HEADERS = gen_ndr/lsa.h PUBLIC_DEPENDENCIES = LIBNDR NDR_SECURITY +PUBLIC_HEADERS += librpc/gen_ndr/lsa.h + [SUBSYSTEM::NDR_DFS] OBJ_FILES = gen_ndr/ndr_dfs.o PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC @@ -125,9 +130,10 @@ PUBLIC_DEPENDENCIES = LIBNDR NDR_SECURITY [SUBSYSTEM::NDR_SAMR] OBJ_FILES = gen_ndr/ndr_samr.o -PUBLIC_HEADERS = gen_ndr/samr.h gen_ndr/ndr_samr.h gen_ndr/ndr_samr_c.h PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC NDR_LSA NDR_SECURITY +PUBLIC_HEADERS += $(addprefix librpc/, gen_ndr/samr.h gen_ndr/ndr_samr.h gen_ndr/ndr_samr_c.h) + [SUBSYSTEM::NDR_NFS4ACL] OBJ_FILES = gen_ndr/ndr_nfs4acl.o PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC NDR_SECURITY @@ -150,14 +156,16 @@ PUBLIC_DEPENDENCIES = LIBNDR NDR_SVCCTL NDR_SECURITY [SUBSYSTEM::NDR_SVCCTL] OBJ_FILES = gen_ndr/ndr_svcctl.o -PUBLIC_HEADERS = gen_ndr/ndr_svcctl.h gen_ndr/svcctl.h PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC +PUBLIC_HEADERS += $(addprefix librpc/, gen_ndr/ndr_svcctl.h gen_ndr/svcctl.h) + [SUBSYSTEM::NDR_ATSVC] OBJ_FILES = gen_ndr/ndr_atsvc.o -PUBLIC_HEADERS = gen_ndr/atsvc.h gen_ndr/ndr_atsvc.h PUBLIC_DEPENDENCIES = LIBNDR +PUBLIC_HEADERS += $(addprefix librpc/, gen_ndr/atsvc.h gen_ndr/ndr_atsvc.h) + [SUBSYSTEM::NDR_EVENTLOG] OBJ_FILES = gen_ndr/ndr_eventlog.o PUBLIC_DEPENDENCIES = LIBNDR NDR_LSA @@ -232,9 +240,10 @@ PUBLIC_DEPENDENCIES = LIBNDR [SUBSYSTEM::NDR_NETLOGON] OBJ_FILES = gen_ndr/ndr_netlogon.o -PUBLIC_HEADERS = gen_ndr/netlogon.h PUBLIC_DEPENDENCIES = LIBNDR NDR_SAMR NDR_LSA NDR_SECURITY +PUBLIC_HEADERS += $(addprefix librpc/, gen_ndr/netlogon.h) + [SUBSYSTEM::NDR_TRKWKS] OBJ_FILES = gen_ndr/ndr_trkwks.o PUBLIC_DEPENDENCIES = LIBNDR @@ -265,24 +274,32 @@ PUBLIC_DEPENDENCIES = LIBNDR NDR_NBT [SUBSYSTEM::NDR_NBT] OBJ_FILES = gen_ndr/ndr_nbt.o -PUBLIC_HEADERS = gen_ndr/nbt.h PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC NDR_NBT_BUF NDR_SVCCTL NDR_SECURITY +PUBLIC_HEADERS += librpc/gen_ndr/nbt.h + [SUBSYSTEM::NDR_WINSREPL] OBJ_FILES = gen_ndr/ndr_winsrepl.o PUBLIC_DEPENDENCIES = LIBNDR NDR_NBT [SUBSYSTEM::NDR_WINBIND] OBJ_FILES = gen_ndr/ndr_winbind.o -PUBLIC_HEADERS = gen_ndr/winbind.h PUBLIC_DEPENDENCIES = LIBNDR NDR_NETLOGON -mkinclude ../heimdal_build/perl_path_wrapper.sh ../librpc/idl-deps.pl librpc/idl/*.idl| +PUBLIC_HEADERS += librpc/gen_ndr/winbind.h + +librpc/idl-deps: + ./librpc/idl-deps.pl librpc/idl/*.idl >$@ + +clean:: + rm -f librpc/idl-deps + +include librpc/idl-deps librpc/gen_ndr/tables.c: $(IDL_NDR_PARSE_H_FILES) - @echo Generating librpc/gen_ndr/tables.c - @$(PERL) $(srcdir)/librpc/tables.pl --output=librpc/gen_ndr/tables.c $(IDL_NDR_PARSE_H_FILES) > librpc/gen_ndr/tables.x - mv librpc/gen_ndr/tables.x librpc/gen_ndr/tables.c + @echo Generating $@ + @$(PERL) $(srcdir)/librpc/tables.pl --output=$@ $^ > librpc/gen_ndr/tables.x + @mv librpc/gen_ndr/tables.x $@ [SUBSYSTEM::NDR_TABLE] OBJ_FILES = ndr/ndr_table.o gen_ndr/tables.o @@ -364,14 +381,16 @@ PUBLIC_DEPENDENCIES = dcerpc NDR_SRVSVC [SUBSYSTEM::RPC_NDR_SVCCTL] OBJ_FILES = gen_ndr/ndr_svcctl_c.o -PUBLIC_HEADERS = gen_ndr/ndr_svcctl_c.h PUBLIC_DEPENDENCIES = dcerpc NDR_SVCCTL +PUBLIC_HEADERS += librpc/gen_ndr/ndr_svcctl_c.h + [SUBSYSTEM::dcerpc_atsvc] OBJ_FILES = gen_ndr/ndr_atsvc_c.o -PUBLIC_HEADERS = gen_ndr/ndr_atsvc_c.h PUBLIC_DEPENDENCIES = dcerpc NDR_ATSVC +PUBLIC_HEADERS += librpc/gen_ndr/ndr_atsvc_c.h + [SUBSYSTEM::RPC_NDR_EVENTLOG] OBJ_FILES = gen_ndr/ndr_eventlog_c.o PUBLIC_DEPENDENCIES = dcerpc NDR_EVENTLOG @@ -451,7 +470,8 @@ PUBLIC_DEPENDENCIES = dcerpc NDR_KEYSVC [SUBSYSTEM::NDR_DCERPC] OBJ_FILES = gen_ndr/ndr_dcerpc.o PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC -PUBLIC_HEADERS = gen_ndr/dcerpc.h gen_ndr/ndr_dcerpc.h + +PUBLIC_HEADERS += $(addprefix librpc/, gen_ndr/dcerpc.h gen_ndr/ndr_dcerpc.h) ################################################ # Start SUBSYSTEM dcerpc @@ -459,10 +479,7 @@ PUBLIC_HEADERS = gen_ndr/dcerpc.h gen_ndr/ndr_dcerpc.h VERSION = 0.0.1 SO_VERSION = 0 PC_FILE = dcerpc.pc -PUBLIC_HEADERS = rpc/dcerpc.h \ - gen_ndr/mgmt.h gen_ndr/ndr_mgmt.h gen_ndr/ndr_mgmt_c.h \ - gen_ndr/epmapper.h gen_ndr/ndr_epmapper.h gen_ndr/ndr_epmapper_c.h -PUBLIC_PROTO_HEADER = rpc/dcerpc_proto.h +PRIVATE_PROTO_HEADER = rpc/dcerpc_proto.h OBJ_FILES = \ rpc/dcerpc.o \ rpc/dcerpc_auth.o \ @@ -484,6 +501,11 @@ PUBLIC_DEPENDENCIES = CREDENTIALS # End SUBSYSTEM dcerpc ################################################ +PUBLIC_HEADERS += $(addprefix librpc/, rpc/dcerpc.h \ + gen_ndr/mgmt.h gen_ndr/ndr_mgmt.h gen_ndr/ndr_mgmt_c.h \ + gen_ndr/epmapper.h gen_ndr/ndr_epmapper.h gen_ndr/ndr_epmapper_c.h) + + [MODULE::RPC_EJS_ECHO] INIT_FUNCTION = ejs_init_rpcecho OBJ_FILES = gen_ndr/ndr_echo_ejs.o diff --git a/source4/librpc/idl/unixinfo.idl b/source4/librpc/idl/unixinfo.idl index 48bc565fff..6929e86e61 100644 --- a/source4/librpc/idl/unixinfo.idl +++ b/source4/librpc/idl/unixinfo.idl @@ -42,8 +42,8 @@ import "security.idl"; typedef struct { NTSTATUS status; - utf8string homedir; - utf8string shell; + [charset(UTF8),string] uint8 homedir[]; + [charset(UTF8),string] uint8 shell[]; } unixinfo_GetPWUidInfo; /******************/ diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index b19a5d7160..a379398f19 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -351,7 +351,7 @@ static NTSTATUS ncacn_push_request_sign(struct dcerpc_connection *c, /* non-signed packets are simpler */ if (!c->security_state.auth_info || !c->security_state.generic_state) { - return ncacn_push_auth(blob, mem_ctx, pkt, c->security_state.auth_info); + return ncacn_push_auth(blob, mem_ctx, c->iconv_convenience, pkt, c->security_state.auth_info); } ndr = ndr_push_init_ctx(mem_ctx, c->iconv_convenience); @@ -750,7 +750,7 @@ struct composite_context *dcerpc_bind_send(struct dcerpc_pipe *p, pkt.u.bind.auth_info = data_blob(NULL, 0); /* construct the NDR form of the packet */ - c->status = ncacn_push_auth(&blob, c, &pkt, + c->status = ncacn_push_auth(&blob, c, p->conn->iconv_convenience, &pkt, p->conn->security_state.auth_info); if (!composite_is_ok(c)) return c; @@ -813,7 +813,7 @@ NTSTATUS dcerpc_auth3(struct dcerpc_connection *c, pkt.u.auth3.auth_info = data_blob(NULL, 0); /* construct the NDR form of the packet */ - status = ncacn_push_auth(&blob, mem_ctx, &pkt, c->security_state.auth_info); + status = ncacn_push_auth(&blob, mem_ctx, c->iconv_convenience, &pkt, c->security_state.auth_info); if (!NT_STATUS_IS_OK(status)) { return status; } @@ -1646,7 +1646,7 @@ struct composite_context *dcerpc_alter_context_send(struct dcerpc_pipe *p, pkt.u.alter.auth_info = data_blob(NULL, 0); /* construct the NDR form of the packet */ - c->status = ncacn_push_auth(&blob, mem_ctx, &pkt, + c->status = ncacn_push_auth(&blob, mem_ctx, p->conn->iconv_convenience, &pkt, p->conn->security_state.auth_info); if (!composite_is_ok(c)) return c; diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c index 4e5d049d66..b8128baf43 100644 --- a/source4/librpc/rpc/dcerpc_util.c +++ b/source4/librpc/rpc/dcerpc_util.c @@ -50,13 +50,14 @@ const struct ndr_interface_call *dcerpc_iface_find_call(const struct ndr_interfa push a ncacn_packet into a blob, potentially with auth info */ NTSTATUS ncacn_push_auth(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, + struct smb_iconv_convenience *iconv_convenience, struct ncacn_packet *pkt, struct dcerpc_auth *auth_info) { struct ndr_push *ndr; enum ndr_err_code ndr_err; - ndr = ndr_push_init_ctx(mem_ctx, lp_iconv_convenience(global_loadparm)); + ndr = ndr_push_init_ctx(mem_ctx, iconv_convenience); if (!ndr) { return NT_STATUS_NO_MEMORY; } |