summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/idl/drsuapi.idl2
-rw-r--r--source4/librpc/idl/unixinfo.idl8
-rw-r--r--source4/librpc/idl/xattr.idl6
-rw-r--r--source4/librpc/ndr/ndr_string.c7
4 files changed, 15 insertions, 8 deletions
diff --git a/source4/librpc/idl/drsuapi.idl b/source4/librpc/idl/drsuapi.idl
index f900af9ce2..9711674581 100644
--- a/source4/librpc/idl/drsuapi.idl
+++ b/source4/librpc/idl/drsuapi.idl
@@ -430,7 +430,7 @@ interface drsuapi
/* UnicodeString values */
typedef struct {
[range(0,10485760)] uint32 length;
- [subcontext(4)] nstring *string;
+ [size_is(length),charset(UTF16)] uint16 *string;
} drsuapi_DsAttributeValueUnicodeString;
typedef struct {
diff --git a/source4/librpc/idl/unixinfo.idl b/source4/librpc/idl/unixinfo.idl
index e740368875..ac75430532 100644
--- a/source4/librpc/idl/unixinfo.idl
+++ b/source4/librpc/idl/unixinfo.idl
@@ -40,10 +40,10 @@
[out] dom_sid *sid
);
- typedef struct {
- NTSTATUS status;
- utf8string homedir;
- utf8string shell;
+ typedef struct {
+ NTSTATUS status;
+ [string,charset(UTF8)] uint8 *homedir;
+ [string,charset(UTF8)] uint8 *shell;
} unixinfo_GetPWUidInfo;
/******************/
diff --git a/source4/librpc/idl/xattr.idl b/source4/librpc/idl/xattr.idl
index 48d0c76183..4cb1f75393 100644
--- a/source4/librpc/idl/xattr.idl
+++ b/source4/librpc/idl/xattr.idl
@@ -41,7 +41,7 @@ interface xattr
NTTIME create_time;
NTTIME change_time;
NTTIME write_time; /* only used when sticky write time is set */
- utf8string name; /* will be used for case-insensitive speedup */
+ [string,charset(UTF8)] uint8 *name; /* will be used for case-insensitive speedup */
} xattr_DosInfo2;
typedef [switch_type(uint16)] union {
@@ -59,7 +59,7 @@ interface xattr
const char *XATTR_DOSEAS_NAME = "user.DosEAs";
typedef struct {
- utf8string name;
+ [string,charset(UTF8)] uint8 *name;
DATA_BLOB value;
} xattr_EA;
@@ -85,7 +85,7 @@ interface xattr
uint32 flags;
udlong size;
udlong alloc_size;
- utf8string name;
+ [charset(UTF8),string] uint8 name[];
} xattr_DosStream;
typedef [public] struct {
diff --git a/source4/librpc/ndr/ndr_string.c b/source4/librpc/ndr/ndr_string.c
index ce035be5dc..684bc047c0 100644
--- a/source4/librpc/ndr/ndr_string.c
+++ b/source4/librpc/ndr/ndr_string.c
@@ -675,3 +675,10 @@ NTSTATUS ndr_push_charset(struct ndr_push *ndr, int ndr_flags, const char *var,
return NT_STATUS_OK;
}
+
+/* Return number of elements in a string in the specified charset */
+uint32_t ndr_charset_length(const void *var, int chset)
+{
+ /* FIXME: Treat special chars special here, taking chset into account */
+ return strlen(var);
+}