#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "librpc/gen_ndr/ndr_security.h"
+#include "param/param.h"
/* local macros to make the code more readable */
#define FINFO_CHECK_MIN_SIZE(size) if (blob->length < (size)) { \
if (nlen > blob.length - (ofs + 24)) {
return NT_STATUS_INFO_LENGTH_MISMATCH;
}
- size = convert_string_talloc(io->streams, CH_UTF16, CH_UNIX,
+ size = convert_string_talloc(io->streams,
+ lp_iconv_convenience(global_loadparm),
+ CH_UTF16, CH_UNIX,
blob.data+ofs+24, nlen, &vstr);
if (size == -1) {
return NT_STATUS_ILLEGAL_CHARACTER;
return NT_STATUS_OK;
case RAW_FILEINFO_SEC_DESC: {
- NTSTATUS status;
+ enum ndr_err_code ndr_err;
parms->query_secdesc.out.sd = talloc(mem_ctx, struct security_descriptor);
NT_STATUS_HAVE_NO_MEMORY(parms->query_secdesc.out.sd);
- status = ndr_pull_struct_blob(blob, mem_ctx,
- parms->query_secdesc.out.sd,
- (ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
- NT_STATUS_NOT_OK_RETURN(status);
+ ndr_err = ndr_pull_struct_blob(blob, mem_ctx, NULL,
+ parms->query_secdesc.out.sd,
+ (ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ return ndr_map_error2ntstatus(ndr_err);
+ }
return NT_STATUS_OK;
}