138
Sources/libsmbclient.xcframework/Info.plist
Normal file
138
Sources/libsmbclient.xcframework/Info.plist
Normal file
@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libsmbclient.framework/libsmbclient</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>xros-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libsmbclient.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>xros</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libsmbclient.framework/libsmbclient</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libsmbclient.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libsmbclient.framework/libsmbclient</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>macos-arm64_x86_64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libsmbclient.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>macos</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libsmbclient.framework/libsmbclient</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>tvos-arm64_arm64e</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libsmbclient.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>arm64e</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>tvos</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libsmbclient.framework/libsmbclient</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>tvos-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libsmbclient.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>tvos</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libsmbclient.framework/libsmbclient</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-maccatalyst</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libsmbclient.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>maccatalyst</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libsmbclient.framework/libsmbclient</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libsmbclient.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libsmbclient.framework/libsmbclient</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>xros-arm64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libsmbclient.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>xros</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1,269 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
charset defines
|
||||
Copyright (C) Andrew Tridgell 2001
|
||||
Copyright (C) Jelmer Vernooij 2002
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* This is a public header file that is installed as part of Samba.
|
||||
* If you remove any functions or change their signature, update
|
||||
* the so version number. */
|
||||
|
||||
#ifndef __CHARSET_H__
|
||||
#define __CHARSET_H__
|
||||
|
||||
#include <talloc.h>
|
||||
|
||||
/* this defines the charset types used in samba */
|
||||
typedef enum {CH_UTF16LE=0, CH_UTF16=0, CH_UNIX, CH_DOS, CH_UTF8, CH_UTF16BE, CH_UTF16MUNGED} charset_t;
|
||||
|
||||
#define NUM_CHARSETS 7
|
||||
|
||||
/*
|
||||
* SMB UCS2 (16-bit unicode) internal type.
|
||||
* smb_ucs2_t is *always* in little endian format.
|
||||
*/
|
||||
|
||||
typedef uint16_t smb_ucs2_t;
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#define UCS2_SHIFT 8
|
||||
#else
|
||||
#define UCS2_SHIFT 0
|
||||
#endif
|
||||
|
||||
/* turn a 7 bit character into a ucs2 character */
|
||||
#define UCS2_CHAR(c) ((c) << UCS2_SHIFT)
|
||||
|
||||
/*
|
||||
* for each charset we have a function that pulls from that charset to
|
||||
* a ucs2 buffer, and a function that pushes to a ucs2 buffer
|
||||
* */
|
||||
|
||||
struct charset_functions {
|
||||
const char *name;
|
||||
size_t (*pull)(void *, const char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft);
|
||||
size_t (*push)(void *, const char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft);
|
||||
bool samba_internal_charset;
|
||||
};
|
||||
|
||||
/* this type is used for manipulating unicode codepoints */
|
||||
typedef uint32_t codepoint_t;
|
||||
|
||||
#define INVALID_CODEPOINT ((codepoint_t)-1)
|
||||
|
||||
/* generic iconv conversion structure */
|
||||
typedef struct smb_iconv_s {
|
||||
size_t (*direct)(void *cd, const char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft);
|
||||
size_t (*pull)(void *cd, const char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft);
|
||||
size_t (*push)(void *cd, const char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft);
|
||||
void *cd_direct, *cd_pull, *cd_push;
|
||||
char *from_name, *to_name;
|
||||
} *smb_iconv_t;
|
||||
|
||||
/* string manipulation flags */
|
||||
#define STR_TERMINATE 1
|
||||
#define STR_UPPER 2
|
||||
#define STR_ASCII 4
|
||||
#define STR_UNICODE 8
|
||||
#define STR_NOALIGN 16
|
||||
#define STR_NO_RANGE_CHECK 32
|
||||
#define STR_LEN8BIT 64
|
||||
#define STR_TERMINATE_ASCII 128 /* only terminate if ascii */
|
||||
#define STR_LEN_NOTERM 256 /* the length field is the unterminated length */
|
||||
|
||||
struct loadparm_context;
|
||||
struct smb_iconv_handle;
|
||||
|
||||
size_t ucs2_align(const void *base_ptr, const void *p, int flags);
|
||||
|
||||
/**
|
||||
return the number of bytes occupied by a buffer in CH_UTF16 format
|
||||
the result includes the null termination
|
||||
**/
|
||||
size_t utf16_len(const void *buf);
|
||||
|
||||
/**
|
||||
return the number of bytes occupied by a buffer in CH_UTF16 format
|
||||
the result includes the null termination
|
||||
limited by 'n' bytes
|
||||
**/
|
||||
size_t utf16_len_n(const void *src, size_t n);
|
||||
|
||||
char *strchr_m(const char *s, char c);
|
||||
/**
|
||||
* Calculate the number of units (8 or 16-bit, depending on the
|
||||
* destination charset), that would be needed to convert the input
|
||||
* string which is expected to be in in src_charset encoding to the
|
||||
* destination charset (which should be a unicode charset).
|
||||
*/
|
||||
size_t strlen_m_ext_handle(struct smb_iconv_handle *ic,
|
||||
const char *s, charset_t src_charset, charset_t dst_charset);
|
||||
size_t strlen_m_ext(const char *s, charset_t src_charset, charset_t dst_charset);
|
||||
size_t strlen_m_ext_term(const char *s, charset_t src_charset,
|
||||
charset_t dst_charset);
|
||||
size_t strlen_m_ext_term_null(const char *s,
|
||||
charset_t src_charset,
|
||||
charset_t dst_charset);
|
||||
size_t strlen_m(const char *s);
|
||||
size_t strlen_m_term(const char *s);
|
||||
size_t strlen_m_term_null(const char *s);
|
||||
char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength);
|
||||
char *talloc_alpha_strcpy(TALLOC_CTX *mem_ctx,
|
||||
const char *src,
|
||||
const char *other_safe_chars);
|
||||
void string_replace_m(char *s, char oldc, char newc);
|
||||
bool strcsequal(const char *s1,const char *s2);
|
||||
bool strequal_m(const char *s1, const char *s2);
|
||||
int strncasecmp_m(const char *s1, const char *s2, size_t n);
|
||||
int strncasecmp_m_handle(struct smb_iconv_handle *iconv_handle,
|
||||
const char *s1, const char *s2, size_t n);
|
||||
bool next_token(const char **ptr,char *buff, const char *sep, size_t bufsize);
|
||||
int strcasecmp_m_handle(struct smb_iconv_handle *iconv_handle,
|
||||
const char *s1, const char *s2);
|
||||
int strcasecmp_m(const char *s1, const char *s2);
|
||||
size_t count_chars_m(const char *s, char c);
|
||||
char *strupper_talloc(TALLOC_CTX *ctx, const char *src);
|
||||
char *talloc_strdup_upper(TALLOC_CTX *ctx, const char *src);
|
||||
char *strupper_talloc_n_handle(struct smb_iconv_handle *iconv_handle,
|
||||
TALLOC_CTX *ctx, const char *src, size_t n);
|
||||
char *strupper_talloc_n(TALLOC_CTX *ctx, const char *src, size_t n);
|
||||
char *strlower_talloc_handle(struct smb_iconv_handle *iconv_handle,
|
||||
TALLOC_CTX *ctx, const char *src);
|
||||
char *strlower_talloc(TALLOC_CTX *ctx, const char *src);
|
||||
bool strhasupper(const char *string);
|
||||
bool strhaslower_handle(struct smb_iconv_handle *ic,
|
||||
const char *string);
|
||||
bool strhaslower(const char *string);
|
||||
bool strhasupper_handle(struct smb_iconv_handle *ic,
|
||||
const char *string);
|
||||
char *strrchr_m(const char *s, char c);
|
||||
char *strchr_m(const char *s, char c);
|
||||
char *strstr_m(const char *src, const char *findstr);
|
||||
|
||||
bool push_ascii_talloc(TALLOC_CTX *ctx, char **dest, const char *src, size_t *converted_size);
|
||||
bool push_ucs2_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src, size_t *converted_size);
|
||||
bool push_utf8_talloc(TALLOC_CTX *ctx, char **dest, const char *src, size_t *converted_size);
|
||||
bool pull_ascii_talloc(TALLOC_CTX *ctx, char **dest, const char *src, size_t *converted_size);
|
||||
bool pull_ucs2_talloc(TALLOC_CTX *ctx, char **dest, const smb_ucs2_t *src, size_t *converted_size);
|
||||
bool pull_utf8_talloc(TALLOC_CTX *ctx, char **dest, const char *src, size_t *converted_size);
|
||||
ssize_t push_string(void *dest, const char *src, size_t dest_len, int flags);
|
||||
ssize_t pull_string(char *dest, const void *src, size_t dest_len, size_t src_len, int flags);
|
||||
|
||||
bool convert_string_talloc(TALLOC_CTX *ctx,
|
||||
charset_t from, charset_t to,
|
||||
void const *src, size_t srclen,
|
||||
void *dest, size_t *converted_size);
|
||||
|
||||
bool convert_string(charset_t from, charset_t to,
|
||||
void const *src, size_t srclen,
|
||||
void *dest, size_t destlen,
|
||||
size_t *converted_size);
|
||||
bool convert_string_error(charset_t from, charset_t to,
|
||||
void const *src, size_t srclen,
|
||||
void *dest, size_t destlen,
|
||||
size_t *converted_size);
|
||||
|
||||
struct smb_iconv_handle *get_iconv_handle(void);
|
||||
struct smb_iconv_handle *get_iconv_testing_handle(TALLOC_CTX *mem_ctx,
|
||||
const char *dos_charset,
|
||||
const char *unix_charset,
|
||||
bool use_builtin_handlers);
|
||||
struct smb_iconv_handle *reinit_iconv_handle(TALLOC_CTX *mem_ctx,
|
||||
const char *dos_charset,
|
||||
const char *unix_charset);
|
||||
void free_iconv_handle(void);
|
||||
|
||||
smb_iconv_t get_conv_handle(struct smb_iconv_handle *ic,
|
||||
charset_t from, charset_t to);
|
||||
const char *charset_name(struct smb_iconv_handle *ic, charset_t ch);
|
||||
|
||||
codepoint_t next_codepoint_ext(const char *str, size_t len,
|
||||
charset_t src_charset, size_t *size);
|
||||
codepoint_t next_codepoint(const char *str, size_t *size);
|
||||
ssize_t push_codepoint(char *str, codepoint_t c);
|
||||
|
||||
/* codepoints */
|
||||
codepoint_t next_codepoint_handle_ext(struct smb_iconv_handle *ic,
|
||||
const char *str, size_t len,
|
||||
charset_t src_charset,
|
||||
size_t *size);
|
||||
codepoint_t next_codepoint_handle(struct smb_iconv_handle *ic,
|
||||
const char *str, size_t *size);
|
||||
ssize_t push_codepoint_handle(struct smb_iconv_handle *ic,
|
||||
char *str, codepoint_t c);
|
||||
|
||||
codepoint_t toupper_m(codepoint_t val);
|
||||
codepoint_t tolower_m(codepoint_t val);
|
||||
bool islower_m(codepoint_t val);
|
||||
bool isupper_m(codepoint_t val);
|
||||
int codepoint_cmpi(codepoint_t c1, codepoint_t c2);
|
||||
|
||||
/* Iconv convenience functions */
|
||||
struct smb_iconv_handle *smb_iconv_handle_reinit(TALLOC_CTX *mem_ctx,
|
||||
const char *dos_charset,
|
||||
const char *unix_charset,
|
||||
bool use_builtin_handlers,
|
||||
struct smb_iconv_handle *old_ic);
|
||||
|
||||
bool convert_string_handle(struct smb_iconv_handle *ic,
|
||||
charset_t from, charset_t to,
|
||||
void const *src, size_t srclen,
|
||||
void *dest, size_t destlen, size_t *converted_size);
|
||||
bool convert_string_error_handle(struct smb_iconv_handle *ic,
|
||||
charset_t from, charset_t to,
|
||||
void const *src, size_t srclen,
|
||||
void *dest, size_t destlen,
|
||||
size_t *converted_size);
|
||||
|
||||
bool convert_string_talloc_handle(TALLOC_CTX *ctx,
|
||||
struct smb_iconv_handle *ic,
|
||||
charset_t from, charset_t to,
|
||||
void const *src, size_t srclen,
|
||||
void *dest, size_t *converted_size);
|
||||
/* iconv */
|
||||
smb_iconv_t smb_iconv_open(const char *tocode, const char *fromcode);
|
||||
int smb_iconv_close(smb_iconv_t cd);
|
||||
size_t smb_iconv(smb_iconv_t cd,
|
||||
const char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft);
|
||||
smb_iconv_t smb_iconv_open_ex(TALLOC_CTX *mem_ctx, const char *tocode,
|
||||
const char *fromcode, bool use_builtin_handlers);
|
||||
|
||||
void smb_init_locale(void);
|
||||
|
||||
/* The following definitions come from util_unistr_w.c */
|
||||
|
||||
size_t strlen_w(const smb_ucs2_t *src);
|
||||
size_t strnlen_w(const smb_ucs2_t *src, size_t max);
|
||||
smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c);
|
||||
smb_ucs2_t *strchr_wa(const smb_ucs2_t *s, char c);
|
||||
smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c);
|
||||
smb_ucs2_t *strnrchr_w(const smb_ucs2_t *s, smb_ucs2_t c, unsigned int n);
|
||||
smb_ucs2_t *strstr_w(const smb_ucs2_t *s, const smb_ucs2_t *ins);
|
||||
bool strlower_w(smb_ucs2_t *s);
|
||||
bool strupper_w(smb_ucs2_t *s);
|
||||
int strcasecmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b);
|
||||
int strncasecmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b, size_t len);
|
||||
int strcmp_wa(const smb_ucs2_t *a, const char *b);
|
||||
smb_ucs2_t toupper_w(smb_ucs2_t v);
|
||||
|
||||
#endif /* __CHARSET_H__ */
|
||||
@ -0,0 +1,176 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
DOS error code constants
|
||||
Copyright (C) Andrew Tridgell 1992-2000
|
||||
Copyright (C) John H Terpstra 1996-2000
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-2000
|
||||
Copyright (C) Paul Ashton 1998-2000
|
||||
Copyright (C) Gerald (Jerry) Carter 2005
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _DOSERR_H
|
||||
#define _DOSERR_H
|
||||
|
||||
/* Error classes */
|
||||
|
||||
#define ERRDOS 0x01 /* Error is from the core DOS operating system set. */
|
||||
#define ERRSRV 0x02 /* Error is generated by the server network file manager.*/
|
||||
#define ERRHRD 0x03 /* Error is an hardware error. */
|
||||
#define ERRCMD 0xFF /* Command was not in the "SMB" format. */
|
||||
|
||||
/* SMB X/Open error codes for the ERRDOS error class */
|
||||
#define ERRsuccess 0 /* No error */
|
||||
#define ERRbadfunc 1 /* Invalid function (or system call) */
|
||||
#define ERRbadfile 2 /* File not found (pathname error) */
|
||||
#define ERRbadpath 3 /* Directory not found */
|
||||
#define ERRnofids 4 /* Too many open files */
|
||||
#define ERRnoaccess 5 /* Access denied */
|
||||
#define ERRbadfid 6 /* Invalid fid */
|
||||
#define ERRbadmcb 7 /* Memory control blocks destroyed. */
|
||||
#define ERRnomem 8 /* Out of memory */
|
||||
#define ERRbadmem 9 /* Invalid memory block address */
|
||||
#define ERRbadenv 10 /* Invalid environment */
|
||||
#define ERRbadformat 11 /* Bad Format */
|
||||
#define ERRbadaccess 12 /* Invalid open mode */
|
||||
#define ERRbaddata 13 /* Invalid data (only from ioctl call) */
|
||||
#define ERRres 14 /* reserved */
|
||||
#define ERRbaddrive 15 /* Invalid drive */
|
||||
#define ERRremcd 16 /* Attempt to delete current directory */
|
||||
#define ERRdiffdevice 17 /* rename/move across different filesystems */
|
||||
#define ERRnofiles 18 /* no more files found in file search */
|
||||
#define ERRgeneral 31 /* General failure */
|
||||
#define ERRbadshare 32 /* Share mode on file conflict with open mode */
|
||||
#define ERRlock 33 /* Lock request conflicts with existing lock */
|
||||
#define ERRunsup 50 /* Request unsupported, returned by Win 95, RJS 20Jun98 */
|
||||
#define ERRnetnamedel 64 /* Network name deleted or not available */
|
||||
#define ERRnosuchshare 67 /* You specified an invalid share name */
|
||||
#define ERRfilexists 80 /* File in operation already exists */
|
||||
#define ERRinvalidparam 87
|
||||
#define ERRcannotopen 110 /* Cannot open the file specified */
|
||||
#define ERRbufferoverflow 111
|
||||
#define ERRinsufficientbuffer 122
|
||||
#define ERRinvalidname 123 /* Invalid name */
|
||||
#define ERRunknownlevel 124
|
||||
#define ERRnotlocked 158 /* This region is not locked by this locking context. */
|
||||
#define ERRinvalidpath 161
|
||||
#define ERRcancelviolation 173
|
||||
#define ERRnoatomiclocks 174
|
||||
#define ERRrename 183
|
||||
#define ERRbadpipe 230 /* Named pipe invalid */
|
||||
#define ERRpipebusy 231 /* All instances of pipe are busy */
|
||||
#define ERRpipeclosing 232 /* named pipe close in progress */
|
||||
#define ERRnotconnected 233 /* No process on other end of named pipe */
|
||||
#define ERRmoredata 234 /* More data to be returned */
|
||||
#define ERReainconsistent 255 /* from EMC */
|
||||
#define ERRnomoreitems 259
|
||||
#define ERRbaddirectory 267 /* Invalid directory name in a path. */
|
||||
#define ERReasnotsupported 282 /* Extended attributes */
|
||||
#define ERRlogonfailure 1326 /* Unknown username or bad password */
|
||||
#define ERRbuftoosmall 2123
|
||||
#define ERRunknownipc 2142
|
||||
#define ERRnosuchprintjob 2151
|
||||
#define ERRinvgroup 2455
|
||||
|
||||
/* here's a special one from observing NT */
|
||||
#define ERRnoipc 66 /* don't support ipc */
|
||||
|
||||
/* These errors seem to be only returned by the NT printer driver system */
|
||||
#define ERRdriveralreadyinstalled 1795 /* ERROR_PRINTER_DRIVER_ALREADY_INSTALLED */
|
||||
#define ERRunknownprinterport 1796 /* ERROR_UNKNOWN_PORT */
|
||||
#define ERRunknownprinterdriver 1797 /* ERROR_UNKNOWN_PRINTER_DRIVER */
|
||||
#define ERRunknownprintprocessor 1798 /* ERROR_UNKNOWN_PRINTPROCESSOR */
|
||||
#define ERRinvalidseparatorfile 1799 /* ERROR_INVALID_SEPARATOR_FILE */
|
||||
#define ERRinvalidjobpriority 1800 /* ERROR_INVALID_PRIORITY */
|
||||
#define ERRinvalidprintername 1801 /* ERROR_INVALID_PRINTER_NAME */
|
||||
#define ERRprinteralreadyexists 1802 /* ERROR_PRINTER_ALREADY_EXISTS */
|
||||
#define ERRinvalidprintercommand 1803 /* ERROR_INVALID_PRINTER_COMMAND */
|
||||
#define ERRinvaliddatatype 1804 /* ERROR_INVALID_DATATYPE */
|
||||
#define ERRinvalidenvironment 1805 /* ERROR_INVALID_ENVIRONMENT */
|
||||
|
||||
#define ERRunknownprintmonitor 3000 /* ERROR_UNKNOWN_PRINT_MONITOR */
|
||||
#define ERRprinterdriverinuse 3001 /* ERROR_PRINTER_DRIVER_IN_USE */
|
||||
#define ERRspoolfilenotfound 3002 /* ERROR_SPOOL_FILE_NOT_FOUND */
|
||||
#define ERRnostartdoc 3003 /* ERROR_SPL_NO_STARTDOC */
|
||||
#define ERRnoaddjob 3004 /* ERROR_SPL_NO_ADDJOB */
|
||||
#define ERRprintprocessoralreadyinstalled 3005 /* ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED */
|
||||
#define ERRprintmonitoralreadyinstalled 3006 /* ERROR_PRINT_MONITOR_ALREADY_INSTALLED */
|
||||
#define ERRinvalidprintmonitor 3007 /* ERROR_INVALID_PRINT_MONITOR */
|
||||
#define ERRprintmonitorinuse 3008 /* ERROR_PRINT_MONITOR_IN_USE */
|
||||
#define ERRprinterhasjobsqueued 3009 /* ERROR_PRINTER_HAS_JOBS_QUEUED */
|
||||
|
||||
/* Error codes for the ERRSRV class */
|
||||
|
||||
#define ERRerror 1 /* Non specific error code */
|
||||
#define ERRbadpw 2 /* Bad password */
|
||||
#define ERRbadtype 3 /* reserved */
|
||||
#define ERRaccess 4 /* No permissions to do the requested operation */
|
||||
#define ERRinvnid 5 /* tid invalid */
|
||||
#define ERRinvnetname 6 /* Invalid servername */
|
||||
#define ERRinvdevice 7 /* Invalid device */
|
||||
#define ERRqfull 49 /* Print queue full */
|
||||
#define ERRqtoobig 50 /* Queued item too big */
|
||||
#define ERRinvpfid 52 /* Invalid print file in smb_fid */
|
||||
#define ERRsmbcmd 64 /* Unrecognised command */
|
||||
#define ERRsrverror 65 /* smb server internal error */
|
||||
#define ERRfilespecs 67 /* fid and pathname invalid combination */
|
||||
#define ERRbadlink 68 /* reserved */
|
||||
#define ERRbadpermits 69 /* Access specified for a file is not valid */
|
||||
#define ERRbadpid 70 /* reserved */
|
||||
#define ERRsetattrmode 71 /* attribute mode invalid */
|
||||
#define ERRpaused 81 /* Message server paused */
|
||||
#define ERRmsgoff 82 /* Not receiving messages */
|
||||
#define ERRnoroom 83 /* No room for message */
|
||||
#define ERRrmuns 87 /* too many remote usernames */
|
||||
#define ERRtimeout 88 /* operation timed out */
|
||||
#define ERRnoresource 89 /* No resources currently available for request. */
|
||||
#define ERRtoomanyuids 90 /* too many userids */
|
||||
#define ERRbaduid 91 /* bad userid */
|
||||
#define ERRuseMPX 250 /* temporarily unable to use raw mode, use MPX mode */
|
||||
#define ERRuseSTD 251 /* temporarily unable to use raw mode, use standard mode */
|
||||
#define ERRcontMPX 252 /* resume MPX mode */
|
||||
#define ERRbadPW /* reserved */
|
||||
#define ERRnosupport 0xFFFF
|
||||
#define ERRunknownsmb 22 /* from NT 3.5 response */
|
||||
|
||||
/* Error codes for the ERRHRD class */
|
||||
|
||||
#define ERRnowrite 19 /* read only media */
|
||||
#define ERRbadunit 20 /* Unknown device */
|
||||
#define ERRnotready 21 /* Drive not ready */
|
||||
#define ERRbadcmd 22 /* Unknown command */
|
||||
#define ERRdata 23 /* Data (CRC) error */
|
||||
#define ERRbadreq 24 /* Bad request structure length */
|
||||
#define ERRseek 25
|
||||
#define ERRbadmedia 26
|
||||
#define ERRbadsector 27
|
||||
#define ERRnopaper 28
|
||||
#define ERRwrite 29 /* write fault */
|
||||
#define ERRread 30 /* read fault */
|
||||
#define ERRgeneral 31 /* General hardware failure */
|
||||
#define ERRwrongdisk 34
|
||||
#define ERRFCBunavail 35
|
||||
#define ERRsharebufexc 36 /* share buffer exceeded */
|
||||
#define ERRdiskfull 39
|
||||
|
||||
#ifndef NERR_BASE
|
||||
#define NERR_BASE (2100)
|
||||
#endif
|
||||
|
||||
#ifndef FRS_ERR_BASE
|
||||
#define FRS_ERR_BASE (8000)
|
||||
#endif
|
||||
|
||||
#endif /* _DOSERR_H */
|
||||
@ -0,0 +1,59 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
Error handling code
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _SAMBA_ERROR_H_
|
||||
#define _SAMBA_ERROR_H_
|
||||
|
||||
#include <core/werror.h>
|
||||
#include <core/doserr.h>
|
||||
#include <core/ntstatus.h>
|
||||
#include <core/hresult.h>
|
||||
|
||||
/*****************************************************************************
|
||||
convert a NT status code to a dos class/code
|
||||
*****************************************************************************/
|
||||
void ntstatus_to_dos(NTSTATUS ntstatus, uint8_t *eclass, uint32_t *ecode);
|
||||
|
||||
/*****************************************************************************
|
||||
convert a WERROR to a NT status32 code
|
||||
*****************************************************************************/
|
||||
NTSTATUS werror_to_ntstatus(WERROR error);
|
||||
|
||||
/*****************************************************************************
|
||||
convert a NTSTATUS to a WERROR
|
||||
*****************************************************************************/
|
||||
WERROR ntstatus_to_werror(NTSTATUS error);
|
||||
|
||||
/*********************************************************************
|
||||
Map an NT error code from a Unix error code.
|
||||
*********************************************************************/
|
||||
NTSTATUS map_nt_error_from_unix_common(int unix_error);
|
||||
|
||||
/*********************************************************************
|
||||
Map a Unix error code from a NT error code.
|
||||
*********************************************************************/
|
||||
int map_errno_from_nt_status(NTSTATUS status);
|
||||
|
||||
NTSTATUS nt_status_squash(NTSTATUS nt_status);
|
||||
|
||||
/*****************************************************************************
|
||||
convert a Unix error to a WERROR
|
||||
*****************************************************************************/
|
||||
WERROR unix_to_werror(int unix_error);
|
||||
|
||||
#endif /* _SAMBA_ERROR_H */
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,200 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
NT error code constants
|
||||
Copyright (C) Andrew Tridgell 1992-2000
|
||||
Copyright (C) John H Terpstra 1996-2000
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-2000
|
||||
Copyright (C) Paul Ashton 1998-2000
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _NTSTATUS_H
|
||||
#define _NTSTATUS_H
|
||||
|
||||
#include <core/ntstatus_gen.h>
|
||||
|
||||
/* the following rather strange looking definitions of NTSTATUS
|
||||
are there in order to catch common coding errors where different error types
|
||||
are mixed up. This is especially important as we slowly convert Samba
|
||||
from using bool for internal functions
|
||||
*/
|
||||
|
||||
#if defined(HAVE_IMMEDIATE_STRUCTURES)
|
||||
typedef struct {uint32_t v;} NTSTATUS;
|
||||
#define NT_STATUS(x) ((NTSTATUS) { x })
|
||||
#define NT_STATUS_V(x) ((x).v)
|
||||
#else
|
||||
typedef uint32_t NTSTATUS;
|
||||
#define NT_STATUS(x) (x)
|
||||
#define NT_STATUS_V(x) (x)
|
||||
#endif
|
||||
|
||||
/* Win32 status codes. */
|
||||
#define ERROR_INVALID_PARAMETER NT_STATUS(0x0057)
|
||||
#define ERROR_INSUFFICIENT_BUFFER NT_STATUS(0x007a)
|
||||
#define NT_STATUS_ERROR_DS_OBJ_STRING_NAME_EXISTS NT_STATUS(0x2071)
|
||||
#define NT_STATUS_ERROR_DS_INCOMPATIBLE_VERSION NT_STATUS(0x2177)
|
||||
#define NT_STATUS_SMB_NO_PREAUTH_INTEGRITY_HASH_OVERLAP NT_STATUS(0xC05D0000)
|
||||
|
||||
/* Other error codes that aren't in the list we use */
|
||||
#define NT_STATUS_OK NT_STATUS_SUCCESS
|
||||
|
||||
#define STATUS_MORE_ENTRIES NT_STATUS_MORE_ENTRIES
|
||||
#define STATUS_BUFFER_OVERFLOW NT_STATUS_BUFFER_OVERFLOW
|
||||
#define STATUS_NO_MORE_FILES NT_STATUS_NO_MORE_FILES
|
||||
#define STATUS_INVALID_EA_NAME NT_STATUS_INVALID_EA_NAME
|
||||
#define STATUS_SOME_UNMAPPED NT_STATUS_SOME_NOT_MAPPED
|
||||
#define NT_STATUS_INACCESSIBLE_SYSTEM_SHORTCUT NT_STATUS(0x8000002d)
|
||||
|
||||
#define NT_STATUS_ABIOS_NOT_PRESENT NT_STATUS(0xC0000000 | 0x010f)
|
||||
#define NT_STATUS_ABIOS_LID_NOT_EXIST NT_STATUS(0xC0000000 | 0x0110)
|
||||
#define NT_STATUS_ABIOS_LID_ALREADY_OWNED NT_STATUS(0xC0000000 | 0x0111)
|
||||
#define NT_STATUS_ABIOS_NOT_LID_OWNER NT_STATUS(0xC0000000 | 0x0112)
|
||||
#define NT_STATUS_ABIOS_INVALID_COMMAND NT_STATUS(0xC0000000 | 0x0113)
|
||||
#define NT_STATUS_ABIOS_INVALID_LID NT_STATUS(0xC0000000 | 0x0114)
|
||||
#define NT_STATUS_ABIOS_SELECTOR_NOT_AVAILABLE NT_STATUS(0xC0000000 | 0x0115)
|
||||
#define NT_STATUS_ABIOS_INVALID_SELECTOR NT_STATUS(0xC0000000 | 0x0116)
|
||||
|
||||
#define NT_STATUS_HANDLE_NOT_WAITABLE NT_STATUS(0xC0000000 | 0x0036)
|
||||
#define NT_STATUS_DEVICE_POWER_FAILURE NT_STATUS(0xC0000000 | 0x009e)
|
||||
#define NT_STATUS_VHD_SHARED NT_STATUS(0xC05CFF0A)
|
||||
#define NT_STATUS_SMB_BAD_CLUSTER_DIALECT NT_STATUS(0xC05D0001)
|
||||
#define NT_STATUS_NO_SUCH_JOB NT_STATUS(0xC0000000 | 0xEDE)
|
||||
|
||||
/*
|
||||
--------------
|
||||
/ \
|
||||
/ REST \
|
||||
/ IN \
|
||||
/ PEACE \
|
||||
/ \
|
||||
| NT_STATUS_NOPROBLEMO |
|
||||
| |
|
||||
| |
|
||||
| 4 September |
|
||||
| |
|
||||
| 2001 |
|
||||
*| * * * | *
|
||||
_________)/\\_//(\/(/\)/\//\/\///|_)_______
|
||||
*/
|
||||
|
||||
/* I use NT_STATUS_FOOBAR when I have no idea what error code to use -
|
||||
* this means we need a torture test */
|
||||
#define NT_STATUS_FOOBAR NT_STATUS_UNSUCCESSFUL
|
||||
|
||||
/*****************************************************************************
|
||||
returns an NT error message. not amazingly helpful, but better than a number.
|
||||
*****************************************************************************/
|
||||
const char *nt_errstr(NTSTATUS nt_code);
|
||||
|
||||
/************************************************************************
|
||||
Print friendler version fo NT error code
|
||||
***********************************************************************/
|
||||
const char *get_friendly_nt_error_msg(NTSTATUS nt_code);
|
||||
|
||||
/*****************************************************************************
|
||||
returns an NT_STATUS constant as a string for inclusion in autogen C code
|
||||
*****************************************************************************/
|
||||
const char *get_nt_error_c_code(void *mem_ctx, NTSTATUS nt_code);
|
||||
|
||||
/*****************************************************************************
|
||||
returns the NT_STATUS constant matching the string supplied (as an NTSTATUS)
|
||||
*****************************************************************************/
|
||||
NTSTATUS nt_status_string_to_code(const char *nt_status_str);
|
||||
|
||||
/* we need these here for openchange */
|
||||
#ifndef likely
|
||||
#define likely(x) (x)
|
||||
#endif
|
||||
#ifndef unlikely
|
||||
#define unlikely(x) (x)
|
||||
#endif
|
||||
|
||||
#define NT_STATUS_IS_OK(x) (likely(NT_STATUS_V(x) == 0))
|
||||
#define NT_STATUS_IS_ERR(x) (unlikely((NT_STATUS_V(x) & 0xc0000000) == 0xc0000000))
|
||||
#define NT_STATUS_EQUAL(x,y) (NT_STATUS_V(x) == NT_STATUS_V(y))
|
||||
|
||||
/*
|
||||
* These macros (with the embedded return) are considered poor coding
|
||||
* style per README.Coding
|
||||
*
|
||||
* Please do not use them in new code, and do not rely on them in
|
||||
* projects external to Samba as they will go away at some point.
|
||||
*/
|
||||
|
||||
#define NT_STATUS_HAVE_NO_MEMORY(x) do { \
|
||||
if (unlikely(!(x))) { \
|
||||
return NT_STATUS_NO_MEMORY;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
/* This varient is for when you want to free a local
|
||||
temporary memory context in the error path */
|
||||
#define NT_STATUS_HAVE_NO_MEMORY_AND_FREE(x, ctx) do { \
|
||||
if (!(x)) {\
|
||||
talloc_free(ctx); \
|
||||
return NT_STATUS_NO_MEMORY;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define NT_STATUS_IS_OK_RETURN(x) do { \
|
||||
if (NT_STATUS_IS_OK(x)) {\
|
||||
return x;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define NT_STATUS_NOT_OK_RETURN(x) do { \
|
||||
if (!NT_STATUS_IS_OK(x)) {\
|
||||
return x;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define NT_STATUS_NOT_OK_RETURN_AND_FREE(x, ctx) do { \
|
||||
if (!NT_STATUS_IS_OK(x)) {\
|
||||
talloc_free(ctx); \
|
||||
return x;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define NT_STATUS_IS_ERR_RETURN(x) do { \
|
||||
if (NT_STATUS_IS_ERR(x)) {\
|
||||
return x;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define NT_STATUS_NOT_ERR_RETURN(x) do { \
|
||||
if (!NT_STATUS_IS_ERR(x)) {\
|
||||
return x;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
/* this defines special NTSTATUS codes to represent DOS errors. I
|
||||
have chosen this macro to produce status codes in the invalid
|
||||
NTSTATUS range */
|
||||
#define NT_STATUS_DOS(class, code) NT_STATUS(0xF1000000 | ((class)<<16) | code)
|
||||
#define NT_STATUS_IS_DOS(status) ((NT_STATUS_V(status) & 0xFF000000) == 0xF1000000)
|
||||
#define NT_STATUS_DOS_CLASS(status) ((NT_STATUS_V(status) >> 16) & 0xFF)
|
||||
#define NT_STATUS_DOS_CODE(status) (NT_STATUS_V(status) & 0xFFFF)
|
||||
|
||||
/* define ldap error codes as NTSTATUS codes */
|
||||
#define NT_STATUS_LDAP(code) NT_STATUS(0xF2000000 | code)
|
||||
#define NT_STATUS_IS_LDAP(status) ((NT_STATUS_V(status) & 0xFF000000) == 0xF2000000)
|
||||
#define NT_STATUS_LDAP_CODE(status) (NT_STATUS_V(status) & ~0xFF000000)
|
||||
|
||||
#define NT_STATUS_IS_RPC(status) \
|
||||
(((NT_STATUS_V(status) & 0xFFFF) == 0xC0020000) || \
|
||||
((NT_STATUS_V(status) & 0xFFFF) == 0xC0030000))
|
||||
|
||||
#endif /* _NTSTATUS_H */
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,172 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
SMB parameters and setup, plus a whole lot more.
|
||||
|
||||
Copyright (C) Andrew Tridgell 2001
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _WERROR_H_
|
||||
#define _WERROR_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* the following rather strange looking definitions of NTSTATUS and WERROR
|
||||
and there in order to catch common coding errors where different error types
|
||||
are mixed up. This is especially important as we slowly convert Samba
|
||||
from using bool for internal functions
|
||||
*/
|
||||
|
||||
#if defined(HAVE_IMMEDIATE_STRUCTURES)
|
||||
typedef struct {uint32_t w;} WERROR;
|
||||
#define W_ERROR(x) ((WERROR) { x })
|
||||
#define W_ERROR_V(x) ((x).w)
|
||||
#else
|
||||
typedef uint32_t WERROR;
|
||||
#define W_ERROR(x) (x)
|
||||
#define W_ERROR_V(x) (x)
|
||||
#endif
|
||||
|
||||
#include <core/werror_gen.h>
|
||||
|
||||
#define W_ERROR_IS_OK(x) (W_ERROR_V(x) == 0)
|
||||
#define W_ERROR_EQUAL(x,y) (W_ERROR_V(x) == W_ERROR_V(y))
|
||||
|
||||
#define W_ERROR_HAVE_NO_MEMORY(x) do { \
|
||||
if (!(x)) {\
|
||||
return WERR_NOT_ENOUGH_MEMORY;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define W_ERROR_HAVE_NO_MEMORY_AND_FREE(x, ctx) do { \
|
||||
if (!(x)) {\
|
||||
talloc_free(ctx); \
|
||||
return WERR_NOT_ENOUGH_MEMORY;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define W_ERROR_IS_OK_RETURN(x) do { \
|
||||
if (W_ERROR_IS_OK(x)) {\
|
||||
return x;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define W_ERROR_NOT_OK_RETURN(x) do { \
|
||||
if (!W_ERROR_IS_OK(x)) {\
|
||||
return x;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define W_ERROR_NOT_OK_GOTO_DONE(x) do { \
|
||||
if (!W_ERROR_IS_OK(x)) {\
|
||||
goto done;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define W_ERROR_NOT_OK_GOTO(x, y) do {\
|
||||
if (!W_ERROR_IS_OK(x)) {\
|
||||
goto y;\
|
||||
}\
|
||||
} while(0)
|
||||
|
||||
/* these are win32 error codes. There are only a few places where
|
||||
these matter for Samba, primarily in the NT printing code */
|
||||
#define WERR_OK W_ERROR(0x00000000)
|
||||
#define WERR_STATUS_MORE_ENTRIES W_ERROR(0x00000105)
|
||||
|
||||
#define WERR_MULTIPLE_FAULT_VIOLATION W_ERROR(0x00000280)
|
||||
#define WERR_SERVICE_NOTIFICATION W_ERROR(0x000002CC)
|
||||
#define WERR_LOG_HARD_ERROR W_ERROR(0x000002CE)
|
||||
#define WERR_WAIT_1 W_ERROR(0x000002DB)
|
||||
#define WERR_WAIT_2 W_ERROR(0x000002DC)
|
||||
#define WERR_WAIT_3 W_ERROR(0x000002DD)
|
||||
#define WERR_WAIT_63 W_ERROR(0x000002DE)
|
||||
#define WERR_ABANDONED_WAIT_63 W_ERROR(0x000002E0)
|
||||
#define WERR_USER_APC W_ERROR(0x000002E1)
|
||||
#define WERR_KERNEL_APC W_ERROR(0x000002E2)
|
||||
#define WERR_ALERTED W_ERROR(0x000002E3)
|
||||
#define WERR_INVALID_PRIMARY_GROUP W_ERROR(0x0000051C)
|
||||
|
||||
#define WERR_DS_DRA_SECRETS_DENIED W_ERROR(0x000021B6)
|
||||
#define WERR_DS_DRA_RECYCLED_TARGET W_ERROR(0x000021BF)
|
||||
|
||||
#define WERR_DNS_ERROR_KEYMASTER_REQUIRED W_ERROR(0x0000238D)
|
||||
#define WERR_DNS_ERROR_NOT_ALLOWED_ON_SIGNED_ZONE W_ERROR(0x0000238E)
|
||||
#define WERR_DNS_ERROR_INVALID_NSEC3_PARAMETERS W_ERROR(0x0000238F)
|
||||
#define WERR_DNS_ERROR_NOT_ENOUGH_SIGNING_KEY_DESCRIPTORS W_ERROR(0x00002390)
|
||||
#define WERR_DNS_ERROR_UNSUPPORTED_ALGORITHM W_ERROR(0x00002391)
|
||||
#define WERR_DNS_ERROR_INVALID_KEY_SIZE W_ERROR(0x00002392)
|
||||
#define WERR_DNS_ERROR_SIGNING_KEY_NOT_ACCESSIBLE W_ERROR(0x00002393)
|
||||
#define WERR_DNS_ERROR_KSP_DOES_NOT_SUPPORT_PROTECTION W_ERROR(0x00002394)
|
||||
#define WERR_DNS_ERROR_UNEXPECTED_DATA_PROTECTION_ERROR W_ERROR(0x00002395)
|
||||
#define WERR_DNS_ERROR_UNEXPECTED_CNG_ERROR W_ERROR(0x00002396)
|
||||
#define WERR_DNS_ERROR_UNKNOWN_SIGNING_PARAMETER_VERSION W_ERROR(0x00002397)
|
||||
#define WERR_DNS_ERROR_KSP_NOT_ACCESSIBLE W_ERROR(0x00002398)
|
||||
#define WERR_DNS_ERROR_TOO_MANY_SKDS W_ERROR(0x00002399)
|
||||
#define WERR_DNS_ERROR_INVALID_ROLLOVER_PERIOD W_ERROR(0x0000239A)
|
||||
#define WERR_DNS_ERROR_INVALID_INITIAL_ROLLOVER_OFFSET W_ERROR(0x0000239B)
|
||||
#define WERR_DNS_ERROR_ROLLOVER_IN_PROGRESS W_ERROR(0x0000239C)
|
||||
#define WERR_DNS_ERROR_STANDBY_KEY_NOT_PRESENT W_ERROR(0x0000239D)
|
||||
#define WERR_DNS_ERROR_NOT_ALLOWED_ON_ZSK W_ERROR(0x0000239E)
|
||||
#define WERR_DNS_ERROR_NOT_ALLOWED_ON_ACTIVE_SKD W_ERROR(0x0000239F)
|
||||
#define WERR_DNS_ERROR_ROLLOVER_ALREADY_QUEUED W_ERROR(0x000023A0)
|
||||
#define WERR_DNS_ERROR_NOT_ALLOWED_ON_UNSIGNED_ZONE W_ERROR(0x000023A1)
|
||||
#define WERR_DNS_ERROR_BAD_KEYMASTER W_ERROR(0x000023A2)
|
||||
#define WERR_DNS_ERROR_INVALID_SIGNATURE_VALIDITY_PERIOD W_ERROR(0x000023A3)
|
||||
#define WERR_DNS_ERROR_INVALID_NSEC3_ITERATION_COUNT W_ERROR(0x000023A4)
|
||||
#define WERR_DNS_ERROR_DNSSEC_IS_DISABLED W_ERROR(0x000023A5)
|
||||
#define WERR_DNS_ERROR_INVALID_XML W_ERROR(0x000023A6)
|
||||
#define WERR_DNS_ERROR_NO_VALID_TRUST_ANCHORS W_ERROR(0x000023A7)
|
||||
#define WERR_DNS_ERROR_ROLLOVER_NOT_POKEABLE W_ERROR(0x000023A8)
|
||||
#define WERR_DNS_ERROR_NSEC3_NAME_COLLISION W_ERROR(0x000023A9)
|
||||
|
||||
#define WERR_DNS_REQUEST_PENDING W_ERROR(0x00002522)
|
||||
#define WERR_DNS_ERROR_NOT_ALLOWED_UNDER_DNAME W_ERROR(0x00002562)
|
||||
#define WERR_DNS_ERROR_DELEGATION_REQUIRED W_ERROR(0x00002563)
|
||||
#define WERR_DNS_ERROR_INVALID_POLICY_TABLE W_ERROR(0x00002564)
|
||||
#define WERR_DNS_ERROR_NODE_IS_DNMAE WERR_DNS_ERROR_NODE_IS_DNAME
|
||||
#define WERR_DNS_ERROR_NODE_IS_DNAME W_ERROR(0x000025F8) /* Used to be: "WERR_DNS_ERROR_NODE_IS_DNMAE" */
|
||||
#define WERR_DNS_ERROR_DNAME_COLLISION W_ERROR(0x000025F9)
|
||||
#define WERR_DNS_ERROR_ALIAS_LOOP W_ERROR(0x000025FA)
|
||||
|
||||
/* Configuration Manager Errors */
|
||||
/* Basically Win32 errors meanings are specific to the \ntsvcs pipe */
|
||||
#define WERR_CM_INVALID_POINTER W_ERROR(3)
|
||||
#define WERR_CM_BUFFER_SMALL W_ERROR(26)
|
||||
#define WERR_CM_NO_MORE_HW_PROFILES W_ERROR(35)
|
||||
#define WERR_CM_NO_SUCH_VALUE W_ERROR(37)
|
||||
|
||||
/* DFS errors */
|
||||
|
||||
#ifndef NERR_BASE
|
||||
#define NERR_BASE (2100)
|
||||
#endif
|
||||
|
||||
#ifndef MAX_NERR
|
||||
#define MAX_NERR (NERR_BASE+899)
|
||||
#endif
|
||||
|
||||
/* Generic error code aliases */
|
||||
#define WERR_FOOBAR WERR_GEN_FAILURE
|
||||
|
||||
/*****************************************************************************
|
||||
returns a windows error message. not amazingly helpful, but better than a number.
|
||||
*****************************************************************************/
|
||||
const char *win_errstr(WERROR werror);
|
||||
|
||||
const char *get_friendly_werror_msg(WERROR werror);
|
||||
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,354 @@
|
||||
/*
|
||||
samba -- Unix SMB/CIFS implementation.
|
||||
|
||||
Client credentials structure
|
||||
|
||||
Copyright (C) Jelmer Vernooij 2004-2006
|
||||
Copyright (C) Andrew Bartlett <abartlet@samba.org> 2005
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __CREDENTIALS_H__
|
||||
#define __CREDENTIALS_H__
|
||||
|
||||
#include <util/time.h>
|
||||
#include <util/data_blob.h>
|
||||
#include <gen_ndr/misc.h>
|
||||
|
||||
struct cli_credentials;
|
||||
struct ccache_container;
|
||||
struct tevent_context;
|
||||
struct netlogon_creds_CredentialState;
|
||||
struct ldb_context;
|
||||
struct ldb_message;
|
||||
struct loadparm_context;
|
||||
struct ccache_container;
|
||||
struct gssapi_creds_container;
|
||||
struct smb_krb5_context;
|
||||
struct keytab_container;
|
||||
struct db_context;
|
||||
enum smb_signing_setting;
|
||||
enum smb_encryption_setting;
|
||||
|
||||
/* In order of priority */
|
||||
enum credentials_obtained {
|
||||
CRED_UNINITIALISED = 0, /* We don't even have a guess yet */
|
||||
CRED_SMB_CONF, /* Current value should be used, which comes from smb.conf */
|
||||
CRED_CALLBACK, /* Callback should be used to obtain value */
|
||||
CRED_GUESS_ENV, /* Current value should be used, which was guessed */
|
||||
CRED_GUESS_FILE, /* A guess from a file (or file pointed at in env variable) */
|
||||
CRED_CALLBACK_RESULT, /* Value was obtained from a callback */
|
||||
CRED_SPECIFIED /* Was explicitly specified on the command-line */
|
||||
};
|
||||
|
||||
enum credentials_use_kerberos {
|
||||
/** Sometimes trying kerberos just does 'bad things', so don't */
|
||||
CRED_USE_KERBEROS_DISABLED = 0,
|
||||
/** Default, we try kerberos if available */
|
||||
CRED_USE_KERBEROS_DESIRED,
|
||||
/** Sometimes administrators are paranoid, so always do kerberos */
|
||||
CRED_USE_KERBEROS_REQUIRED,
|
||||
};
|
||||
|
||||
enum credentials_client_protection {
|
||||
CRED_CLIENT_PROTECTION_DEFAULT = -1,
|
||||
CRED_CLIENT_PROTECTION_PLAIN = 0,
|
||||
CRED_CLIENT_PROTECTION_SIGN,
|
||||
CRED_CLIENT_PROTECTION_ENCRYPT,
|
||||
};
|
||||
|
||||
enum credentials_krb_forwardable {
|
||||
CRED_AUTO_KRB_FORWARDABLE = 0, /* Default, follow library defaults */
|
||||
CRED_NO_KRB_FORWARDABLE, /* not forwardable */
|
||||
CRED_FORCE_KRB_FORWARDABLE /* forwardable */
|
||||
};
|
||||
|
||||
#define CLI_CRED_NTLM2 0x01
|
||||
#define CLI_CRED_NTLMv2_AUTH 0x02
|
||||
#define CLI_CRED_LANMAN_AUTH 0x04
|
||||
#define CLI_CRED_NTLM_AUTH 0x08
|
||||
#define CLI_CRED_CLEAR_AUTH 0x10 /* TODO: Push cleartext auth with this flag */
|
||||
|
||||
const char *cli_credentials_get_workstation(struct cli_credentials *cred);
|
||||
bool cli_credentials_set_workstation(struct cli_credentials *cred,
|
||||
const char *val,
|
||||
enum credentials_obtained obtained);
|
||||
bool cli_credentials_is_anonymous(struct cli_credentials *cred);
|
||||
struct cli_credentials *cli_credentials_init(TALLOC_CTX *mem_ctx);
|
||||
struct cli_credentials *cli_credentials_init_server(TALLOC_CTX *mem_ctx,
|
||||
struct loadparm_context *lp_ctx);
|
||||
void cli_credentials_set_anonymous(struct cli_credentials *cred);
|
||||
bool cli_credentials_wrong_password(struct cli_credentials *cred);
|
||||
const char *cli_credentials_get_password(struct cli_credentials *cred);
|
||||
const char *cli_credentials_get_password_and_obtained(struct cli_credentials *cred,
|
||||
enum credentials_obtained *obtained);
|
||||
void cli_credentials_get_ntlm_username_domain(struct cli_credentials *cred, TALLOC_CTX *mem_ctx,
|
||||
const char **username,
|
||||
const char **domain);
|
||||
NTSTATUS cli_credentials_get_ntlm_response(struct cli_credentials *cred, TALLOC_CTX *mem_ctx,
|
||||
int *flags,
|
||||
DATA_BLOB challenge,
|
||||
const NTTIME *server_timestamp,
|
||||
DATA_BLOB target_info,
|
||||
DATA_BLOB *_lm_response, DATA_BLOB *_nt_response,
|
||||
DATA_BLOB *_lm_session_key, DATA_BLOB *_session_key);
|
||||
const char *cli_credentials_get_realm(struct cli_credentials *cred);
|
||||
const char *cli_credentials_get_username(struct cli_credentials *cred);
|
||||
const char *cli_credentials_get_username_and_obtained(struct cli_credentials *cred,
|
||||
enum credentials_obtained *obtained);
|
||||
int cli_credentials_get_krb5_context(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct smb_krb5_context **smb_krb5_context);
|
||||
int cli_credentials_get_ccache(struct cli_credentials *cred,
|
||||
struct tevent_context *event_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct ccache_container **ccc,
|
||||
const char **error_string);
|
||||
int cli_credentials_get_named_ccache(struct cli_credentials *cred,
|
||||
struct tevent_context *event_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
char *ccache_name,
|
||||
struct ccache_container **ccc, const char **error_string);
|
||||
bool cli_credentials_failed_kerberos_login(struct cli_credentials *cred,
|
||||
const char *principal,
|
||||
unsigned int *count);
|
||||
int cli_credentials_get_keytab(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct keytab_container **_ktc);
|
||||
const char *cli_credentials_get_domain(struct cli_credentials *cred);
|
||||
struct netlogon_creds_CredentialState *cli_credentials_get_netlogon_creds(struct cli_credentials *cred);
|
||||
void cli_credentials_set_machine_account_pending(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx);
|
||||
bool cli_credentials_set_conf(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx);
|
||||
char *cli_credentials_get_principal(struct cli_credentials *cred, TALLOC_CTX *mem_ctx);
|
||||
int cli_credentials_get_server_gss_creds(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct gssapi_creds_container **_gcc);
|
||||
int cli_credentials_get_client_gss_creds(struct cli_credentials *cred,
|
||||
struct tevent_context *event_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct gssapi_creds_container **_gcc,
|
||||
const char **error_string);
|
||||
void cli_credentials_set_forced_sasl_mech(struct cli_credentials *creds,
|
||||
const char *sasl_mech);
|
||||
bool cli_credentials_set_kerberos_state(struct cli_credentials *creds,
|
||||
enum credentials_use_kerberos kerberos_state,
|
||||
enum credentials_obtained obtained);
|
||||
void cli_credentials_set_krb_forwardable(struct cli_credentials *creds,
|
||||
enum credentials_krb_forwardable krb_forwardable);
|
||||
bool cli_credentials_set_domain(struct cli_credentials *cred,
|
||||
const char *val,
|
||||
enum credentials_obtained obtained);
|
||||
bool cli_credentials_set_domain_callback(struct cli_credentials *cred,
|
||||
const char *(*domain_cb) (struct cli_credentials *));
|
||||
bool cli_credentials_set_username(struct cli_credentials *cred,
|
||||
const char *val, enum credentials_obtained obtained);
|
||||
bool cli_credentials_set_username_callback(struct cli_credentials *cred,
|
||||
const char *(*username_cb) (struct cli_credentials *));
|
||||
bool cli_credentials_set_principal(struct cli_credentials *cred,
|
||||
const char *val,
|
||||
enum credentials_obtained obtained);
|
||||
bool cli_credentials_set_principal_callback(struct cli_credentials *cred,
|
||||
const char *(*principal_cb) (struct cli_credentials *));
|
||||
bool cli_credentials_set_password(struct cli_credentials *cred,
|
||||
const char *val,
|
||||
enum credentials_obtained obtained);
|
||||
struct cli_credentials *cli_credentials_init_anon(TALLOC_CTX *mem_ctx);
|
||||
void cli_credentials_parse_string(struct cli_credentials *credentials, const char *data, enum credentials_obtained obtained);
|
||||
struct samr_Password *cli_credentials_get_nt_hash(struct cli_credentials *cred,
|
||||
TALLOC_CTX *mem_ctx);
|
||||
struct samr_Password *cli_credentials_get_old_nt_hash(struct cli_credentials *cred,
|
||||
TALLOC_CTX *mem_ctx);
|
||||
bool cli_credentials_set_realm(struct cli_credentials *cred,
|
||||
const char *val,
|
||||
enum credentials_obtained obtained);
|
||||
void cli_credentials_set_secure_channel_type(struct cli_credentials *cred,
|
||||
enum netr_SchannelType secure_channel_type);
|
||||
void cli_credentials_set_password_last_changed_time(struct cli_credentials *cred,
|
||||
time_t last_change_time);
|
||||
void cli_credentials_set_netlogon_creds(
|
||||
struct cli_credentials *cred,
|
||||
const struct netlogon_creds_CredentialState *netlogon_creds);
|
||||
NTSTATUS cli_credentials_set_krb5_context(struct cli_credentials *cred,
|
||||
struct smb_krb5_context *smb_krb5_context);
|
||||
NTSTATUS cli_credentials_set_stored_principal(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx,
|
||||
const char *serviceprincipal);
|
||||
NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx);
|
||||
/**
|
||||
* Fill in credentials for the machine trust account, from the
|
||||
* secrets.ldb or passed in handle to secrets.tdb (perhaps in CTDB).
|
||||
*
|
||||
* This version is used in parts of the code that can link in the
|
||||
* CTDB dbwrap backend, by passing down the already open handle.
|
||||
*
|
||||
* @param cred Credentials structure to fill in
|
||||
* @param db_ctx dbwrap context for secrets.tdb
|
||||
* @retval NTSTATUS error detailing any failure
|
||||
*/
|
||||
NTSTATUS cli_credentials_set_machine_account_db_ctx(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct db_context *db_ctx);
|
||||
|
||||
bool cli_credentials_authentication_requested(struct cli_credentials *cred);
|
||||
bool cli_credentials_guess(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx);
|
||||
bool cli_credentials_set_bind_dn(struct cli_credentials *cred,
|
||||
const char *bind_dn);
|
||||
const char *cli_credentials_get_bind_dn(struct cli_credentials *cred);
|
||||
bool cli_credentials_parse_file(struct cli_credentials *cred, const char *file, enum credentials_obtained obtained);
|
||||
char *cli_credentials_get_unparsed_name(struct cli_credentials *credentials, TALLOC_CTX *mem_ctx);
|
||||
bool cli_credentials_set_password_callback(struct cli_credentials *cred,
|
||||
const char *(*password_cb) (struct cli_credentials *));
|
||||
enum netr_SchannelType cli_credentials_get_secure_channel_type(struct cli_credentials *cred);
|
||||
time_t cli_credentials_get_password_last_changed_time(struct cli_credentials *cred);
|
||||
void cli_credentials_set_kvno(struct cli_credentials *cred,
|
||||
int kvno);
|
||||
bool cli_credentials_set_utf16_password(struct cli_credentials *cred,
|
||||
const DATA_BLOB *password_utf16,
|
||||
enum credentials_obtained obtained);
|
||||
bool cli_credentials_set_old_utf16_password(struct cli_credentials *cred,
|
||||
const DATA_BLOB *password_utf16);
|
||||
void cli_credentials_set_password_will_be_nt_hash(struct cli_credentials *cred,
|
||||
bool val);
|
||||
bool cli_credentials_set_nt_hash(struct cli_credentials *cred,
|
||||
const struct samr_Password *nt_hash,
|
||||
enum credentials_obtained obtained);
|
||||
bool cli_credentials_set_old_nt_hash(struct cli_credentials *cred,
|
||||
const struct samr_Password *nt_hash);
|
||||
bool cli_credentials_set_ntlm_response(struct cli_credentials *cred,
|
||||
const DATA_BLOB *lm_response,
|
||||
const DATA_BLOB *lm_session_key,
|
||||
const DATA_BLOB *nt_response,
|
||||
const DATA_BLOB *nt_session_key,
|
||||
enum credentials_obtained obtained);
|
||||
int cli_credentials_set_keytab_name(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx,
|
||||
const char *keytab_name,
|
||||
enum credentials_obtained obtained);
|
||||
bool cli_credentials_set_gensec_features(struct cli_credentials *creds,
|
||||
uint32_t gensec_features,
|
||||
enum credentials_obtained obtained);
|
||||
uint32_t cli_credentials_get_gensec_features(struct cli_credentials *creds);
|
||||
int cli_credentials_set_ccache(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx,
|
||||
const char *name,
|
||||
enum credentials_obtained obtained,
|
||||
const char **error_string);
|
||||
bool cli_credentials_parse_password_file(struct cli_credentials *credentials, const char *file, enum credentials_obtained obtained);
|
||||
bool cli_credentials_parse_password_fd(struct cli_credentials *credentials,
|
||||
int fd, enum credentials_obtained obtained);
|
||||
void cli_credentials_invalidate_ccache(struct cli_credentials *cred,
|
||||
enum credentials_obtained obtained);
|
||||
void cli_credentials_set_salt_principal(struct cli_credentials *cred, const char *principal);
|
||||
void cli_credentials_set_impersonate_principal(struct cli_credentials *cred,
|
||||
const char *principal,
|
||||
const char *self_service);
|
||||
void cli_credentials_set_target_service(struct cli_credentials *cred, const char *principal);
|
||||
const char *cli_credentials_get_salt_principal(struct cli_credentials *cred);
|
||||
const char *cli_credentials_get_impersonate_principal(struct cli_credentials *cred);
|
||||
const char *cli_credentials_get_self_service(struct cli_credentials *cred);
|
||||
const char *cli_credentials_get_target_service(struct cli_credentials *cred);
|
||||
enum credentials_use_kerberos cli_credentials_get_kerberos_state(struct cli_credentials *creds);
|
||||
const char *cli_credentials_get_forced_sasl_mech(struct cli_credentials *cred);
|
||||
enum credentials_krb_forwardable cli_credentials_get_krb_forwardable(struct cli_credentials *creds);
|
||||
NTSTATUS cli_credentials_set_secrets(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct ldb_context *ldb,
|
||||
const char *base,
|
||||
const char *filter,
|
||||
char **error_string);
|
||||
int cli_credentials_get_kvno(struct cli_credentials *cred);
|
||||
|
||||
bool cli_credentials_set_username_callback(struct cli_credentials *cred,
|
||||
const char *(*username_cb) (struct cli_credentials *));
|
||||
|
||||
/**
|
||||
* Obtain the client principal for this credentials context.
|
||||
* @param cred credentials context
|
||||
* @retval The username set on this context.
|
||||
* @note Return value will never be NULL except by programmer error.
|
||||
*/
|
||||
char *cli_credentials_get_principal_and_obtained(struct cli_credentials *cred, TALLOC_CTX *mem_ctx, enum credentials_obtained *obtained);
|
||||
bool cli_credentials_set_principal(struct cli_credentials *cred,
|
||||
const char *val,
|
||||
enum credentials_obtained obtained);
|
||||
bool cli_credentials_set_principal_callback(struct cli_credentials *cred,
|
||||
const char *(*principal_cb) (struct cli_credentials *));
|
||||
|
||||
/**
|
||||
* Obtain the 'old' password for this credentials context (used for join accounts).
|
||||
* @param cred credentials context
|
||||
* @retval If set, the cleartext password, otherwise NULL
|
||||
*/
|
||||
const char *cli_credentials_get_old_password(struct cli_credentials *cred);
|
||||
bool cli_credentials_set_old_password(struct cli_credentials *cred,
|
||||
const char *val,
|
||||
enum credentials_obtained obtained);
|
||||
bool cli_credentials_set_domain_callback(struct cli_credentials *cred,
|
||||
const char *(*domain_cb) (struct cli_credentials *));
|
||||
bool cli_credentials_set_realm_callback(struct cli_credentials *cred,
|
||||
const char *(*realm_cb) (struct cli_credentials *));
|
||||
bool cli_credentials_set_workstation_callback(struct cli_credentials *cred,
|
||||
const char *(*workstation_cb) (struct cli_credentials *));
|
||||
|
||||
void cli_credentials_set_callback_data(struct cli_credentials *cred,
|
||||
void *callback_data);
|
||||
void *_cli_credentials_callback_data(struct cli_credentials *cred);
|
||||
#define cli_credentials_callback_data(_cred, _type) \
|
||||
talloc_get_type_abort(_cli_credentials_callback_data(_cred), _type)
|
||||
#define cli_credentials_callback_data_void(_cred) \
|
||||
_cli_credentials_callback_data(_cred)
|
||||
|
||||
bool cli_credentials_set_smb_signing(struct cli_credentials *cred,
|
||||
enum smb_signing_setting signing_state,
|
||||
enum credentials_obtained obtained);
|
||||
enum smb_signing_setting
|
||||
cli_credentials_get_smb_signing(struct cli_credentials *cred);
|
||||
|
||||
bool cli_credentials_set_smb_ipc_signing(struct cli_credentials *cred,
|
||||
enum smb_signing_setting ipc_signing_state,
|
||||
enum credentials_obtained obtained);
|
||||
enum smb_signing_setting
|
||||
cli_credentials_get_smb_ipc_signing(struct cli_credentials *cred);
|
||||
|
||||
bool cli_credentials_set_smb_encryption(struct cli_credentials *cred,
|
||||
enum smb_encryption_setting encryption_state,
|
||||
enum credentials_obtained obtained);
|
||||
enum smb_encryption_setting
|
||||
cli_credentials_get_smb_encryption(struct cli_credentials *cred);
|
||||
|
||||
bool cli_credentials_set_cmdline_callbacks(struct cli_credentials *cred);
|
||||
|
||||
void cli_credentials_dump(struct cli_credentials *creds);
|
||||
|
||||
/**
|
||||
* Return attached NETLOGON credentials
|
||||
*/
|
||||
struct netlogon_creds_CredentialState *cli_credentials_get_netlogon_creds(struct cli_credentials *cred);
|
||||
|
||||
NTSTATUS netlogon_creds_session_encrypt(
|
||||
struct netlogon_creds_CredentialState *state,
|
||||
DATA_BLOB data);
|
||||
|
||||
int cli_credentials_get_aes256_key(struct cli_credentials *cred,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
const char *password,
|
||||
const char *salt,
|
||||
DATA_BLOB *aes_256);
|
||||
|
||||
#endif /* __CREDENTIALS_H__ */
|
||||
@ -0,0 +1,264 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
DCERPC client side interface structures
|
||||
|
||||
Copyright (C) Tim Potter 2003
|
||||
Copyright (C) Andrew Tridgell 2003-2005
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* This is a public header file that is installed as part of Samba.
|
||||
* If you remove any functions or change their signature, update
|
||||
* the so version number. */
|
||||
|
||||
#ifndef __S4_DCERPC_H__
|
||||
#define __S4_DCERPC_H__
|
||||
|
||||
#include <util/data_blob.h>
|
||||
#include <gen_ndr/dcerpc.h>
|
||||
#include <ndr.h>
|
||||
#include <rpc_common.h>
|
||||
|
||||
struct tevent_context;
|
||||
struct tevent_req;
|
||||
struct dcerpc_binding_handle;
|
||||
struct tstream_context;
|
||||
struct ndr_interface_table;
|
||||
struct resolve_context;
|
||||
|
||||
/*
|
||||
this defines a generic security context for signed/sealed dcerpc pipes.
|
||||
*/
|
||||
struct dcecli_connection;
|
||||
struct gensec_settings;
|
||||
struct cli_credentials;
|
||||
struct dcecli_security {
|
||||
enum dcerpc_AuthType auth_type;
|
||||
enum dcerpc_AuthLevel auth_level;
|
||||
uint32_t auth_context_id;
|
||||
struct {
|
||||
struct dcerpc_auth *out;
|
||||
struct dcerpc_auth *in;
|
||||
TALLOC_CTX *mem;
|
||||
} tmp_auth_info;
|
||||
struct gensec_security *generic_state;
|
||||
|
||||
/* get the session key */
|
||||
NTSTATUS (*session_key)(struct dcecli_connection *, DATA_BLOB *);
|
||||
|
||||
bool verified_bitmask1;
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
this holds the information that is not specific to a particular rpc context_id
|
||||
*/
|
||||
struct rpc_request;
|
||||
struct dcecli_connection {
|
||||
uint32_t call_id;
|
||||
uint32_t srv_max_xmit_frag;
|
||||
uint32_t srv_max_recv_frag;
|
||||
uint32_t flags;
|
||||
struct dcecli_security security_state;
|
||||
struct tevent_context *event_ctx;
|
||||
|
||||
struct tevent_immediate *io_trigger;
|
||||
bool io_trigger_pending;
|
||||
|
||||
/** Directory in which to save ndrdump-parseable files */
|
||||
const char *packet_log_dir;
|
||||
|
||||
bool dead;
|
||||
bool free_skipped;
|
||||
|
||||
struct dcerpc_transport {
|
||||
enum dcerpc_transport_t transport;
|
||||
void *private_data;
|
||||
bool encrypted;
|
||||
|
||||
struct tstream_context *stream;
|
||||
/** to serialize write events */
|
||||
struct tevent_queue *write_queue;
|
||||
/** the current active read request if any */
|
||||
struct tevent_req *read_subreq;
|
||||
/** number of read requests other than the current active */
|
||||
uint32_t pending_reads;
|
||||
} transport;
|
||||
|
||||
const char *server_name;
|
||||
|
||||
/* Requests that have been sent, waiting for a reply */
|
||||
struct rpc_request *pending;
|
||||
|
||||
/* Sync requests waiting to be shipped */
|
||||
struct rpc_request *request_queue;
|
||||
|
||||
/* the next context_id to be assigned */
|
||||
uint32_t next_context_id;
|
||||
|
||||
/* The maximum total payload of reassembled response pdus */
|
||||
size_t max_total_response_size;
|
||||
|
||||
/* the negotiated bind time features */
|
||||
uint16_t bind_time_features;
|
||||
};
|
||||
|
||||
/*
|
||||
this encapsulates a full dcerpc client side pipe
|
||||
*/
|
||||
struct dcerpc_pipe {
|
||||
struct dcerpc_binding_handle *binding_handle;
|
||||
|
||||
uint32_t context_id;
|
||||
|
||||
struct GUID object;
|
||||
struct ndr_syntax_id syntax;
|
||||
struct ndr_syntax_id transfer_syntax;
|
||||
|
||||
struct dcecli_connection *conn;
|
||||
const struct dcerpc_binding *binding;
|
||||
|
||||
/** the last fault code from a DCERPC fault */
|
||||
uint32_t last_fault_code;
|
||||
|
||||
/** timeout for individual rpc requests, in seconds */
|
||||
uint32_t request_timeout;
|
||||
|
||||
/*
|
||||
* Set for the timeout in dcerpc_pipe_connect_b_send(), to
|
||||
* allow the timeout not to destory the stack during a nested
|
||||
* event loop caused by gensec_update()
|
||||
*/
|
||||
bool inhibit_timeout_processing;
|
||||
bool timed_out;
|
||||
|
||||
bool verified_pcontext;
|
||||
};
|
||||
|
||||
/* default timeout for all rpc requests, in seconds */
|
||||
#define DCERPC_REQUEST_TIMEOUT 60
|
||||
|
||||
struct epm_tower;
|
||||
struct epm_floor;
|
||||
|
||||
struct smbcli_tree;
|
||||
struct smb2_tree;
|
||||
struct smbXcli_conn;
|
||||
struct smbXcli_session;
|
||||
struct smbXcli_tcon;
|
||||
struct roh_connection;
|
||||
struct tstream_tls_params;
|
||||
struct socket_address;
|
||||
|
||||
NTSTATUS dcerpc_pipe_connect(TALLOC_CTX *parent_ctx,
|
||||
struct dcerpc_pipe **pp,
|
||||
const char *binding,
|
||||
const struct ndr_interface_table *table,
|
||||
struct cli_credentials *credentials,
|
||||
struct tevent_context *ev,
|
||||
struct loadparm_context *lp_ctx);
|
||||
const char *dcerpc_server_name(struct dcerpc_pipe *p);
|
||||
struct dcerpc_pipe *dcerpc_pipe_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev);
|
||||
NTSTATUS dcerpc_pipe_open_smb(struct dcerpc_pipe *p,
|
||||
struct smbcli_tree *tree,
|
||||
const char *pipe_name);
|
||||
NTSTATUS dcerpc_pipe_open_smb2(struct dcerpc_pipe *p,
|
||||
struct smb2_tree *tree,
|
||||
const char *pipe_name);
|
||||
NTSTATUS dcerpc_bind_auth_none(struct dcerpc_pipe *p,
|
||||
const struct ndr_interface_table *table);
|
||||
NTSTATUS dcerpc_fetch_session_key(struct dcerpc_pipe *p,
|
||||
DATA_BLOB *session_key);
|
||||
bool dcerpc_transport_encrypted(struct dcerpc_pipe *p);
|
||||
struct composite_context;
|
||||
NTSTATUS dcerpc_secondary_connection_recv(struct composite_context *c,
|
||||
struct dcerpc_pipe **p2);
|
||||
|
||||
struct composite_context* dcerpc_pipe_connect_b_send(TALLOC_CTX *parent_ctx,
|
||||
const struct dcerpc_binding *binding,
|
||||
const struct ndr_interface_table *table,
|
||||
struct cli_credentials *credentials,
|
||||
struct tevent_context *ev,
|
||||
struct loadparm_context *lp_ctx);
|
||||
|
||||
NTSTATUS dcerpc_pipe_connect_b_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
|
||||
struct dcerpc_pipe **p);
|
||||
|
||||
NTSTATUS dcerpc_pipe_connect_b(TALLOC_CTX *parent_ctx,
|
||||
struct dcerpc_pipe **pp,
|
||||
const struct dcerpc_binding *binding,
|
||||
const struct ndr_interface_table *table,
|
||||
struct cli_credentials *credentials,
|
||||
struct tevent_context *ev,
|
||||
struct loadparm_context *lp_ctx);
|
||||
|
||||
NTSTATUS dcerpc_pipe_auth(TALLOC_CTX *mem_ctx,
|
||||
struct dcerpc_pipe **p,
|
||||
const struct dcerpc_binding *binding,
|
||||
const struct ndr_interface_table *table,
|
||||
struct cli_credentials *credentials,
|
||||
struct loadparm_context *lp_ctx);
|
||||
NTSTATUS dcerpc_init(void);
|
||||
struct composite_context *dcerpc_secondary_smb_send(struct dcecli_connection *c1,
|
||||
struct dcecli_connection *c2,
|
||||
const char *pipe_name);
|
||||
NTSTATUS dcerpc_secondary_smb_recv(struct composite_context *c);
|
||||
NTSTATUS dcerpc_secondary_context(struct dcerpc_pipe *p,
|
||||
struct dcerpc_pipe **pp2,
|
||||
const struct ndr_interface_table *table);
|
||||
NTSTATUS dcerpc_alter_context(struct dcerpc_pipe *p,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct ndr_syntax_id *syntax,
|
||||
const struct ndr_syntax_id *transfer_syntax);
|
||||
|
||||
NTSTATUS dcerpc_bind_auth(struct dcerpc_pipe *p,
|
||||
const struct ndr_interface_table *table,
|
||||
struct cli_credentials *credentials,
|
||||
struct gensec_settings *gensec_settings,
|
||||
uint8_t auth_type, uint8_t auth_level,
|
||||
const char *service);
|
||||
struct composite_context* dcerpc_pipe_connect_send(TALLOC_CTX *parent_ctx,
|
||||
const char *binding,
|
||||
const struct ndr_interface_table *table,
|
||||
struct cli_credentials *credentials,
|
||||
struct tevent_context *ev, struct loadparm_context *lp_ctx);
|
||||
NTSTATUS dcerpc_pipe_connect_recv(struct composite_context *c,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct dcerpc_pipe **pp);
|
||||
|
||||
NTSTATUS dcerpc_epm_map_binding(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding,
|
||||
const struct ndr_interface_table *table, struct tevent_context *ev,
|
||||
struct loadparm_context *lp_ctx);
|
||||
struct composite_context* dcerpc_secondary_auth_connection_send(struct dcerpc_pipe *p,
|
||||
const struct dcerpc_binding *binding,
|
||||
const struct ndr_interface_table *table,
|
||||
struct cli_credentials *credentials,
|
||||
struct loadparm_context *lp_ctx);
|
||||
NTSTATUS dcerpc_secondary_auth_connection_recv(struct composite_context *c,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct dcerpc_pipe **p);
|
||||
NTSTATUS dcerpc_secondary_auth_connection(struct dcerpc_pipe *p,
|
||||
const struct dcerpc_binding *binding,
|
||||
const struct ndr_interface_table *table,
|
||||
struct cli_credentials *credentials,
|
||||
struct loadparm_context *lp_ctx,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct dcerpc_pipe **p2);
|
||||
|
||||
struct composite_context* dcerpc_secondary_connection_send(struct dcerpc_pipe *p,
|
||||
const struct dcerpc_binding *b);
|
||||
|
||||
#endif /* __S4_DCERPC_H__ */
|
||||
@ -0,0 +1,656 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
server side dcerpc defines
|
||||
|
||||
Copyright (C) Andrew Tridgell 2003-2005
|
||||
Copyright (C) Stefan (metze) Metzmacher 2004-2005
|
||||
Copyright (C) Samuel Cabrero <scabrero@samba.org> 2019
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _LIBRPC_RPC_DCESRV_CORE_H_
|
||||
#define _LIBRPC_RPC_DCESRV_CORE_H_
|
||||
|
||||
#include <rpc_common.h>
|
||||
#include <ndr.h>
|
||||
#include <gen_ndr/security.h>
|
||||
|
||||
/* modules can use the following to determine if the interface has changed
|
||||
* please increment the version number after each interface change
|
||||
* with a comment and maybe update struct dcesrv_critical_sizes.
|
||||
*/
|
||||
/* version 1 - initial version - metze */
|
||||
#define DCERPC_MODULE_VERSION 1
|
||||
|
||||
struct dcesrv_connection;
|
||||
struct dcesrv_call_state;
|
||||
struct dcesrv_auth;
|
||||
struct dcesrv_connection_context;
|
||||
struct dcesrv_iface_state;
|
||||
struct cli_credentials;
|
||||
|
||||
struct dcesrv_interface {
|
||||
const char *name;
|
||||
struct ndr_syntax_id syntax_id;
|
||||
|
||||
/* this function is called when the client binds to this interface */
|
||||
NTSTATUS (*bind)(struct dcesrv_connection_context *, const struct dcesrv_interface *);
|
||||
|
||||
/* this function is called when the client disconnects the endpoint */
|
||||
void (*unbind)(struct dcesrv_connection_context *, const struct dcesrv_interface *);
|
||||
|
||||
/* the ndr_pull function for the chosen interface.
|
||||
*/
|
||||
NTSTATUS (*ndr_pull)(struct dcesrv_call_state *, TALLOC_CTX *, struct ndr_pull *, void **);
|
||||
|
||||
/* the dispatch function for the chosen interface.
|
||||
*/
|
||||
NTSTATUS (*dispatch)(struct dcesrv_call_state *, TALLOC_CTX *, void *);
|
||||
|
||||
/* the reply function for the chosen interface.
|
||||
*/
|
||||
NTSTATUS (*reply)(struct dcesrv_call_state *, TALLOC_CTX *, void *);
|
||||
|
||||
/* the ndr_push function for the chosen interface.
|
||||
*/
|
||||
NTSTATUS (*ndr_push)(struct dcesrv_call_state *, TALLOC_CTX *, struct ndr_push *, const void *);
|
||||
|
||||
/* the local dispatch function for the chosen interface.
|
||||
*/
|
||||
NTSTATUS (*local)(struct dcesrv_call_state *, TALLOC_CTX *, void *);
|
||||
|
||||
/* for any private use by the interface code */
|
||||
const void *private_data;
|
||||
|
||||
uint64_t flags;
|
||||
};
|
||||
|
||||
#define DCESRV_INTERFACE_FLAGS_HANDLES_NOT_USED 0x00000001
|
||||
|
||||
enum dcesrv_call_list {
|
||||
DCESRV_LIST_NONE,
|
||||
DCESRV_LIST_CALL_LIST,
|
||||
DCESRV_LIST_FRAGMENTED_CALL_LIST,
|
||||
DCESRV_LIST_PENDING_CALL_LIST
|
||||
};
|
||||
|
||||
struct data_blob_list_item {
|
||||
struct data_blob_list_item *prev,*next;
|
||||
DATA_BLOB blob;
|
||||
};
|
||||
|
||||
/* the state of an ongoing dcerpc call */
|
||||
struct dcesrv_call_state {
|
||||
struct dcesrv_call_state *next, *prev;
|
||||
struct dcesrv_auth *auth_state;
|
||||
struct dcesrv_connection *conn;
|
||||
struct dcesrv_connection_context *context;
|
||||
struct ncacn_packet pkt;
|
||||
|
||||
/*
|
||||
* Used during async bind/alter_context.
|
||||
*/
|
||||
struct ncacn_packet ack_pkt;
|
||||
|
||||
/*
|
||||
which list this request is in, if any
|
||||
*/
|
||||
enum dcesrv_call_list list;
|
||||
|
||||
/* the backend can mark the call
|
||||
* with DCESRV_CALL_STATE_FLAG_ASYNC
|
||||
* that will cause the frontend to not touch r->out
|
||||
* and skip the reply
|
||||
*
|
||||
* this is only allowed to the backend when DCESRV_CALL_STATE_FLAG_MAY_ASYNC
|
||||
* is already set by the frontend
|
||||
*
|
||||
* the backend then needs to call dcesrv_reply() when it's
|
||||
* ready to send the reply
|
||||
*/
|
||||
#define DCESRV_CALL_STATE_FLAG_ASYNC (1<<0)
|
||||
#define DCESRV_CALL_STATE_FLAG_MAY_ASYNC (1<<1)
|
||||
#define DCESRV_CALL_STATE_FLAG_MULTIPLEXED (1<<3)
|
||||
#define DCESRV_CALL_STATE_FLAG_PROCESS_PENDING_CALL (1<<4)
|
||||
uint32_t state_flags;
|
||||
|
||||
/* the time the request arrived in the server */
|
||||
struct timeval time;
|
||||
|
||||
/* the backend can use this event context for async replies */
|
||||
struct tevent_context *event_ctx;
|
||||
|
||||
/* this is the pointer to the allocated function struct */
|
||||
void *r;
|
||||
|
||||
/*
|
||||
* that's the ndr pull context used in dcesrv_request()
|
||||
* needed by dcesrv_reply() to carry over information
|
||||
* for full pointer support.
|
||||
*/
|
||||
struct ndr_pull *ndr_pull;
|
||||
|
||||
DATA_BLOB input;
|
||||
|
||||
struct data_blob_list_item *replies;
|
||||
|
||||
/* this is used by the boilerplate code to generate DCERPC faults */
|
||||
uint32_t fault_code;
|
||||
|
||||
/* the reason why we terminate the connection after sending a response */
|
||||
const char *terminate_reason;
|
||||
|
||||
/* temporary auth_info fields */
|
||||
struct dcerpc_auth in_auth_info;
|
||||
struct dcerpc_auth _out_auth_info;
|
||||
struct dcerpc_auth *out_auth_info;
|
||||
};
|
||||
|
||||
/*
|
||||
* DCERPC Handles
|
||||
* --------------
|
||||
* The various handles that are used in the RPC servers should be
|
||||
* created and fetch using the dcesrv_handle_* functions.
|
||||
*
|
||||
* Use
|
||||
* dcesrv_handle_create(struct dcesrv_call_state \*, uint8 handle_type)
|
||||
* to obtain a new handle of the specified type. Handle types are
|
||||
* unique within each pipe.
|
||||
*
|
||||
* The handle can later be fetched again using:
|
||||
*
|
||||
* struct dcesrv_handle *dcesrv_handle_lookup(
|
||||
* struct dcesrv_call_state *dce_call,
|
||||
* struct policy_handle *p,
|
||||
* uint8 handle_type)
|
||||
*
|
||||
* and destroyed by:
|
||||
*
|
||||
* TALLOC_FREE(struct dcesrv_handle *).
|
||||
*
|
||||
* User data should be stored in the 'data' member of the dcesrv_handle
|
||||
* struct.
|
||||
*/
|
||||
|
||||
#define DCESRV_HANDLE_ANY 255
|
||||
|
||||
/* a dcerpc handle in internal format */
|
||||
struct dcesrv_handle {
|
||||
struct dcesrv_handle *next, *prev;
|
||||
struct dcesrv_assoc_group *assoc_group;
|
||||
struct policy_handle wire_handle;
|
||||
struct dom_sid sid;
|
||||
enum dcerpc_AuthLevel min_auth_level;
|
||||
const struct dcesrv_interface *iface;
|
||||
void *data;
|
||||
};
|
||||
|
||||
/* hold the authentication state information */
|
||||
struct dcesrv_auth {
|
||||
struct dcesrv_auth *prev, *next;
|
||||
enum dcerpc_AuthType auth_type;
|
||||
enum dcerpc_AuthLevel auth_level;
|
||||
uint32_t auth_context_id;
|
||||
struct gensec_security *gensec_security;
|
||||
struct auth_session_info *session_info;
|
||||
NTSTATUS (*session_key_fn)(struct dcesrv_auth *, DATA_BLOB *session_key);
|
||||
bool auth_started;
|
||||
bool auth_finished;
|
||||
bool auth_audited;
|
||||
bool auth_invalid;
|
||||
};
|
||||
|
||||
struct dcesrv_connection_context {
|
||||
struct dcesrv_connection_context *next, *prev;
|
||||
uint16_t context_id;
|
||||
|
||||
/* the connection this is on */
|
||||
struct dcesrv_connection *conn;
|
||||
|
||||
/* the ndr function table for the chosen interface */
|
||||
const struct dcesrv_interface *iface;
|
||||
|
||||
/*
|
||||
* the minimum required auth level for this interface
|
||||
*/
|
||||
enum dcerpc_AuthLevel min_auth_level;
|
||||
bool allow_connect;
|
||||
|
||||
/* the negotiated transfer syntax */
|
||||
struct ndr_syntax_id transfer_syntax;
|
||||
};
|
||||
|
||||
|
||||
/* the state associated with a dcerpc server connection */
|
||||
struct dcesrv_connection {
|
||||
/* for the broken_connections DLIST */
|
||||
struct dcesrv_connection *prev, *next;
|
||||
|
||||
/* the top level context for this server */
|
||||
struct dcesrv_context *dce_ctx;
|
||||
|
||||
/* the endpoint that was opened */
|
||||
const struct dcesrv_endpoint *endpoint;
|
||||
|
||||
/* a list of established context_ids */
|
||||
struct dcesrv_connection_context *contexts;
|
||||
|
||||
/* the state of the current incoming call fragments */
|
||||
struct dcesrv_call_state *incoming_fragmented_call_list;
|
||||
|
||||
/* the state of the async pending calls */
|
||||
struct dcesrv_call_state *pending_call_list;
|
||||
|
||||
/* the state of the current outgoing calls */
|
||||
struct dcesrv_call_state *call_list;
|
||||
|
||||
/* the maximum size the client wants to receive */
|
||||
uint16_t max_recv_frag;
|
||||
uint16_t max_xmit_frag;
|
||||
|
||||
DATA_BLOB partial_input;
|
||||
|
||||
/* the event_context that will be used for this connection */
|
||||
struct tevent_context *event_ctx;
|
||||
|
||||
/* is this connection pending termination? If so, why? */
|
||||
const char *terminate;
|
||||
|
||||
const char *packet_log_dir;
|
||||
|
||||
/* this is the default state_flags for dcesrv_call_state structs */
|
||||
uint32_t state_flags;
|
||||
|
||||
struct {
|
||||
void *private_data;
|
||||
void (*report_output_data)(struct dcesrv_connection *);
|
||||
void (*terminate_connection)(struct dcesrv_connection *,
|
||||
const char *);
|
||||
} transport;
|
||||
|
||||
struct tstream_context *stream;
|
||||
struct tevent_queue *send_queue;
|
||||
|
||||
const struct tsocket_address *local_address;
|
||||
const struct tsocket_address *remote_address;
|
||||
|
||||
/* the current authentication state */
|
||||
struct dcesrv_auth *default_auth_state;
|
||||
size_t max_auth_states;
|
||||
struct dcesrv_auth *auth_states;
|
||||
bool got_explicit_auth_level_connect;
|
||||
struct dcesrv_auth *default_auth_level_connect;
|
||||
bool client_hdr_signing;
|
||||
bool support_hdr_signing;
|
||||
bool negotiated_hdr_signing;
|
||||
|
||||
/*
|
||||
* remember which pdu types are allowed
|
||||
*/
|
||||
bool allow_bind;
|
||||
bool allow_alter;
|
||||
|
||||
/* the association group the connection belongs to */
|
||||
struct dcesrv_assoc_group *assoc_group;
|
||||
|
||||
/* The maximum total payload of reassembled request pdus */
|
||||
size_t max_total_request_size;
|
||||
|
||||
/*
|
||||
* Our preferred transfer syntax.
|
||||
*/
|
||||
const struct ndr_syntax_id *preferred_transfer;
|
||||
|
||||
/*
|
||||
* This is used to block the connection during
|
||||
* pending authentication.
|
||||
*/
|
||||
struct tevent_req *(*wait_send)(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
void *private_data);
|
||||
NTSTATUS (*wait_recv)(struct tevent_req *req);
|
||||
void *wait_private;
|
||||
};
|
||||
|
||||
|
||||
struct dcesrv_endpoint_server {
|
||||
/* this is the name of the endpoint server */
|
||||
const char *name;
|
||||
|
||||
/* true if the endpoint server has been initialized */
|
||||
bool initialized;
|
||||
|
||||
/* this function should register endpoints and some other setup stuff,
|
||||
* it is called when the dcesrv_context gets initialized.
|
||||
*/
|
||||
NTSTATUS (*init_server)(struct dcesrv_context *, const struct dcesrv_endpoint_server *);
|
||||
|
||||
/* this function should cleanup endpoint server state and unregister
|
||||
* the endpoint server from dcesrv_context */
|
||||
NTSTATUS (*shutdown_server)(struct dcesrv_context *, const struct dcesrv_endpoint_server *);
|
||||
|
||||
/* this function can be used by other endpoint servers to
|
||||
* ask for a dcesrv_interface implementation
|
||||
* - iface must be reference to an already existing struct !
|
||||
*/
|
||||
bool (*interface_by_uuid)(struct dcesrv_interface *iface, const struct GUID *, uint32_t);
|
||||
|
||||
/* this function can be used by other endpoint servers to
|
||||
* ask for a dcesrv_interface implementation
|
||||
* - iface must be reference to an already existing struct !
|
||||
*/
|
||||
bool (*interface_by_name)(struct dcesrv_interface *iface, const char *);
|
||||
};
|
||||
|
||||
|
||||
/* one association groups */
|
||||
struct dcesrv_assoc_group {
|
||||
/* the wire id */
|
||||
uint32_t id;
|
||||
|
||||
/* The transport this is valid on */
|
||||
enum dcerpc_transport_t transport;
|
||||
|
||||
/* list of handles in this association group */
|
||||
struct dcesrv_handle *handles;
|
||||
|
||||
/*
|
||||
* list of iface states per assoc/conn
|
||||
*/
|
||||
struct dcesrv_iface_state *iface_states;
|
||||
|
||||
/* parent context */
|
||||
struct dcesrv_context *dce_ctx;
|
||||
|
||||
/* the negotiated bind time features */
|
||||
uint16_t bind_time_features;
|
||||
};
|
||||
|
||||
struct dcesrv_context_callbacks {
|
||||
struct {
|
||||
void (*successful_authz)(
|
||||
struct dcesrv_call_state *call, void *private_data);
|
||||
void *private_data;
|
||||
} log;
|
||||
struct {
|
||||
NTSTATUS (*gensec_prepare)(
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct dcesrv_call_state *call,
|
||||
struct gensec_security **out,
|
||||
void *private_data);
|
||||
void *private_data;
|
||||
void (*become_root)(void);
|
||||
void (*unbecome_root)(void);
|
||||
} auth;
|
||||
struct {
|
||||
NTSTATUS (*find)(
|
||||
struct dcesrv_call_state *call, void *private_data);
|
||||
void *private_data;
|
||||
} assoc_group;
|
||||
};
|
||||
|
||||
/* server-wide context information for the dcerpc server */
|
||||
struct dcesrv_context {
|
||||
/*
|
||||
* The euid at startup time.
|
||||
*
|
||||
* This is required for DCERPC_AUTH_TYPE_NCALRPC_AS_SYSTEM
|
||||
*/
|
||||
uid_t initial_euid;
|
||||
|
||||
/* the list of endpoints that have registered
|
||||
* by the configured endpoint servers
|
||||
*/
|
||||
struct dcesrv_endpoint {
|
||||
struct dcesrv_endpoint *next, *prev;
|
||||
/* the type and location of the endpoint */
|
||||
struct dcerpc_binding *ep_description;
|
||||
/* the secondary endpoint description for the BIND_ACK */
|
||||
struct dcerpc_binding *ep_2nd_description;
|
||||
/* the security descriptor for smb named pipes */
|
||||
struct security_descriptor *sd;
|
||||
/* the list of interfaces available on this endpoint */
|
||||
struct dcesrv_if_list {
|
||||
struct dcesrv_if_list *next, *prev;
|
||||
struct dcesrv_interface *iface;
|
||||
} *interface_list;
|
||||
|
||||
/*
|
||||
* Should this service be run in a single process (so far only
|
||||
* NETLOGON is not run in a single process)
|
||||
*/
|
||||
bool use_single_process;
|
||||
} *endpoint_list;
|
||||
|
||||
/* loadparm context to use for this connection */
|
||||
struct loadparm_context *lp_ctx;
|
||||
|
||||
struct idr_context *assoc_groups_idr;
|
||||
|
||||
struct dcesrv_connection *broken_connections;
|
||||
|
||||
struct dcesrv_context_callbacks *callbacks;
|
||||
};
|
||||
|
||||
/* this structure is used by modules to determine the size of some critical types */
|
||||
struct dcesrv_critical_sizes {
|
||||
int interface_version;
|
||||
int sizeof_dcesrv_context;
|
||||
int sizeof_dcesrv_endpoint;
|
||||
int sizeof_dcesrv_endpoint_server;
|
||||
int sizeof_dcesrv_interface;
|
||||
int sizeof_dcesrv_if_list;
|
||||
int sizeof_dcesrv_connection;
|
||||
int sizeof_dcesrv_call_state;
|
||||
int sizeof_dcesrv_auth;
|
||||
int sizeof_dcesrv_handle;
|
||||
};
|
||||
|
||||
NTSTATUS dcesrv_interface_register(struct dcesrv_context *dce_ctx,
|
||||
const char *ep_name,
|
||||
const char *ncacn_np_secondary_endpoint,
|
||||
const struct dcesrv_interface *iface,
|
||||
const struct security_descriptor *sd);
|
||||
NTSTATUS dcerpc_register_ep_server(const struct dcesrv_endpoint_server *ep_server);
|
||||
NTSTATUS dcesrv_init_ep_servers(struct dcesrv_context *dce_ctx,
|
||||
const char **ep_servers);
|
||||
NTSTATUS dcesrv_init_registered_ep_servers(struct dcesrv_context *dce_ctx);
|
||||
NTSTATUS dcesrv_shutdown_registered_ep_servers(struct dcesrv_context *dce_ctx);
|
||||
NTSTATUS dcesrv_init_ep_server(struct dcesrv_context *dce_ctx,
|
||||
const char *ep_server_name);
|
||||
NTSTATUS dcesrv_shutdown_ep_server(struct dcesrv_context *dce_ctx,
|
||||
const char *name);
|
||||
const struct dcesrv_endpoint_server *dcesrv_ep_server_byname(const char *name);
|
||||
|
||||
NTSTATUS dcesrv_init_context(TALLOC_CTX *mem_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct dcesrv_context_callbacks *cb,
|
||||
struct dcesrv_context **_dce_ctx);
|
||||
NTSTATUS dcesrv_reinit_context(struct dcesrv_context *dce_ctx);
|
||||
|
||||
NTSTATUS dcesrv_reply(struct dcesrv_call_state *call);
|
||||
struct dcesrv_handle *dcesrv_handle_create(struct dcesrv_call_state *call,
|
||||
uint8_t handle_type);
|
||||
|
||||
struct dcesrv_handle *dcesrv_handle_lookup(struct dcesrv_call_state *call,
|
||||
const struct policy_handle *p,
|
||||
uint8_t handle_type);
|
||||
|
||||
const struct tsocket_address *dcesrv_connection_get_local_address(struct dcesrv_connection *conn);
|
||||
const struct tsocket_address *dcesrv_connection_get_remote_address(struct dcesrv_connection *conn);
|
||||
|
||||
/*
|
||||
* Fetch the authentication session key if available.
|
||||
*
|
||||
* This is the key generated by a gensec authentication.
|
||||
*/
|
||||
NTSTATUS dcesrv_auth_session_key(struct dcesrv_call_state *call,
|
||||
DATA_BLOB *session_key);
|
||||
|
||||
/*
|
||||
* Fetch the transport session key if available.
|
||||
* Typically this is the SMB session key
|
||||
* or a fixed key for local transports.
|
||||
*
|
||||
* The key is always truncated to 16 bytes.
|
||||
*/
|
||||
NTSTATUS dcesrv_transport_session_key(struct dcesrv_call_state *call,
|
||||
DATA_BLOB *session_key);
|
||||
|
||||
/* a useful macro for generating a RPC fault in the backend code */
|
||||
#define DCESRV_FAULT(code) do { \
|
||||
dce_call->fault_code = code; \
|
||||
return r->out.result; \
|
||||
} while(0)
|
||||
|
||||
/* a useful macro for generating a RPC fault in the backend code */
|
||||
#define DCESRV_FAULT_VOID(code) do { \
|
||||
dce_call->fault_code = code; \
|
||||
return; \
|
||||
} while(0)
|
||||
|
||||
/* a useful macro for checking the validity of a dcerpc policy handle
|
||||
and giving the right fault code if invalid */
|
||||
#define DCESRV_CHECK_HANDLE(h) do {if (!(h)) DCESRV_FAULT(DCERPC_FAULT_CONTEXT_MISMATCH); } while (0)
|
||||
|
||||
/* this checks for a valid policy handle, and gives a fault if an
|
||||
invalid handle or retval if the handle is of the
|
||||
wrong type */
|
||||
#define DCESRV_PULL_HANDLE_RETVAL(h, inhandle, t, retval) do { \
|
||||
(h) = dcesrv_handle_lookup(dce_call, (inhandle), DCESRV_HANDLE_ANY); \
|
||||
DCESRV_CHECK_HANDLE(h); \
|
||||
if ((t) != DCESRV_HANDLE_ANY && (h)->wire_handle.handle_type != (t)) { \
|
||||
return retval; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* this checks for a valid policy handle and gives a dcerpc fault
|
||||
if its the wrong type of handle */
|
||||
#define DCESRV_PULL_HANDLE_FAULT(h, inhandle, t) do { \
|
||||
(h) = dcesrv_handle_lookup(dce_call, (inhandle), t); \
|
||||
DCESRV_CHECK_HANDLE(h); \
|
||||
} while (0)
|
||||
|
||||
#define DCESRV_PULL_HANDLE(h, inhandle, t) DCESRV_PULL_HANDLE_RETVAL(h, inhandle, t, NT_STATUS_INVALID_HANDLE)
|
||||
#define DCESRV_PULL_HANDLE_WERR(h, inhandle, t) DCESRV_PULL_HANDLE_RETVAL(h, inhandle, t, WERR_INVALID_HANDLE)
|
||||
|
||||
/**
|
||||
* retrieve credentials from a dce_call
|
||||
*/
|
||||
_PUBLIC_ struct cli_credentials *dcesrv_call_credentials(struct dcesrv_call_state *dce_call);
|
||||
|
||||
/**
|
||||
* returns true if this is an authenticated call
|
||||
*/
|
||||
_PUBLIC_ bool dcesrv_call_authenticated(struct dcesrv_call_state *dce_call);
|
||||
|
||||
/**
|
||||
* retrieve account_name for a dce_call
|
||||
*/
|
||||
_PUBLIC_ const char *dcesrv_call_account_name(struct dcesrv_call_state *dce_call);
|
||||
|
||||
/**
|
||||
* retrieve session_info from a dce_call
|
||||
*/
|
||||
_PUBLIC_ struct auth_session_info *dcesrv_call_session_info(struct dcesrv_call_state *dce_call);
|
||||
|
||||
/**
|
||||
* retrieve auth type/level from a dce_call
|
||||
*/
|
||||
_PUBLIC_ void dcesrv_call_auth_info(struct dcesrv_call_state *dce_call,
|
||||
enum dcerpc_AuthType *auth_type,
|
||||
enum dcerpc_AuthLevel *auth_level);
|
||||
|
||||
_PUBLIC_ NTSTATUS dcesrv_interface_bind_require_integrity(struct dcesrv_connection_context *context,
|
||||
const struct dcesrv_interface *iface);
|
||||
_PUBLIC_ NTSTATUS dcesrv_interface_bind_require_privacy(struct dcesrv_connection_context *context,
|
||||
const struct dcesrv_interface *iface);
|
||||
_PUBLIC_ NTSTATUS dcesrv_interface_bind_reject_connect(struct dcesrv_connection_context *context,
|
||||
const struct dcesrv_interface *iface);
|
||||
_PUBLIC_ NTSTATUS dcesrv_interface_bind_allow_connect(struct dcesrv_connection_context *context,
|
||||
const struct dcesrv_interface *iface);
|
||||
|
||||
_PUBLIC_ NTSTATUS _dcesrv_iface_state_store_assoc(
|
||||
struct dcesrv_call_state *call,
|
||||
uint64_t magic,
|
||||
void *ptr,
|
||||
const char *location);
|
||||
#define dcesrv_iface_state_store_assoc(call, magic, ptr) \
|
||||
_dcesrv_iface_state_store_assoc((call), (magic), (ptr), \
|
||||
__location__)
|
||||
_PUBLIC_ void *_dcesrv_iface_state_find_assoc(
|
||||
struct dcesrv_call_state *call,
|
||||
uint64_t magic);
|
||||
#define dcesrv_iface_state_find_assoc(call, magic, _type) \
|
||||
talloc_get_type( \
|
||||
_dcesrv_iface_state_find_assoc((call), (magic)), \
|
||||
_type)
|
||||
|
||||
_PUBLIC_ NTSTATUS _dcesrv_iface_state_store_conn(
|
||||
struct dcesrv_call_state *call,
|
||||
uint64_t magic,
|
||||
void *_pptr,
|
||||
const char *location);
|
||||
#define dcesrv_iface_state_store_conn(call, magic, ptr) \
|
||||
_dcesrv_iface_state_store_conn((call), (magic), (ptr), \
|
||||
__location__)
|
||||
_PUBLIC_ void *_dcesrv_iface_state_find_conn(
|
||||
struct dcesrv_call_state *call,
|
||||
uint64_t magic);
|
||||
#define dcesrv_iface_state_find_conn(call, magic, _type) \
|
||||
talloc_get_type( \
|
||||
_dcesrv_iface_state_find_conn((call), (magic)), \
|
||||
_type)
|
||||
|
||||
_PUBLIC_ void dcesrv_cleanup_broken_connections(struct dcesrv_context *dce_ctx);
|
||||
|
||||
_PUBLIC_ NTSTATUS dcesrv_endpoint_connect(struct dcesrv_context *dce_ctx,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct dcesrv_endpoint *ep,
|
||||
struct auth_session_info *session_info,
|
||||
struct tevent_context *event_ctx,
|
||||
uint32_t state_flags,
|
||||
struct dcesrv_connection **_p);
|
||||
_PUBLIC_ NTSTATUS dcesrv_find_endpoint(struct dcesrv_context *dce_ctx,
|
||||
const struct dcerpc_binding *ep_description,
|
||||
struct dcesrv_endpoint **_out);
|
||||
|
||||
_PUBLIC_ void dcesrv_terminate_connection(struct dcesrv_connection *dce_conn,
|
||||
const char *reason);
|
||||
_PUBLIC_ void dcesrv_sock_report_output_data(struct dcesrv_connection *dce_conn);
|
||||
|
||||
_PUBLIC_ NTSTATUS dcesrv_connection_loop_start(struct dcesrv_connection *conn);
|
||||
|
||||
_PUBLIC_ NTSTATUS dcesrv_call_dispatch_local(struct dcesrv_call_state *call);
|
||||
|
||||
_PUBLIC_ const struct dcesrv_interface *find_interface_by_syntax_id(
|
||||
const struct dcesrv_endpoint *endpoint,
|
||||
const struct ndr_syntax_id *interface);
|
||||
|
||||
void _dcesrv_save_ndr_fuzz_seed(DATA_BLOB call_blob,
|
||||
struct dcesrv_call_state *call,
|
||||
int flags);
|
||||
|
||||
#if DEVELOPER
|
||||
#define dcesrv_save_ndr_fuzz_seed(stub, call, flags) \
|
||||
_dcesrv_save_ndr_fuzz_seed(stub, call, flags)
|
||||
#else
|
||||
#define dcesrv_save_ndr_fuzz_seed(stub, call, flags) \
|
||||
/* */
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _LIBRPC_RPC_DCESRV_CORE_H_ */
|
||||
@ -0,0 +1,70 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
code to manipulate domain credentials
|
||||
|
||||
Copyright (C) Andrew Tridgell 2004
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <gen_ndr/netlogon.h>
|
||||
|
||||
/* The 7 here seems to be required to get Win2k not to downgrade us
|
||||
to NT4. Actually, anything other than 1ff would seem to do... */
|
||||
#define NETLOGON_NEG_AUTH2_FLAGS 0x000701ff
|
||||
/*
|
||||
(NETLOGON_NEG_ACCOUNT_LOCKOUT |
|
||||
NETLOGON_NEG_PERSISTENT_SAMREPL |
|
||||
NETLOGON_NEG_ARCFOUR |
|
||||
NETLOGON_NEG_PROMOTION_COUNT |
|
||||
NETLOGON_NEG_CHANGELOG_BDC |
|
||||
NETLOGON_NEG_FULL_SYNC_REPL |
|
||||
NETLOGON_NEG_MULTIPLE_SIDS |
|
||||
NETLOGON_NEG_REDO |
|
||||
NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL |
|
||||
NETLOGON_NEG_DNS_DOMAIN_TRUSTS |
|
||||
NETLOGON_NEG_PASSWORD_SET2 |
|
||||
NETLOGON_NEG_GETDOMAININFO)
|
||||
*/
|
||||
#define NETLOGON_NEG_DOMAIN_TRUST_ACCOUNT 0x2010b000
|
||||
|
||||
/* these are the flags that ADS clients use */
|
||||
/*
|
||||
(NETLOGON_NEG_ACCOUNT_LOCKOUT |
|
||||
NETLOGON_NEG_PERSISTENT_SAMREPL |
|
||||
NETLOGON_NEG_ARCFOUR |
|
||||
NETLOGON_NEG_PROMOTION_COUNT |
|
||||
NETLOGON_NEG_CHANGELOG_BDC |
|
||||
NETLOGON_NEG_FULL_SYNC_REPL |
|
||||
NETLOGON_NEG_MULTIPLE_SIDS |
|
||||
NETLOGON_NEG_REDO |
|
||||
NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL |
|
||||
NETLOGON_NEG_SEND_PASSWORD_INFO_PDC |
|
||||
NETLOGON_NEG_GENERIC_PASSTHROUGH |
|
||||
NETLOGON_NEG_CONCURRENT_RPC |
|
||||
NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL |
|
||||
NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL |
|
||||
NETLOGON_NEG_128BIT |
|
||||
NETLOGON_NEG_TRANSITIVE_TRUSTS |
|
||||
NETLOGON_NEG_DNS_DOMAIN_TRUSTS |
|
||||
NETLOGON_NEG_PASSWORD_SET2 |
|
||||
NETLOGON_NEG_GETDOMAININFO |
|
||||
NETLOGON_NEG_CROSS_FOREST_TRUSTS |
|
||||
NETLOGON_NEG_AUTHENTICATED_RPC_LSASS |
|
||||
NETLOGON_NEG_SCHANNEL)
|
||||
*/
|
||||
|
||||
#define NETLOGON_NEG_AUTH2_ADS_FLAGS (0x200fbffb | NETLOGON_NEG_ARCFOUR | NETLOGON_NEG_128BIT | NETLOGON_NEG_SCHANNEL)
|
||||
|
||||
@ -0,0 +1,145 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#ifndef _PIDL_HEADER_atsvc
|
||||
#define _PIDL_HEADER_atsvc
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <core/ntstatus.h>
|
||||
|
||||
#ifndef _HEADER_atsvc
|
||||
#define _HEADER_atsvc
|
||||
|
||||
/* bitmap atsvc_DaysOfMonth */
|
||||
#define First ( 0x00000001 )
|
||||
#define Second ( 0x00000002 )
|
||||
#define Third ( 0x00000004 )
|
||||
#define Fourth ( 0x00000008 )
|
||||
#define Fifth ( 0x00000010 )
|
||||
#define Sixth ( 0x00000020 )
|
||||
#define Seventh ( 0x00000040 )
|
||||
#define Eight ( 0x00000080 )
|
||||
#define Ninth ( 0x00000100 )
|
||||
#define Tenth ( 0x00000200 )
|
||||
#define Eleventh ( 0x00000400 )
|
||||
#define Twelfth ( 0x00000800 )
|
||||
#define Thitteenth ( 0x00001000 )
|
||||
#define Fourteenth ( 0x00002000 )
|
||||
#define Fifteenth ( 0x00004000 )
|
||||
#define Sixteenth ( 0x00008000 )
|
||||
#define Seventeenth ( 0x00010000 )
|
||||
#define Eighteenth ( 0x00020000 )
|
||||
#define Ninteenth ( 0x00040000 )
|
||||
#define Twentyth ( 0x00080000 )
|
||||
#define Twentyfirst ( 0x00100000 )
|
||||
#define Twentysecond ( 0x00200000 )
|
||||
#define Twentythird ( 0x00400000 )
|
||||
#define Twentyfourth ( 0x00800000 )
|
||||
#define Twentyfifth ( 0x01000000 )
|
||||
#define Twentysixth ( 0x02000000 )
|
||||
#define Twentyseventh ( 0x04000000 )
|
||||
#define Twentyeighth ( 0x08000000 )
|
||||
#define Twentyninth ( 0x10000000 )
|
||||
#define Thirtieth ( 0x20000000 )
|
||||
#define Thirtyfirst ( 0x40000000 )
|
||||
|
||||
/* bitmap atsvc_Flags */
|
||||
#define JOB_RUN_PERIODICALLY ( 0x01 )
|
||||
#define JOB_EXEC_ERROR ( 0x02 )
|
||||
#define JOB_RUNS_TODAY ( 0x04 )
|
||||
#define JOB_ADD_CURRENT_DATE ( 0x08 )
|
||||
#define JOB_NONINTERACTIVE ( 0x10 )
|
||||
|
||||
/* bitmap atsvc_DaysOfWeek */
|
||||
#define DAYSOFWEEK_MONDAY ( 0x01 )
|
||||
#define DAYSOFWEEK_TUESDAY ( 0x02 )
|
||||
#define DAYSOFWEEK_WEDNESDAY ( 0x04 )
|
||||
#define DAYSOFWEEK_THURSDAY ( 0x08 )
|
||||
#define DAYSOFWEEK_FRIDAY ( 0x10 )
|
||||
#define DAYSOFWEEK_SATURDAY ( 0x20 )
|
||||
#define DAYSOFWEEK_SUNDAY ( 0x40 )
|
||||
|
||||
struct atsvc_JobInfo {
|
||||
uint32_t job_time;
|
||||
uint32_t days_of_month;
|
||||
uint8_t days_of_week;
|
||||
uint8_t flags;
|
||||
const char *command;/* [charset(UTF16),unique] */
|
||||
};
|
||||
|
||||
struct atsvc_JobEnumInfo {
|
||||
uint32_t job_id;
|
||||
uint32_t job_time;
|
||||
uint32_t days_of_month;
|
||||
uint8_t days_of_week;
|
||||
uint8_t flags;
|
||||
const char *command;/* [charset(UTF16),unique] */
|
||||
};
|
||||
|
||||
struct atsvc_enum_ctr {
|
||||
uint32_t entries_read;
|
||||
struct atsvc_JobEnumInfo *first_entry;/* [size_is(entries_read),unique] */
|
||||
};
|
||||
|
||||
|
||||
struct atsvc_JobAdd {
|
||||
struct {
|
||||
const char *servername;/* [charset(UTF16),unique] */
|
||||
struct atsvc_JobInfo *job_info;/* [ref] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
uint32_t *job_id;/* [ref] */
|
||||
NTSTATUS result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct atsvc_JobDel {
|
||||
struct {
|
||||
const char *servername;/* [charset(UTF16),unique] */
|
||||
uint32_t min_job_id;
|
||||
uint32_t max_job_id;
|
||||
} in;
|
||||
|
||||
struct {
|
||||
NTSTATUS result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct atsvc_JobEnum {
|
||||
struct {
|
||||
const char *servername;/* [charset(UTF16),unique] */
|
||||
uint32_t preferred_max_len;
|
||||
struct atsvc_enum_ctr *ctr;/* [ref] */
|
||||
uint32_t *resume_handle;/* [unique] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
uint32_t *total_entries;/* [ref] */
|
||||
struct atsvc_enum_ctr *ctr;/* [ref] */
|
||||
uint32_t *resume_handle;/* [unique] */
|
||||
NTSTATUS result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct atsvc_JobGetInfo {
|
||||
struct {
|
||||
const char *servername;/* [charset(UTF16),unique] */
|
||||
uint32_t job_id;
|
||||
} in;
|
||||
|
||||
struct {
|
||||
struct atsvc_JobInfo **job_info;/* [ref] */
|
||||
NTSTATUS result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
#endif /* _HEADER_atsvc */
|
||||
#endif /* _PIDL_HEADER_atsvc */
|
||||
@ -0,0 +1,108 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#ifndef _PIDL_HEADER_auth
|
||||
#define _PIDL_HEADER_auth
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <core/ntstatus.h>
|
||||
|
||||
#include <gen_ndr/misc.h>
|
||||
#include <gen_ndr/security.h>
|
||||
#include <gen_ndr/lsa.h>
|
||||
#include <gen_ndr/krb5pac.h>
|
||||
#ifndef _HEADER_auth
|
||||
#define _HEADER_auth
|
||||
|
||||
enum auth_method
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
SEC_AUTH_METHOD_UNAUTHENTICATED=(int)(0),
|
||||
SEC_AUTH_METHOD_NTLM=(int)(1),
|
||||
SEC_AUTH_METHOD_KERBEROS=(int)(2)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_auth_method=0x7FFFFFFF}
|
||||
#define SEC_AUTH_METHOD_UNAUTHENTICATED ( 0 )
|
||||
#define SEC_AUTH_METHOD_NTLM ( 1 )
|
||||
#define SEC_AUTH_METHOD_KERBEROS ( 2 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct auth_user_info {
|
||||
const char *account_name;/* [charset(UTF8),unique] */
|
||||
const char *user_principal_name;/* [charset(UTF8),unique] */
|
||||
uint8_t user_principal_constructed;
|
||||
const char *domain_name;/* [charset(UTF8),unique] */
|
||||
const char *dns_domain_name;/* [charset(UTF8),unique] */
|
||||
const char *full_name;/* [charset(UTF8),unique] */
|
||||
const char *logon_script;/* [charset(UTF8),unique] */
|
||||
const char *profile_path;/* [charset(UTF8),unique] */
|
||||
const char *home_directory;/* [charset(UTF8),unique] */
|
||||
const char *home_drive;/* [charset(UTF8),unique] */
|
||||
const char *logon_server;/* [charset(UTF8),unique] */
|
||||
NTTIME last_logon;
|
||||
NTTIME last_logoff;
|
||||
NTTIME acct_expiry;
|
||||
NTTIME last_password_change;
|
||||
NTTIME allow_password_change;
|
||||
NTTIME force_password_change;
|
||||
uint16_t logon_count;
|
||||
uint16_t bad_password_count;
|
||||
uint32_t acct_flags;
|
||||
uint8_t authenticated;
|
||||
}/* [public] */;
|
||||
|
||||
struct auth_user_info_torture {
|
||||
uint32_t num_dc_sids;
|
||||
struct dom_sid *dc_sids;/* [size_is(num_dc_sids)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct auth_user_info_unix {
|
||||
const char *unix_name;/* [charset(UTF8),unique] */
|
||||
const char *sanitized_username;/* [charset(UTF8),unique] */
|
||||
}/* [public] */;
|
||||
|
||||
enum ticket_type
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
TICKET_TYPE_UNKNOWN=(int)(0),
|
||||
TICKET_TYPE_TGT=(int)(1),
|
||||
TICKET_TYPE_NON_TGT=(int)(2)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_ticket_type=0x7FFFFFFF}
|
||||
#define TICKET_TYPE_UNKNOWN ( 0 )
|
||||
#define TICKET_TYPE_TGT ( 1 )
|
||||
#define TICKET_TYPE_NON_TGT ( 2 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct auth_user_info_dc {
|
||||
uint32_t num_sids;
|
||||
struct dom_sid *sids;/* [size_is(num_sids)] */
|
||||
struct auth_user_info *info;/* [unique] */
|
||||
DATA_BLOB user_session_key;/* [noprint] */
|
||||
DATA_BLOB lm_session_key;/* [noprint] */
|
||||
enum ticket_type ticket_type;
|
||||
}/* [public] */;
|
||||
|
||||
struct auth_session_info {
|
||||
struct security_token *security_token;/* [unique] */
|
||||
struct security_unix_token *unix_token;/* [unique] */
|
||||
struct auth_user_info *info;/* [unique] */
|
||||
struct auth_user_info_unix *unix_info;/* [unique] */
|
||||
struct auth_user_info_torture *torture;/* [ignore,value(NULL)] */
|
||||
DATA_BLOB session_key;/* [noprint] */
|
||||
struct cli_credentials *credentials;/* [ignore,value(NULL)] */
|
||||
struct GUID unique_session_token;
|
||||
enum ticket_type ticket_type;
|
||||
}/* [public] */;
|
||||
|
||||
struct auth_session_info_transport {
|
||||
struct auth_session_info *session_info;/* [unique] */
|
||||
DATA_BLOB exported_gssapi_credentials;/* [noprint] */
|
||||
}/* [public] */;
|
||||
|
||||
#endif /* _HEADER_auth */
|
||||
#endif /* _PIDL_HEADER_auth */
|
||||
@ -0,0 +1,754 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#ifndef _PIDL_HEADER_dcerpc
|
||||
#define _PIDL_HEADER_dcerpc
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <core/ntstatus.h>
|
||||
|
||||
#include <gen_ndr/misc.h>
|
||||
extern const uint8_t DCERPC_SEC_VT_MAGIC[8];
|
||||
#ifndef _HEADER_dcerpc
|
||||
#define _HEADER_dcerpc
|
||||
|
||||
#define DCERPC_REQUEST_LENGTH ( 24 )
|
||||
#define DCERPC_BIND_PROVIDER_REJECT ( DCERPC_BIND_ACK_RESULT_PROVIDER_REJECTION )
|
||||
#define DCERPC_BIND_REASON_ASYNTAX ( DCERPC_BIND_ACK_REASON_ABSTRACT_SYNTAX_NOT_SUPPORTED )
|
||||
#define DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED ( DCERPC_BIND_NAK_REASON_PROTOCOL_VERSION_NOT_SUPPORTED )
|
||||
#define DCERPC_BIND_REASON_INVALID_AUTH_TYPE ( DCERPC_BIND_NAK_REASON_INVALID_AUTH_TYPE )
|
||||
#define DCERPC_RESPONSE_LENGTH ( 24 )
|
||||
#define DCERPC_FAULT_OP_RNG_ERROR ( DCERPC_NCA_S_OP_RNG_ERROR )
|
||||
#define DCERPC_FAULT_NDR ( DCERPC_FAULT_BAD_STUB_DATA )
|
||||
#define DCERPC_FAULT_INVALID_TAG ( DCERPC_NCA_S_FAULT_INVALID_TAG )
|
||||
#define DCERPC_FAULT_CONTEXT_MISMATCH ( DCERPC_NCA_S_FAULT_CONTEXT_MISMATCH )
|
||||
#define DCERPC_FAULT_OTHER ( 0x00000001 )
|
||||
#define DCERPC_FAULT_TODO ( 0x00000042 )
|
||||
#define DCERPC_FAULT_LENGTH ( 32 )
|
||||
#define AS_SYSTEM_MAGIC_PATH_TOKEN ( "/root/ncalrpc_as_system" )
|
||||
#define DCERPC_AUTH_TRAILER_LENGTH ( 8 )
|
||||
#define DCERPC_AUTH_PAD_ALIGNMENT ( 16 )
|
||||
#define DCERPC_PFC_FLAG_PENDING_CANCEL ( DCERPC_PFC_FLAG_PENDING_CANCEL_OR_HDR_SIGNING )
|
||||
#define DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN ( DCERPC_PFC_FLAG_PENDING_CANCEL_OR_HDR_SIGNING )
|
||||
#define DCERPC_PFC_OFFSET ( 3 )
|
||||
#define DCERPC_DREP_OFFSET ( 4 )
|
||||
#define DCERPC_FRAG_LEN_OFFSET ( 8 )
|
||||
#define DCERPC_FRAG_MAX_SIZE ( 5840 )
|
||||
#define DCERPC_AUTH_LEN_OFFSET ( 10 )
|
||||
#define DCERPC_NCACN_PAYLOAD_OFFSET ( 16 )
|
||||
#define DCERPC_NCACN_REQUEST_DEFAULT_MAX_SIZE ( 0x400000 )
|
||||
#define DCERPC_NCACN_RESPONSE_DEFAULT_MAX_SIZE ( 0xf000000 )
|
||||
#define DCERPC_DREP_LE ( 0x10 )
|
||||
#define DCERPC_SEC_VT_MAX_SIZE ( 1024 )
|
||||
struct dcerpc_ctx_list {
|
||||
uint16_t context_id;
|
||||
uint8_t num_transfer_syntaxes;
|
||||
struct ndr_syntax_id abstract_syntax;
|
||||
struct ndr_syntax_id *transfer_syntaxes;
|
||||
};
|
||||
|
||||
struct dcerpc_bind {
|
||||
uint16_t max_xmit_frag;
|
||||
uint16_t max_recv_frag;
|
||||
uint32_t assoc_group_id;
|
||||
uint8_t num_contexts;
|
||||
struct dcerpc_ctx_list *ctx_list;
|
||||
DATA_BLOB auth_info;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_empty {
|
||||
char _empty_;
|
||||
};
|
||||
|
||||
union dcerpc_object {
|
||||
struct GUID object;/* [case(LIBNDR_FLAG_OBJECT_PRESENT)] */
|
||||
struct dcerpc_empty empty;/* [default] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct dcerpc_request {
|
||||
uint32_t alloc_hint;
|
||||
uint16_t context_id;
|
||||
uint16_t opnum;
|
||||
union dcerpc_object object;/* [switch_is(NDR_DCERPC_REQUEST_OBJECT_PRESENT)] */
|
||||
DATA_BLOB stub_and_verifier;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
};
|
||||
|
||||
enum dcerpc_bind_ack_result
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DCERPC_BIND_ACK_RESULT_ACCEPTANCE=(int)(0),
|
||||
DCERPC_BIND_ACK_RESULT_USER_REJECTION=(int)(1),
|
||||
DCERPC_BIND_ACK_RESULT_PROVIDER_REJECTION=(int)(2),
|
||||
DCERPC_BIND_ACK_RESULT_NEGOTIATE_ACK=(int)(3)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_dcerpc_bind_ack_result=0x7FFFFFFF}
|
||||
#define DCERPC_BIND_ACK_RESULT_ACCEPTANCE ( 0 )
|
||||
#define DCERPC_BIND_ACK_RESULT_USER_REJECTION ( 1 )
|
||||
#define DCERPC_BIND_ACK_RESULT_PROVIDER_REJECTION ( 2 )
|
||||
#define DCERPC_BIND_ACK_RESULT_NEGOTIATE_ACK ( 3 )
|
||||
#endif
|
||||
;
|
||||
|
||||
enum dcerpc_bind_ack_reason_values
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DCERPC_BIND_ACK_REASON_NOT_SPECIFIED=(int)(0),
|
||||
DCERPC_BIND_ACK_REASON_ABSTRACT_SYNTAX_NOT_SUPPORTED=(int)(1),
|
||||
DCERPC_BIND_ACK_REASON_TRANSFER_SYNTAXES_NOT_SUPPORTED=(int)(2),
|
||||
DCERPC_BIND_ACK_REASON_LOCAL_LIMIT_EXCEEDED=(int)(3)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_dcerpc_bind_ack_reason_values=0x7FFFFFFF}
|
||||
#define DCERPC_BIND_ACK_REASON_NOT_SPECIFIED ( 0 )
|
||||
#define DCERPC_BIND_ACK_REASON_ABSTRACT_SYNTAX_NOT_SUPPORTED ( 1 )
|
||||
#define DCERPC_BIND_ACK_REASON_TRANSFER_SYNTAXES_NOT_SUPPORTED ( 2 )
|
||||
#define DCERPC_BIND_ACK_REASON_LOCAL_LIMIT_EXCEEDED ( 3 )
|
||||
#endif
|
||||
;
|
||||
|
||||
/* bitmap dcerpc_bind_time_features */
|
||||
#define DCERPC_BIND_TIME_SECURITY_CONTEXT_MULTIPLEXING ( 0x0001 )
|
||||
#define DCERPC_BIND_TIME_KEEP_CONNECTION_ON_ORPHAN ( 0x0002 )
|
||||
|
||||
union dcerpc_bind_ack_reason {
|
||||
uint16_t negotiate;/* [case(DCERPC_BIND_ACK_RESULT_NEGOTIATE_ACK)] */
|
||||
enum dcerpc_bind_ack_reason_values value;/* [default] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct dcerpc_ack_ctx {
|
||||
enum dcerpc_bind_ack_result result;
|
||||
union dcerpc_bind_ack_reason reason;/* [switch_is(result)] */
|
||||
struct ndr_syntax_id syntax;
|
||||
};
|
||||
|
||||
struct dcerpc_bind_ack {
|
||||
uint16_t max_xmit_frag;
|
||||
uint16_t max_recv_frag;
|
||||
uint32_t assoc_group_id;
|
||||
uint16_t secondary_address_size;/* [value(strlen_m_term_null(secondary_address))] */
|
||||
const char *secondary_address;/* [charset(DOS)] */
|
||||
DATA_BLOB _pad1;/* [flag(LIBNDR_FLAG_ALIGN4)] */
|
||||
uint8_t num_results;
|
||||
struct dcerpc_ack_ctx *ctx_list;
|
||||
DATA_BLOB auth_info;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
};
|
||||
|
||||
enum dcerpc_bind_nak_reason
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DCERPC_BIND_NAK_REASON_NOT_SPECIFIED=(int)(0),
|
||||
DCERPC_BIND_NAK_REASON_TEMPORARY_CONGESTION=(int)(1),
|
||||
DCERPC_BIND_NAK_REASON_LOCAL_LIMIT_EXCEEDED=(int)(2),
|
||||
DCERPC_BIND_NAK_REASON_PROTOCOL_VERSION_NOT_SUPPORTED=(int)(4),
|
||||
DCERPC_BIND_NAK_REASON_INVALID_AUTH_TYPE=(int)(8),
|
||||
DCERPC_BIND_NAK_REASON_INVALID_CHECKSUM=(int)(9)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_dcerpc_bind_nak_reason=0x7FFFFFFF}
|
||||
#define DCERPC_BIND_NAK_REASON_NOT_SPECIFIED ( 0 )
|
||||
#define DCERPC_BIND_NAK_REASON_TEMPORARY_CONGESTION ( 1 )
|
||||
#define DCERPC_BIND_NAK_REASON_LOCAL_LIMIT_EXCEEDED ( 2 )
|
||||
#define DCERPC_BIND_NAK_REASON_PROTOCOL_VERSION_NOT_SUPPORTED ( 4 )
|
||||
#define DCERPC_BIND_NAK_REASON_INVALID_AUTH_TYPE ( 8 )
|
||||
#define DCERPC_BIND_NAK_REASON_INVALID_CHECKSUM ( 9 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct dcerpc_bind_nak_version {
|
||||
uint8_t rpc_vers;
|
||||
uint8_t rpc_vers_minor;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_bind_nak {
|
||||
enum dcerpc_bind_nak_reason reject_reason;
|
||||
uint8_t num_versions;
|
||||
struct dcerpc_bind_nak_version *versions;
|
||||
DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [nopull,public] */;
|
||||
|
||||
struct dcerpc_response {
|
||||
uint32_t alloc_hint;
|
||||
uint16_t context_id;
|
||||
uint8_t cancel_count;
|
||||
uint8_t reserved;/* [value(0)] */
|
||||
DATA_BLOB stub_and_verifier;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
};
|
||||
|
||||
enum dcerpc_nca_status
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DCERPC_NCA_S_COMM_FAILURE=(int)(0x1C010001),
|
||||
DCERPC_NCA_S_OP_RNG_ERROR=(int)(0x1C010002),
|
||||
DCERPC_NCA_S_UNKNOWN_IF=(int)(0x1C010003),
|
||||
DCERPC_NCA_S_WRONG_BOOT_TIME=(int)(0x1C010006),
|
||||
DCERPC_NCA_S_YOU_CRASHED=(int)(0x1C010009),
|
||||
DCERPC_NCA_S_PROTO_ERROR=(int)(0x1C01000B),
|
||||
DCERPC_NCA_S_OUT_ARGS_TOO_BIG=(int)(0x1C010013),
|
||||
DCERPC_NCA_S_SERVER_TOO_BUSY=(int)(0x1C010014),
|
||||
DCERPC_NCA_S_FAULT_STRING_TOO_LARGE=(int)(0x1C010015),
|
||||
DCERPC_NCA_S_UNSUPPORTED_TYPE=(int)(0x1C010017),
|
||||
DCERPC_NCA_S_FAULT_INT_DIV_BY_ZERO=(int)(0x1C000001),
|
||||
DCERPC_NCA_S_FAULT_ADDR_ERROR=(int)(0x1C000002),
|
||||
DCERPC_NCA_S_FAULT_FP_DIV_BY_ZERO=(int)(0x1C000003),
|
||||
DCERPC_NCA_S_FAULT_FP_UNDERFLOW=(int)(0x1C000004),
|
||||
DCERPC_NCA_S_FAULT_FP_OVERRFLOW=(int)(0x1C000005),
|
||||
DCERPC_NCA_S_FAULT_INVALID_TAG=(int)(0x1C000006),
|
||||
DCERPC_NCA_S_FAULT_INVALID_BOUND=(int)(0x1C000007),
|
||||
DCERPC_NCA_S_FAULT_RPC_VERSION_MISMATCH=(int)(0x1C000008),
|
||||
DCERPC_NCA_S_FAULT_UNSPEC_REJECT=(int)(0x1C000009),
|
||||
DCERPC_NCA_S_FAULT_BAD_ACTID=(int)(0x1C00000A),
|
||||
DCERPC_NCA_S_FAULT_WHO_ARE_YOU_FAILED=(int)(0x1C00000B),
|
||||
DCERPC_NCA_S_FAULT_MANAGER_NOT_ENTERED=(int)(0x1C00000C),
|
||||
DCERPC_NCA_S_FAULT_CANCEL=(int)(0x1C00000D),
|
||||
DCERPC_NCA_S_FAULT_ILL_INST=(int)(0x1C00000E),
|
||||
DCERPC_NCA_S_FAULT_FP_ERROR=(int)(0x1C00000F),
|
||||
DCERPC_NCA_S_FAULT_INT_OVERFLOW=(int)(0x1C000010),
|
||||
DCERPC_NCA_S_UNUSED_1C000011=(int)(0x1C000011),
|
||||
DCERPC_NCA_S_FAULT_UNSPEC=(int)(0x1C000012),
|
||||
DCERPC_NCA_S_FAULT_REMOTE_COMM_FAILURE=(int)(0x1C000013),
|
||||
DCERPC_NCA_S_FAULT_PIPE_EMPTY=(int)(0x1C000014),
|
||||
DCERPC_NCA_S_FAULT_PIPE_CLOSED=(int)(0x1C000015),
|
||||
DCERPC_NCA_S_FAULT_PIPE_ORDER=(int)(0x1C000016),
|
||||
DCERPC_NCA_S_FAULT_PIPE_DISCIPLINE=(int)(0x1C000017),
|
||||
DCERPC_NCA_S_FAULT_PIPE_COMM_ERROR=(int)(0x1C000018),
|
||||
DCERPC_NCA_S_FAULT_PIPE_MEMORY=(int)(0x1C000019),
|
||||
DCERPC_NCA_S_FAULT_CONTEXT_MISMATCH=(int)(0x1C00001A),
|
||||
DCERPC_NCA_S_FAULT_REMOTE_NO_MEMORY=(int)(0x1C00001B),
|
||||
DCERPC_NCA_S_INVALID_PRES_CONTEXT_ID=(int)(0x1C00001C),
|
||||
DCERPC_NCA_S_UNSUPPORTED_AUTHN_LEVEL=(int)(0x1C00001D),
|
||||
DCERPC_NCA_S_UNUSED_1C00001E=(int)(0x1C00001E),
|
||||
DCERPC_NCA_S_INVALID_CHECKSUM=(int)(0x1C00001F),
|
||||
DCERPC_NCA_S_INVALID_CRC=(int)(0x1C000020),
|
||||
DCERPC_NCA_S_FAULT_USER_DEFINED=(int)(0x1C000021),
|
||||
DCERPC_NCA_S_FAULT_TX_OPEN_FAILED=(int)(0x1C000022),
|
||||
DCERPC_NCA_S_FAULT_CODESET_CONV_ERROR=(int)(0x1C000023),
|
||||
DCERPC_NCA_S_FAULT_OBJECT_NOT_FOUND=(int)(0x1C000024),
|
||||
DCERPC_NCA_S_FAULT_NO_CLIENT_STUB=(int)(0x1C000025),
|
||||
DCERPC_FAULT_ACCESS_DENIED=(int)(0x00000005),
|
||||
DCERPC_FAULT_SERVER_UNAVAILABLE=(int)(0x000006ba),
|
||||
DCERPC_FAULT_NO_CALL_ACTIVE=(int)(0x000006bd),
|
||||
DCERPC_FAULT_CANT_PERFORM=(int)(0x000006d8),
|
||||
DCERPC_FAULT_OUT_OF_RESOURCES=(int)(0x000006d9),
|
||||
DCERPC_FAULT_BAD_STUB_DATA=(int)(0x000006f7),
|
||||
DCERPC_FAULT_SEC_PKG_ERROR=(int)(0x00000721)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_dcerpc_nca_status=0x7FFFFFFF}
|
||||
#define DCERPC_NCA_S_COMM_FAILURE ( 0x1C010001 )
|
||||
#define DCERPC_NCA_S_OP_RNG_ERROR ( 0x1C010002 )
|
||||
#define DCERPC_NCA_S_UNKNOWN_IF ( 0x1C010003 )
|
||||
#define DCERPC_NCA_S_WRONG_BOOT_TIME ( 0x1C010006 )
|
||||
#define DCERPC_NCA_S_YOU_CRASHED ( 0x1C010009 )
|
||||
#define DCERPC_NCA_S_PROTO_ERROR ( 0x1C01000B )
|
||||
#define DCERPC_NCA_S_OUT_ARGS_TOO_BIG ( 0x1C010013 )
|
||||
#define DCERPC_NCA_S_SERVER_TOO_BUSY ( 0x1C010014 )
|
||||
#define DCERPC_NCA_S_FAULT_STRING_TOO_LARGE ( 0x1C010015 )
|
||||
#define DCERPC_NCA_S_UNSUPPORTED_TYPE ( 0x1C010017 )
|
||||
#define DCERPC_NCA_S_FAULT_INT_DIV_BY_ZERO ( 0x1C000001 )
|
||||
#define DCERPC_NCA_S_FAULT_ADDR_ERROR ( 0x1C000002 )
|
||||
#define DCERPC_NCA_S_FAULT_FP_DIV_BY_ZERO ( 0x1C000003 )
|
||||
#define DCERPC_NCA_S_FAULT_FP_UNDERFLOW ( 0x1C000004 )
|
||||
#define DCERPC_NCA_S_FAULT_FP_OVERRFLOW ( 0x1C000005 )
|
||||
#define DCERPC_NCA_S_FAULT_INVALID_TAG ( 0x1C000006 )
|
||||
#define DCERPC_NCA_S_FAULT_INVALID_BOUND ( 0x1C000007 )
|
||||
#define DCERPC_NCA_S_FAULT_RPC_VERSION_MISMATCH ( 0x1C000008 )
|
||||
#define DCERPC_NCA_S_FAULT_UNSPEC_REJECT ( 0x1C000009 )
|
||||
#define DCERPC_NCA_S_FAULT_BAD_ACTID ( 0x1C00000A )
|
||||
#define DCERPC_NCA_S_FAULT_WHO_ARE_YOU_FAILED ( 0x1C00000B )
|
||||
#define DCERPC_NCA_S_FAULT_MANAGER_NOT_ENTERED ( 0x1C00000C )
|
||||
#define DCERPC_NCA_S_FAULT_CANCEL ( 0x1C00000D )
|
||||
#define DCERPC_NCA_S_FAULT_ILL_INST ( 0x1C00000E )
|
||||
#define DCERPC_NCA_S_FAULT_FP_ERROR ( 0x1C00000F )
|
||||
#define DCERPC_NCA_S_FAULT_INT_OVERFLOW ( 0x1C000010 )
|
||||
#define DCERPC_NCA_S_UNUSED_1C000011 ( 0x1C000011 )
|
||||
#define DCERPC_NCA_S_FAULT_UNSPEC ( 0x1C000012 )
|
||||
#define DCERPC_NCA_S_FAULT_REMOTE_COMM_FAILURE ( 0x1C000013 )
|
||||
#define DCERPC_NCA_S_FAULT_PIPE_EMPTY ( 0x1C000014 )
|
||||
#define DCERPC_NCA_S_FAULT_PIPE_CLOSED ( 0x1C000015 )
|
||||
#define DCERPC_NCA_S_FAULT_PIPE_ORDER ( 0x1C000016 )
|
||||
#define DCERPC_NCA_S_FAULT_PIPE_DISCIPLINE ( 0x1C000017 )
|
||||
#define DCERPC_NCA_S_FAULT_PIPE_COMM_ERROR ( 0x1C000018 )
|
||||
#define DCERPC_NCA_S_FAULT_PIPE_MEMORY ( 0x1C000019 )
|
||||
#define DCERPC_NCA_S_FAULT_CONTEXT_MISMATCH ( 0x1C00001A )
|
||||
#define DCERPC_NCA_S_FAULT_REMOTE_NO_MEMORY ( 0x1C00001B )
|
||||
#define DCERPC_NCA_S_INVALID_PRES_CONTEXT_ID ( 0x1C00001C )
|
||||
#define DCERPC_NCA_S_UNSUPPORTED_AUTHN_LEVEL ( 0x1C00001D )
|
||||
#define DCERPC_NCA_S_UNUSED_1C00001E ( 0x1C00001E )
|
||||
#define DCERPC_NCA_S_INVALID_CHECKSUM ( 0x1C00001F )
|
||||
#define DCERPC_NCA_S_INVALID_CRC ( 0x1C000020 )
|
||||
#define DCERPC_NCA_S_FAULT_USER_DEFINED ( 0x1C000021 )
|
||||
#define DCERPC_NCA_S_FAULT_TX_OPEN_FAILED ( 0x1C000022 )
|
||||
#define DCERPC_NCA_S_FAULT_CODESET_CONV_ERROR ( 0x1C000023 )
|
||||
#define DCERPC_NCA_S_FAULT_OBJECT_NOT_FOUND ( 0x1C000024 )
|
||||
#define DCERPC_NCA_S_FAULT_NO_CLIENT_STUB ( 0x1C000025 )
|
||||
#define DCERPC_FAULT_ACCESS_DENIED ( 0x00000005 )
|
||||
#define DCERPC_FAULT_SERVER_UNAVAILABLE ( 0x000006ba )
|
||||
#define DCERPC_FAULT_NO_CALL_ACTIVE ( 0x000006bd )
|
||||
#define DCERPC_FAULT_CANT_PERFORM ( 0x000006d8 )
|
||||
#define DCERPC_FAULT_OUT_OF_RESOURCES ( 0x000006d9 )
|
||||
#define DCERPC_FAULT_BAD_STUB_DATA ( 0x000006f7 )
|
||||
#define DCERPC_FAULT_SEC_PKG_ERROR ( 0x00000721 )
|
||||
#endif
|
||||
;
|
||||
|
||||
/* bitmap dcerpc_fault_flags */
|
||||
#define DCERPC_FAULT_FLAG_EXTENDED_ERROR_INFORMATION ( 0x01 )
|
||||
|
||||
struct dcerpc_fault {
|
||||
uint32_t alloc_hint;
|
||||
uint16_t context_id;
|
||||
uint8_t cancel_count;
|
||||
uint8_t flags;
|
||||
enum dcerpc_nca_status status;
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
DATA_BLOB error_and_verifier;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
};
|
||||
|
||||
enum dcerpc_AuthType
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DCERPC_AUTH_TYPE_NONE=(int)(0),
|
||||
DCERPC_AUTH_TYPE_KRB5_1=(int)(1),
|
||||
DCERPC_AUTH_TYPE_SPNEGO=(int)(9),
|
||||
DCERPC_AUTH_TYPE_NTLMSSP=(int)(10),
|
||||
DCERPC_AUTH_TYPE_KRB5=(int)(16),
|
||||
DCERPC_AUTH_TYPE_DPA=(int)(17),
|
||||
DCERPC_AUTH_TYPE_MSN=(int)(18),
|
||||
DCERPC_AUTH_TYPE_DIGEST=(int)(21),
|
||||
DCERPC_AUTH_TYPE_SCHANNEL=(int)(68),
|
||||
DCERPC_AUTH_TYPE_MSMQ=(int)(100),
|
||||
DCERPC_AUTH_TYPE_NCALRPC_AS_SYSTEM=(int)(200)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_dcerpc_AuthType=0x7FFFFFFF}
|
||||
#define DCERPC_AUTH_TYPE_NONE ( 0 )
|
||||
#define DCERPC_AUTH_TYPE_KRB5_1 ( 1 )
|
||||
#define DCERPC_AUTH_TYPE_SPNEGO ( 9 )
|
||||
#define DCERPC_AUTH_TYPE_NTLMSSP ( 10 )
|
||||
#define DCERPC_AUTH_TYPE_KRB5 ( 16 )
|
||||
#define DCERPC_AUTH_TYPE_DPA ( 17 )
|
||||
#define DCERPC_AUTH_TYPE_MSN ( 18 )
|
||||
#define DCERPC_AUTH_TYPE_DIGEST ( 21 )
|
||||
#define DCERPC_AUTH_TYPE_SCHANNEL ( 68 )
|
||||
#define DCERPC_AUTH_TYPE_MSMQ ( 100 )
|
||||
#define DCERPC_AUTH_TYPE_NCALRPC_AS_SYSTEM ( 200 )
|
||||
#endif
|
||||
;
|
||||
|
||||
enum dcerpc_AuthLevel
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DCERPC_AUTH_LEVEL_NONE=(int)(1),
|
||||
DCERPC_AUTH_LEVEL_CONNECT=(int)(2),
|
||||
DCERPC_AUTH_LEVEL_CALL=(int)(3),
|
||||
DCERPC_AUTH_LEVEL_PACKET=(int)(4),
|
||||
DCERPC_AUTH_LEVEL_INTEGRITY=(int)(5),
|
||||
DCERPC_AUTH_LEVEL_PRIVACY=(int)(6)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_dcerpc_AuthLevel=0x7FFFFFFF}
|
||||
#define DCERPC_AUTH_LEVEL_NONE ( 1 )
|
||||
#define DCERPC_AUTH_LEVEL_CONNECT ( 2 )
|
||||
#define DCERPC_AUTH_LEVEL_CALL ( 3 )
|
||||
#define DCERPC_AUTH_LEVEL_PACKET ( 4 )
|
||||
#define DCERPC_AUTH_LEVEL_INTEGRITY ( 5 )
|
||||
#define DCERPC_AUTH_LEVEL_PRIVACY ( 6 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct dcerpc_auth {
|
||||
enum dcerpc_AuthType auth_type;
|
||||
enum dcerpc_AuthLevel auth_level;
|
||||
uint8_t auth_pad_length;
|
||||
uint8_t auth_reserved;
|
||||
uint32_t auth_context_id;
|
||||
DATA_BLOB credentials;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_auth3 {
|
||||
uint32_t _pad;/* [value(0)] */
|
||||
DATA_BLOB auth_info;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_orphaned {
|
||||
uint32_t _pad;/* [value(0)] */
|
||||
DATA_BLOB auth_info;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_co_cancel {
|
||||
uint32_t _pad;/* [value(0)] */
|
||||
DATA_BLOB auth_info;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_cl_cancel {
|
||||
uint32_t version;
|
||||
uint32_t id;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_cancel_ack {
|
||||
uint32_t version;
|
||||
uint32_t id;
|
||||
uint32_t server_is_accepting;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_fack {
|
||||
uint32_t version;
|
||||
uint8_t _pad1;
|
||||
uint16_t window_size;
|
||||
uint32_t max_tdsu;
|
||||
uint32_t max_frag_size;
|
||||
uint16_t serial_no;
|
||||
uint16_t selack_size;
|
||||
uint32_t *selack;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_ack {
|
||||
char _empty_;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_ping {
|
||||
char _empty_;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_shutdown {
|
||||
char _empty_;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_working {
|
||||
char _empty_;
|
||||
}/* [public] */;
|
||||
|
||||
struct RTSCookie {
|
||||
struct GUID Cookie;
|
||||
}/* [public] */;
|
||||
|
||||
enum AddressType
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
RTS_IPV4=(int)(0),
|
||||
RTS_IPV6=(int)(1)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_AddressType=0x7FFFFFFF}
|
||||
#define RTS_IPV4 ( 0 )
|
||||
#define RTS_IPV6 ( 1 )
|
||||
#endif
|
||||
;
|
||||
|
||||
union ClientAddressType {
|
||||
const char * ClientAddressIPV4;/* [case(RTS_IPV4)] */
|
||||
const char * ClientAddressIPV6;/* [case(RTS_IPV6)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct ClientAddress {
|
||||
enum AddressType AddressType;
|
||||
union ClientAddressType ClientAddress;/* [switch_is(AddressType)] */
|
||||
uint8_t Padding[12];
|
||||
}/* [public] */;
|
||||
|
||||
enum ForwardDestination
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
FDClient=(int)(0),
|
||||
FDInProxy=(int)(1),
|
||||
FDServer=(int)(2),
|
||||
FDOutProxy=(int)(3)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_ForwardDestination=0x7FFFFFFF}
|
||||
#define FDClient ( 0 )
|
||||
#define FDInProxy ( 1 )
|
||||
#define FDServer ( 2 )
|
||||
#define FDOutProxy ( 3 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct FlowControlAcknowledgment {
|
||||
uint32_t BytesReceived;
|
||||
uint32_t AvailableWindow;
|
||||
struct RTSCookie ChannelCookie;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_ReceiveWindowSize {
|
||||
uint32_t ReceiveWindowSize;/* [range(0x2000,0x40000)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_FlowControlAck {
|
||||
struct FlowControlAcknowledgment Ack;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_ConnectionTimeout {
|
||||
uint32_t ConnectionTimeout;/* [range(0x1D4C0,0xDBBA00)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_Cookie {
|
||||
struct RTSCookie Cookie;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_ChannelLifetime {
|
||||
uint32_t ChannelLifetime;/* [range(0x20000,0x80000000)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_ClientKeepalive {
|
||||
uint32_t ClientKeepalive;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_Version {
|
||||
uint32_t Version;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_Empty {
|
||||
char _empty_;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_Padding {
|
||||
uint32_t ConformanceCount;/* [range(0x0,0xFFFF)] */
|
||||
uint8_t *Padding;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_NegativeANCE {
|
||||
char _empty_;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_ANCE {
|
||||
char _empty_;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_ClientAddress {
|
||||
struct ClientAddress ClientAddress;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_AssociationGroupId {
|
||||
struct RTSCookie AssociationGroupId;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_Destination {
|
||||
enum ForwardDestination ForwardDestination;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_PingTrafficSentNotify {
|
||||
uint32_t PingTrafficSent;
|
||||
}/* [public] */;
|
||||
|
||||
union dcerpc_rts_cmds {
|
||||
struct dcerpc_rts_cmd_ReceiveWindowSize ReceiveWindowSize;/* [case(0x0)] */
|
||||
struct dcerpc_rts_cmd_FlowControlAck FlowControlAck;/* [case(0x1)] */
|
||||
struct dcerpc_rts_cmd_ConnectionTimeout ConnectionTimeout;/* [case(0x2)] */
|
||||
struct dcerpc_rts_cmd_Cookie Cookie;/* [case(0x3)] */
|
||||
struct dcerpc_rts_cmd_ChannelLifetime ChannelLifetime;/* [case(0x4)] */
|
||||
struct dcerpc_rts_cmd_ClientKeepalive ClientKeepalive;/* [case(0x5)] */
|
||||
struct dcerpc_rts_cmd_Version Version;/* [case(0x6)] */
|
||||
struct dcerpc_rts_cmd_Empty Empty;/* [case(0x7)] */
|
||||
struct dcerpc_rts_cmd_Padding Padding;/* [case(0x8)] */
|
||||
struct dcerpc_rts_cmd_NegativeANCE NegativeANCE;/* [case(0x9)] */
|
||||
struct dcerpc_rts_cmd_ANCE ANCE;/* [case(0xA)] */
|
||||
struct dcerpc_rts_cmd_ClientAddress ClientAddress;/* [case(0xB)] */
|
||||
struct dcerpc_rts_cmd_AssociationGroupId AssociationGroupId;/* [case(0xC)] */
|
||||
struct dcerpc_rts_cmd_Destination Destination;/* [case(0xD)] */
|
||||
struct dcerpc_rts_cmd_PingTrafficSentNotify PingTrafficSentNotify;/* [case(0xE)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct dcerpc_rts_cmd {
|
||||
uint32_t CommandType;
|
||||
union dcerpc_rts_cmds Command;/* [switch_is(CommandType)] */
|
||||
}/* [public] */;
|
||||
|
||||
/* bitmap dcerpc_rts_flags */
|
||||
#define RTS_FLAG_NONE ( 0x0000 )
|
||||
#define RTS_FLAG_PING ( 0x0001 )
|
||||
#define RTS_FLAG_OTHER_CMD ( 0x0002 )
|
||||
#define RTS_FLAG_RECYCLE_CHANNEL ( 0x0004 )
|
||||
#define RTS_FLAG_IN_CHANNEL ( 0x0008 )
|
||||
#define RTS_FLAG_OUT_CHANNEL ( 0x0010 )
|
||||
#define RTS_FLAG_EOF ( 0x0020 )
|
||||
#define RTS_FLAG_ECHO ( 0x0040 )
|
||||
|
||||
struct dcerpc_rts {
|
||||
uint16_t Flags;
|
||||
uint16_t NumberOfCommands;
|
||||
struct dcerpc_rts_cmd *Commands;
|
||||
}/* [public] */;
|
||||
|
||||
enum dcerpc_pkt_type
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DCERPC_PKT_REQUEST=(int)(0),
|
||||
DCERPC_PKT_PING=(int)(1),
|
||||
DCERPC_PKT_RESPONSE=(int)(2),
|
||||
DCERPC_PKT_FAULT=(int)(3),
|
||||
DCERPC_PKT_WORKING=(int)(4),
|
||||
DCERPC_PKT_NOCALL=(int)(5),
|
||||
DCERPC_PKT_REJECT=(int)(6),
|
||||
DCERPC_PKT_ACK=(int)(7),
|
||||
DCERPC_PKT_CL_CANCEL=(int)(8),
|
||||
DCERPC_PKT_FACK=(int)(9),
|
||||
DCERPC_PKT_CANCEL_ACK=(int)(10),
|
||||
DCERPC_PKT_BIND=(int)(11),
|
||||
DCERPC_PKT_BIND_ACK=(int)(12),
|
||||
DCERPC_PKT_BIND_NAK=(int)(13),
|
||||
DCERPC_PKT_ALTER=(int)(14),
|
||||
DCERPC_PKT_ALTER_RESP=(int)(15),
|
||||
DCERPC_PKT_AUTH3=(int)(16),
|
||||
DCERPC_PKT_SHUTDOWN=(int)(17),
|
||||
DCERPC_PKT_CO_CANCEL=(int)(18),
|
||||
DCERPC_PKT_ORPHANED=(int)(19),
|
||||
DCERPC_PKT_RTS=(int)(20)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_dcerpc_pkt_type=0x7FFFFFFF}
|
||||
#define DCERPC_PKT_REQUEST ( 0 )
|
||||
#define DCERPC_PKT_PING ( 1 )
|
||||
#define DCERPC_PKT_RESPONSE ( 2 )
|
||||
#define DCERPC_PKT_FAULT ( 3 )
|
||||
#define DCERPC_PKT_WORKING ( 4 )
|
||||
#define DCERPC_PKT_NOCALL ( 5 )
|
||||
#define DCERPC_PKT_REJECT ( 6 )
|
||||
#define DCERPC_PKT_ACK ( 7 )
|
||||
#define DCERPC_PKT_CL_CANCEL ( 8 )
|
||||
#define DCERPC_PKT_FACK ( 9 )
|
||||
#define DCERPC_PKT_CANCEL_ACK ( 10 )
|
||||
#define DCERPC_PKT_BIND ( 11 )
|
||||
#define DCERPC_PKT_BIND_ACK ( 12 )
|
||||
#define DCERPC_PKT_BIND_NAK ( 13 )
|
||||
#define DCERPC_PKT_ALTER ( 14 )
|
||||
#define DCERPC_PKT_ALTER_RESP ( 15 )
|
||||
#define DCERPC_PKT_AUTH3 ( 16 )
|
||||
#define DCERPC_PKT_SHUTDOWN ( 17 )
|
||||
#define DCERPC_PKT_CO_CANCEL ( 18 )
|
||||
#define DCERPC_PKT_ORPHANED ( 19 )
|
||||
#define DCERPC_PKT_RTS ( 20 )
|
||||
#endif
|
||||
;
|
||||
|
||||
union dcerpc_payload {
|
||||
struct dcerpc_request request;/* [case(DCERPC_PKT_REQUEST)] */
|
||||
struct dcerpc_ping ping;/* [case(DCERPC_PKT_PING)] */
|
||||
struct dcerpc_response response;/* [case(DCERPC_PKT_RESPONSE)] */
|
||||
struct dcerpc_fault fault;/* [case(DCERPC_PKT_FAULT)] */
|
||||
struct dcerpc_working working;/* [case(DCERPC_PKT_WORKING)] */
|
||||
struct dcerpc_fack nocall;/* [case(DCERPC_PKT_NOCALL)] */
|
||||
struct dcerpc_fault reject;/* [case(DCERPC_PKT_REJECT)] */
|
||||
struct dcerpc_ack ack;/* [case(DCERPC_PKT_ACK)] */
|
||||
struct dcerpc_cl_cancel cl_cancel;/* [case(DCERPC_PKT_CL_CANCEL)] */
|
||||
struct dcerpc_fack fack;/* [case(DCERPC_PKT_FACK)] */
|
||||
struct dcerpc_cancel_ack cancel_ack;/* [case(DCERPC_PKT_CANCEL_ACK)] */
|
||||
struct dcerpc_bind bind;/* [case(DCERPC_PKT_BIND)] */
|
||||
struct dcerpc_bind_ack bind_ack;/* [case(DCERPC_PKT_BIND_ACK)] */
|
||||
struct dcerpc_bind_nak bind_nak;/* [case(DCERPC_PKT_BIND_NAK)] */
|
||||
struct dcerpc_bind alter;/* [case(DCERPC_PKT_ALTER)] */
|
||||
struct dcerpc_bind_ack alter_resp;/* [case(DCERPC_PKT_ALTER_RESP)] */
|
||||
struct dcerpc_shutdown shutdown;/* [case(DCERPC_PKT_SHUTDOWN)] */
|
||||
struct dcerpc_co_cancel co_cancel;/* [case(DCERPC_PKT_CO_CANCEL)] */
|
||||
struct dcerpc_orphaned orphaned;/* [case(DCERPC_PKT_ORPHANED)] */
|
||||
struct dcerpc_auth3 auth3;/* [case(DCERPC_PKT_AUTH3)] */
|
||||
struct dcerpc_rts rts;/* [case(DCERPC_PKT_RTS)] */
|
||||
}/* [nodiscriminant,public] */;
|
||||
|
||||
/* bitmap dcerpc_pfc_flags */
|
||||
#define DCERPC_PFC_FLAG_FIRST ( 0x01 )
|
||||
#define DCERPC_PFC_FLAG_LAST ( 0x02 )
|
||||
#define DCERPC_PFC_FLAG_PENDING_CANCEL_OR_HDR_SIGNING ( 0x04 )
|
||||
#define DCERPC_PFC_FLAG_CONC_MPX ( 0x10 )
|
||||
#define DCERPC_PFC_FLAG_DID_NOT_EXECUTE ( 0x20 )
|
||||
#define DCERPC_PFC_FLAG_MAYBE ( 0x40 )
|
||||
#define DCERPC_PFC_FLAG_OBJECT_UUID ( 0x80 )
|
||||
|
||||
struct ncacn_packet {
|
||||
uint8_t rpc_vers;
|
||||
uint8_t rpc_vers_minor;
|
||||
enum dcerpc_pkt_type ptype;
|
||||
uint8_t pfc_flags;
|
||||
uint8_t drep[4];
|
||||
uint16_t frag_length;
|
||||
uint16_t auth_length;
|
||||
uint32_t call_id;
|
||||
union dcerpc_payload u;/* [switch_is(ptype)] */
|
||||
}/* [noprint,nopull,nopush,public] */;
|
||||
|
||||
struct ncadg_packet {
|
||||
uint8_t rpc_vers;
|
||||
uint8_t ptype;
|
||||
uint8_t pfc_flags;
|
||||
uint8_t ncadg_flags;
|
||||
uint8_t drep[3];
|
||||
uint8_t serial_high;
|
||||
struct GUID object;
|
||||
struct GUID iface;
|
||||
struct GUID activity;
|
||||
uint32_t server_boot;
|
||||
uint32_t iface_version;
|
||||
uint32_t seq_num;
|
||||
uint16_t opnum;
|
||||
uint16_t ihint;
|
||||
uint16_t ahint;
|
||||
uint16_t len;
|
||||
uint16_t fragnum;
|
||||
uint8_t auth_proto;
|
||||
uint8_t serial_low;
|
||||
union dcerpc_payload u;/* [switch_is(ptype)] */
|
||||
}/* [public] */;
|
||||
|
||||
/* bitmap dcerpc_sec_vt_command */
|
||||
#define DCERPC_SEC_VT_COMMAND_ENUM ( 0x3FFF )
|
||||
#define DCERPC_SEC_VT_COMMAND_END ( 0x4000 )
|
||||
#define DCERPC_SEC_VT_MUST_PROCESS ( 0x8000 )
|
||||
|
||||
enum dcerpc_sec_vt_command_enum
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DCERPC_SEC_VT_COMMAND_BITMASK1=(int)(0x0001),
|
||||
DCERPC_SEC_VT_COMMAND_PCONTEXT=(int)(0x0002),
|
||||
DCERPC_SEC_VT_COMMAND_HEADER2=(int)(0x0003)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_dcerpc_sec_vt_command_enum=0x7FFFFFFF}
|
||||
#define DCERPC_SEC_VT_COMMAND_BITMASK1 ( 0x0001 )
|
||||
#define DCERPC_SEC_VT_COMMAND_PCONTEXT ( 0x0002 )
|
||||
#define DCERPC_SEC_VT_COMMAND_HEADER2 ( 0x0003 )
|
||||
#endif
|
||||
;
|
||||
|
||||
/* bitmap dcerpc_sec_vt_bitmask1 */
|
||||
#define DCERPC_SEC_VT_CLIENT_SUPPORTS_HEADER_SIGNING ( 0x00000001 )
|
||||
|
||||
struct dcerpc_sec_vt_pcontext {
|
||||
struct ndr_syntax_id abstract_syntax;
|
||||
struct ndr_syntax_id transfer_syntax;
|
||||
};
|
||||
|
||||
struct dcerpc_sec_vt_header2 {
|
||||
enum dcerpc_pkt_type ptype;
|
||||
uint8_t reserved1;/* [value(0)] */
|
||||
uint16_t reserved2;/* [value(0)] */
|
||||
uint8_t drep[4];
|
||||
uint32_t call_id;
|
||||
uint16_t context_id;
|
||||
uint16_t opnum;
|
||||
};
|
||||
|
||||
union dcerpc_sec_vt_union {
|
||||
uint32_t bitmask1;/* [case(DCERPC_SEC_VT_COMMAND_BITMASK1)] */
|
||||
struct dcerpc_sec_vt_pcontext pcontext;/* [case(DCERPC_SEC_VT_COMMAND_PCONTEXT)] */
|
||||
struct dcerpc_sec_vt_header2 header2;/* [case(DCERPC_SEC_VT_COMMAND_HEADER2)] */
|
||||
DATA_BLOB _unknown;/* [default,flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [nodiscriminant,switch_type(dcerpc_sec_vt_command_enum)] */;
|
||||
|
||||
struct dcerpc_sec_vt {
|
||||
uint16_t command;
|
||||
union dcerpc_sec_vt_union u;/* [flag(LIBNDR_FLAG_SUBCONTEXT_NO_UNREAD_BYTES),subcontext(2),switch_is(command&DCERPC_SEC_VT_COMMAND_ENUM)] */
|
||||
};
|
||||
|
||||
struct dcerpc_sec_vt_count {
|
||||
uint16_t count;
|
||||
}/* [nopull,nopush,public] */;
|
||||
|
||||
struct dcerpc_sec_verification_trailer {
|
||||
DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
|
||||
uint8_t magic[8];/* [value(DCERPC_SEC_VT_MAGIC)] */
|
||||
struct dcerpc_sec_vt_count count;
|
||||
struct dcerpc_sec_vt *commands;
|
||||
}/* [flag(LIBNDR_PRINT_ARRAY_HEX),public] */;
|
||||
|
||||
#endif /* _HEADER_dcerpc */
|
||||
#endif /* _PIDL_HEADER_dcerpc */
|
||||
@ -0,0 +1,587 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#ifndef _PIDL_HEADER_drsblobs
|
||||
#define _PIDL_HEADER_drsblobs
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <core/ntstatus.h>
|
||||
|
||||
#include <gen_ndr/drsuapi.h>
|
||||
#include <gen_ndr/misc.h>
|
||||
#include <gen_ndr/samr.h>
|
||||
#include <gen_ndr/lsa.h>
|
||||
#include <gen_ndr/security.h>
|
||||
#ifndef _HEADER_drsblobs
|
||||
#define _HEADER_drsblobs
|
||||
|
||||
#define SUPPLEMENTAL_CREDENTIALS_PREFIX ( " " )
|
||||
#define ENCRYPTED_SECRET_MAGIC_VALUE ( 0xCA5CADED )
|
||||
struct replPropertyMetaData1 {
|
||||
enum drsuapi_DsAttributeId attid;
|
||||
uint32_t version;
|
||||
NTTIME originating_change_time;
|
||||
struct GUID originating_invocation_id;
|
||||
uint64_t originating_usn;
|
||||
uint64_t local_usn;
|
||||
}/* [public] */;
|
||||
|
||||
struct replPropertyMetaDataCtr1 {
|
||||
uint32_t count;
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
struct replPropertyMetaData1 *array;
|
||||
};
|
||||
|
||||
union replPropertyMetaDataCtr {
|
||||
struct replPropertyMetaDataCtr1 ctr1;/* [case] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct replPropertyMetaDataBlob {
|
||||
uint32_t version;
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
union replPropertyMetaDataCtr ctr;/* [switch_is(version)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct replUpToDateVectorCtr1 {
|
||||
uint32_t count;
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
struct drsuapi_DsReplicaCursor *cursors;
|
||||
};
|
||||
|
||||
struct replUpToDateVectorCtr2 {
|
||||
uint32_t count;
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
struct drsuapi_DsReplicaCursor2 *cursors;
|
||||
};
|
||||
|
||||
union replUpToDateVectorCtr {
|
||||
struct replUpToDateVectorCtr1 ctr1;/* [case] */
|
||||
struct replUpToDateVectorCtr2 ctr2;/* [case(2)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct replUpToDateVectorBlob {
|
||||
uint32_t version;
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
union replUpToDateVectorCtr ctr;/* [switch_is(version)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct repsFromTo1OtherInfo {
|
||||
uint32_t __dns_name_size;/* [value(strlen(dns_name)+1)] */
|
||||
const char *dns_name;/* [charset(DOS)] */
|
||||
}/* [gensize,public] */;
|
||||
|
||||
struct repsFromTo1 {
|
||||
uint32_t blobsize;/* [value(ndr_size_repsFromTo1(this,ndr->flags)+8)] */
|
||||
uint32_t consecutive_sync_failures;
|
||||
NTTIME last_success;
|
||||
NTTIME last_attempt;
|
||||
WERROR result_last_attempt;
|
||||
struct repsFromTo1OtherInfo *other_info;/* [relative] */
|
||||
uint32_t other_info_length;/* [value(ndr_size_repsFromTo1OtherInfo(other_info,ndr->flags))] */
|
||||
uint32_t replica_flags;
|
||||
uint8_t schedule[84];
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
struct drsuapi_DsReplicaHighWaterMark highwatermark;
|
||||
struct GUID source_dsa_obj_guid;
|
||||
struct GUID source_dsa_invocation_id;
|
||||
struct GUID transport_guid;
|
||||
}/* [flag(LIBNDR_PRINT_ARRAY_HEX),gensize,public] */;
|
||||
|
||||
struct repsFromTo2OtherInfo {
|
||||
uint32_t __ndr_size;/* [value(ndr_size_repsFromTo2OtherInfo(this,ndr->flags))] */
|
||||
const char * dns_name1;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2),relative] */
|
||||
uint32_t unknown1;
|
||||
const char * dns_name2;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2),relative] */
|
||||
uint64_t unknown2;
|
||||
}/* [gensize,public,relative_base] */;
|
||||
|
||||
struct repsFromTo2 {
|
||||
uint32_t blobsize;/* [value(ndr_size_repsFromTo2(this,ndr->flags)+8)] */
|
||||
uint32_t consecutive_sync_failures;
|
||||
NTTIME last_success;
|
||||
NTTIME last_attempt;
|
||||
WERROR result_last_attempt;
|
||||
struct repsFromTo2OtherInfo *other_info;/* [relative] */
|
||||
uint32_t other_info_length;/* [value(ndr_size_repsFromTo2OtherInfo(other_info,ndr->flags))] */
|
||||
uint32_t replica_flags;
|
||||
uint8_t schedule[84];
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
struct drsuapi_DsReplicaHighWaterMark highwatermark;
|
||||
struct GUID source_dsa_obj_guid;
|
||||
struct GUID source_dsa_invocation_id;
|
||||
struct GUID transport_guid;
|
||||
uint64_t unknown1;
|
||||
}/* [flag(LIBNDR_PRINT_ARRAY_HEX),gensize,public] */;
|
||||
|
||||
union repsFromTo {
|
||||
struct repsFromTo1 ctr1;/* [case] */
|
||||
struct repsFromTo2 ctr2;/* [case(2)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct repsFromToBlob {
|
||||
uint32_t version;
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
union repsFromTo ctr;/* [switch_is(version)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct scheduleHeader {
|
||||
uint32_t type;/* [value(0)] */
|
||||
uint32_t offset;
|
||||
}/* [public] */;
|
||||
|
||||
struct scheduleSlots {
|
||||
uint8_t slots[168];
|
||||
}/* [public] */;
|
||||
|
||||
struct schedule {
|
||||
uint32_t size;
|
||||
uint32_t bandwidth;/* [value(0)] */
|
||||
uint32_t numberOfSchedules;
|
||||
struct scheduleHeader *headerArray;
|
||||
struct scheduleSlots *dataArray;
|
||||
}/* [public] */;
|
||||
|
||||
struct partialAttributeSetCtr1 {
|
||||
uint32_t count;
|
||||
enum drsuapi_DsAttributeId *array;
|
||||
};
|
||||
|
||||
union partialAttributeSetCtr {
|
||||
struct partialAttributeSetCtr1 ctr1;/* [case] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct partialAttributeSetBlob {
|
||||
uint32_t version;
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
union partialAttributeSetCtr ctr;/* [switch_is(version)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct schemaInfoBlob {
|
||||
uint8_t marker;/* [value(0xFF)] */
|
||||
uint32_t revision;/* [flag(LIBNDR_FLAG_BIGENDIAN)] */
|
||||
struct GUID invocation_id;
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN),public] */;
|
||||
|
||||
struct drsuapi_MSPrefixMap_Entry {
|
||||
uint16_t entryID;
|
||||
uint16_t length;
|
||||
uint8_t *binary_oid;
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN),noprint] */;
|
||||
|
||||
struct drsuapi_MSPrefixMap_Ctr {
|
||||
uint32_t num_entries;
|
||||
uint32_t __ndr_size;/* [value(ndr_size_drsuapi_MSPrefixMap_Ctr(r,ndr->flags))] */
|
||||
struct drsuapi_MSPrefixMap_Entry *entries;
|
||||
}/* [gensize,public] */;
|
||||
|
||||
enum prefixMapVersion
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
PREFIX_MAP_VERSION_DSDB=(int)(0x44534442)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_prefixMapVersion=0x7FFFFFFF}
|
||||
#define PREFIX_MAP_VERSION_DSDB ( 0x44534442 )
|
||||
#endif
|
||||
;
|
||||
|
||||
union prefixMapCtr {
|
||||
struct drsuapi_DsReplicaOIDMapping_Ctr dsdb;/* [case(PREFIX_MAP_VERSION_DSDB)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct prefixMapBlob {
|
||||
enum prefixMapVersion version;
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
union prefixMapCtr ctr;/* [switch_is(version)] */
|
||||
}/* [public] */;
|
||||
|
||||
union ldapControlDirSyncExtra {
|
||||
struct replUpToDateVectorBlob uptodateness_vector;/* [default] */
|
||||
}/* [gensize,nodiscriminant] */;
|
||||
|
||||
struct ldapControlDirSyncBlob {
|
||||
uint32_t u1;/* [value(3)] */
|
||||
NTTIME time;
|
||||
uint32_t u2;
|
||||
uint32_t u3;
|
||||
uint32_t extra_length;/* [value(ndr_size_ldapControlDirSyncExtra(&extra,extra.uptodateness_vector.version,0))] */
|
||||
struct drsuapi_DsReplicaHighWaterMark highwatermark;
|
||||
struct GUID guid1;
|
||||
union ldapControlDirSyncExtra extra;/* [switch_is(extra_length)] */
|
||||
};
|
||||
|
||||
struct ldapControlDirSyncCookie {
|
||||
const char *msds;/* [charset(DOS),value("MSDS")] */
|
||||
struct ldapControlDirSyncBlob blob;/* [subcontext(0)] */
|
||||
}/* [public,relative_base] */;
|
||||
|
||||
struct supplementalCredentialsPackage {
|
||||
uint16_t name_len;/* [value(2*strlen_m(name))] */
|
||||
uint16_t data_len;/* [value(strlen(data))] */
|
||||
uint16_t reserved;
|
||||
const char *name;/* [charset(UTF16)] */
|
||||
const char *data;/* [charset(DOS)] */
|
||||
}/* [public] */;
|
||||
|
||||
enum supplementalCredentialsSignature
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
SUPPLEMENTAL_CREDENTIALS_SIGNATURE=(int)(0x0050)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_supplementalCredentialsSignature=0x7FFFFFFF}
|
||||
#define SUPPLEMENTAL_CREDENTIALS_SIGNATURE ( 0x0050 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct supplementalCredentialsSubBlob {
|
||||
const char *prefix;/* [charset(UTF16),value(SUPPLEMENTAL_CREDENTIALS_PREFIX)] */
|
||||
enum supplementalCredentialsSignature signature;/* [value(SUPPLEMENTAL_CREDENTIALS_SIGNATURE)] */
|
||||
uint16_t num_packages;
|
||||
struct supplementalCredentialsPackage *packages;
|
||||
}/* [gensize,nopull,nopush] */;
|
||||
|
||||
struct supplementalCredentialsBlob {
|
||||
uint32_t unknown1;/* [value(0)] */
|
||||
uint32_t __ndr_size;/* [value(ndr_size_supplementalCredentialsSubBlob(&sub,ndr->flags))] */
|
||||
uint32_t unknown2;/* [value(0)] */
|
||||
struct supplementalCredentialsSubBlob sub;/* [subcontext(0),subcontext_size(__ndr_size)] */
|
||||
uint8_t unknown3;/* [value(0)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct package_PackagesBlob {
|
||||
const char ** names;/* [flag(LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct package_PrimaryKerberosString {
|
||||
uint16_t length;/* [value(2*strlen_m(string))] */
|
||||
uint16_t size;/* [value(2*strlen_m(string))] */
|
||||
const char * string;/* [flag(LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING),relative,subcontext(0),subcontext_size(size)] */
|
||||
};
|
||||
|
||||
struct package_PrimaryKerberosKey3 {
|
||||
uint16_t reserved1;/* [value(0)] */
|
||||
uint16_t reserved2;/* [value(0)] */
|
||||
uint32_t reserved3;/* [value(0)] */
|
||||
uint32_t keytype;
|
||||
uint32_t value_len;/* [value((value?value->length:0))] */
|
||||
DATA_BLOB *value;/* [flag(LIBNDR_FLAG_REMAINING),relative,subcontext(0),subcontext_size(value_len)] */
|
||||
};
|
||||
|
||||
struct package_PrimaryKerberosCtr3 {
|
||||
uint16_t num_keys;
|
||||
uint16_t num_old_keys;
|
||||
struct package_PrimaryKerberosString salt;
|
||||
struct package_PrimaryKerberosKey3 *keys;
|
||||
struct package_PrimaryKerberosKey3 *old_keys;
|
||||
uint32_t padding1;/* [value(0)] */
|
||||
uint32_t padding2;/* [value(0)] */
|
||||
uint32_t padding3;/* [value(0)] */
|
||||
uint32_t padding4;/* [value(0)] */
|
||||
uint32_t padding5;/* [value(0)] */
|
||||
};
|
||||
|
||||
struct package_PrimaryKerberosKey4 {
|
||||
uint16_t reserved1;/* [value(0)] */
|
||||
uint16_t reserved2;/* [value(0)] */
|
||||
uint32_t reserved3;/* [value(0)] */
|
||||
uint32_t iteration_count;
|
||||
uint32_t keytype;
|
||||
uint32_t value_len;/* [value((value?value->length:0))] */
|
||||
DATA_BLOB *value;/* [flag(LIBNDR_FLAG_REMAINING),relative,subcontext(0),subcontext_size(value_len)] */
|
||||
};
|
||||
|
||||
struct package_PrimaryKerberosCtr4 {
|
||||
uint16_t num_keys;
|
||||
uint16_t num_service_keys;/* [value(0)] */
|
||||
uint16_t num_old_keys;
|
||||
uint16_t num_older_keys;
|
||||
struct package_PrimaryKerberosString salt;
|
||||
uint32_t default_iteration_count;
|
||||
struct package_PrimaryKerberosKey4 *keys;
|
||||
struct package_PrimaryKerberosKey4 *service_keys;
|
||||
struct package_PrimaryKerberosKey4 *old_keys;
|
||||
struct package_PrimaryKerberosKey4 *older_keys;
|
||||
};
|
||||
|
||||
union package_PrimaryKerberosCtr {
|
||||
struct package_PrimaryKerberosCtr3 ctr3;/* [case(3)] */
|
||||
struct package_PrimaryKerberosCtr4 ctr4;/* [case(4)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct package_PrimaryKerberosBlob {
|
||||
uint16_t version;
|
||||
uint16_t flags;/* [value(0)] */
|
||||
union package_PrimaryKerberosCtr ctr;/* [switch_is(version)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct package_PrimaryCLEARTEXTBlob {
|
||||
DATA_BLOB cleartext;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct package_PrimaryWDigestHash {
|
||||
uint8_t hash[16];
|
||||
}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;
|
||||
|
||||
struct package_PrimaryWDigestBlob {
|
||||
uint16_t unknown1;/* [value(0x31)] */
|
||||
uint8_t unknown2;/* [value(0x01)] */
|
||||
uint8_t num_hashes;
|
||||
uint32_t unknown3;/* [value(0)] */
|
||||
uint64_t uuknown4;/* [value(0)] */
|
||||
struct package_PrimaryWDigestHash *hashes;
|
||||
}/* [public] */;
|
||||
|
||||
struct package_PrimarySambaGPGBlob {
|
||||
DATA_BLOB gpg_blob;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct package_PrimaryUserPasswordValue {
|
||||
uint16_t scheme_len;/* [value(2*strlen_m(scheme))] */
|
||||
const char *scheme;/* [charset(UTF16)] */
|
||||
uint32_t value_len;/* [value((value?value->length:0))] */
|
||||
DATA_BLOB *value;/* [flag(LIBNDR_FLAG_REMAINING),relative,subcontext(0),subcontext_size(value_len)] */
|
||||
};
|
||||
|
||||
struct package_PrimaryUserPasswordBlob {
|
||||
struct samr_Password current_nt_hash;
|
||||
uint16_t num_hashes;
|
||||
struct package_PrimaryUserPasswordValue *hashes;
|
||||
}/* [public] */;
|
||||
|
||||
struct AuthInfoNone {
|
||||
uint32_t size;/* [value(0)] */
|
||||
};
|
||||
|
||||
struct AuthInfoNT4Owf {
|
||||
uint32_t size;/* [value(16)] */
|
||||
struct samr_Password password;
|
||||
};
|
||||
|
||||
struct AuthInfoClear {
|
||||
uint32_t size;
|
||||
uint8_t *password;
|
||||
};
|
||||
|
||||
struct AuthInfoVersion {
|
||||
uint32_t size;/* [value(4)] */
|
||||
uint32_t version;
|
||||
};
|
||||
|
||||
union AuthInfo {
|
||||
struct AuthInfoNone none;/* [case(TRUST_AUTH_TYPE_NONE)] */
|
||||
struct AuthInfoNT4Owf nt4owf;/* [case(TRUST_AUTH_TYPE_NT4OWF)] */
|
||||
struct AuthInfoClear clear;/* [case(TRUST_AUTH_TYPE_CLEAR)] */
|
||||
struct AuthInfoVersion version;/* [case(TRUST_AUTH_TYPE_VERSION)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct AuthenticationInformation {
|
||||
NTTIME LastUpdateTime;
|
||||
enum lsa_TrustAuthType AuthType;
|
||||
union AuthInfo AuthInfo;/* [switch_is(AuthType)] */
|
||||
DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct AuthenticationInformationArray {
|
||||
uint32_t count;
|
||||
struct AuthenticationInformation *array;
|
||||
}/* [gensize,nopull,nopush,public] */;
|
||||
|
||||
struct trustAuthInOutBlob {
|
||||
uint32_t count;
|
||||
uint32_t current_offset;/* [value((count>0)?12:0)] */
|
||||
uint32_t previous_offset;/* [value((count>0)?12+ndr_size_AuthenticationInformationArray(¤t,ndr->flags):0)] */
|
||||
struct AuthenticationInformationArray current;/* [subcontext(0),subcontext_size((previous_offset)-(current_offset))] */
|
||||
struct AuthenticationInformationArray previous;/* [flag(LIBNDR_FLAG_REMAINING),subcontext(0)] */
|
||||
}/* [gensize,nopush,public] */;
|
||||
|
||||
struct trustDomainPasswords {
|
||||
uint8_t confounder[512];
|
||||
struct trustAuthInOutBlob outgoing;/* [subcontext(0),subcontext_size(outgoing_size)] */
|
||||
struct trustAuthInOutBlob incoming;/* [subcontext(0),subcontext_size(incoming_size)] */
|
||||
uint32_t outgoing_size;/* [value(ndr_size_trustAuthInOutBlob(&outgoing,ndr->flags))] */
|
||||
uint32_t incoming_size;/* [value(ndr_size_trustAuthInOutBlob(&incoming,ndr->flags))] */
|
||||
}/* [nopull,public] */;
|
||||
|
||||
struct DsCompressedChunk {
|
||||
uint32_t marker;
|
||||
DATA_BLOB data;
|
||||
}/* [public] */;
|
||||
|
||||
struct ExtendedErrorAString {
|
||||
uint16_t __size;
|
||||
const char *string;/* [charset(DOS),size_is(__size),unique] */
|
||||
};
|
||||
|
||||
struct ExtendedErrorUString {
|
||||
uint16_t __size;
|
||||
const char *string;/* [charset(UTF16),size_is(__size),unique] */
|
||||
};
|
||||
|
||||
struct ExtendedErrorBlob {
|
||||
uint16_t length;
|
||||
uint8_t *data;/* [size_is(length),unique] */
|
||||
};
|
||||
|
||||
enum ExtendedErrorComputerNamePresent
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
EXTENDED_ERROR_COMPUTER_NAME_PRESENT=(int)(1),
|
||||
EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT=(int)(2)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_ExtendedErrorComputerNamePresent=0x7FFFFFFF}
|
||||
#define EXTENDED_ERROR_COMPUTER_NAME_PRESENT ( 1 )
|
||||
#define EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT ( 2 )
|
||||
#endif
|
||||
;
|
||||
|
||||
union ExtendedErrorComputerNameU {
|
||||
struct ExtendedErrorUString name;/* [case(EXTENDED_ERROR_COMPUTER_NAME_PRESENT)] */
|
||||
}/* [switch_type(ExtendedErrorComputerNamePresent)] */;
|
||||
|
||||
struct ExtendedErrorComputerName {
|
||||
enum ExtendedErrorComputerNamePresent present;
|
||||
union ExtendedErrorComputerNameU n;/* [switch_is(present)] */
|
||||
};
|
||||
|
||||
enum ExtendedErrorParamType
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING=(int)(1),
|
||||
EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING=(int)(2),
|
||||
EXTENDED_ERROR_PARAM_TYPE_UINT32=(int)(3),
|
||||
EXTENDED_ERROR_PARAM_TYPE_UINT16=(int)(4),
|
||||
EXTENDED_ERROR_PARAM_TYPE_UINT64=(int)(5),
|
||||
EXTENDED_ERROR_PARAM_TYPE_NONE=(int)(6),
|
||||
EXTENDED_ERROR_PARAM_TYPE_BLOB=(int)(7)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_ExtendedErrorParamType=0x7FFFFFFF}
|
||||
#define EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING ( 1 )
|
||||
#define EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING ( 2 )
|
||||
#define EXTENDED_ERROR_PARAM_TYPE_UINT32 ( 3 )
|
||||
#define EXTENDED_ERROR_PARAM_TYPE_UINT16 ( 4 )
|
||||
#define EXTENDED_ERROR_PARAM_TYPE_UINT64 ( 5 )
|
||||
#define EXTENDED_ERROR_PARAM_TYPE_NONE ( 6 )
|
||||
#define EXTENDED_ERROR_PARAM_TYPE_BLOB ( 7 )
|
||||
#endif
|
||||
;
|
||||
|
||||
union ExtendedErrorParamU {
|
||||
struct ExtendedErrorAString a_string;/* [case(EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING)] */
|
||||
struct ExtendedErrorUString u_string;/* [case(EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING)] */
|
||||
uint32_t uint32;/* [case(EXTENDED_ERROR_PARAM_TYPE_UINT32)] */
|
||||
uint16_t uint16;/* [case(EXTENDED_ERROR_PARAM_TYPE_UINT16)] */
|
||||
uint64_t uint64;/* [case(EXTENDED_ERROR_PARAM_TYPE_UINT64)] */
|
||||
struct ExtendedErrorBlob blob;/* [case(EXTENDED_ERROR_PARAM_TYPE_BLOB)] */
|
||||
}/* [switch_type(ExtendedErrorParamType)] */;
|
||||
|
||||
struct ExtendedErrorParam {
|
||||
enum ExtendedErrorParamType type;
|
||||
union ExtendedErrorParamU p;/* [switch_is(type)] */
|
||||
};
|
||||
|
||||
struct ExtendedErrorInfo {
|
||||
struct ExtendedErrorInfo *next;/* [max_recursion(20000),unique] */
|
||||
struct ExtendedErrorComputerName computer_name;
|
||||
uint64_t pid;
|
||||
NTTIME time;
|
||||
uint32_t generating_component;
|
||||
WERROR status;
|
||||
uint16_t detection_location;
|
||||
uint16_t flags;
|
||||
uint16_t num_params;
|
||||
struct ExtendedErrorParam *params;/* [size_is(num_params)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct ExtendedErrorInfoPtr {
|
||||
struct ExtendedErrorInfo *info;/* [unique] */
|
||||
};
|
||||
|
||||
struct ForestTrustString {
|
||||
uint32_t size;/* [value(strlen_m(string))] */
|
||||
const char *string;/* [charset(UTF8)] */
|
||||
};
|
||||
|
||||
struct ForestTrustDataDomainInfo {
|
||||
uint32_t sid_size;/* [value(ndr_size_dom_sid0(&sid,ndr->flags))] */
|
||||
struct dom_sid sid;/* [subcontext(0),subcontext_size(sid_size)] */
|
||||
struct ForestTrustString dns_name;
|
||||
struct ForestTrustString netbios_name;
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN)] */;
|
||||
|
||||
struct ForestTrustDataBinaryData {
|
||||
uint32_t size;
|
||||
uint8_t *data;
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN)] */;
|
||||
|
||||
union ForestTrustData {
|
||||
struct ForestTrustString name;/* [case(FOREST_TRUST_TOP_LEVEL_NAME)] */
|
||||
struct ForestTrustDataDomainInfo info;/* [case(FOREST_TRUST_DOMAIN_INFO)] */
|
||||
struct ForestTrustDataBinaryData data;/* [default] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
enum ForestTrustInfoRecordType
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
FOREST_TRUST_TOP_LEVEL_NAME=(int)(LSA_FOREST_TRUST_TOP_LEVEL_NAME),
|
||||
FOREST_TRUST_TOP_LEVEL_NAME_EX=(int)(LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX),
|
||||
FOREST_TRUST_DOMAIN_INFO=(int)(LSA_FOREST_TRUST_DOMAIN_INFO)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_ForestTrustInfoRecordType=0x7FFFFFFF}
|
||||
#define FOREST_TRUST_TOP_LEVEL_NAME ( LSA_FOREST_TRUST_TOP_LEVEL_NAME )
|
||||
#define FOREST_TRUST_TOP_LEVEL_NAME_EX ( LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX )
|
||||
#define FOREST_TRUST_DOMAIN_INFO ( LSA_FOREST_TRUST_DOMAIN_INFO )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct ForestTrustInfoRecord {
|
||||
uint32_t flags;
|
||||
NTTIME timestamp;
|
||||
enum ForestTrustInfoRecordType type;
|
||||
union ForestTrustData data;/* [switch_is(type)] */
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN),gensize,public] */;
|
||||
|
||||
struct ForestTrustInfoRecordArmor {
|
||||
uint32_t record_size;/* [value(ndr_size_ForestTrustInfoRecord(&record,ndr->flags))] */
|
||||
struct ForestTrustInfoRecord record;
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN)] */;
|
||||
|
||||
struct ForestTrustInfo {
|
||||
uint32_t version;
|
||||
uint32_t count;
|
||||
struct ForestTrustInfoRecordArmor *records;
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN),public] */;
|
||||
|
||||
enum EncryptedSecretAlgorithm
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
ENC_SECRET_AES_128_AEAD=(int)(1)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_EncryptedSecretAlgorithm=0x7FFFFFFF}
|
||||
#define ENC_SECRET_AES_128_AEAD ( 1 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct PlaintextSecret {
|
||||
DATA_BLOB cleartext;
|
||||
}/* [public] */;
|
||||
|
||||
struct EncryptedSecretHeader {
|
||||
uint32_t magic;
|
||||
uint32_t version;
|
||||
uint32_t algorithm;
|
||||
uint32_t flags;
|
||||
}/* [public] */;
|
||||
|
||||
struct EncryptedSecret {
|
||||
DATA_BLOB iv;
|
||||
struct EncryptedSecretHeader header;
|
||||
DATA_BLOB encrypted;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
#endif /* _HEADER_drsblobs */
|
||||
#endif /* _PIDL_HEADER_drsblobs */
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,222 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#ifndef _PIDL_HEADER_krb5pac
|
||||
#define _PIDL_HEADER_krb5pac
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <core/ntstatus.h>
|
||||
|
||||
#include <gen_ndr/security.h>
|
||||
#include <gen_ndr/lsa.h>
|
||||
#include <gen_ndr/netlogon.h>
|
||||
#include <gen_ndr/samr.h>
|
||||
#ifndef _HEADER_krb5pac
|
||||
#define _HEADER_krb5pac
|
||||
|
||||
#define NETLOGON_GENERIC_KRB5_PAC_VALIDATE ( 3 )
|
||||
struct PAC_LOGON_NAME {
|
||||
NTTIME logon_time;
|
||||
uint16_t size;/* [value(2*strlen_m(account_name))] */
|
||||
const char *account_name;/* [charset(UTF16)] */
|
||||
};
|
||||
|
||||
struct PAC_SIGNATURE_DATA {
|
||||
uint32_t type;
|
||||
DATA_BLOB signature;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [flag(LIBNDR_PRINT_ARRAY_HEX),public] */;
|
||||
|
||||
struct PAC_DOMAIN_GROUP_MEMBERSHIP {
|
||||
struct dom_sid2 *domain_sid;/* [unique] */
|
||||
struct samr_RidWithAttributeArray groups;
|
||||
};
|
||||
|
||||
struct PAC_LOGON_INFO {
|
||||
struct netr_SamInfo3 info3;
|
||||
struct PAC_DOMAIN_GROUP_MEMBERSHIP resource_groups;
|
||||
};
|
||||
|
||||
/* bitmap PAC_CREDENTIAL_NTLM_FLAGS */
|
||||
#define PAC_CREDENTIAL_NTLM_HAS_LM_HASH ( 0x00000001 )
|
||||
#define PAC_CREDENTIAL_NTLM_HAS_NT_HASH ( 0x00000002 )
|
||||
|
||||
struct PAC_CREDENTIAL_NTLM_SECPKG {
|
||||
uint32_t version;/* [value(0)] */
|
||||
uint32_t flags;
|
||||
struct samr_Password lm_password;/* [noprint] */
|
||||
struct samr_Password nt_password;/* [noprint] */
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_CREDENTIAL_SUPPLEMENTAL_SECPKG {
|
||||
struct lsa_String package_name;
|
||||
uint32_t credential_size;
|
||||
uint8_t *credential;/* [noprint,size_is(credential_size),unique] */
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_CREDENTIAL_DATA {
|
||||
uint32_t credential_count;
|
||||
struct PAC_CREDENTIAL_SUPPLEMENTAL_SECPKG *credentials;/* [size_is(credential_count)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_CREDENTIAL_DATA_CTR {
|
||||
struct PAC_CREDENTIAL_DATA *data;/* [unique] */
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_CREDENTIAL_DATA_NDR {
|
||||
struct PAC_CREDENTIAL_DATA_CTR ctr;/* [subcontext(0xFFFFFC01)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_CREDENTIAL_INFO {
|
||||
uint32_t version;/* [value(0)] */
|
||||
uint32_t encryption_type;
|
||||
DATA_BLOB encrypted_data;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_CONSTRAINED_DELEGATION {
|
||||
struct lsa_String proxy_target;
|
||||
uint32_t num_transited_services;
|
||||
struct lsa_String *transited_services;/* [size_is(num_transited_services),unique] */
|
||||
};
|
||||
|
||||
/* bitmap PAC_UPN_DNS_FLAGS */
|
||||
#define PAC_UPN_DNS_FLAG_CONSTRUCTED ( 0x00000001 )
|
||||
#define PAC_UPN_DNS_FLAG_HAS_SAM_NAME_AND_SID ( 0x00000002 )
|
||||
|
||||
struct PAC_UPN_DNS_INFO_SAM_NAME_AND_SID {
|
||||
uint16_t samaccountname_size;/* [value(2*strlen_m(samaccountname))] */
|
||||
const char * samaccountname;/* [flag(LIBNDR_FLAG_ALIGN8|LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING),relative_short,subcontext(0),subcontext_size(samaccountname_size)] */
|
||||
uint16_t objectsid_size;/* [value(ndr_size_dom_sid(objectsid,ndr->flags))] */
|
||||
struct dom_sid *objectsid;/* [relative_short,subcontext(0),subcontext_size(objectsid_size)] */
|
||||
};
|
||||
|
||||
union PAC_UPN_DNS_INFO_EX {
|
||||
struct PAC_UPN_DNS_INFO_SAM_NAME_AND_SID sam_name_and_sid;/* [case(PAC_UPN_DNS_FLAG_HAS_SAM_NAME_AND_SID)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct PAC_UPN_DNS_INFO {
|
||||
uint16_t upn_name_size;/* [value(2*strlen_m(upn_name))] */
|
||||
const char * upn_name;/* [flag(LIBNDR_FLAG_ALIGN8|LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING),relative_short,subcontext(0),subcontext_size(upn_name_size)] */
|
||||
uint16_t dns_domain_name_size;/* [value(2*strlen_m(dns_domain_name))] */
|
||||
const char * dns_domain_name;/* [flag(LIBNDR_FLAG_ALIGN8|LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING),relative_short,subcontext(0),subcontext_size(dns_domain_name_size)] */
|
||||
uint32_t flags;
|
||||
union PAC_UPN_DNS_INFO_EX ex;/* [switch_is(flags&PAC_UPN_DNS_FLAG_HAS_SAM_NAME_AND_SID)] */
|
||||
};
|
||||
|
||||
/* bitmap PAC_ATTRIBUTE_INFO_FLAGS */
|
||||
#define PAC_ATTRIBUTE_FLAG_PAC_WAS_REQUESTED ( 0x00000001 )
|
||||
#define PAC_ATTRIBUTE_FLAG_PAC_WAS_GIVEN_IMPLICITLY ( 0x00000002 )
|
||||
|
||||
struct PAC_ATTRIBUTES_INFO {
|
||||
uint32_t flags_length;
|
||||
uint32_t flags;
|
||||
};
|
||||
|
||||
struct PAC_REQUESTER_SID {
|
||||
struct dom_sid sid;
|
||||
};
|
||||
|
||||
struct PAC_LOGON_INFO_CTR {
|
||||
struct PAC_LOGON_INFO *info;/* [unique] */
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_CONSTRAINED_DELEGATION_CTR {
|
||||
struct PAC_CONSTRAINED_DELEGATION *info;/* [unique] */
|
||||
}/* [public] */;
|
||||
|
||||
enum PAC_TYPE
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
PAC_TYPE_LOGON_INFO=(int)(1),
|
||||
PAC_TYPE_CREDENTIAL_INFO=(int)(2),
|
||||
PAC_TYPE_SRV_CHECKSUM=(int)(6),
|
||||
PAC_TYPE_KDC_CHECKSUM=(int)(7),
|
||||
PAC_TYPE_LOGON_NAME=(int)(10),
|
||||
PAC_TYPE_CONSTRAINED_DELEGATION=(int)(11),
|
||||
PAC_TYPE_UPN_DNS_INFO=(int)(12),
|
||||
PAC_TYPE_CLIENT_CLAIMS_INFO=(int)(13),
|
||||
PAC_TYPE_DEVICE_INFO=(int)(14),
|
||||
PAC_TYPE_DEVICE_CLAIMS_INFO=(int)(15),
|
||||
PAC_TYPE_TICKET_CHECKSUM=(int)(16),
|
||||
PAC_TYPE_ATTRIBUTES_INFO=(int)(17),
|
||||
PAC_TYPE_REQUESTER_SID=(int)(18),
|
||||
PAC_TYPE_FULL_CHECKSUM=(int)(19)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_PAC_TYPE=0x7FFFFFFF}
|
||||
#define PAC_TYPE_LOGON_INFO ( 1 )
|
||||
#define PAC_TYPE_CREDENTIAL_INFO ( 2 )
|
||||
#define PAC_TYPE_SRV_CHECKSUM ( 6 )
|
||||
#define PAC_TYPE_KDC_CHECKSUM ( 7 )
|
||||
#define PAC_TYPE_LOGON_NAME ( 10 )
|
||||
#define PAC_TYPE_CONSTRAINED_DELEGATION ( 11 )
|
||||
#define PAC_TYPE_UPN_DNS_INFO ( 12 )
|
||||
#define PAC_TYPE_CLIENT_CLAIMS_INFO ( 13 )
|
||||
#define PAC_TYPE_DEVICE_INFO ( 14 )
|
||||
#define PAC_TYPE_DEVICE_CLAIMS_INFO ( 15 )
|
||||
#define PAC_TYPE_TICKET_CHECKSUM ( 16 )
|
||||
#define PAC_TYPE_ATTRIBUTES_INFO ( 17 )
|
||||
#define PAC_TYPE_REQUESTER_SID ( 18 )
|
||||
#define PAC_TYPE_FULL_CHECKSUM ( 19 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct DATA_BLOB_REM {
|
||||
DATA_BLOB remaining;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
};
|
||||
|
||||
union PAC_INFO {
|
||||
struct PAC_LOGON_INFO_CTR logon_info;/* [case(PAC_TYPE_LOGON_INFO),subcontext(0xFFFFFC01)] */
|
||||
struct PAC_CREDENTIAL_INFO credential_info;/* [case(PAC_TYPE_CREDENTIAL_INFO)] */
|
||||
struct PAC_SIGNATURE_DATA srv_cksum;/* [case(PAC_TYPE_SRV_CHECKSUM)] */
|
||||
struct PAC_SIGNATURE_DATA kdc_cksum;/* [case(PAC_TYPE_KDC_CHECKSUM)] */
|
||||
struct PAC_LOGON_NAME logon_name;/* [case(PAC_TYPE_LOGON_NAME)] */
|
||||
struct PAC_CONSTRAINED_DELEGATION_CTR constrained_delegation;/* [case(PAC_TYPE_CONSTRAINED_DELEGATION),subcontext(0xFFFFFC01)] */
|
||||
struct PAC_UPN_DNS_INFO upn_dns_info;/* [case(PAC_TYPE_UPN_DNS_INFO)] */
|
||||
struct PAC_SIGNATURE_DATA ticket_checksum;/* [case(PAC_TYPE_TICKET_CHECKSUM)] */
|
||||
struct PAC_ATTRIBUTES_INFO attributes_info;/* [case(PAC_TYPE_ATTRIBUTES_INFO)] */
|
||||
struct PAC_REQUESTER_SID requester_sid;/* [case(PAC_TYPE_REQUESTER_SID)] */
|
||||
struct PAC_SIGNATURE_DATA full_checksum;/* [case(PAC_TYPE_FULL_CHECKSUM)] */
|
||||
struct DATA_BLOB_REM unknown;/* [default,subcontext(0)] */
|
||||
}/* [gensize,nodiscriminant,public] */;
|
||||
|
||||
struct PAC_BUFFER {
|
||||
enum PAC_TYPE type;
|
||||
uint32_t _ndr_size;/* [value(_ndr_size_PAC_INFO(info,type,LIBNDR_FLAG_ALIGN8))] */
|
||||
union PAC_INFO *info;/* [flag(LIBNDR_FLAG_ALIGN8),relative,subcontext(0),subcontext_size(NDR_ROUND(_ndr_size,8)),switch_is(type)] */
|
||||
uint32_t _pad;/* [value(0)] */
|
||||
}/* [nopull,nopush,public] */;
|
||||
|
||||
struct PAC_DATA {
|
||||
uint32_t num_buffers;
|
||||
uint32_t version;
|
||||
struct PAC_BUFFER *buffers;
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_BUFFER_RAW {
|
||||
enum PAC_TYPE type;
|
||||
uint32_t ndr_size;
|
||||
struct DATA_BLOB_REM *info;/* [flag(LIBNDR_FLAG_ALIGN8),relative,subcontext(0),subcontext_size(NDR_ROUND(ndr_size,8))] */
|
||||
uint32_t _pad;/* [value(0)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_DATA_RAW {
|
||||
uint32_t num_buffers;
|
||||
uint32_t version;
|
||||
struct PAC_BUFFER_RAW *buffers;
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_Validate {
|
||||
uint32_t MessageType;/* [value(NETLOGON_GENERIC_KRB5_PAC_VALIDATE)] */
|
||||
uint32_t ChecksumLength;
|
||||
int32_t SignatureType;
|
||||
uint32_t SignatureLength;
|
||||
DATA_BLOB ChecksumAndSignature;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct netsamlogoncache_entry {
|
||||
time_t timestamp;
|
||||
struct netr_SamInfo3 info3;
|
||||
}/* [public] */;
|
||||
|
||||
#endif /* _HEADER_krb5pac */
|
||||
#endif /* _PIDL_HEADER_krb5pac */
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,158 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#ifndef _PIDL_HEADER_misc
|
||||
#define _PIDL_HEADER_misc
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <core/ntstatus.h>
|
||||
|
||||
#ifndef _HEADER_misc
|
||||
#define _HEADER_misc
|
||||
|
||||
#define SV_TYPE_ALL ( 0xFFFFFFFF )
|
||||
struct GUID {
|
||||
uint32_t time_low;
|
||||
uint16_t time_mid;
|
||||
uint16_t time_hi_and_version;
|
||||
uint8_t clock_seq[2];
|
||||
uint8_t node[6];
|
||||
}/* [gensize,noprint,public] */;
|
||||
|
||||
struct ndr_syntax_id {
|
||||
struct GUID uuid;
|
||||
uint32_t if_version;
|
||||
}/* [public] */;
|
||||
|
||||
struct policy_handle {
|
||||
uint32_t handle_type;
|
||||
struct GUID uuid;
|
||||
}/* [public] */;
|
||||
|
||||
enum netr_SchannelType
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
SEC_CHAN_NULL=(int)(0),
|
||||
SEC_CHAN_LOCAL=(int)(1),
|
||||
SEC_CHAN_WKSTA=(int)(2),
|
||||
SEC_CHAN_DNS_DOMAIN=(int)(3),
|
||||
SEC_CHAN_DOMAIN=(int)(4),
|
||||
SEC_CHAN_LANMAN=(int)(5),
|
||||
SEC_CHAN_BDC=(int)(6),
|
||||
SEC_CHAN_RODC=(int)(7)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_netr_SchannelType=0x7FFFFFFF}
|
||||
#define SEC_CHAN_NULL ( 0 )
|
||||
#define SEC_CHAN_LOCAL ( 1 )
|
||||
#define SEC_CHAN_WKSTA ( 2 )
|
||||
#define SEC_CHAN_DNS_DOMAIN ( 3 )
|
||||
#define SEC_CHAN_DOMAIN ( 4 )
|
||||
#define SEC_CHAN_LANMAN ( 5 )
|
||||
#define SEC_CHAN_BDC ( 6 )
|
||||
#define SEC_CHAN_RODC ( 7 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct KRB5_EDATA_NTSTATUS {
|
||||
NTSTATUS ntstatus;
|
||||
uint32_t unknown1;
|
||||
uint32_t unknown2;
|
||||
}/* [public] */;
|
||||
|
||||
enum winreg_Type
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
REG_NONE=(int)(0),
|
||||
REG_SZ=(int)(1),
|
||||
REG_EXPAND_SZ=(int)(2),
|
||||
REG_BINARY=(int)(3),
|
||||
REG_DWORD=(int)(4),
|
||||
REG_DWORD_BIG_ENDIAN=(int)(5),
|
||||
REG_LINK=(int)(6),
|
||||
REG_MULTI_SZ=(int)(7),
|
||||
REG_RESOURCE_LIST=(int)(8),
|
||||
REG_FULL_RESOURCE_DESCRIPTOR=(int)(9),
|
||||
REG_RESOURCE_REQUIREMENTS_LIST=(int)(10),
|
||||
REG_QWORD=(int)(11)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_winreg_Type=0x7FFFFFFF}
|
||||
#define REG_NONE ( 0 )
|
||||
#define REG_SZ ( 1 )
|
||||
#define REG_EXPAND_SZ ( 2 )
|
||||
#define REG_BINARY ( 3 )
|
||||
#define REG_DWORD ( 4 )
|
||||
#define REG_DWORD_BIG_ENDIAN ( 5 )
|
||||
#define REG_LINK ( 6 )
|
||||
#define REG_MULTI_SZ ( 7 )
|
||||
#define REG_RESOURCE_LIST ( 8 )
|
||||
#define REG_FULL_RESOURCE_DESCRIPTOR ( 9 )
|
||||
#define REG_RESOURCE_REQUIREMENTS_LIST ( 10 )
|
||||
#define REG_QWORD ( 11 )
|
||||
#endif
|
||||
;
|
||||
|
||||
union winreg_Data {
|
||||
const char * string;/* [case(REG_SZ),flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2)] */
|
||||
DATA_BLOB binary;/* [case(REG_BINARY),flag(LIBNDR_FLAG_REMAINING)] */
|
||||
uint32_t value;/* [case(REG_DWORD)] */
|
||||
const char ** string_array;/* [case(REG_MULTI_SZ),flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2)] */
|
||||
uint64_t qword;/* [case(REG_QWORD)] */
|
||||
DATA_BLOB data;/* [default,flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [flag(LIBNDR_FLAG_LITTLE_ENDIAN),nodiscriminant,public] */;
|
||||
|
||||
union winreg_Data_GPO {
|
||||
const char * string;/* [case(REG_SZ),flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2)] */
|
||||
DATA_BLOB binary;/* [case(REG_BINARY),flag(LIBNDR_FLAG_REMAINING)] */
|
||||
uint32_t value;/* [case(REG_DWORD)] */
|
||||
uint64_t qword;/* [case(REG_QWORD)] */
|
||||
DATA_BLOB data;/* [default,flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [flag(LIBNDR_FLAG_LITTLE_ENDIAN),gensize,nodiscriminant,public] */;
|
||||
|
||||
enum netr_SamDatabaseID
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
SAM_DATABASE_DOMAIN=(int)(0),
|
||||
SAM_DATABASE_BUILTIN=(int)(1),
|
||||
SAM_DATABASE_PRIVS=(int)(2)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_netr_SamDatabaseID=0x7FFFFFFF}
|
||||
#define SAM_DATABASE_DOMAIN ( 0 )
|
||||
#define SAM_DATABASE_BUILTIN ( 1 )
|
||||
#define SAM_DATABASE_PRIVS ( 2 )
|
||||
#endif
|
||||
;
|
||||
|
||||
/* bitmap svcctl_ServerType */
|
||||
#define SV_TYPE_WORKSTATION ( 0x00000001 )
|
||||
#define SV_TYPE_SERVER ( 0x00000002 )
|
||||
#define SV_TYPE_SQLSERVER ( 0x00000004 )
|
||||
#define SV_TYPE_DOMAIN_CTRL ( 0x00000008 )
|
||||
#define SV_TYPE_DOMAIN_BAKCTRL ( 0x00000010 )
|
||||
#define SV_TYPE_TIME_SOURCE ( 0x00000020 )
|
||||
#define SV_TYPE_AFP ( 0x00000040 )
|
||||
#define SV_TYPE_NOVELL ( 0x00000080 )
|
||||
#define SV_TYPE_DOMAIN_MEMBER ( 0x00000100 )
|
||||
#define SV_TYPE_PRINTQ_SERVER ( 0x00000200 )
|
||||
#define SV_TYPE_DIALIN_SERVER ( 0x00000400 )
|
||||
#define SV_TYPE_SERVER_UNIX ( 0x00000800 )
|
||||
#define SV_TYPE_NT ( 0x00001000 )
|
||||
#define SV_TYPE_WFW ( 0x00002000 )
|
||||
#define SV_TYPE_SERVER_MFPN ( 0x00004000 )
|
||||
#define SV_TYPE_SERVER_NT ( 0x00008000 )
|
||||
#define SV_TYPE_POTENTIAL_BROWSER ( 0x00010000 )
|
||||
#define SV_TYPE_BACKUP_BROWSER ( 0x00020000 )
|
||||
#define SV_TYPE_MASTER_BROWSER ( 0x00040000 )
|
||||
#define SV_TYPE_DOMAIN_MASTER ( 0x00080000 )
|
||||
#define SV_TYPE_SERVER_OSF ( 0x00100000 )
|
||||
#define SV_TYPE_SERVER_VMS ( 0x00200000 )
|
||||
#define SV_TYPE_WIN95_PLUS ( 0x00400000 )
|
||||
#define SV_TYPE_DFS_SERVER ( 0x00800000 )
|
||||
#define SV_TYPE_ALTERNATE_XPORT ( 0x20000000 )
|
||||
#define SV_TYPE_LOCAL_LIST_ONLY ( 0x40000000 )
|
||||
#define SV_TYPE_DOMAIN_ENUM ( 0x80000000 )
|
||||
|
||||
#endif /* _HEADER_misc */
|
||||
#endif /* _PIDL_HEADER_misc */
|
||||
@ -0,0 +1,732 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#ifndef _PIDL_HEADER_nbt
|
||||
#define _PIDL_HEADER_nbt
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <core/ntstatus.h>
|
||||
|
||||
#include <gen_ndr/misc.h>
|
||||
#include <gen_ndr/security.h>
|
||||
#ifndef _HEADER_nbt
|
||||
#define _HEADER_nbt
|
||||
|
||||
#define NBT_NAME_SERVICE_PORT ( 137 )
|
||||
#define NBT_DGRAM_SERVICE_PORT ( 138 )
|
||||
#define NBT_MAILSLOT_NETLOGON ( "\\MAILSLOT\\NET\\NETLOGON" )
|
||||
#define NBT_MAILSLOT_NTLOGON ( "\\MAILSLOT\\NET\\NTLOGON" )
|
||||
#define NBT_MAILSLOT_GETDC ( "\\MAILSLOT\\NET\\GETDC" )
|
||||
#define NBT_MAILSLOT_BROWSE ( "\\MAILSLOT\\BROWSE" )
|
||||
#define DGRAM_SMB ( 0xff534d42 )
|
||||
/* bitmap nbt_operation */
|
||||
#define NBT_RCODE ( 0x000F )
|
||||
#define NBT_FLAG_BROADCAST ( 0x0010 )
|
||||
#define NBT_FLAG_RECURSION_AVAIL ( 0x0080 )
|
||||
#define NBT_FLAG_RECURSION_DESIRED ( 0x0100 )
|
||||
#define NBT_FLAG_TRUNCATION ( 0x0200 )
|
||||
#define NBT_FLAG_AUTHORITATIVE ( 0x0400 )
|
||||
#define NBT_OPCODE ( 0x7800 )
|
||||
#define NBT_FLAG_REPLY ( 0x8000 )
|
||||
|
||||
enum nbt_opcode
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
NBT_OPCODE_QUERY=(int)((0x0<<11)),
|
||||
NBT_OPCODE_REGISTER=(int)((0x5<<11)),
|
||||
NBT_OPCODE_RELEASE=(int)((0x6<<11)),
|
||||
NBT_OPCODE_WACK=(int)((0x7<<11)),
|
||||
NBT_OPCODE_REFRESH=(int)((0x8<<11)),
|
||||
NBT_OPCODE_REFRESH2=(int)((0x9<<11)),
|
||||
NBT_OPCODE_MULTI_HOME_REG=(int)((0xf<<11))
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_nbt_opcode=0x7FFFFFFF}
|
||||
#define NBT_OPCODE_QUERY ( (0x0<<11) )
|
||||
#define NBT_OPCODE_REGISTER ( (0x5<<11) )
|
||||
#define NBT_OPCODE_RELEASE ( (0x6<<11) )
|
||||
#define NBT_OPCODE_WACK ( (0x7<<11) )
|
||||
#define NBT_OPCODE_REFRESH ( (0x8<<11) )
|
||||
#define NBT_OPCODE_REFRESH2 ( (0x9<<11) )
|
||||
#define NBT_OPCODE_MULTI_HOME_REG ( (0xf<<11) )
|
||||
#endif
|
||||
;
|
||||
|
||||
enum nbt_rcode
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
NBT_RCODE_OK=(int)(0x0),
|
||||
NBT_RCODE_FMT=(int)(0x1),
|
||||
NBT_RCODE_SVR=(int)(0x2),
|
||||
NBT_RCODE_NAM=(int)(0x3),
|
||||
NBT_RCODE_IMP=(int)(0x4),
|
||||
NBT_RCODE_RFS=(int)(0x5),
|
||||
NBT_RCODE_ACT=(int)(0x6),
|
||||
NBT_RCODE_CFT=(int)(0x7)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_nbt_rcode=0x7FFFFFFF}
|
||||
#define NBT_RCODE_OK ( 0x0 )
|
||||
#define NBT_RCODE_FMT ( 0x1 )
|
||||
#define NBT_RCODE_SVR ( 0x2 )
|
||||
#define NBT_RCODE_NAM ( 0x3 )
|
||||
#define NBT_RCODE_IMP ( 0x4 )
|
||||
#define NBT_RCODE_RFS ( 0x5 )
|
||||
#define NBT_RCODE_ACT ( 0x6 )
|
||||
#define NBT_RCODE_CFT ( 0x7 )
|
||||
#endif
|
||||
;
|
||||
|
||||
enum nbt_name_type
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
NBT_NAME_CLIENT=(int)(0x00),
|
||||
NBT_NAME_MS=(int)(0x01),
|
||||
NBT_NAME_USER=(int)(0x03),
|
||||
NBT_NAME_SERVER=(int)(0x20),
|
||||
NBT_NAME_PDC=(int)(0x1B),
|
||||
NBT_NAME_LOGON=(int)(0x1C),
|
||||
NBT_NAME_MASTER=(int)(0x1D),
|
||||
NBT_NAME_BROWSER=(int)(0x1E)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_nbt_name_type=0x7FFFFFFF}
|
||||
#define NBT_NAME_CLIENT ( 0x00 )
|
||||
#define NBT_NAME_MS ( 0x01 )
|
||||
#define NBT_NAME_USER ( 0x03 )
|
||||
#define NBT_NAME_SERVER ( 0x20 )
|
||||
#define NBT_NAME_PDC ( 0x1B )
|
||||
#define NBT_NAME_LOGON ( 0x1C )
|
||||
#define NBT_NAME_MASTER ( 0x1D )
|
||||
#define NBT_NAME_BROWSER ( 0x1E )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct nbt_name {
|
||||
const char * name;
|
||||
const char * scope;
|
||||
enum nbt_name_type type;
|
||||
}/* [nopull,nopush,public] */;
|
||||
|
||||
enum nbt_qclass
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
NBT_QCLASS_IP=(int)(0x01)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_nbt_qclass=0x7FFFFFFF}
|
||||
#define NBT_QCLASS_IP ( 0x01 )
|
||||
#endif
|
||||
;
|
||||
|
||||
enum nbt_qtype
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
NBT_QTYPE_ADDRESS=(int)(0x0001),
|
||||
NBT_QTYPE_NAMESERVICE=(int)(0x0002),
|
||||
NBT_QTYPE_NULL=(int)(0x000A),
|
||||
NBT_QTYPE_NETBIOS=(int)(0x0020),
|
||||
NBT_QTYPE_STATUS=(int)(0x0021)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_nbt_qtype=0x7FFFFFFF}
|
||||
#define NBT_QTYPE_ADDRESS ( 0x0001 )
|
||||
#define NBT_QTYPE_NAMESERVICE ( 0x0002 )
|
||||
#define NBT_QTYPE_NULL ( 0x000A )
|
||||
#define NBT_QTYPE_NETBIOS ( 0x0020 )
|
||||
#define NBT_QTYPE_STATUS ( 0x0021 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct nbt_name_question {
|
||||
struct nbt_name name;
|
||||
enum nbt_qtype question_type;
|
||||
enum nbt_qclass question_class;
|
||||
};
|
||||
|
||||
enum nbt_node_type
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
NBT_NODE_B=(int)(0x0000),
|
||||
NBT_NODE_P=(int)(0x2000),
|
||||
NBT_NODE_M=(int)(0x4000),
|
||||
NBT_NODE_H=(int)(0x6000)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_nbt_node_type=0x7FFFFFFF}
|
||||
#define NBT_NODE_B ( 0x0000 )
|
||||
#define NBT_NODE_P ( 0x2000 )
|
||||
#define NBT_NODE_M ( 0x4000 )
|
||||
#define NBT_NODE_H ( 0x6000 )
|
||||
#endif
|
||||
;
|
||||
|
||||
/* bitmap nb_flags */
|
||||
#define NBT_NM_PERMANENT ( 0x0200 )
|
||||
#define NBT_NM_ACTIVE ( 0x0400 )
|
||||
#define NBT_NM_CONFLICT ( 0x0800 )
|
||||
#define NBT_NM_DEREGISTER ( 0x1000 )
|
||||
#define NBT_NM_OWNER_TYPE ( 0x6000 )
|
||||
#define NBT_NM_GROUP ( 0x8000 )
|
||||
|
||||
struct nbt_rdata_address {
|
||||
uint16_t nb_flags;
|
||||
const char * ipaddr;
|
||||
};
|
||||
|
||||
struct nbt_rdata_netbios {
|
||||
uint16_t length;
|
||||
struct nbt_rdata_address *addresses;
|
||||
};
|
||||
|
||||
struct nbt_statistics {
|
||||
uint8_t unit_id[6];
|
||||
uint8_t jumpers;
|
||||
uint8_t test_result;
|
||||
uint16_t version_number;
|
||||
uint16_t period_of_statistics;
|
||||
uint16_t number_of_crcs;
|
||||
uint16_t number_alignment_errors;
|
||||
uint16_t number_of_collisions;
|
||||
uint16_t number_send_aborts;
|
||||
uint32_t number_good_sends;
|
||||
uint32_t number_good_receives;
|
||||
uint16_t number_retransmits;
|
||||
uint16_t number_no_resource_conditions;
|
||||
uint16_t number_free_command_blocks;
|
||||
uint16_t total_number_command_blocks;
|
||||
uint16_t max_total_number_command_blocks;
|
||||
uint16_t number_pending_sessions;
|
||||
uint16_t max_number_pending_sessions;
|
||||
uint16_t max_total_sessions_possible;
|
||||
uint16_t session_data_packet_size;
|
||||
};
|
||||
|
||||
struct nbt_status_name {
|
||||
const char *name;/* [charset(DOS)] */
|
||||
enum nbt_name_type type;
|
||||
uint16_t nb_flags;
|
||||
};
|
||||
|
||||
struct nbt_rdata_status {
|
||||
uint16_t length;/* [value(num_names*18+47)] */
|
||||
uint8_t num_names;
|
||||
struct nbt_status_name *names;
|
||||
struct nbt_statistics statistics;
|
||||
};
|
||||
|
||||
struct nbt_rdata_data {
|
||||
uint16_t length;
|
||||
uint8_t *data;
|
||||
};
|
||||
|
||||
union nbt_rdata {
|
||||
struct nbt_rdata_netbios netbios;/* [case(NBT_QTYPE_NETBIOS)] */
|
||||
struct nbt_rdata_status status;/* [case(NBT_QTYPE_STATUS)] */
|
||||
struct nbt_rdata_data data;/* [default] */
|
||||
}/* [nodiscriminant,public] */;
|
||||
|
||||
struct nbt_res_rec {
|
||||
struct nbt_name name;
|
||||
enum nbt_qtype rr_type;
|
||||
enum nbt_qclass rr_class;
|
||||
uint32_t ttl;
|
||||
union nbt_rdata rdata;/* [switch_is(rr_type)] */
|
||||
}/* [flag(LIBNDR_PRINT_ARRAY_HEX),nopush] */;
|
||||
|
||||
struct nbt_name_packet {
|
||||
uint16_t name_trn_id;
|
||||
uint16_t operation;
|
||||
uint16_t qdcount;
|
||||
uint16_t ancount;
|
||||
uint16_t nscount;
|
||||
uint16_t arcount;
|
||||
struct nbt_name_question *questions;
|
||||
struct nbt_res_rec *answers;
|
||||
struct nbt_res_rec *nsrecs;
|
||||
struct nbt_res_rec *additional;
|
||||
DATA_BLOB padding;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX),public] */;
|
||||
|
||||
enum dgram_msg_type
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DGRAM_DIRECT_UNIQUE=(int)(0x10),
|
||||
DGRAM_DIRECT_GROUP=(int)(0x11),
|
||||
DGRAM_BCAST=(int)(0x12),
|
||||
DGRAM_ERROR=(int)(0x13),
|
||||
DGRAM_QUERY=(int)(0x14),
|
||||
DGRAM_QUERY_POSITIVE=(int)(0x15),
|
||||
DGRAM_QUERY_NEGATIVE=(int)(0x16)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_dgram_msg_type=0x7FFFFFFF}
|
||||
#define DGRAM_DIRECT_UNIQUE ( 0x10 )
|
||||
#define DGRAM_DIRECT_GROUP ( 0x11 )
|
||||
#define DGRAM_BCAST ( 0x12 )
|
||||
#define DGRAM_ERROR ( 0x13 )
|
||||
#define DGRAM_QUERY ( 0x14 )
|
||||
#define DGRAM_QUERY_POSITIVE ( 0x15 )
|
||||
#define DGRAM_QUERY_NEGATIVE ( 0x16 )
|
||||
#endif
|
||||
;
|
||||
|
||||
/* bitmap dgram_flags */
|
||||
#define DGRAM_FLAG_MORE ( 0x01 )
|
||||
#define DGRAM_FLAG_FIRST ( 0x02 )
|
||||
#define DGRAM_FLAG_NODE_TYPE ( 0x0C )
|
||||
|
||||
enum dgram_node_type
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DGRAM_NODE_B=(int)(0x00),
|
||||
DGRAM_NODE_P=(int)(0x04),
|
||||
DGRAM_NODE_M=(int)(0x08),
|
||||
DGRAM_NODE_NBDD=(int)(0x0C)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_dgram_node_type=0x7FFFFFFF}
|
||||
#define DGRAM_NODE_B ( 0x00 )
|
||||
#define DGRAM_NODE_P ( 0x04 )
|
||||
#define DGRAM_NODE_M ( 0x08 )
|
||||
#define DGRAM_NODE_NBDD ( 0x0C )
|
||||
#endif
|
||||
;
|
||||
|
||||
enum smb_command
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
SMB_TRANSACTION=(int)(0x25)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_smb_command=0x7FFFFFFF}
|
||||
#define SMB_TRANSACTION ( 0x25 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct smb_trans_body {
|
||||
uint8_t wct;/* [range(17,17),value(17)] */
|
||||
uint16_t total_param_count;
|
||||
uint16_t total_data_count;
|
||||
uint16_t max_param_count;
|
||||
uint16_t max_data_count;
|
||||
uint8_t max_setup_count;
|
||||
uint8_t pad;
|
||||
uint16_t trans_flags;
|
||||
uint32_t timeout;
|
||||
uint16_t reserved;
|
||||
uint16_t param_count;
|
||||
uint16_t param_offset;
|
||||
uint16_t data_count;
|
||||
uint16_t data_offset;
|
||||
uint8_t setup_count;/* [range(3,3),value(3)] */
|
||||
uint8_t pad2;
|
||||
uint16_t opcode;
|
||||
uint16_t priority;
|
||||
uint16_t _class;
|
||||
uint16_t byte_count;/* [value(strlen(mailslot_name)+1+data.length)] */
|
||||
const char * mailslot_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
|
||||
DATA_BLOB data;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
};
|
||||
|
||||
union smb_body {
|
||||
struct smb_trans_body trans;/* [case(SMB_TRANSACTION)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct dgram_smb_packet {
|
||||
enum smb_command smb_command;
|
||||
uint8_t err_class;
|
||||
uint8_t pad;
|
||||
uint16_t err_code;
|
||||
uint8_t flags;
|
||||
uint16_t flags2;
|
||||
uint16_t pid_high;
|
||||
uint8_t signature[8];
|
||||
uint16_t reserved;
|
||||
uint16_t tid;
|
||||
uint16_t pid;
|
||||
uint16_t vuid;
|
||||
uint16_t mid;
|
||||
union smb_body body;/* [switch_is(smb_command)] */
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_PRINT_ARRAY_HEX),public] */;
|
||||
|
||||
union dgram_message_body {
|
||||
struct dgram_smb_packet smb;/* [case(DGRAM_SMB)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct dgram_message {
|
||||
uint16_t length;
|
||||
uint16_t offset;
|
||||
struct nbt_name source_name;
|
||||
struct nbt_name dest_name;
|
||||
uint32_t dgram_body_type;
|
||||
union dgram_message_body body;/* [switch_is(dgram_body_type)] */
|
||||
};
|
||||
|
||||
enum dgram_err_code
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DGRAM_ERROR_NAME_NOT_PRESENT=(int)(0x82),
|
||||
DGRAM_ERROR_INVALID_SOURCE=(int)(0x83),
|
||||
DGRAM_ERROR_INVALID_DEST=(int)(0x84)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_dgram_err_code=0x7FFFFFFF}
|
||||
#define DGRAM_ERROR_NAME_NOT_PRESENT ( 0x82 )
|
||||
#define DGRAM_ERROR_INVALID_SOURCE ( 0x83 )
|
||||
#define DGRAM_ERROR_INVALID_DEST ( 0x84 )
|
||||
#endif
|
||||
;
|
||||
|
||||
union dgram_data {
|
||||
struct dgram_message msg;/* [case(DGRAM_DIRECT_UNIQUE)] */
|
||||
enum dgram_err_code error;/* [case(DGRAM_ERROR)] */
|
||||
struct nbt_name dest_name;/* [case(DGRAM_QUERY)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct nbt_dgram_packet {
|
||||
enum dgram_msg_type msg_type;
|
||||
uint8_t flags;
|
||||
uint16_t dgram_id;
|
||||
const char * src_addr;
|
||||
uint16_t src_port;
|
||||
union dgram_data data;/* [switch_is(msg_type)] */
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX),public] */;
|
||||
|
||||
struct nbt_sockaddr {
|
||||
uint32_t sockaddr_family;
|
||||
const char * pdc_ip;/* [flag(LIBNDR_FLAG_BIGENDIAN)] */
|
||||
DATA_BLOB remaining;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [gensize,public] */;
|
||||
|
||||
/* bitmap nbt_server_type */
|
||||
#define NBT_SERVER_PDC ( 0x00000001 )
|
||||
#define NBT_SERVER_GC ( 0x00000004 )
|
||||
#define NBT_SERVER_LDAP ( 0x00000008 )
|
||||
#define NBT_SERVER_DS ( 0x00000010 )
|
||||
#define NBT_SERVER_KDC ( 0x00000020 )
|
||||
#define NBT_SERVER_TIMESERV ( 0x00000040 )
|
||||
#define NBT_SERVER_CLOSEST ( 0x00000080 )
|
||||
#define NBT_SERVER_WRITABLE ( 0x00000100 )
|
||||
#define NBT_SERVER_GOOD_TIMESERV ( 0x00000200 )
|
||||
#define NBT_SERVER_NDNC ( 0x00000400 )
|
||||
#define NBT_SERVER_SELECT_SECRET_DOMAIN_6 ( 0x00000800 )
|
||||
#define NBT_SERVER_FULL_SECRET_DOMAIN_6 ( 0x00001000 )
|
||||
#define NBT_SERVER_ADS_WEB_SERVICE ( 0x00002000 )
|
||||
#define NBT_SERVER_DS_8 ( 0x00004000 )
|
||||
#define NBT_SERVER_HAS_DNS_NAME ( 0x20000000 )
|
||||
#define NBT_SERVER_IS_DEFAULT_NC ( 0x40000000 )
|
||||
#define NBT_SERVER_FOREST_ROOT ( 0x80000000 )
|
||||
|
||||
/* bitmap netlogon_nt_version_flags */
|
||||
#define NETLOGON_NT_VERSION_1 ( 0x00000001 )
|
||||
#define NETLOGON_NT_VERSION_5 ( 0x00000002 )
|
||||
#define NETLOGON_NT_VERSION_5EX ( 0x00000004 )
|
||||
#define NETLOGON_NT_VERSION_5EX_WITH_IP ( 0x00000008 )
|
||||
#define NETLOGON_NT_VERSION_WITH_CLOSEST_SITE ( 0x00000010 )
|
||||
#define NETLOGON_NT_VERSION_AVOID_NT4EMUL ( 0x01000000 )
|
||||
#define NETLOGON_NT_VERSION_PDC ( 0x10000000 )
|
||||
#define NETLOGON_NT_VERSION_IP ( 0x20000000 )
|
||||
#define NETLOGON_NT_VERSION_LOCAL ( 0x40000000 )
|
||||
#define NETLOGON_NT_VERSION_GC ( 0x80000000 )
|
||||
|
||||
enum netlogon_command
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
LOGON_REQUEST=(int)(0),
|
||||
LOGON_RESPONSE2=(int)(6),
|
||||
LOGON_PRIMARY_QUERY=(int)(7),
|
||||
NETLOGON_ANNOUNCE_UAS=(int)(10),
|
||||
NETLOGON_RESPONSE_FROM_PDC=(int)(12),
|
||||
LOGON_SAM_LOGON_REQUEST=(int)(18),
|
||||
LOGON_SAM_LOGON_RESPONSE=(int)(19),
|
||||
LOGON_SAM_LOGON_PAUSE_RESPONSE=(int)(20),
|
||||
LOGON_SAM_LOGON_USER_UNKNOWN=(int)(21),
|
||||
LOGON_SAM_LOGON_RESPONSE_EX=(int)(23),
|
||||
LOGON_SAM_LOGON_PAUSE_RESPONSE_EX=(int)(24),
|
||||
LOGON_SAM_LOGON_USER_UNKNOWN_EX=(int)(25)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_netlogon_command=0x7FFFFFFF}
|
||||
#define LOGON_REQUEST ( 0 )
|
||||
#define LOGON_RESPONSE2 ( 6 )
|
||||
#define LOGON_PRIMARY_QUERY ( 7 )
|
||||
#define NETLOGON_ANNOUNCE_UAS ( 10 )
|
||||
#define NETLOGON_RESPONSE_FROM_PDC ( 12 )
|
||||
#define LOGON_SAM_LOGON_REQUEST ( 18 )
|
||||
#define LOGON_SAM_LOGON_RESPONSE ( 19 )
|
||||
#define LOGON_SAM_LOGON_PAUSE_RESPONSE ( 20 )
|
||||
#define LOGON_SAM_LOGON_USER_UNKNOWN ( 21 )
|
||||
#define LOGON_SAM_LOGON_RESPONSE_EX ( 23 )
|
||||
#define LOGON_SAM_LOGON_PAUSE_RESPONSE_EX ( 24 )
|
||||
#define LOGON_SAM_LOGON_USER_UNKNOWN_EX ( 25 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct NETLOGON_SAM_LOGON_REQUEST {
|
||||
uint16_t request_count;
|
||||
const char * computer_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2)] */
|
||||
const char * user_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2)] */
|
||||
const char * mailslot_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
|
||||
uint32_t acct_control;
|
||||
uint32_t sid_size;/* [value(ndr_size_dom_sid0(&sid,ndr->flags))] */
|
||||
DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
|
||||
struct dom_sid0 sid;/* [subcontext(0),subcontext_size(sid_size)] */
|
||||
uint32_t nt_version;
|
||||
uint16_t lmnt_token;
|
||||
uint16_t lm20_token;
|
||||
}/* [nopull,nopush] */;
|
||||
|
||||
struct NETLOGON_LOGON_REQUEST {
|
||||
const char * computer_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
|
||||
const char * user_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
|
||||
const char * mailslot_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
|
||||
uint8_t request_count;
|
||||
uint16_t lmnt_token;
|
||||
uint16_t lm20_token;
|
||||
};
|
||||
|
||||
struct NETLOGON_SAM_LOGON_RESPONSE_NT40 {
|
||||
enum netlogon_command command;
|
||||
const char * pdc_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2)] */
|
||||
const char * user_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2)] */
|
||||
const char * domain_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2)] */
|
||||
uint32_t nt_version;
|
||||
uint16_t lmnt_token;
|
||||
uint16_t lm20_token;
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN),public] */;
|
||||
|
||||
struct NETLOGON_SAM_LOGON_RESPONSE {
|
||||
enum netlogon_command command;
|
||||
const char * pdc_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2)] */
|
||||
const char * user_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2)] */
|
||||
const char * domain_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2)] */
|
||||
struct GUID domain_uuid;
|
||||
struct GUID zero_uuid;
|
||||
const char * forest;
|
||||
const char * dns_domain;
|
||||
const char * pdc_dns_name;
|
||||
const char * pdc_ip;
|
||||
uint32_t server_type;
|
||||
uint32_t nt_version;
|
||||
uint16_t lmnt_token;
|
||||
uint16_t lm20_token;
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN),public] */;
|
||||
|
||||
struct NETLOGON_SAM_LOGON_RESPONSE_EX {
|
||||
enum netlogon_command command;
|
||||
uint16_t sbz;
|
||||
uint32_t server_type;
|
||||
struct GUID domain_uuid;
|
||||
const char * forest;
|
||||
const char * dns_domain;
|
||||
const char * pdc_dns_name;
|
||||
const char * domain_name;
|
||||
const char * pdc_name;
|
||||
const char * user_name;
|
||||
const char * server_site;
|
||||
const char * client_site;
|
||||
uint8_t sockaddr_size;/* [value(ndr_size_nbt_sockaddr(&sockaddr,ndr->flags))] */
|
||||
struct nbt_sockaddr sockaddr;/* [subcontext(0),subcontext_size(sockaddr_size)] */
|
||||
const char * next_closest_site;
|
||||
uint32_t nt_version;
|
||||
uint16_t lmnt_token;
|
||||
uint16_t lm20_token;
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN),public] */;
|
||||
|
||||
union netlogon_samlogon_response_union {
|
||||
struct NETLOGON_SAM_LOGON_RESPONSE_NT40 nt4;/* [case(NETLOGON_NT_VERSION_1)] */
|
||||
struct NETLOGON_SAM_LOGON_RESPONSE nt5;/* [case(NETLOGON_NT_VERSION_5)] */
|
||||
struct NETLOGON_SAM_LOGON_RESPONSE_EX nt5_ex;/* [case(NETLOGON_NT_VERSION_5EX)] */
|
||||
}/* [nopull,nopush] */;
|
||||
|
||||
struct netlogon_samlogon_response {
|
||||
uint32_t ntver;
|
||||
union netlogon_samlogon_response_union data;/* [switch_is(ntver)] */
|
||||
}/* [nopull,nopush] */;
|
||||
|
||||
struct nbt_netlogon_query_for_pdc {
|
||||
const char * computer_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
|
||||
const char * mailslot_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
|
||||
DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN2)] */
|
||||
const char * unicode_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2)] */
|
||||
uint32_t nt_version;
|
||||
uint16_t lmnt_token;
|
||||
uint16_t lm20_token;
|
||||
};
|
||||
|
||||
struct nbt_netlogon_response_from_pdc {
|
||||
enum netlogon_command command;
|
||||
const char * pdc_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
|
||||
DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN2)] */
|
||||
const char * unicode_pdc_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2)] */
|
||||
const char * domain_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2)] */
|
||||
uint32_t nt_version;
|
||||
uint16_t lmnt_token;
|
||||
uint16_t lm20_token;
|
||||
}/* [public] */;
|
||||
|
||||
struct nbt_netlogon_response2 {
|
||||
enum netlogon_command command;
|
||||
const char * pdc_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
|
||||
uint16_t lm20_token;
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN),public] */;
|
||||
|
||||
struct nbt_db_change_info {
|
||||
enum netr_SamDatabaseID db_index;
|
||||
uint64_t serial;
|
||||
NTTIME timestamp;
|
||||
};
|
||||
|
||||
struct NETLOGON_DB_CHANGE {
|
||||
uint32_t serial_lo;
|
||||
time_t timestamp;
|
||||
uint32_t pulse;
|
||||
uint32_t random;
|
||||
const char * pdc_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
|
||||
const char * domain;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
|
||||
DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN2)] */
|
||||
const char * unicode_pdc_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2)] */
|
||||
const char * unicode_domain;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2)] */
|
||||
uint32_t db_count;
|
||||
struct nbt_db_change_info *dbchange;
|
||||
uint32_t sid_size;/* [value(ndr_size_dom_sid0(&sid,ndr->flags))] */
|
||||
struct dom_sid0 sid;/* [subcontext(0),subcontext_size(sid_size)] */
|
||||
uint32_t message_format_version;
|
||||
uint32_t message_token;
|
||||
};
|
||||
|
||||
union nbt_netlogon_request {
|
||||
struct NETLOGON_LOGON_REQUEST logon0;/* [case(LOGON_REQUEST)] */
|
||||
struct NETLOGON_SAM_LOGON_REQUEST logon;/* [case(LOGON_SAM_LOGON_REQUEST)] */
|
||||
struct nbt_netlogon_query_for_pdc pdc;/* [case(LOGON_PRIMARY_QUERY)] */
|
||||
struct NETLOGON_DB_CHANGE uas;/* [case(NETLOGON_ANNOUNCE_UAS)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct nbt_netlogon_packet {
|
||||
enum netlogon_command command;
|
||||
union nbt_netlogon_request req;/* [switch_is(command)] */
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN),public] */;
|
||||
|
||||
enum nbt_browse_opcode
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
HostAnnouncement=(int)(1),
|
||||
AnnouncementRequest=(int)(2),
|
||||
Election=(int)(8),
|
||||
GetBackupListReq=(int)(9),
|
||||
GetBackupListResp=(int)(10),
|
||||
BecomeBackup=(int)(11),
|
||||
DomainAnnouncement=(int)(12),
|
||||
MasterAnnouncement=(int)(13),
|
||||
ResetBrowserState=(int)(14),
|
||||
LocalMasterAnnouncement=(int)(15)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_nbt_browse_opcode=0x7FFFFFFF}
|
||||
#define HostAnnouncement ( 1 )
|
||||
#define AnnouncementRequest ( 2 )
|
||||
#define Election ( 8 )
|
||||
#define GetBackupListReq ( 9 )
|
||||
#define GetBackupListResp ( 10 )
|
||||
#define BecomeBackup ( 11 )
|
||||
#define DomainAnnouncement ( 12 )
|
||||
#define MasterAnnouncement ( 13 )
|
||||
#define ResetBrowserState ( 14 )
|
||||
#define LocalMasterAnnouncement ( 15 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct nbt_browse_host_announcement {
|
||||
uint8_t UpdateCount;
|
||||
uint32_t Periodicity;
|
||||
const char *ServerName;/* [charset(DOS)] */
|
||||
uint8_t OSMajor;
|
||||
uint8_t OSMinor;
|
||||
uint32_t ServerType;
|
||||
uint8_t BroMajorVer;
|
||||
uint8_t BroMinorVer;
|
||||
uint16_t Signature;
|
||||
const char * Comment;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
|
||||
};
|
||||
|
||||
struct nbt_browse_announcement_request {
|
||||
uint8_t Unused;
|
||||
const char * ResponseName;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
|
||||
};
|
||||
|
||||
struct nbt_browse_election_request {
|
||||
uint8_t Version;
|
||||
uint32_t Criteria;
|
||||
uint32_t UpTime;
|
||||
uint32_t Reserved;
|
||||
const char * ServerName;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
|
||||
};
|
||||
|
||||
struct nbt_browse_backup_list_request {
|
||||
uint8_t ReqCount;
|
||||
uint32_t Token;
|
||||
};
|
||||
|
||||
struct nbt_browse_backup_list_response {
|
||||
uint8_t BackupCount;
|
||||
uint32_t Token;
|
||||
struct nbt_name *BackupServerList;
|
||||
};
|
||||
|
||||
struct nbt_browse_become_backup {
|
||||
const char * BrowserName;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
|
||||
};
|
||||
|
||||
struct nbt_browse_domain_announcement {
|
||||
uint8_t UpdateCount;
|
||||
uint32_t Periodicity;
|
||||
const char *ServerName;/* [charset(DOS)] */
|
||||
uint8_t OSMajor;
|
||||
uint8_t OSMinor;
|
||||
uint32_t ServerType;
|
||||
uint32_t MysteriousField;
|
||||
const char * Comment;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
|
||||
};
|
||||
|
||||
struct nbt_browse_master_announcement {
|
||||
const char * ServerName;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
|
||||
};
|
||||
|
||||
struct nbt_browse_reset_state {
|
||||
uint8_t Command;
|
||||
};
|
||||
|
||||
struct nbt_browse_local_master_announcement {
|
||||
uint8_t UpdateCount;
|
||||
uint32_t Periodicity;
|
||||
const char *ServerName;/* [charset(DOS)] */
|
||||
uint8_t OSMajor;
|
||||
uint8_t OSMinor;
|
||||
uint32_t ServerType;
|
||||
uint8_t BroMajorVer;
|
||||
uint8_t BroMinorVer;
|
||||
uint16_t Signature;
|
||||
const char * Comment;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
|
||||
};
|
||||
|
||||
union nbt_browse_payload {
|
||||
struct nbt_browse_host_announcement host_annoucement;/* [case(HostAnnouncement)] */
|
||||
struct nbt_browse_announcement_request announcement_request;/* [case(AnnouncementRequest)] */
|
||||
struct nbt_browse_election_request election_request;/* [case(Election)] */
|
||||
struct nbt_browse_backup_list_request backup_list_request;/* [case(GetBackupListReq)] */
|
||||
struct nbt_browse_backup_list_response backup_list_response;/* [case(GetBackupListResp)] */
|
||||
struct nbt_browse_become_backup become_backup;/* [case(BecomeBackup)] */
|
||||
struct nbt_browse_domain_announcement domain_announcement;/* [case(DomainAnnouncement)] */
|
||||
struct nbt_browse_master_announcement master_announcement;/* [case(MasterAnnouncement)] */
|
||||
struct nbt_browse_reset_state reset_browser_state;/* [case(ResetBrowserState)] */
|
||||
struct nbt_browse_local_master_announcement local_master_announcement;/* [case(LocalMasterAnnouncement)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct nbt_browse_packet {
|
||||
enum nbt_browse_opcode opcode;
|
||||
union nbt_browse_payload payload;/* [switch_is(opcode)] */
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN),public] */;
|
||||
|
||||
#endif /* _HEADER_nbt */
|
||||
#endif /* _PIDL_HEADER_nbt */
|
||||
@ -0,0 +1,41 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#include <ndr.h>
|
||||
#include <gen_ndr/atsvc.h>
|
||||
|
||||
#ifndef _HEADER_NDR_atsvc
|
||||
#define _HEADER_NDR_atsvc
|
||||
|
||||
#define NDR_ATSVC_UUID "1ff70682-0a51-30e8-076d-740be8cee98b"
|
||||
#define NDR_ATSVC_VERSION 1.0
|
||||
#define NDR_ATSVC_NAME "atsvc"
|
||||
#define NDR_ATSVC_HELPSTRING "Microsoft AT-Scheduler Service"
|
||||
extern const struct ndr_interface_table ndr_table_atsvc;
|
||||
#define NDR_ATSVC_JOBADD (0x00)
|
||||
|
||||
#define NDR_ATSVC_JOBDEL (0x01)
|
||||
|
||||
#define NDR_ATSVC_JOBENUM (0x02)
|
||||
|
||||
#define NDR_ATSVC_JOBGETINFO (0x03)
|
||||
|
||||
#define NDR_ATSVC_CALL_COUNT (4)
|
||||
void ndr_print_atsvc_DaysOfMonth(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
void ndr_print_atsvc_Flags(struct ndr_print *ndr, const char *name, uint8_t r);
|
||||
void ndr_print_atsvc_DaysOfWeek(struct ndr_print *ndr, const char *name, uint8_t r);
|
||||
void ndr_print_atsvc_JobInfo(struct ndr_print *ndr, const char *name, const struct atsvc_JobInfo *r);
|
||||
void ndr_print_atsvc_JobEnumInfo(struct ndr_print *ndr, const char *name, const struct atsvc_JobEnumInfo *r);
|
||||
void ndr_print_atsvc_enum_ctr(struct ndr_print *ndr, const char *name, const struct atsvc_enum_ctr *r);
|
||||
enum ndr_err_code ndr_push_atsvc_JobAdd(struct ndr_push *ndr, int flags, const struct atsvc_JobAdd *r);
|
||||
enum ndr_err_code ndr_pull_atsvc_JobAdd(struct ndr_pull *ndr, int flags, struct atsvc_JobAdd *r);
|
||||
void ndr_print_atsvc_JobAdd(struct ndr_print *ndr, const char *name, int flags, const struct atsvc_JobAdd *r);
|
||||
enum ndr_err_code ndr_push_atsvc_JobDel(struct ndr_push *ndr, int flags, const struct atsvc_JobDel *r);
|
||||
enum ndr_err_code ndr_pull_atsvc_JobDel(struct ndr_pull *ndr, int flags, struct atsvc_JobDel *r);
|
||||
void ndr_print_atsvc_JobDel(struct ndr_print *ndr, const char *name, int flags, const struct atsvc_JobDel *r);
|
||||
enum ndr_err_code ndr_push_atsvc_JobEnum(struct ndr_push *ndr, int flags, const struct atsvc_JobEnum *r);
|
||||
enum ndr_err_code ndr_pull_atsvc_JobEnum(struct ndr_pull *ndr, int flags, struct atsvc_JobEnum *r);
|
||||
void ndr_print_atsvc_JobEnum(struct ndr_print *ndr, const char *name, int flags, const struct atsvc_JobEnum *r);
|
||||
enum ndr_err_code ndr_push_atsvc_JobGetInfo(struct ndr_push *ndr, int flags, const struct atsvc_JobGetInfo *r);
|
||||
enum ndr_err_code ndr_pull_atsvc_JobGetInfo(struct ndr_pull *ndr, int flags, struct atsvc_JobGetInfo *r);
|
||||
void ndr_print_atsvc_JobGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct atsvc_JobGetInfo *r);
|
||||
#endif /* _HEADER_NDR_atsvc */
|
||||
@ -0,0 +1,171 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#include <ndr.h>
|
||||
#include <gen_ndr/dcerpc.h>
|
||||
|
||||
#ifndef _HEADER_NDR_dcerpc
|
||||
#define _HEADER_NDR_dcerpc
|
||||
|
||||
#include <ndr/ndr_dcerpc.h>
|
||||
extern const struct ndr_interface_table ndr_table_dcerpc;
|
||||
#define NDR_DCERPC_CALL_COUNT (0)
|
||||
void ndr_print_dcerpc_ctx_list(struct ndr_print *ndr, const char *name, const struct dcerpc_ctx_list *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_bind(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_bind *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_bind(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_bind *r);
|
||||
void ndr_print_dcerpc_bind(struct ndr_print *ndr, const char *name, const struct dcerpc_bind *r);
|
||||
void ndr_print_dcerpc_empty(struct ndr_print *ndr, const char *name, const struct dcerpc_empty *r);
|
||||
void ndr_print_dcerpc_object(struct ndr_print *ndr, const char *name, const union dcerpc_object *r);
|
||||
void ndr_print_dcerpc_request(struct ndr_print *ndr, const char *name, const struct dcerpc_request *r);
|
||||
void ndr_print_dcerpc_bind_ack_result(struct ndr_print *ndr, const char *name, enum dcerpc_bind_ack_result r);
|
||||
void ndr_print_dcerpc_bind_ack_reason_values(struct ndr_print *ndr, const char *name, enum dcerpc_bind_ack_reason_values r);
|
||||
void ndr_print_dcerpc_bind_time_features(struct ndr_print *ndr, const char *name, uint16_t r);
|
||||
void ndr_print_dcerpc_bind_ack_reason(struct ndr_print *ndr, const char *name, const union dcerpc_bind_ack_reason *r);
|
||||
void ndr_print_dcerpc_ack_ctx(struct ndr_print *ndr, const char *name, const struct dcerpc_ack_ctx *r);
|
||||
void ndr_print_dcerpc_bind_ack(struct ndr_print *ndr, const char *name, const struct dcerpc_bind_ack *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_bind_nak_reason(struct ndr_push *ndr, int ndr_flags, enum dcerpc_bind_nak_reason r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_bind_nak_reason(struct ndr_pull *ndr, int ndr_flags, enum dcerpc_bind_nak_reason *r);
|
||||
void ndr_print_dcerpc_bind_nak_reason(struct ndr_print *ndr, const char *name, enum dcerpc_bind_nak_reason r);
|
||||
enum ndr_err_code ndr_push_dcerpc_bind_nak_version(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_bind_nak_version *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_bind_nak_version(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_bind_nak_version *r);
|
||||
void ndr_print_dcerpc_bind_nak_version(struct ndr_print *ndr, const char *name, const struct dcerpc_bind_nak_version *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_bind_nak(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_bind_nak *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_bind_nak(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_bind_nak *r);
|
||||
void ndr_print_dcerpc_bind_nak(struct ndr_print *ndr, const char *name, const struct dcerpc_bind_nak *r);
|
||||
void ndr_print_dcerpc_response(struct ndr_print *ndr, const char *name, const struct dcerpc_response *r);
|
||||
void ndr_print_dcerpc_nca_status(struct ndr_print *ndr, const char *name, enum dcerpc_nca_status r);
|
||||
void ndr_print_dcerpc_fault_flags(struct ndr_print *ndr, const char *name, uint8_t r);
|
||||
void ndr_print_dcerpc_fault(struct ndr_print *ndr, const char *name, const struct dcerpc_fault *r);
|
||||
void ndr_print_dcerpc_AuthType(struct ndr_print *ndr, const char *name, enum dcerpc_AuthType r);
|
||||
void ndr_print_dcerpc_AuthLevel(struct ndr_print *ndr, const char *name, enum dcerpc_AuthLevel r);
|
||||
enum ndr_err_code ndr_push_dcerpc_auth(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_auth *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_auth(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_auth *r);
|
||||
void ndr_print_dcerpc_auth(struct ndr_print *ndr, const char *name, const struct dcerpc_auth *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_auth3(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_auth3 *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_auth3(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_auth3 *r);
|
||||
void ndr_print_dcerpc_auth3(struct ndr_print *ndr, const char *name, const struct dcerpc_auth3 *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_orphaned(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_orphaned *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_orphaned(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_orphaned *r);
|
||||
void ndr_print_dcerpc_orphaned(struct ndr_print *ndr, const char *name, const struct dcerpc_orphaned *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_co_cancel(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_co_cancel *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_co_cancel(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_co_cancel *r);
|
||||
void ndr_print_dcerpc_co_cancel(struct ndr_print *ndr, const char *name, const struct dcerpc_co_cancel *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_cl_cancel(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_cl_cancel *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_cl_cancel(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_cl_cancel *r);
|
||||
void ndr_print_dcerpc_cl_cancel(struct ndr_print *ndr, const char *name, const struct dcerpc_cl_cancel *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_cancel_ack(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_cancel_ack *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_cancel_ack(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_cancel_ack *r);
|
||||
void ndr_print_dcerpc_cancel_ack(struct ndr_print *ndr, const char *name, const struct dcerpc_cancel_ack *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_fack(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_fack *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_fack(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_fack *r);
|
||||
void ndr_print_dcerpc_fack(struct ndr_print *ndr, const char *name, const struct dcerpc_fack *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_ack(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_ack *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_ack(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_ack *r);
|
||||
void ndr_print_dcerpc_ack(struct ndr_print *ndr, const char *name, const struct dcerpc_ack *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_ping(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_ping *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_ping(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_ping *r);
|
||||
void ndr_print_dcerpc_ping(struct ndr_print *ndr, const char *name, const struct dcerpc_ping *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_shutdown(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_shutdown *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_shutdown(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_shutdown *r);
|
||||
void ndr_print_dcerpc_shutdown(struct ndr_print *ndr, const char *name, const struct dcerpc_shutdown *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_working(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_working *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_working(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_working *r);
|
||||
void ndr_print_dcerpc_working(struct ndr_print *ndr, const char *name, const struct dcerpc_working *r);
|
||||
enum ndr_err_code ndr_push_RTSCookie(struct ndr_push *ndr, int ndr_flags, const struct RTSCookie *r);
|
||||
enum ndr_err_code ndr_pull_RTSCookie(struct ndr_pull *ndr, int ndr_flags, struct RTSCookie *r);
|
||||
void ndr_print_RTSCookie(struct ndr_print *ndr, const char *name, const struct RTSCookie *r);
|
||||
enum ndr_err_code ndr_push_AddressType(struct ndr_push *ndr, int ndr_flags, enum AddressType r);
|
||||
enum ndr_err_code ndr_pull_AddressType(struct ndr_pull *ndr, int ndr_flags, enum AddressType *r);
|
||||
void ndr_print_AddressType(struct ndr_print *ndr, const char *name, enum AddressType r);
|
||||
void ndr_print_ClientAddressType(struct ndr_print *ndr, const char *name, const union ClientAddressType *r);
|
||||
enum ndr_err_code ndr_push_ClientAddress(struct ndr_push *ndr, int ndr_flags, const struct ClientAddress *r);
|
||||
enum ndr_err_code ndr_pull_ClientAddress(struct ndr_pull *ndr, int ndr_flags, struct ClientAddress *r);
|
||||
void ndr_print_ClientAddress(struct ndr_print *ndr, const char *name, const struct ClientAddress *r);
|
||||
enum ndr_err_code ndr_push_ForwardDestination(struct ndr_push *ndr, int ndr_flags, enum ForwardDestination r);
|
||||
enum ndr_err_code ndr_pull_ForwardDestination(struct ndr_pull *ndr, int ndr_flags, enum ForwardDestination *r);
|
||||
void ndr_print_ForwardDestination(struct ndr_print *ndr, const char *name, enum ForwardDestination r);
|
||||
enum ndr_err_code ndr_push_FlowControlAcknowledgment(struct ndr_push *ndr, int ndr_flags, const struct FlowControlAcknowledgment *r);
|
||||
enum ndr_err_code ndr_pull_FlowControlAcknowledgment(struct ndr_pull *ndr, int ndr_flags, struct FlowControlAcknowledgment *r);
|
||||
void ndr_print_FlowControlAcknowledgment(struct ndr_print *ndr, const char *name, const struct FlowControlAcknowledgment *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_rts_cmd_ReceiveWindowSize(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_rts_cmd_ReceiveWindowSize *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_rts_cmd_ReceiveWindowSize(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_rts_cmd_ReceiveWindowSize *r);
|
||||
void ndr_print_dcerpc_rts_cmd_ReceiveWindowSize(struct ndr_print *ndr, const char *name, const struct dcerpc_rts_cmd_ReceiveWindowSize *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_rts_cmd_FlowControlAck(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_rts_cmd_FlowControlAck *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_rts_cmd_FlowControlAck(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_rts_cmd_FlowControlAck *r);
|
||||
void ndr_print_dcerpc_rts_cmd_FlowControlAck(struct ndr_print *ndr, const char *name, const struct dcerpc_rts_cmd_FlowControlAck *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_rts_cmd_ConnectionTimeout(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_rts_cmd_ConnectionTimeout *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_rts_cmd_ConnectionTimeout(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_rts_cmd_ConnectionTimeout *r);
|
||||
void ndr_print_dcerpc_rts_cmd_ConnectionTimeout(struct ndr_print *ndr, const char *name, const struct dcerpc_rts_cmd_ConnectionTimeout *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_rts_cmd_Cookie(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_rts_cmd_Cookie *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_rts_cmd_Cookie(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_rts_cmd_Cookie *r);
|
||||
void ndr_print_dcerpc_rts_cmd_Cookie(struct ndr_print *ndr, const char *name, const struct dcerpc_rts_cmd_Cookie *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_rts_cmd_ChannelLifetime(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_rts_cmd_ChannelLifetime *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_rts_cmd_ChannelLifetime(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_rts_cmd_ChannelLifetime *r);
|
||||
void ndr_print_dcerpc_rts_cmd_ChannelLifetime(struct ndr_print *ndr, const char *name, const struct dcerpc_rts_cmd_ChannelLifetime *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_rts_cmd_ClientKeepalive(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_rts_cmd_ClientKeepalive *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_rts_cmd_ClientKeepalive(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_rts_cmd_ClientKeepalive *r);
|
||||
void ndr_print_dcerpc_rts_cmd_ClientKeepalive(struct ndr_print *ndr, const char *name, const struct dcerpc_rts_cmd_ClientKeepalive *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_rts_cmd_Version(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_rts_cmd_Version *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_rts_cmd_Version(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_rts_cmd_Version *r);
|
||||
void ndr_print_dcerpc_rts_cmd_Version(struct ndr_print *ndr, const char *name, const struct dcerpc_rts_cmd_Version *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_rts_cmd_Empty(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_rts_cmd_Empty *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_rts_cmd_Empty(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_rts_cmd_Empty *r);
|
||||
void ndr_print_dcerpc_rts_cmd_Empty(struct ndr_print *ndr, const char *name, const struct dcerpc_rts_cmd_Empty *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_rts_cmd_Padding(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_rts_cmd_Padding *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_rts_cmd_Padding(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_rts_cmd_Padding *r);
|
||||
void ndr_print_dcerpc_rts_cmd_Padding(struct ndr_print *ndr, const char *name, const struct dcerpc_rts_cmd_Padding *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_rts_cmd_NegativeANCE(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_rts_cmd_NegativeANCE *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_rts_cmd_NegativeANCE(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_rts_cmd_NegativeANCE *r);
|
||||
void ndr_print_dcerpc_rts_cmd_NegativeANCE(struct ndr_print *ndr, const char *name, const struct dcerpc_rts_cmd_NegativeANCE *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_rts_cmd_ANCE(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_rts_cmd_ANCE *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_rts_cmd_ANCE(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_rts_cmd_ANCE *r);
|
||||
void ndr_print_dcerpc_rts_cmd_ANCE(struct ndr_print *ndr, const char *name, const struct dcerpc_rts_cmd_ANCE *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_rts_cmd_ClientAddress(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_rts_cmd_ClientAddress *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_rts_cmd_ClientAddress(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_rts_cmd_ClientAddress *r);
|
||||
void ndr_print_dcerpc_rts_cmd_ClientAddress(struct ndr_print *ndr, const char *name, const struct dcerpc_rts_cmd_ClientAddress *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_rts_cmd_AssociationGroupId(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_rts_cmd_AssociationGroupId *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_rts_cmd_AssociationGroupId(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_rts_cmd_AssociationGroupId *r);
|
||||
void ndr_print_dcerpc_rts_cmd_AssociationGroupId(struct ndr_print *ndr, const char *name, const struct dcerpc_rts_cmd_AssociationGroupId *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_rts_cmd_Destination(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_rts_cmd_Destination *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_rts_cmd_Destination(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_rts_cmd_Destination *r);
|
||||
void ndr_print_dcerpc_rts_cmd_Destination(struct ndr_print *ndr, const char *name, const struct dcerpc_rts_cmd_Destination *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_rts_cmd_PingTrafficSentNotify(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_rts_cmd_PingTrafficSentNotify *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_rts_cmd_PingTrafficSentNotify(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_rts_cmd_PingTrafficSentNotify *r);
|
||||
void ndr_print_dcerpc_rts_cmd_PingTrafficSentNotify(struct ndr_print *ndr, const char *name, const struct dcerpc_rts_cmd_PingTrafficSentNotify *r);
|
||||
void ndr_print_dcerpc_rts_cmds(struct ndr_print *ndr, const char *name, const union dcerpc_rts_cmds *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_rts_cmd(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_rts_cmd *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_rts_cmd(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_rts_cmd *r);
|
||||
void ndr_print_dcerpc_rts_cmd(struct ndr_print *ndr, const char *name, const struct dcerpc_rts_cmd *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_rts_flags(struct ndr_push *ndr, int ndr_flags, uint16_t r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_rts_flags(struct ndr_pull *ndr, int ndr_flags, uint16_t *r);
|
||||
void ndr_print_dcerpc_rts_flags(struct ndr_print *ndr, const char *name, uint16_t r);
|
||||
enum ndr_err_code ndr_push_dcerpc_rts(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_rts *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_rts(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_rts *r);
|
||||
void ndr_print_dcerpc_rts(struct ndr_print *ndr, const char *name, const struct dcerpc_rts *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_pkt_type(struct ndr_push *ndr, int ndr_flags, enum dcerpc_pkt_type r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_pkt_type(struct ndr_pull *ndr, int ndr_flags, enum dcerpc_pkt_type *r);
|
||||
void ndr_print_dcerpc_pkt_type(struct ndr_print *ndr, const char *name, enum dcerpc_pkt_type r);
|
||||
enum ndr_err_code ndr_push_dcerpc_payload(struct ndr_push *ndr, int ndr_flags, const union dcerpc_payload *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_payload(struct ndr_pull *ndr, int ndr_flags, union dcerpc_payload *r);
|
||||
void ndr_print_dcerpc_payload(struct ndr_print *ndr, const char *name, const union dcerpc_payload *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_pfc_flags(struct ndr_push *ndr, int ndr_flags, uint8_t r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_pfc_flags(struct ndr_pull *ndr, int ndr_flags, uint8_t *r);
|
||||
void ndr_print_dcerpc_pfc_flags(struct ndr_print *ndr, const char *name, uint8_t r);
|
||||
enum ndr_err_code ndr_push_ncacn_packet(struct ndr_push *ndr, int ndr_flags, const struct ncacn_packet *r);
|
||||
enum ndr_err_code ndr_pull_ncacn_packet(struct ndr_pull *ndr, int ndr_flags, struct ncacn_packet *r);
|
||||
void ndr_print_ncacn_packet(struct ndr_print *ndr, const char *name, const struct ncacn_packet *r);
|
||||
enum ndr_err_code ndr_push_ncadg_packet(struct ndr_push *ndr, int ndr_flags, const struct ncadg_packet *r);
|
||||
enum ndr_err_code ndr_pull_ncadg_packet(struct ndr_pull *ndr, int ndr_flags, struct ncadg_packet *r);
|
||||
void ndr_print_ncadg_packet(struct ndr_print *ndr, const char *name, const struct ncadg_packet *r);
|
||||
void ndr_print_dcerpc_sec_vt_command(struct ndr_print *ndr, const char *name, uint16_t r);
|
||||
void ndr_print_dcerpc_sec_vt_bitmask1(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
void ndr_print_dcerpc_sec_vt_pcontext(struct ndr_print *ndr, const char *name, const struct dcerpc_sec_vt_pcontext *r);
|
||||
void ndr_print_dcerpc_sec_vt_header2(struct ndr_print *ndr, const char *name, const struct dcerpc_sec_vt_header2 *r);
|
||||
void ndr_print_dcerpc_sec_vt_union(struct ndr_print *ndr, const char *name, const union dcerpc_sec_vt_union *r);
|
||||
void ndr_print_dcerpc_sec_vt(struct ndr_print *ndr, const char *name, const struct dcerpc_sec_vt *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_sec_vt_count(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_sec_vt_count *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_sec_vt_count(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_sec_vt_count *r);
|
||||
void ndr_print_dcerpc_sec_vt_count(struct ndr_print *ndr, const char *name, const struct dcerpc_sec_vt_count *r);
|
||||
enum ndr_err_code ndr_push_dcerpc_sec_verification_trailer(struct ndr_push *ndr, int ndr_flags, const struct dcerpc_sec_verification_trailer *r);
|
||||
enum ndr_err_code ndr_pull_dcerpc_sec_verification_trailer(struct ndr_pull *ndr, int ndr_flags, struct dcerpc_sec_verification_trailer *r);
|
||||
void ndr_print_dcerpc_sec_verification_trailer(struct ndr_print *ndr, const char *name, const struct dcerpc_sec_verification_trailer *r);
|
||||
#endif /* _HEADER_NDR_dcerpc */
|
||||
@ -0,0 +1,176 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#include <ndr.h>
|
||||
#include <gen_ndr/drsblobs.h>
|
||||
|
||||
#ifndef _HEADER_NDR_drsblobs
|
||||
#define _HEADER_NDR_drsblobs
|
||||
|
||||
#include <ndr/ndr_drsblobs.h>
|
||||
#define NDR_DRSBLOBS_UUID "12345778-1234-abcd-0001-00000001"
|
||||
#define NDR_DRSBLOBS_VERSION 0.0
|
||||
#define NDR_DRSBLOBS_NAME "drsblobs"
|
||||
#define NDR_DRSBLOBS_HELPSTRING "Active Directory Replication LDAP Blobs"
|
||||
extern const struct ndr_interface_table ndr_table_drsblobs;
|
||||
#define NDR_DRSBLOBS_CALL_COUNT (0)
|
||||
enum ndr_err_code ndr_push_replPropertyMetaData1(struct ndr_push *ndr, int ndr_flags, const struct replPropertyMetaData1 *r);
|
||||
enum ndr_err_code ndr_pull_replPropertyMetaData1(struct ndr_pull *ndr, int ndr_flags, struct replPropertyMetaData1 *r);
|
||||
void ndr_print_replPropertyMetaData1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaData1 *r);
|
||||
void ndr_print_replPropertyMetaDataCtr1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaDataCtr1 *r);
|
||||
void ndr_print_replPropertyMetaDataCtr(struct ndr_print *ndr, const char *name, const union replPropertyMetaDataCtr *r);
|
||||
enum ndr_err_code ndr_push_replPropertyMetaDataBlob(struct ndr_push *ndr, int ndr_flags, const struct replPropertyMetaDataBlob *r);
|
||||
enum ndr_err_code ndr_pull_replPropertyMetaDataBlob(struct ndr_pull *ndr, int ndr_flags, struct replPropertyMetaDataBlob *r);
|
||||
void ndr_print_replPropertyMetaDataBlob(struct ndr_print *ndr, const char *name, const struct replPropertyMetaDataBlob *r);
|
||||
void ndr_print_replUpToDateVectorCtr1(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorCtr1 *r);
|
||||
void ndr_print_replUpToDateVectorCtr2(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorCtr2 *r);
|
||||
void ndr_print_replUpToDateVectorCtr(struct ndr_print *ndr, const char *name, const union replUpToDateVectorCtr *r);
|
||||
enum ndr_err_code ndr_push_replUpToDateVectorBlob(struct ndr_push *ndr, int ndr_flags, const struct replUpToDateVectorBlob *r);
|
||||
enum ndr_err_code ndr_pull_replUpToDateVectorBlob(struct ndr_pull *ndr, int ndr_flags, struct replUpToDateVectorBlob *r);
|
||||
void ndr_print_replUpToDateVectorBlob(struct ndr_print *ndr, const char *name, const struct replUpToDateVectorBlob *r);
|
||||
enum ndr_err_code ndr_push_repsFromTo1OtherInfo(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo1OtherInfo *r);
|
||||
enum ndr_err_code ndr_pull_repsFromTo1OtherInfo(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo1OtherInfo *r);
|
||||
void ndr_print_repsFromTo1OtherInfo(struct ndr_print *ndr, const char *name, const struct repsFromTo1OtherInfo *r);
|
||||
size_t ndr_size_repsFromTo1OtherInfo(const struct repsFromTo1OtherInfo *r, int flags);
|
||||
enum ndr_err_code ndr_push_repsFromTo1(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo1 *r);
|
||||
enum ndr_err_code ndr_pull_repsFromTo1(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo1 *r);
|
||||
void ndr_print_repsFromTo1(struct ndr_print *ndr, const char *name, const struct repsFromTo1 *r);
|
||||
size_t ndr_size_repsFromTo1(const struct repsFromTo1 *r, int flags);
|
||||
enum ndr_err_code ndr_push_repsFromTo2OtherInfo(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo2OtherInfo *r);
|
||||
enum ndr_err_code ndr_pull_repsFromTo2OtherInfo(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo2OtherInfo *r);
|
||||
void ndr_print_repsFromTo2OtherInfo(struct ndr_print *ndr, const char *name, const struct repsFromTo2OtherInfo *r);
|
||||
size_t ndr_size_repsFromTo2OtherInfo(const struct repsFromTo2OtherInfo *r, int flags);
|
||||
enum ndr_err_code ndr_push_repsFromTo2(struct ndr_push *ndr, int ndr_flags, const struct repsFromTo2 *r);
|
||||
enum ndr_err_code ndr_pull_repsFromTo2(struct ndr_pull *ndr, int ndr_flags, struct repsFromTo2 *r);
|
||||
void ndr_print_repsFromTo2(struct ndr_print *ndr, const char *name, const struct repsFromTo2 *r);
|
||||
size_t ndr_size_repsFromTo2(const struct repsFromTo2 *r, int flags);
|
||||
void ndr_print_repsFromTo(struct ndr_print *ndr, const char *name, const union repsFromTo *r);
|
||||
enum ndr_err_code ndr_push_repsFromToBlob(struct ndr_push *ndr, int ndr_flags, const struct repsFromToBlob *r);
|
||||
enum ndr_err_code ndr_pull_repsFromToBlob(struct ndr_pull *ndr, int ndr_flags, struct repsFromToBlob *r);
|
||||
void ndr_print_repsFromToBlob(struct ndr_print *ndr, const char *name, const struct repsFromToBlob *r);
|
||||
enum ndr_err_code ndr_push_scheduleHeader(struct ndr_push *ndr, int ndr_flags, const struct scheduleHeader *r);
|
||||
enum ndr_err_code ndr_pull_scheduleHeader(struct ndr_pull *ndr, int ndr_flags, struct scheduleHeader *r);
|
||||
void ndr_print_scheduleHeader(struct ndr_print *ndr, const char *name, const struct scheduleHeader *r);
|
||||
enum ndr_err_code ndr_push_scheduleSlots(struct ndr_push *ndr, int ndr_flags, const struct scheduleSlots *r);
|
||||
enum ndr_err_code ndr_pull_scheduleSlots(struct ndr_pull *ndr, int ndr_flags, struct scheduleSlots *r);
|
||||
void ndr_print_scheduleSlots(struct ndr_print *ndr, const char *name, const struct scheduleSlots *r);
|
||||
enum ndr_err_code ndr_push_schedule(struct ndr_push *ndr, int ndr_flags, const struct schedule *r);
|
||||
enum ndr_err_code ndr_pull_schedule(struct ndr_pull *ndr, int ndr_flags, struct schedule *r);
|
||||
void ndr_print_schedule(struct ndr_print *ndr, const char *name, const struct schedule *r);
|
||||
void ndr_print_partialAttributeSetCtr1(struct ndr_print *ndr, const char *name, const struct partialAttributeSetCtr1 *r);
|
||||
void ndr_print_partialAttributeSetCtr(struct ndr_print *ndr, const char *name, const union partialAttributeSetCtr *r);
|
||||
enum ndr_err_code ndr_push_partialAttributeSetBlob(struct ndr_push *ndr, int ndr_flags, const struct partialAttributeSetBlob *r);
|
||||
enum ndr_err_code ndr_pull_partialAttributeSetBlob(struct ndr_pull *ndr, int ndr_flags, struct partialAttributeSetBlob *r);
|
||||
void ndr_print_partialAttributeSetBlob(struct ndr_print *ndr, const char *name, const struct partialAttributeSetBlob *r);
|
||||
enum ndr_err_code ndr_push_schemaInfoBlob(struct ndr_push *ndr, int ndr_flags, const struct schemaInfoBlob *r);
|
||||
enum ndr_err_code ndr_pull_schemaInfoBlob(struct ndr_pull *ndr, int ndr_flags, struct schemaInfoBlob *r);
|
||||
void ndr_print_schemaInfoBlob(struct ndr_print *ndr, const char *name, const struct schemaInfoBlob *r);
|
||||
void ndr_print_drsuapi_MSPrefixMap_Entry(struct ndr_print *ndr, const char *name, const struct drsuapi_MSPrefixMap_Entry *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_MSPrefixMap_Ctr(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_MSPrefixMap_Ctr *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_MSPrefixMap_Ctr(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_MSPrefixMap_Ctr *r);
|
||||
void ndr_print_drsuapi_MSPrefixMap_Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_MSPrefixMap_Ctr *r);
|
||||
size_t ndr_size_drsuapi_MSPrefixMap_Ctr(const struct drsuapi_MSPrefixMap_Ctr *r, int flags);
|
||||
void ndr_print_prefixMapVersion(struct ndr_print *ndr, const char *name, enum prefixMapVersion r);
|
||||
void ndr_print_prefixMapCtr(struct ndr_print *ndr, const char *name, const union prefixMapCtr *r);
|
||||
enum ndr_err_code ndr_push_prefixMapBlob(struct ndr_push *ndr, int ndr_flags, const struct prefixMapBlob *r);
|
||||
enum ndr_err_code ndr_pull_prefixMapBlob(struct ndr_pull *ndr, int ndr_flags, struct prefixMapBlob *r);
|
||||
void ndr_print_prefixMapBlob(struct ndr_print *ndr, const char *name, const struct prefixMapBlob *r);
|
||||
void ndr_print_ldapControlDirSyncExtra(struct ndr_print *ndr, const char *name, const union ldapControlDirSyncExtra *r);
|
||||
void ndr_print_ldapControlDirSyncBlob(struct ndr_print *ndr, const char *name, const struct ldapControlDirSyncBlob *r);
|
||||
enum ndr_err_code ndr_push_ldapControlDirSyncCookie(struct ndr_push *ndr, int ndr_flags, const struct ldapControlDirSyncCookie *r);
|
||||
enum ndr_err_code ndr_pull_ldapControlDirSyncCookie(struct ndr_pull *ndr, int ndr_flags, struct ldapControlDirSyncCookie *r);
|
||||
void ndr_print_ldapControlDirSyncCookie(struct ndr_print *ndr, const char *name, const struct ldapControlDirSyncCookie *r);
|
||||
enum ndr_err_code ndr_push_supplementalCredentialsPackage(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsPackage *r);
|
||||
enum ndr_err_code ndr_pull_supplementalCredentialsPackage(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsPackage *r);
|
||||
void ndr_print_supplementalCredentialsPackage(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsPackage *r);
|
||||
enum ndr_err_code ndr_push_supplementalCredentialsSignature(struct ndr_push *ndr, int ndr_flags, enum supplementalCredentialsSignature r);
|
||||
enum ndr_err_code ndr_pull_supplementalCredentialsSignature(struct ndr_pull *ndr, int ndr_flags, enum supplementalCredentialsSignature *r);
|
||||
void ndr_print_supplementalCredentialsSignature(struct ndr_print *ndr, const char *name, enum supplementalCredentialsSignature r);
|
||||
enum ndr_err_code ndr_push_supplementalCredentialsSubBlob(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsSubBlob *r);
|
||||
enum ndr_err_code ndr_pull_supplementalCredentialsSubBlob(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsSubBlob *r);
|
||||
void ndr_print_supplementalCredentialsSubBlob(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsSubBlob *r);
|
||||
enum ndr_err_code ndr_push_supplementalCredentialsBlob(struct ndr_push *ndr, int ndr_flags, const struct supplementalCredentialsBlob *r);
|
||||
enum ndr_err_code ndr_pull_supplementalCredentialsBlob(struct ndr_pull *ndr, int ndr_flags, struct supplementalCredentialsBlob *r);
|
||||
void ndr_print_supplementalCredentialsBlob(struct ndr_print *ndr, const char *name, const struct supplementalCredentialsBlob *r);
|
||||
enum ndr_err_code ndr_push_package_PackagesBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PackagesBlob *r);
|
||||
enum ndr_err_code ndr_pull_package_PackagesBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PackagesBlob *r);
|
||||
void ndr_print_package_PackagesBlob(struct ndr_print *ndr, const char *name, const struct package_PackagesBlob *r);
|
||||
void ndr_print_package_PrimaryKerberosString(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosString *r);
|
||||
void ndr_print_package_PrimaryKerberosKey3(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosKey3 *r);
|
||||
void ndr_print_package_PrimaryKerberosCtr3(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosCtr3 *r);
|
||||
void ndr_print_package_PrimaryKerberosKey4(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosKey4 *r);
|
||||
void ndr_print_package_PrimaryKerberosCtr4(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosCtr4 *r);
|
||||
void ndr_print_package_PrimaryKerberosCtr(struct ndr_print *ndr, const char *name, const union package_PrimaryKerberosCtr *r);
|
||||
enum ndr_err_code ndr_push_package_PrimaryKerberosBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryKerberosBlob *r);
|
||||
enum ndr_err_code ndr_pull_package_PrimaryKerberosBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryKerberosBlob *r);
|
||||
void ndr_print_package_PrimaryKerberosBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryKerberosBlob *r);
|
||||
enum ndr_err_code ndr_push_package_PrimaryCLEARTEXTBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryCLEARTEXTBlob *r);
|
||||
enum ndr_err_code ndr_pull_package_PrimaryCLEARTEXTBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryCLEARTEXTBlob *r);
|
||||
void ndr_print_package_PrimaryCLEARTEXTBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryCLEARTEXTBlob *r);
|
||||
void ndr_print_package_PrimaryWDigestHash(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestHash *r);
|
||||
enum ndr_err_code ndr_push_package_PrimaryWDigestBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryWDigestBlob *r);
|
||||
enum ndr_err_code ndr_pull_package_PrimaryWDigestBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryWDigestBlob *r);
|
||||
void ndr_print_package_PrimaryWDigestBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestBlob *r);
|
||||
enum ndr_err_code ndr_push_package_PrimarySambaGPGBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimarySambaGPGBlob *r);
|
||||
enum ndr_err_code ndr_pull_package_PrimarySambaGPGBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimarySambaGPGBlob *r);
|
||||
void ndr_print_package_PrimarySambaGPGBlob(struct ndr_print *ndr, const char *name, const struct package_PrimarySambaGPGBlob *r);
|
||||
void ndr_print_package_PrimaryUserPasswordValue(struct ndr_print *ndr, const char *name, const struct package_PrimaryUserPasswordValue *r);
|
||||
enum ndr_err_code ndr_push_package_PrimaryUserPasswordBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryUserPasswordBlob *r);
|
||||
enum ndr_err_code ndr_pull_package_PrimaryUserPasswordBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryUserPasswordBlob *r);
|
||||
void ndr_print_package_PrimaryUserPasswordBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryUserPasswordBlob *r);
|
||||
void ndr_print_AuthInfoNone(struct ndr_print *ndr, const char *name, const struct AuthInfoNone *r);
|
||||
void ndr_print_AuthInfoNT4Owf(struct ndr_print *ndr, const char *name, const struct AuthInfoNT4Owf *r);
|
||||
void ndr_print_AuthInfoClear(struct ndr_print *ndr, const char *name, const struct AuthInfoClear *r);
|
||||
void ndr_print_AuthInfoVersion(struct ndr_print *ndr, const char *name, const struct AuthInfoVersion *r);
|
||||
void ndr_print_AuthInfo(struct ndr_print *ndr, const char *name, const union AuthInfo *r);
|
||||
enum ndr_err_code ndr_push_AuthenticationInformation(struct ndr_push *ndr, int ndr_flags, const struct AuthenticationInformation *r);
|
||||
enum ndr_err_code ndr_pull_AuthenticationInformation(struct ndr_pull *ndr, int ndr_flags, struct AuthenticationInformation *r);
|
||||
void ndr_print_AuthenticationInformation(struct ndr_print *ndr, const char *name, const struct AuthenticationInformation *r);
|
||||
enum ndr_err_code ndr_push_AuthenticationInformationArray(struct ndr_push *ndr, int ndr_flags, const struct AuthenticationInformationArray *r);
|
||||
enum ndr_err_code ndr_pull_AuthenticationInformationArray(struct ndr_pull *ndr, int ndr_flags, struct AuthenticationInformationArray *r);
|
||||
void ndr_print_AuthenticationInformationArray(struct ndr_print *ndr, const char *name, const struct AuthenticationInformationArray *r);
|
||||
size_t ndr_size_AuthenticationInformationArray(const struct AuthenticationInformationArray *r, int flags);
|
||||
enum ndr_err_code ndr_push_trustAuthInOutBlob(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutBlob *r);
|
||||
enum ndr_err_code ndr_pull_trustAuthInOutBlob(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutBlob *r);
|
||||
void ndr_print_trustAuthInOutBlob(struct ndr_print *ndr, const char *name, const struct trustAuthInOutBlob *r);
|
||||
size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob *r, int flags);
|
||||
enum ndr_err_code ndr_push_trustDomainPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustDomainPasswords *r);
|
||||
enum ndr_err_code ndr_pull_trustDomainPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustDomainPasswords *r);
|
||||
void ndr_print_trustDomainPasswords(struct ndr_print *ndr, const char *name, const struct trustDomainPasswords *r);
|
||||
enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r);
|
||||
enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r);
|
||||
void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r);
|
||||
void ndr_print_ExtendedErrorAString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorAString *r);
|
||||
void ndr_print_ExtendedErrorUString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorUString *r);
|
||||
void ndr_print_ExtendedErrorBlob(struct ndr_print *ndr, const char *name, const struct ExtendedErrorBlob *r);
|
||||
void ndr_print_ExtendedErrorComputerNamePresent(struct ndr_print *ndr, const char *name, enum ExtendedErrorComputerNamePresent r);
|
||||
void ndr_print_ExtendedErrorComputerNameU(struct ndr_print *ndr, const char *name, const union ExtendedErrorComputerNameU *r);
|
||||
void ndr_print_ExtendedErrorComputerName(struct ndr_print *ndr, const char *name, const struct ExtendedErrorComputerName *r);
|
||||
void ndr_print_ExtendedErrorParamType(struct ndr_print *ndr, const char *name, enum ExtendedErrorParamType r);
|
||||
void ndr_print_ExtendedErrorParamU(struct ndr_print *ndr, const char *name, const union ExtendedErrorParamU *r);
|
||||
void ndr_print_ExtendedErrorParam(struct ndr_print *ndr, const char *name, const struct ExtendedErrorParam *r);
|
||||
enum ndr_err_code ndr_push_ExtendedErrorInfo(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfo *r);
|
||||
enum ndr_err_code ndr_pull_ExtendedErrorInfo(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfo *r);
|
||||
void ndr_print_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfo *r);
|
||||
void ndr_print_ForestTrustString(struct ndr_print *ndr, const char *name, const struct ForestTrustString *r);
|
||||
void ndr_print_ForestTrustDataDomainInfo(struct ndr_print *ndr, const char *name, const struct ForestTrustDataDomainInfo *r);
|
||||
void ndr_print_ForestTrustDataBinaryData(struct ndr_print *ndr, const char *name, const struct ForestTrustDataBinaryData *r);
|
||||
void ndr_print_ForestTrustData(struct ndr_print *ndr, const char *name, const union ForestTrustData *r);
|
||||
void ndr_print_ForestTrustInfoRecordType(struct ndr_print *ndr, const char *name, enum ForestTrustInfoRecordType r);
|
||||
enum ndr_err_code ndr_push_ForestTrustInfoRecord(struct ndr_push *ndr, int ndr_flags, const struct ForestTrustInfoRecord *r);
|
||||
enum ndr_err_code ndr_pull_ForestTrustInfoRecord(struct ndr_pull *ndr, int ndr_flags, struct ForestTrustInfoRecord *r);
|
||||
void ndr_print_ForestTrustInfoRecord(struct ndr_print *ndr, const char *name, const struct ForestTrustInfoRecord *r);
|
||||
size_t ndr_size_ForestTrustInfoRecord(const struct ForestTrustInfoRecord *r, int flags);
|
||||
void ndr_print_ForestTrustInfoRecordArmor(struct ndr_print *ndr, const char *name, const struct ForestTrustInfoRecordArmor *r);
|
||||
enum ndr_err_code ndr_push_ForestTrustInfo(struct ndr_push *ndr, int ndr_flags, const struct ForestTrustInfo *r);
|
||||
enum ndr_err_code ndr_pull_ForestTrustInfo(struct ndr_pull *ndr, int ndr_flags, struct ForestTrustInfo *r);
|
||||
void ndr_print_ForestTrustInfo(struct ndr_print *ndr, const char *name, const struct ForestTrustInfo *r);
|
||||
enum ndr_err_code ndr_push_PlaintextSecret(struct ndr_push *ndr, int ndr_flags, const struct PlaintextSecret *r);
|
||||
enum ndr_err_code ndr_pull_PlaintextSecret(struct ndr_pull *ndr, int ndr_flags, struct PlaintextSecret *r);
|
||||
void ndr_print_PlaintextSecret(struct ndr_print *ndr, const char *name, const struct PlaintextSecret *r);
|
||||
enum ndr_err_code ndr_push_EncryptedSecretHeader(struct ndr_push *ndr, int ndr_flags, const struct EncryptedSecretHeader *r);
|
||||
enum ndr_err_code ndr_pull_EncryptedSecretHeader(struct ndr_pull *ndr, int ndr_flags, struct EncryptedSecretHeader *r);
|
||||
void ndr_print_EncryptedSecretHeader(struct ndr_print *ndr, const char *name, const struct EncryptedSecretHeader *r);
|
||||
enum ndr_err_code ndr_push_EncryptedSecret(struct ndr_push *ndr, int ndr_flags, const struct EncryptedSecret *r);
|
||||
enum ndr_err_code ndr_pull_EncryptedSecret(struct ndr_pull *ndr, int ndr_flags, struct EncryptedSecret *r);
|
||||
void ndr_print_EncryptedSecret(struct ndr_print *ndr, const char *name, const struct EncryptedSecret *r);
|
||||
#endif /* _HEADER_NDR_drsblobs */
|
||||
@ -0,0 +1,340 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#include <ndr.h>
|
||||
#include <gen_ndr/drsuapi.h>
|
||||
|
||||
#ifndef _HEADER_NDR_drsuapi
|
||||
#define _HEADER_NDR_drsuapi
|
||||
|
||||
#include <ndr/ndr_drsuapi.h>
|
||||
#define NDR_DRSUAPI_UUID "e3514235-4b06-11d1-ab04-00c04fc2dcd2"
|
||||
#define NDR_DRSUAPI_VERSION 4.0
|
||||
#define NDR_DRSUAPI_NAME "drsuapi"
|
||||
#define NDR_DRSUAPI_HELPSTRING "Active Directory Replication"
|
||||
extern const struct ndr_interface_table ndr_table_drsuapi;
|
||||
#define NDR_DRSUAPI_DSBIND (0x00)
|
||||
|
||||
#define NDR_DRSUAPI_DSUNBIND (0x01)
|
||||
|
||||
#define NDR_DRSUAPI_DSREPLICASYNC (0x02)
|
||||
|
||||
#define NDR_DRSUAPI_DSGETNCCHANGES (0x03)
|
||||
|
||||
#define NDR_DRSUAPI_DSREPLICAUPDATEREFS (0x04)
|
||||
|
||||
#define NDR_DRSUAPI_DSREPLICAADD (0x05)
|
||||
|
||||
#define NDR_DRSUAPI_DSREPLICADEL (0x06)
|
||||
|
||||
#define NDR_DRSUAPI_DSREPLICAMOD (0x07)
|
||||
|
||||
#define NDR_DRSUAPI_VERIFY_NAMES (0x08)
|
||||
|
||||
#define NDR_DRSUAPI_DSGETMEMBERSHIPS (0x09)
|
||||
|
||||
#define NDR_DRSUAPI_INTER_DOMAIN_MOVE (0x0a)
|
||||
|
||||
#define NDR_DRSUAPI_DSGETNT4CHANGELOG (0x0b)
|
||||
|
||||
#define NDR_DRSUAPI_DSCRACKNAMES (0x0c)
|
||||
|
||||
#define NDR_DRSUAPI_DSWRITEACCOUNTSPN (0x0d)
|
||||
|
||||
#define NDR_DRSUAPI_DSREMOVEDSSERVER (0x0e)
|
||||
|
||||
#define NDR_DRSUAPI_REMOVE_DS_DOMAIN (0x0f)
|
||||
|
||||
#define NDR_DRSUAPI_DSGETDOMAINCONTROLLERINFO (0x10)
|
||||
|
||||
#define NDR_DRSUAPI_DSADDENTRY (0x11)
|
||||
|
||||
#define NDR_DRSUAPI_DSEXECUTEKCC (0x12)
|
||||
|
||||
#define NDR_DRSUAPI_DSREPLICAGETINFO (0x13)
|
||||
|
||||
#define NDR_DRSUAPI_ADD_SID_HISTORY (0x14)
|
||||
|
||||
#define NDR_DRSUAPI_DSGETMEMBERSHIPS2 (0x15)
|
||||
|
||||
#define NDR_DRSUAPI_REPLICA_VERIFY_OBJECTS (0x16)
|
||||
|
||||
#define NDR_DRSUAPI_GET_OBJECT_EXISTENCE (0x17)
|
||||
|
||||
#define NDR_DRSUAPI_QUERYSITESBYCOST (0x18)
|
||||
|
||||
#define NDR_DRSUAPI_CALL_COUNT (25)
|
||||
enum ndr_err_code ndr_push_drsuapi_DrsOptions(struct ndr_push *ndr, int ndr_flags, uint32_t r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DrsOptions(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
|
||||
void ndr_print_drsuapi_DrsOptions(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DrsMoreOptions(struct ndr_push *ndr, int ndr_flags, uint32_t r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DrsMoreOptions(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
|
||||
void ndr_print_drsuapi_DrsMoreOptions(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DrsUpdate(struct ndr_push *ndr, int ndr_flags, uint32_t r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DrsUpdate(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
|
||||
void ndr_print_drsuapi_DrsUpdate(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
void ndr_print_drsuapi_SupportedExtensions(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
void ndr_print_drsuapi_SupportedExtensionsExt(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsBindInfo24(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsBindInfo24 *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsBindInfo24(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsBindInfo24 *r);
|
||||
void ndr_print_drsuapi_DsBindInfo24(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfo24 *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsBindInfo28(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsBindInfo28 *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsBindInfo28(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsBindInfo28 *r);
|
||||
void ndr_print_drsuapi_DsBindInfo28(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfo28 *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsBindInfo32(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsBindInfo32 *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsBindInfo32(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsBindInfo32 *r);
|
||||
void ndr_print_drsuapi_DsBindInfo32(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfo32 *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsBindInfo48(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsBindInfo48 *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsBindInfo48(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsBindInfo48 *r);
|
||||
void ndr_print_drsuapi_DsBindInfo48(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfo48 *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsBindInfo52(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsBindInfo52 *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsBindInfo52(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsBindInfo52 *r);
|
||||
void ndr_print_drsuapi_DsBindInfo52(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfo52 *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsBindInfoFallBack(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsBindInfoFallBack *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsBindInfoFallBack(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsBindInfoFallBack *r);
|
||||
void ndr_print_drsuapi_DsBindInfoFallBack(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfoFallBack *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsBindInfo(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsBindInfo *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsBindInfo(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsBindInfo *r);
|
||||
void ndr_print_drsuapi_DsBindInfo(struct ndr_print *ndr, const char *name, const union drsuapi_DsBindInfo *r);
|
||||
void ndr_print_drsuapi_DsBindInfoCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfoCtr *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaObjectIdentifier *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaObjectIdentifier *r);
|
||||
void ndr_print_drsuapi_DsReplicaObjectIdentifier(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectIdentifier *r);
|
||||
size_t ndr_size_drsuapi_DsReplicaObjectIdentifier(const struct drsuapi_DsReplicaObjectIdentifier *r, int flags);
|
||||
void ndr_print_drsuapi_DsReplicaSyncRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaSyncRequest1 *r);
|
||||
void ndr_print_drsuapi_DsReplicaSyncRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaSyncRequest *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsReplicaHighWaterMark(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaHighWaterMark *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsReplicaHighWaterMark(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaHighWaterMark *r);
|
||||
void ndr_print_drsuapi_DsReplicaHighWaterMark(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaHighWaterMark *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaCursor *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaCursor *r);
|
||||
void ndr_print_drsuapi_DsReplicaCursor(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor *r);
|
||||
void ndr_print_drsuapi_DsReplicaCursorCtrEx(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursorCtrEx *r);
|
||||
void ndr_print_drsuapi_DsExtendedOperation(struct ndr_print *ndr, const char *name, enum drsuapi_DsExtendedOperation r);
|
||||
void ndr_print_drsuapi_DsExtendedError(struct ndr_print *ndr, const char *name, enum drsuapi_DsExtendedError r);
|
||||
void ndr_print_drsuapi_DsGetNCChangesRequest5(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesRequest5 *r);
|
||||
void ndr_print_drsuapi_DsReplicaOID(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOID *r);
|
||||
void ndr_print_drsuapi_DsReplicaOIDMapping(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOIDMapping *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOIDMapping_Ctr *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOIDMapping_Ctr *r);
|
||||
void ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOIDMapping_Ctr *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsAttributeId(struct ndr_push *ndr, int ndr_flags, enum drsuapi_DsAttributeId r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsAttributeId(struct ndr_pull *ndr, int ndr_flags, enum drsuapi_DsAttributeId *r);
|
||||
void ndr_print_drsuapi_DsAttributeId(struct ndr_print *ndr, const char *name, enum drsuapi_DsAttributeId r);
|
||||
void ndr_print_drsuapi_DsPartialAttributeSet(struct ndr_print *ndr, const char *name, const struct drsuapi_DsPartialAttributeSet *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest8(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesRequest8 *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest8(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesRequest8 *r);
|
||||
void ndr_print_drsuapi_DsGetNCChangesRequest8(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesRequest8 *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest10(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesRequest10 *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest10(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesRequest10 *r);
|
||||
void ndr_print_drsuapi_DsGetNCChangesRequest10(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesRequest10 *r);
|
||||
void ndr_print_drsuapi_DsGetNCChangesRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNCChangesRequest *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor2(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaCursor2 *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor2(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaCursor2 *r);
|
||||
void ndr_print_drsuapi_DsReplicaCursor2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor2 *r);
|
||||
void ndr_print_drsuapi_DsReplicaCursor2CtrEx(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor2CtrEx *r);
|
||||
void ndr_print_drsuapi_DsAttributeValue(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAttributeValue *r);
|
||||
void ndr_print_drsuapi_DsAttributeValueCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAttributeValueCtr *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier3(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaObjectIdentifier3 *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier3(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaObjectIdentifier3 *r);
|
||||
void ndr_print_drsuapi_DsReplicaObjectIdentifier3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectIdentifier3 *r);
|
||||
size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3(const struct drsuapi_DsReplicaObjectIdentifier3 *r, int flags);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaObjectIdentifier3Binary *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaObjectIdentifier3Binary *r);
|
||||
void ndr_print_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectIdentifier3Binary *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsReplicaAttribute(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaAttribute *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttribute(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaAttribute *r);
|
||||
void ndr_print_drsuapi_DsReplicaAttribute(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttribute *r);
|
||||
void ndr_print_drsuapi_DsReplicaAttributeCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttributeCtr *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
|
||||
void ndr_print_drsuapi_DsReplicaObjectFlags(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsReplicaObject(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaObject *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsReplicaObject(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaObject *r);
|
||||
void ndr_print_drsuapi_DsReplicaObject(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObject *r);
|
||||
void ndr_print_drsuapi_DsReplicaMetaData(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaMetaData *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsReplicaMetaDataCtr(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaMetaDataCtr *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsReplicaMetaDataCtr(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaMetaDataCtr *r);
|
||||
void ndr_print_drsuapi_DsReplicaMetaDataCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaMetaDataCtr *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectListItemEx(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaObjectListItemEx *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectListItemEx(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaObjectListItemEx *r);
|
||||
void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectListItemEx *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr1 *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr1 *r);
|
||||
void ndr_print_drsuapi_DsGetNCChangesCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr1 *r);
|
||||
size_t ndr_size_drsuapi_DsGetNCChangesCtr1(const struct drsuapi_DsGetNCChangesCtr1 *r, int flags);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsLinkedAttributeFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsLinkedAttributeFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
|
||||
void ndr_print_drsuapi_DsLinkedAttributeFlags(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsReplicaLinkedAttribute(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaLinkedAttribute *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsReplicaLinkedAttribute(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaLinkedAttribute *r);
|
||||
void ndr_print_drsuapi_DsReplicaLinkedAttribute(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaLinkedAttribute *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr6(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr6 *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr6 *r);
|
||||
void ndr_print_drsuapi_DsGetNCChangesCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr6 *r);
|
||||
size_t ndr_size_drsuapi_DsGetNCChangesCtr6(const struct drsuapi_DsGetNCChangesCtr6 *r, int flags);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr1TS(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr1TS *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr1TS(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr1TS *r);
|
||||
void ndr_print_drsuapi_DsGetNCChangesCtr1TS(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr1TS *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr6TS(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr6TS *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6TS(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr6TS *r);
|
||||
void ndr_print_drsuapi_DsGetNCChangesCtr6TS(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr6TS *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r);
|
||||
void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesMSZIPCtr6 *r);
|
||||
void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr6 *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesXPRESSCtr1 *r);
|
||||
void ndr_print_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesXPRESSCtr1 *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesXPRESSCtr6 *r);
|
||||
void ndr_print_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesXPRESSCtr6 *r);
|
||||
void ndr_print_drsuapi_DsGetNCChangesCompressionType(struct ndr_print *ndr, const char *name, enum drsuapi_DsGetNCChangesCompressionType r);
|
||||
void ndr_print_drsuapi_DsGetNCChangesCompressedCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNCChangesCompressedCtr *r);
|
||||
void ndr_print_drsuapi_DsGetNCChangesCtr2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr2 *r);
|
||||
void ndr_print_drsuapi_DsGetNCChangesCtr7(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr7 *r);
|
||||
void ndr_print_drsuapi_DsGetNCChangesCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNCChangesCtr *r);
|
||||
void ndr_print_drsuapi_DsReplicaUpdateRefsRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaUpdateRefsRequest1 *r);
|
||||
void ndr_print_drsuapi_DsReplicaUpdateRefsRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaUpdateRefsRequest *r);
|
||||
void ndr_print_drsuapi_DsReplicaAddRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAddRequest1 *r);
|
||||
void ndr_print_drsuapi_DsReplicaAddRequest2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAddRequest2 *r);
|
||||
void ndr_print_drsuapi_DsReplicaAddRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaAddRequest *r);
|
||||
void ndr_print_drsuapi_DsReplicaDelRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaDelRequest1 *r);
|
||||
void ndr_print_drsuapi_DsReplicaDelRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaDelRequest *r);
|
||||
void ndr_print_drsuapi_DsReplicaModRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaModRequest1 *r);
|
||||
void ndr_print_drsuapi_DsReplicaModRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaModRequest *r);
|
||||
void ndr_print_drsuapi_DsMembershipType(struct ndr_print *ndr, const char *name, enum drsuapi_DsMembershipType r);
|
||||
void ndr_print_drsuapi_DsGetMembershipsCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetMembershipsCtr1 *r);
|
||||
void ndr_print_drsuapi_DsGetMembershipsCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetMembershipsCtr *r);
|
||||
void ndr_print_drsuapi_DsGetMembershipsRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetMembershipsRequest1 *r);
|
||||
void ndr_print_drsuapi_DsGetMembershipsRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetMembershipsRequest *r);
|
||||
void ndr_print_drsuapi_DsGetNT4ChangeLogFlags(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
void ndr_print_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNT4ChangeLogRequest1 *r);
|
||||
void ndr_print_drsuapi_DsGetNT4ChangeLogRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNT4ChangeLogRequest *r);
|
||||
void ndr_print_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNT4ChangeLogInfo1 *r);
|
||||
void ndr_print_drsuapi_DsGetNT4ChangeLogInfo(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNT4ChangeLogInfo *r);
|
||||
void ndr_print_drsuapi_DsNameStatus(struct ndr_print *ndr, const char *name, enum drsuapi_DsNameStatus r);
|
||||
void ndr_print_drsuapi_DsNameFlags(struct ndr_print *ndr, const char *name, enum drsuapi_DsNameFlags r);
|
||||
void ndr_print_drsuapi_DsNameFormat(struct ndr_print *ndr, const char *name, enum drsuapi_DsNameFormat r);
|
||||
void ndr_print_drsuapi_DsNameString(struct ndr_print *ndr, const char *name, const struct drsuapi_DsNameString *r);
|
||||
void ndr_print_drsuapi_DsNameRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsNameRequest1 *r);
|
||||
void ndr_print_drsuapi_DsNameRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsNameRequest *r);
|
||||
void ndr_print_drsuapi_DsNameInfo1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsNameInfo1 *r);
|
||||
void ndr_print_drsuapi_DsNameCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsNameCtr1 *r);
|
||||
void ndr_print_drsuapi_DsNameCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsNameCtr *r);
|
||||
void ndr_print_drsuapi_DsSpnOperation(struct ndr_print *ndr, const char *name, enum drsuapi_DsSpnOperation r);
|
||||
void ndr_print_drsuapi_DsWriteAccountSpnRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsWriteAccountSpnRequest1 *r);
|
||||
void ndr_print_drsuapi_DsWriteAccountSpnRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsWriteAccountSpnRequest *r);
|
||||
void ndr_print_drsuapi_DsWriteAccountSpnResult1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsWriteAccountSpnResult1 *r);
|
||||
void ndr_print_drsuapi_DsWriteAccountSpnResult(struct ndr_print *ndr, const char *name, const union drsuapi_DsWriteAccountSpnResult *r);
|
||||
void ndr_print_drsuapi_DsRemoveDSServerRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsRemoveDSServerRequest1 *r);
|
||||
void ndr_print_drsuapi_DsRemoveDSServerRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsRemoveDSServerRequest *r);
|
||||
void ndr_print_drsuapi_DsRemoveDSServerResult1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsRemoveDSServerResult1 *r);
|
||||
void ndr_print_drsuapi_DsRemoveDSServerResult(struct ndr_print *ndr, const char *name, const union drsuapi_DsRemoveDSServerResult *r);
|
||||
void ndr_print_drsuapi_DsGetDCInfoCtrLevels(struct ndr_print *ndr, const char *name, enum drsuapi_DsGetDCInfoCtrLevels r);
|
||||
void ndr_print_drsuapi_DsGetDCInfoRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfoRequest1 *r);
|
||||
void ndr_print_drsuapi_DsGetDCInfoRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetDCInfoRequest *r);
|
||||
void ndr_print_drsuapi_DsGetDCInfo1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfo1 *r);
|
||||
void ndr_print_drsuapi_DsGetDCInfoCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfoCtr1 *r);
|
||||
void ndr_print_drsuapi_DsGetDCInfo2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfo2 *r);
|
||||
void ndr_print_drsuapi_DsGetDCInfoCtr2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfoCtr2 *r);
|
||||
void ndr_print_drsuapi_DsGetDCInfo3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfo3 *r);
|
||||
void ndr_print_drsuapi_DsGetDCInfoCtr3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfoCtr3 *r);
|
||||
void ndr_print_drsuapi_DsGetDCConnection01(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCConnection01 *r);
|
||||
void ndr_print_drsuapi_DsGetDCConnectionCtr01(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCConnectionCtr01 *r);
|
||||
void ndr_print_drsuapi_DsGetDCInfoCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetDCInfoCtr *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectListItem(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaObjectListItem *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectListItem(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaObjectListItem *r);
|
||||
void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectListItem *r);
|
||||
void ndr_print_drsuapi_DsAddEntry_DirErr(struct ndr_print *ndr, const char *name, enum drsuapi_DsAddEntry_DirErr r);
|
||||
void ndr_print_drsuapi_DsAddEntryRequest2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryRequest2 *r);
|
||||
void ndr_print_drsuapi_SecBufferType(struct ndr_print *ndr, const char *name, enum drsuapi_SecBufferType r);
|
||||
void ndr_print_drsuapi_SecBuffer(struct ndr_print *ndr, const char *name, const struct drsuapi_SecBuffer *r);
|
||||
void ndr_print_drsuapi_SecBufferDesc(struct ndr_print *ndr, const char *name, const struct drsuapi_SecBufferDesc *r);
|
||||
void ndr_print_drsuapi_DsAddEntryRequest3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryRequest3 *r);
|
||||
void ndr_print_drsuapi_DsAddEntryRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsAddEntryRequest *r);
|
||||
void ndr_print_drsuapi_DsAddEntryErrorInfoX(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryErrorInfoX *r);
|
||||
void ndr_print_drsuapi_DsAddEntry_AttrErr_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntry_AttrErr_V1 *r);
|
||||
void ndr_print_drsuapi_DsAddEntry_AttrErrListItem_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntry_AttrErrListItem_V1 *r);
|
||||
void ndr_print_drsuapi_DsAddEntryErrorInfo_Attr_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *r);
|
||||
void ndr_print_drsuapi_DsAddEntryErrorInfo_Name_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryErrorInfo_Name_V1 *r);
|
||||
void ndr_print_drsuapi_NameResOp_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_NameResOp_V1 *r);
|
||||
void ndr_print_drsuapi_DsAddEntry_RefType(struct ndr_print *ndr, const char *name, enum drsuapi_DsAddEntry_RefType r);
|
||||
void ndr_print_drsuapi_DsAddEntry_ChoiceType(struct ndr_print *ndr, const char *name, enum drsuapi_DsAddEntry_ChoiceType r);
|
||||
void ndr_print_drsuapi_DsaAddressListItem_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsaAddressListItem_V1 *r);
|
||||
void ndr_print_drsuapi_DsAddEntry_RefErrListItem_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntry_RefErrListItem_V1 *r);
|
||||
void ndr_print_drsuapi_DsAddEntryErrorInfo_Referr_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *r);
|
||||
void ndr_print_drsuapi_DsAddEntryErrorInfo(struct ndr_print *ndr, const char *name, const union drsuapi_DsAddEntryErrorInfo *r);
|
||||
void ndr_print_drsuapi_DsAddEntry_ErrData_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntry_ErrData_V1 *r);
|
||||
void ndr_print_drsuapi_DsAddEntry_ErrData(struct ndr_print *ndr, const char *name, const union drsuapi_DsAddEntry_ErrData *r);
|
||||
void ndr_print_drsuapi_DsReplicaObjectIdentifier2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectIdentifier2 *r);
|
||||
void ndr_print_drsuapi_DsAddEntryCtr2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryCtr2 *r);
|
||||
void ndr_print_drsuapi_DsAddEntryCtr3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryCtr3 *r);
|
||||
void ndr_print_drsuapi_DsAddEntryCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsAddEntryCtr *r);
|
||||
void ndr_print_drsuapi_DsExecuteKCCFlags(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
void ndr_print_drsuapi_DsExecuteKCC1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsExecuteKCC1 *r);
|
||||
void ndr_print_drsuapi_DsExecuteKCCRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsExecuteKCCRequest *r);
|
||||
void ndr_print_drsuapi_DsReplicaGetInfoLevel(struct ndr_print *ndr, const char *name, enum drsuapi_DsReplicaGetInfoLevel r);
|
||||
void ndr_print_drsuapi_DsReplicaInfoType(struct ndr_print *ndr, const char *name, enum drsuapi_DsReplicaInfoType r);
|
||||
void ndr_print_drsuapi_DsReplicaGetInfoRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaGetInfoRequest1 *r);
|
||||
void ndr_print_drsuapi_DsReplicaGetInfoRequest2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaGetInfoRequest2 *r);
|
||||
void ndr_print_drsuapi_DsReplicaGetInfoRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaGetInfoRequest *r);
|
||||
void ndr_print_drsuapi_DsReplicaNeighbour(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaNeighbour *r);
|
||||
void ndr_print_drsuapi_DsReplicaNeighbourCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaNeighbourCtr *r);
|
||||
void ndr_print_drsuapi_DsReplicaCursorCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursorCtr *r);
|
||||
void ndr_print_drsuapi_DsReplicaObjMetaData(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjMetaData *r);
|
||||
void ndr_print_drsuapi_DsReplicaObjMetaDataCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjMetaDataCtr *r);
|
||||
void ndr_print_drsuapi_DsReplicaKccDsaFailure(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaKccDsaFailure *r);
|
||||
void ndr_print_drsuapi_DsReplicaKccDsaFailuresCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaKccDsaFailuresCtr *r);
|
||||
void ndr_print_drsuapi_DsReplicaOpType(struct ndr_print *ndr, const char *name, enum drsuapi_DsReplicaOpType r);
|
||||
void ndr_print_drsuapi_DsReplicaOp(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOp *r);
|
||||
void ndr_print_drsuapi_DsReplicaOpCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOpCtr *r);
|
||||
void ndr_print_drsuapi_DsReplicaAttrValMetaData(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttrValMetaData *r);
|
||||
void ndr_print_drsuapi_DsReplicaAttrValMetaDataCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttrValMetaDataCtr *r);
|
||||
void ndr_print_drsuapi_DsReplicaCursor2Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor2Ctr *r);
|
||||
void ndr_print_drsuapi_DsReplicaCursor3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor3 *r);
|
||||
void ndr_print_drsuapi_DsReplicaCursor3Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor3Ctr *r);
|
||||
void ndr_print_drsuapi_DsReplicaObjMetaData2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjMetaData2 *r);
|
||||
void ndr_print_drsuapi_DsReplicaObjMetaData2Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjMetaData2Ctr *r);
|
||||
void ndr_print_drsuapi_DsReplicaAttrValMetaData2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttrValMetaData2 *r);
|
||||
void ndr_print_drsuapi_DsReplicaAttrValMetaData2Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttrValMetaData2Ctr *r);
|
||||
void ndr_print_drsuapi_DsReplicaConnection04(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaConnection04 *r);
|
||||
void ndr_print_drsuapi_DsReplicaConnection04Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaConnection04Ctr *r);
|
||||
void ndr_print_drsuapi_DsReplica06(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplica06 *r);
|
||||
void ndr_print_drsuapi_DsReplica06Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplica06Ctr *r);
|
||||
void ndr_print_drsuapi_DsReplicaInfo(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaInfo *r);
|
||||
void ndr_print_drsuapi_DsGetMemberships2Ctr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetMemberships2Ctr *r);
|
||||
void ndr_print_drsuapi_DsGetMemberships2Request1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetMemberships2Request1 *r);
|
||||
void ndr_print_drsuapi_DsGetMemberships2Request(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetMemberships2Request *r);
|
||||
void ndr_print_drsuapi_DsSiteCostInfo(struct ndr_print *ndr, const char *name, const struct drsuapi_DsSiteCostInfo *r);
|
||||
void ndr_print_drsuapi_QuerySitesByCostCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_QuerySitesByCostCtr1 *r);
|
||||
void ndr_print_drsuapi_QuerySitesByCostCtr(struct ndr_print *ndr, const char *name, const union drsuapi_QuerySitesByCostCtr *r);
|
||||
void ndr_print_drsuapi_QuerySitesByCostRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_QuerySitesByCostRequest1 *r);
|
||||
void ndr_print_drsuapi_QuerySitesByCostRequest(struct ndr_print *ndr, const char *name, const union drsuapi_QuerySitesByCostRequest *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsBind(struct ndr_push *ndr, int flags, const struct drsuapi_DsBind *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsBind(struct ndr_pull *ndr, int flags, struct drsuapi_DsBind *r);
|
||||
void ndr_print_drsuapi_DsBind(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsBind *r);
|
||||
void ndr_print_drsuapi_DsUnbind(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsUnbind *r);
|
||||
void ndr_print_drsuapi_DsReplicaSync(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsReplicaSync *r);
|
||||
void ndr_print_drsuapi_DsGetNCChanges(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsGetNCChanges *r);
|
||||
void ndr_print_drsuapi_DsReplicaUpdateRefs(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsReplicaUpdateRefs *r);
|
||||
void ndr_print_drsuapi_DsReplicaAdd(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsReplicaAdd *r);
|
||||
void ndr_print_drsuapi_DsReplicaDel(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsReplicaDel *r);
|
||||
void ndr_print_drsuapi_DsReplicaMod(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsReplicaMod *r);
|
||||
void ndr_print_DRSUAPI_VERIFY_NAMES(struct ndr_print *ndr, const char *name, int flags, const struct DRSUAPI_VERIFY_NAMES *r);
|
||||
void ndr_print_drsuapi_DsGetMemberships(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsGetMemberships *r);
|
||||
void ndr_print_DRSUAPI_INTER_DOMAIN_MOVE(struct ndr_print *ndr, const char *name, int flags, const struct DRSUAPI_INTER_DOMAIN_MOVE *r);
|
||||
void ndr_print_drsuapi_DsGetNT4ChangeLog(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsGetNT4ChangeLog *r);
|
||||
void ndr_print_drsuapi_DsCrackNames(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsCrackNames *r);
|
||||
void ndr_print_drsuapi_DsWriteAccountSpn(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsWriteAccountSpn *r);
|
||||
void ndr_print_drsuapi_DsRemoveDSServer(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsRemoveDSServer *r);
|
||||
void ndr_print_DRSUAPI_REMOVE_DS_DOMAIN(struct ndr_print *ndr, const char *name, int flags, const struct DRSUAPI_REMOVE_DS_DOMAIN *r);
|
||||
void ndr_print_drsuapi_DsGetDomainControllerInfo(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsGetDomainControllerInfo *r);
|
||||
enum ndr_err_code ndr_push_drsuapi_DsAddEntry(struct ndr_push *ndr, int flags, const struct drsuapi_DsAddEntry *r);
|
||||
enum ndr_err_code ndr_pull_drsuapi_DsAddEntry(struct ndr_pull *ndr, int flags, struct drsuapi_DsAddEntry *r);
|
||||
void ndr_print_drsuapi_DsAddEntry(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsAddEntry *r);
|
||||
void ndr_print_drsuapi_DsExecuteKCC(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsExecuteKCC *r);
|
||||
void ndr_print_drsuapi_DsReplicaGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsReplicaGetInfo *r);
|
||||
void ndr_print_DRSUAPI_ADD_SID_HISTORY(struct ndr_print *ndr, const char *name, int flags, const struct DRSUAPI_ADD_SID_HISTORY *r);
|
||||
void ndr_print_drsuapi_DsGetMemberships2(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsGetMemberships2 *r);
|
||||
void ndr_print_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct ndr_print *ndr, const char *name, int flags, const struct DRSUAPI_REPLICA_VERIFY_OBJECTS *r);
|
||||
void ndr_print_DRSUAPI_GET_OBJECT_EXISTENCE(struct ndr_print *ndr, const char *name, int flags, const struct DRSUAPI_GET_OBJECT_EXISTENCE *r);
|
||||
void ndr_print_drsuapi_QuerySitesByCost(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_QuerySitesByCost *r);
|
||||
#endif /* _HEADER_NDR_drsuapi */
|
||||
@ -0,0 +1,81 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#include <ndr.h>
|
||||
#include <gen_ndr/krb5pac.h>
|
||||
|
||||
#ifndef _HEADER_NDR_krb5pac
|
||||
#define _HEADER_NDR_krb5pac
|
||||
|
||||
#include <ndr/ndr_krb5pac.h>
|
||||
#define NDR_KRB5PAC_UUID "12345778-1234-abcd-0000-00000000"
|
||||
#define NDR_KRB5PAC_VERSION 0.0
|
||||
#define NDR_KRB5PAC_NAME "krb5pac"
|
||||
#define NDR_KRB5PAC_HELPSTRING "Active Directory KRB5 PAC"
|
||||
extern const struct ndr_interface_table ndr_table_krb5pac;
|
||||
#define NDR_KRB5PAC_CALL_COUNT (0)
|
||||
void ndr_print_PAC_LOGON_NAME(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_NAME *r);
|
||||
enum ndr_err_code ndr_push_PAC_SIGNATURE_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_SIGNATURE_DATA *r);
|
||||
enum ndr_err_code ndr_pull_PAC_SIGNATURE_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_SIGNATURE_DATA *r);
|
||||
void ndr_print_PAC_SIGNATURE_DATA(struct ndr_print *ndr, const char *name, const struct PAC_SIGNATURE_DATA *r);
|
||||
void ndr_print_PAC_DOMAIN_GROUP_MEMBERSHIP(struct ndr_print *ndr, const char *name, const struct PAC_DOMAIN_GROUP_MEMBERSHIP *r);
|
||||
void ndr_print_PAC_LOGON_INFO(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO *r);
|
||||
void ndr_print_PAC_CREDENTIAL_NTLM_FLAGS(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
enum ndr_err_code ndr_push_PAC_CREDENTIAL_NTLM_SECPKG(struct ndr_push *ndr, int ndr_flags, const struct PAC_CREDENTIAL_NTLM_SECPKG *r);
|
||||
enum ndr_err_code ndr_pull_PAC_CREDENTIAL_NTLM_SECPKG(struct ndr_pull *ndr, int ndr_flags, struct PAC_CREDENTIAL_NTLM_SECPKG *r);
|
||||
void ndr_print_PAC_CREDENTIAL_NTLM_SECPKG(struct ndr_print *ndr, const char *name, const struct PAC_CREDENTIAL_NTLM_SECPKG *r);
|
||||
enum ndr_err_code ndr_push_PAC_CREDENTIAL_SUPPLEMENTAL_SECPKG(struct ndr_push *ndr, int ndr_flags, const struct PAC_CREDENTIAL_SUPPLEMENTAL_SECPKG *r);
|
||||
enum ndr_err_code ndr_pull_PAC_CREDENTIAL_SUPPLEMENTAL_SECPKG(struct ndr_pull *ndr, int ndr_flags, struct PAC_CREDENTIAL_SUPPLEMENTAL_SECPKG *r);
|
||||
void ndr_print_PAC_CREDENTIAL_SUPPLEMENTAL_SECPKG(struct ndr_print *ndr, const char *name, const struct PAC_CREDENTIAL_SUPPLEMENTAL_SECPKG *r);
|
||||
enum ndr_err_code ndr_push_PAC_CREDENTIAL_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_CREDENTIAL_DATA *r);
|
||||
enum ndr_err_code ndr_pull_PAC_CREDENTIAL_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_CREDENTIAL_DATA *r);
|
||||
void ndr_print_PAC_CREDENTIAL_DATA(struct ndr_print *ndr, const char *name, const struct PAC_CREDENTIAL_DATA *r);
|
||||
enum ndr_err_code ndr_push_PAC_CREDENTIAL_DATA_CTR(struct ndr_push *ndr, int ndr_flags, const struct PAC_CREDENTIAL_DATA_CTR *r);
|
||||
enum ndr_err_code ndr_pull_PAC_CREDENTIAL_DATA_CTR(struct ndr_pull *ndr, int ndr_flags, struct PAC_CREDENTIAL_DATA_CTR *r);
|
||||
void ndr_print_PAC_CREDENTIAL_DATA_CTR(struct ndr_print *ndr, const char *name, const struct PAC_CREDENTIAL_DATA_CTR *r);
|
||||
enum ndr_err_code ndr_push_PAC_CREDENTIAL_DATA_NDR(struct ndr_push *ndr, int ndr_flags, const struct PAC_CREDENTIAL_DATA_NDR *r);
|
||||
enum ndr_err_code ndr_pull_PAC_CREDENTIAL_DATA_NDR(struct ndr_pull *ndr, int ndr_flags, struct PAC_CREDENTIAL_DATA_NDR *r);
|
||||
void ndr_print_PAC_CREDENTIAL_DATA_NDR(struct ndr_print *ndr, const char *name, const struct PAC_CREDENTIAL_DATA_NDR *r);
|
||||
enum ndr_err_code ndr_push_PAC_CREDENTIAL_INFO(struct ndr_push *ndr, int ndr_flags, const struct PAC_CREDENTIAL_INFO *r);
|
||||
enum ndr_err_code ndr_pull_PAC_CREDENTIAL_INFO(struct ndr_pull *ndr, int ndr_flags, struct PAC_CREDENTIAL_INFO *r);
|
||||
void ndr_print_PAC_CREDENTIAL_INFO(struct ndr_print *ndr, const char *name, const struct PAC_CREDENTIAL_INFO *r);
|
||||
void ndr_print_PAC_CONSTRAINED_DELEGATION(struct ndr_print *ndr, const char *name, const struct PAC_CONSTRAINED_DELEGATION *r);
|
||||
void ndr_print_PAC_UPN_DNS_FLAGS(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
void ndr_print_PAC_UPN_DNS_INFO_SAM_NAME_AND_SID(struct ndr_print *ndr, const char *name, const struct PAC_UPN_DNS_INFO_SAM_NAME_AND_SID *r);
|
||||
void ndr_print_PAC_UPN_DNS_INFO_EX(struct ndr_print *ndr, const char *name, const union PAC_UPN_DNS_INFO_EX *r);
|
||||
void ndr_print_PAC_UPN_DNS_INFO(struct ndr_print *ndr, const char *name, const struct PAC_UPN_DNS_INFO *r);
|
||||
void ndr_print_PAC_ATTRIBUTE_INFO_FLAGS(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
void ndr_print_PAC_ATTRIBUTES_INFO(struct ndr_print *ndr, const char *name, const struct PAC_ATTRIBUTES_INFO *r);
|
||||
void ndr_print_PAC_REQUESTER_SID(struct ndr_print *ndr, const char *name, const struct PAC_REQUESTER_SID *r);
|
||||
enum ndr_err_code ndr_push_PAC_LOGON_INFO_CTR(struct ndr_push *ndr, int ndr_flags, const struct PAC_LOGON_INFO_CTR *r);
|
||||
enum ndr_err_code ndr_pull_PAC_LOGON_INFO_CTR(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_INFO_CTR *r);
|
||||
void ndr_print_PAC_LOGON_INFO_CTR(struct ndr_print *ndr, const char *name, const struct PAC_LOGON_INFO_CTR *r);
|
||||
enum ndr_err_code ndr_push_PAC_CONSTRAINED_DELEGATION_CTR(struct ndr_push *ndr, int ndr_flags, const struct PAC_CONSTRAINED_DELEGATION_CTR *r);
|
||||
enum ndr_err_code ndr_pull_PAC_CONSTRAINED_DELEGATION_CTR(struct ndr_pull *ndr, int ndr_flags, struct PAC_CONSTRAINED_DELEGATION_CTR *r);
|
||||
void ndr_print_PAC_CONSTRAINED_DELEGATION_CTR(struct ndr_print *ndr, const char *name, const struct PAC_CONSTRAINED_DELEGATION_CTR *r);
|
||||
enum ndr_err_code ndr_push_PAC_TYPE(struct ndr_push *ndr, int ndr_flags, enum PAC_TYPE r);
|
||||
enum ndr_err_code ndr_pull_PAC_TYPE(struct ndr_pull *ndr, int ndr_flags, enum PAC_TYPE *r);
|
||||
void ndr_print_PAC_TYPE(struct ndr_print *ndr, const char *name, enum PAC_TYPE r);
|
||||
void ndr_print_DATA_BLOB_REM(struct ndr_print *ndr, const char *name, const struct DATA_BLOB_REM *r);
|
||||
enum ndr_err_code ndr_push_PAC_INFO(struct ndr_push *ndr, int ndr_flags, const union PAC_INFO *r);
|
||||
enum ndr_err_code ndr_pull_PAC_INFO(struct ndr_pull *ndr, int ndr_flags, union PAC_INFO *r);
|
||||
void ndr_print_PAC_INFO(struct ndr_print *ndr, const char *name, const union PAC_INFO *r);
|
||||
size_t ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags);
|
||||
enum ndr_err_code ndr_push_PAC_BUFFER(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER *r);
|
||||
enum ndr_err_code ndr_pull_PAC_BUFFER(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER *r);
|
||||
void ndr_print_PAC_BUFFER(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER *r);
|
||||
enum ndr_err_code ndr_push_PAC_DATA(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA *r);
|
||||
enum ndr_err_code ndr_pull_PAC_DATA(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA *r);
|
||||
void ndr_print_PAC_DATA(struct ndr_print *ndr, const char *name, const struct PAC_DATA *r);
|
||||
enum ndr_err_code ndr_push_PAC_BUFFER_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER_RAW *r);
|
||||
enum ndr_err_code ndr_pull_PAC_BUFFER_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER_RAW *r);
|
||||
void ndr_print_PAC_BUFFER_RAW(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER_RAW *r);
|
||||
enum ndr_err_code ndr_push_PAC_DATA_RAW(struct ndr_push *ndr, int ndr_flags, const struct PAC_DATA_RAW *r);
|
||||
enum ndr_err_code ndr_pull_PAC_DATA_RAW(struct ndr_pull *ndr, int ndr_flags, struct PAC_DATA_RAW *r);
|
||||
void ndr_print_PAC_DATA_RAW(struct ndr_print *ndr, const char *name, const struct PAC_DATA_RAW *r);
|
||||
enum ndr_err_code ndr_push_PAC_Validate(struct ndr_push *ndr, int ndr_flags, const struct PAC_Validate *r);
|
||||
enum ndr_err_code ndr_pull_PAC_Validate(struct ndr_pull *ndr, int ndr_flags, struct PAC_Validate *r);
|
||||
void ndr_print_PAC_Validate(struct ndr_print *ndr, const char *name, const struct PAC_Validate *r);
|
||||
enum ndr_err_code ndr_push_netsamlogoncache_entry(struct ndr_push *ndr, int ndr_flags, const struct netsamlogoncache_entry *r);
|
||||
enum ndr_err_code ndr_pull_netsamlogoncache_entry(struct ndr_pull *ndr, int ndr_flags, struct netsamlogoncache_entry *r);
|
||||
void ndr_print_netsamlogoncache_entry(struct ndr_print *ndr, const char *name, const struct netsamlogoncache_entry *r);
|
||||
#endif /* _HEADER_NDR_krb5pac */
|
||||
@ -0,0 +1,43 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#include <ndr.h>
|
||||
#include <gen_ndr/misc.h>
|
||||
|
||||
#ifndef _HEADER_NDR_misc
|
||||
#define _HEADER_NDR_misc
|
||||
|
||||
extern const struct ndr_interface_table ndr_table_misc;
|
||||
#define NDR_MISC_CALL_COUNT (0)
|
||||
enum ndr_err_code ndr_push_GUID(struct ndr_push *ndr, int ndr_flags, const struct GUID *r);
|
||||
enum ndr_err_code ndr_pull_GUID(struct ndr_pull *ndr, int ndr_flags, struct GUID *r);
|
||||
void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *r);
|
||||
size_t ndr_size_GUID(const struct GUID *r, int flags);
|
||||
enum ndr_err_code ndr_push_ndr_syntax_id(struct ndr_push *ndr, int ndr_flags, const struct ndr_syntax_id *r);
|
||||
enum ndr_err_code ndr_pull_ndr_syntax_id(struct ndr_pull *ndr, int ndr_flags, struct ndr_syntax_id *r);
|
||||
void ndr_print_ndr_syntax_id(struct ndr_print *ndr, const char *name, const struct ndr_syntax_id *r);
|
||||
enum ndr_err_code ndr_push_policy_handle(struct ndr_push *ndr, int ndr_flags, const struct policy_handle *r);
|
||||
enum ndr_err_code ndr_pull_policy_handle(struct ndr_pull *ndr, int ndr_flags, struct policy_handle *r);
|
||||
void ndr_print_policy_handle(struct ndr_print *ndr, const char *name, const struct policy_handle *r);
|
||||
enum ndr_err_code ndr_push_netr_SchannelType(struct ndr_push *ndr, int ndr_flags, enum netr_SchannelType r);
|
||||
enum ndr_err_code ndr_pull_netr_SchannelType(struct ndr_pull *ndr, int ndr_flags, enum netr_SchannelType *r);
|
||||
void ndr_print_netr_SchannelType(struct ndr_print *ndr, const char *name, enum netr_SchannelType r);
|
||||
enum ndr_err_code ndr_push_KRB5_EDATA_NTSTATUS(struct ndr_push *ndr, int ndr_flags, const struct KRB5_EDATA_NTSTATUS *r);
|
||||
enum ndr_err_code ndr_pull_KRB5_EDATA_NTSTATUS(struct ndr_pull *ndr, int ndr_flags, struct KRB5_EDATA_NTSTATUS *r);
|
||||
void ndr_print_KRB5_EDATA_NTSTATUS(struct ndr_print *ndr, const char *name, const struct KRB5_EDATA_NTSTATUS *r);
|
||||
enum ndr_err_code ndr_push_winreg_Type(struct ndr_push *ndr, int ndr_flags, enum winreg_Type r);
|
||||
enum ndr_err_code ndr_pull_winreg_Type(struct ndr_pull *ndr, int ndr_flags, enum winreg_Type *r);
|
||||
void ndr_print_winreg_Type(struct ndr_print *ndr, const char *name, enum winreg_Type r);
|
||||
enum ndr_err_code ndr_push_winreg_Data(struct ndr_push *ndr, int ndr_flags, const union winreg_Data *r);
|
||||
enum ndr_err_code ndr_pull_winreg_Data(struct ndr_pull *ndr, int ndr_flags, union winreg_Data *r);
|
||||
void ndr_print_winreg_Data(struct ndr_print *ndr, const char *name, const union winreg_Data *r);
|
||||
enum ndr_err_code ndr_push_winreg_Data_GPO(struct ndr_push *ndr, int ndr_flags, const union winreg_Data_GPO *r);
|
||||
enum ndr_err_code ndr_pull_winreg_Data_GPO(struct ndr_pull *ndr, int ndr_flags, union winreg_Data_GPO *r);
|
||||
void ndr_print_winreg_Data_GPO(struct ndr_print *ndr, const char *name, const union winreg_Data_GPO *r);
|
||||
size_t ndr_size_winreg_Data_GPO(const union winreg_Data_GPO *r, uint32_t level, int flags);
|
||||
enum ndr_err_code ndr_push_netr_SamDatabaseID(struct ndr_push *ndr, int ndr_flags, enum netr_SamDatabaseID r);
|
||||
enum ndr_err_code ndr_pull_netr_SamDatabaseID(struct ndr_pull *ndr, int ndr_flags, enum netr_SamDatabaseID *r);
|
||||
void ndr_print_netr_SamDatabaseID(struct ndr_print *ndr, const char *name, enum netr_SamDatabaseID r);
|
||||
enum ndr_err_code ndr_push_svcctl_ServerType(struct ndr_push *ndr, int ndr_flags, uint32_t r);
|
||||
enum ndr_err_code ndr_pull_svcctl_ServerType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
|
||||
void ndr_print_svcctl_ServerType(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
#endif /* _HEADER_NDR_misc */
|
||||
@ -0,0 +1,112 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#include <ndr.h>
|
||||
#include <gen_ndr/nbt.h>
|
||||
|
||||
#ifndef _HEADER_NDR_nbt
|
||||
#define _HEADER_NDR_nbt
|
||||
|
||||
#include <ndr/ndr_nbt.h>
|
||||
#define NDR_NBT_UUID "6def41b6-86e4-4c32-997c-ed33af7bcd8e"
|
||||
#define NDR_NBT_VERSION 0.0
|
||||
#define NDR_NBT_NAME "nbt"
|
||||
#define NDR_NBT_HELPSTRING "NBT messages"
|
||||
extern const struct ndr_interface_table ndr_table_nbt;
|
||||
#define NDR_NBT_CALL_COUNT (0)
|
||||
void ndr_print_nbt_operation(struct ndr_print *ndr, const char *name, uint16_t r);
|
||||
void ndr_print_nbt_name_type(struct ndr_print *ndr, const char *name, enum nbt_name_type r);
|
||||
enum ndr_err_code ndr_push_nbt_name(struct ndr_push *ndr, int ndr_flags, const struct nbt_name *r);
|
||||
enum ndr_err_code ndr_pull_nbt_name(struct ndr_pull *ndr, int ndr_flags, struct nbt_name *r);
|
||||
void ndr_print_nbt_name(struct ndr_print *ndr, const char *name, const struct nbt_name *r);
|
||||
enum ndr_err_code ndr_push_nbt_qclass(struct ndr_push *ndr, int ndr_flags, enum nbt_qclass r);
|
||||
enum ndr_err_code ndr_pull_nbt_qclass(struct ndr_pull *ndr, int ndr_flags, enum nbt_qclass *r);
|
||||
void ndr_print_nbt_qclass(struct ndr_print *ndr, const char *name, enum nbt_qclass r);
|
||||
enum ndr_err_code ndr_push_nbt_qtype(struct ndr_push *ndr, int ndr_flags, enum nbt_qtype r);
|
||||
enum ndr_err_code ndr_pull_nbt_qtype(struct ndr_pull *ndr, int ndr_flags, enum nbt_qtype *r);
|
||||
void ndr_print_nbt_qtype(struct ndr_print *ndr, const char *name, enum nbt_qtype r);
|
||||
void ndr_print_nbt_name_question(struct ndr_print *ndr, const char *name, const struct nbt_name_question *r);
|
||||
void ndr_print_nb_flags(struct ndr_print *ndr, const char *name, uint16_t r);
|
||||
void ndr_print_nbt_rdata_address(struct ndr_print *ndr, const char *name, const struct nbt_rdata_address *r);
|
||||
void ndr_print_nbt_rdata_netbios(struct ndr_print *ndr, const char *name, const struct nbt_rdata_netbios *r);
|
||||
void ndr_print_nbt_statistics(struct ndr_print *ndr, const char *name, const struct nbt_statistics *r);
|
||||
void ndr_print_nbt_status_name(struct ndr_print *ndr, const char *name, const struct nbt_status_name *r);
|
||||
void ndr_print_nbt_rdata_status(struct ndr_print *ndr, const char *name, const struct nbt_rdata_status *r);
|
||||
void ndr_print_nbt_rdata_data(struct ndr_print *ndr, const char *name, const struct nbt_rdata_data *r);
|
||||
enum ndr_err_code ndr_push_nbt_rdata(struct ndr_push *ndr, int ndr_flags, const union nbt_rdata *r);
|
||||
enum ndr_err_code ndr_pull_nbt_rdata(struct ndr_pull *ndr, int ndr_flags, union nbt_rdata *r);
|
||||
void ndr_print_nbt_rdata(struct ndr_print *ndr, const char *name, const union nbt_rdata *r);
|
||||
enum ndr_err_code ndr_push_nbt_res_rec(struct ndr_push *ndr, int ndr_flags, const struct nbt_res_rec *r);
|
||||
void ndr_print_nbt_res_rec(struct ndr_print *ndr, const char *name, const struct nbt_res_rec *r);
|
||||
enum ndr_err_code ndr_push_nbt_name_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_name_packet *r);
|
||||
enum ndr_err_code ndr_pull_nbt_name_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_name_packet *r);
|
||||
void ndr_print_nbt_name_packet(struct ndr_print *ndr, const char *name, const struct nbt_name_packet *r);
|
||||
void ndr_print_dgram_msg_type(struct ndr_print *ndr, const char *name, enum dgram_msg_type r);
|
||||
void ndr_print_dgram_flags(struct ndr_print *ndr, const char *name, uint8_t r);
|
||||
void ndr_print_smb_command(struct ndr_print *ndr, const char *name, enum smb_command r);
|
||||
void ndr_print_smb_trans_body(struct ndr_print *ndr, const char *name, const struct smb_trans_body *r);
|
||||
void ndr_print_smb_body(struct ndr_print *ndr, const char *name, const union smb_body *r);
|
||||
enum ndr_err_code ndr_push_dgram_smb_packet(struct ndr_push *ndr, int ndr_flags, const struct dgram_smb_packet *r);
|
||||
enum ndr_err_code ndr_pull_dgram_smb_packet(struct ndr_pull *ndr, int ndr_flags, struct dgram_smb_packet *r);
|
||||
void ndr_print_dgram_smb_packet(struct ndr_print *ndr, const char *name, const struct dgram_smb_packet *r);
|
||||
void ndr_print_dgram_message_body(struct ndr_print *ndr, const char *name, const union dgram_message_body *r);
|
||||
void ndr_print_dgram_message(struct ndr_print *ndr, const char *name, const struct dgram_message *r);
|
||||
void ndr_print_dgram_err_code(struct ndr_print *ndr, const char *name, enum dgram_err_code r);
|
||||
void ndr_print_dgram_data(struct ndr_print *ndr, const char *name, const union dgram_data *r);
|
||||
enum ndr_err_code ndr_push_nbt_dgram_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_dgram_packet *r);
|
||||
enum ndr_err_code ndr_pull_nbt_dgram_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_dgram_packet *r);
|
||||
void ndr_print_nbt_dgram_packet(struct ndr_print *ndr, const char *name, const struct nbt_dgram_packet *r);
|
||||
enum ndr_err_code ndr_push_nbt_sockaddr(struct ndr_push *ndr, int ndr_flags, const struct nbt_sockaddr *r);
|
||||
enum ndr_err_code ndr_pull_nbt_sockaddr(struct ndr_pull *ndr, int ndr_flags, struct nbt_sockaddr *r);
|
||||
void ndr_print_nbt_sockaddr(struct ndr_print *ndr, const char *name, const struct nbt_sockaddr *r);
|
||||
size_t ndr_size_nbt_sockaddr(const struct nbt_sockaddr *r, int flags);
|
||||
enum ndr_err_code ndr_push_nbt_server_type(struct ndr_push *ndr, int ndr_flags, uint32_t r);
|
||||
enum ndr_err_code ndr_pull_nbt_server_type(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
|
||||
void ndr_print_nbt_server_type(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
enum ndr_err_code ndr_push_netlogon_nt_version_flags(struct ndr_push *ndr, int ndr_flags, uint32_t r);
|
||||
enum ndr_err_code ndr_pull_netlogon_nt_version_flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
|
||||
void ndr_print_netlogon_nt_version_flags(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
enum ndr_err_code ndr_push_netlogon_command(struct ndr_push *ndr, int ndr_flags, enum netlogon_command r);
|
||||
enum ndr_err_code ndr_pull_netlogon_command(struct ndr_pull *ndr, int ndr_flags, enum netlogon_command *r);
|
||||
void ndr_print_netlogon_command(struct ndr_print *ndr, const char *name, enum netlogon_command r);
|
||||
enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_REQUEST(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_REQUEST *r);
|
||||
enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_REQUEST(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_REQUEST *r);
|
||||
void ndr_print_NETLOGON_SAM_LOGON_REQUEST(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_REQUEST *r);
|
||||
void ndr_print_NETLOGON_LOGON_REQUEST(struct ndr_print *ndr, const char *name, const struct NETLOGON_LOGON_REQUEST *r);
|
||||
enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE_NT40(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_RESPONSE_NT40 *r);
|
||||
enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_NT40(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_RESPONSE_NT40 *r);
|
||||
void ndr_print_NETLOGON_SAM_LOGON_RESPONSE_NT40(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_RESPONSE_NT40 *r);
|
||||
enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_RESPONSE *r);
|
||||
enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_RESPONSE *r);
|
||||
void ndr_print_NETLOGON_SAM_LOGON_RESPONSE(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_RESPONSE *r);
|
||||
enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_RESPONSE_EX *r);
|
||||
enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_RESPONSE_EX *r);
|
||||
void ndr_print_NETLOGON_SAM_LOGON_RESPONSE_EX(struct ndr_print *ndr, const char *name, const struct NETLOGON_SAM_LOGON_RESPONSE_EX *r);
|
||||
void ndr_print_nbt_netlogon_query_for_pdc(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_query_for_pdc *r);
|
||||
enum ndr_err_code ndr_push_nbt_netlogon_response_from_pdc(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_response_from_pdc *r);
|
||||
enum ndr_err_code ndr_pull_nbt_netlogon_response_from_pdc(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_response_from_pdc *r);
|
||||
void ndr_print_nbt_netlogon_response_from_pdc(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_response_from_pdc *r);
|
||||
enum ndr_err_code ndr_push_nbt_netlogon_response2(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_response2 *r);
|
||||
enum ndr_err_code ndr_pull_nbt_netlogon_response2(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_response2 *r);
|
||||
void ndr_print_nbt_netlogon_response2(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_response2 *r);
|
||||
void ndr_print_nbt_db_change_info(struct ndr_print *ndr, const char *name, const struct nbt_db_change_info *r);
|
||||
void ndr_print_NETLOGON_DB_CHANGE(struct ndr_print *ndr, const char *name, const struct NETLOGON_DB_CHANGE *r);
|
||||
void ndr_print_nbt_netlogon_request(struct ndr_print *ndr, const char *name, const union nbt_netlogon_request *r);
|
||||
enum ndr_err_code ndr_push_nbt_netlogon_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_netlogon_packet *r);
|
||||
enum ndr_err_code ndr_pull_nbt_netlogon_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_netlogon_packet *r);
|
||||
void ndr_print_nbt_netlogon_packet(struct ndr_print *ndr, const char *name, const struct nbt_netlogon_packet *r);
|
||||
void ndr_print_nbt_browse_opcode(struct ndr_print *ndr, const char *name, enum nbt_browse_opcode r);
|
||||
void ndr_print_nbt_browse_host_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_host_announcement *r);
|
||||
void ndr_print_nbt_browse_announcement_request(struct ndr_print *ndr, const char *name, const struct nbt_browse_announcement_request *r);
|
||||
void ndr_print_nbt_browse_election_request(struct ndr_print *ndr, const char *name, const struct nbt_browse_election_request *r);
|
||||
void ndr_print_nbt_browse_backup_list_request(struct ndr_print *ndr, const char *name, const struct nbt_browse_backup_list_request *r);
|
||||
void ndr_print_nbt_browse_backup_list_response(struct ndr_print *ndr, const char *name, const struct nbt_browse_backup_list_response *r);
|
||||
void ndr_print_nbt_browse_become_backup(struct ndr_print *ndr, const char *name, const struct nbt_browse_become_backup *r);
|
||||
void ndr_print_nbt_browse_domain_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_domain_announcement *r);
|
||||
void ndr_print_nbt_browse_master_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_master_announcement *r);
|
||||
void ndr_print_nbt_browse_reset_state(struct ndr_print *ndr, const char *name, const struct nbt_browse_reset_state *r);
|
||||
void ndr_print_nbt_browse_local_master_announcement(struct ndr_print *ndr, const char *name, const struct nbt_browse_local_master_announcement *r);
|
||||
void ndr_print_nbt_browse_payload(struct ndr_print *ndr, const char *name, const union nbt_browse_payload *r);
|
||||
enum ndr_err_code ndr_push_nbt_browse_packet(struct ndr_push *ndr, int ndr_flags, const struct nbt_browse_packet *r);
|
||||
enum ndr_err_code ndr_pull_nbt_browse_packet(struct ndr_pull *ndr, int ndr_flags, struct nbt_browse_packet *r);
|
||||
void ndr_print_nbt_browse_packet(struct ndr_print *ndr, const char *name, const struct nbt_browse_packet *r);
|
||||
#endif /* _HEADER_NDR_nbt */
|
||||
@ -0,0 +1,347 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#include <ndr.h>
|
||||
#include <gen_ndr/samr.h>
|
||||
|
||||
#ifndef _HEADER_NDR_samr
|
||||
#define _HEADER_NDR_samr
|
||||
|
||||
#define NDR_SAMR_UUID "12345778-1234-abcd-ef00-0123456789ac"
|
||||
#define NDR_SAMR_VERSION 1.0
|
||||
#define NDR_SAMR_NAME "samr"
|
||||
#define NDR_SAMR_HELPSTRING NULL
|
||||
extern const struct ndr_interface_table ndr_table_samr;
|
||||
#define NDR_SAMR_CONNECT (0x00)
|
||||
|
||||
#define NDR_SAMR_CLOSE (0x01)
|
||||
|
||||
#define NDR_SAMR_SETSECURITY (0x02)
|
||||
|
||||
#define NDR_SAMR_QUERYSECURITY (0x03)
|
||||
|
||||
#define NDR_SAMR_SHUTDOWN (0x04)
|
||||
|
||||
#define NDR_SAMR_LOOKUPDOMAIN (0x05)
|
||||
|
||||
#define NDR_SAMR_ENUMDOMAINS (0x06)
|
||||
|
||||
#define NDR_SAMR_OPENDOMAIN (0x07)
|
||||
|
||||
#define NDR_SAMR_QUERYDOMAININFO (0x08)
|
||||
|
||||
#define NDR_SAMR_SETDOMAININFO (0x09)
|
||||
|
||||
#define NDR_SAMR_CREATEDOMAINGROUP (0x0a)
|
||||
|
||||
#define NDR_SAMR_ENUMDOMAINGROUPS (0x0b)
|
||||
|
||||
#define NDR_SAMR_CREATEUSER (0x0c)
|
||||
|
||||
#define NDR_SAMR_ENUMDOMAINUSERS (0x0d)
|
||||
|
||||
#define NDR_SAMR_CREATEDOMALIAS (0x0e)
|
||||
|
||||
#define NDR_SAMR_ENUMDOMAINALIASES (0x0f)
|
||||
|
||||
#define NDR_SAMR_GETALIASMEMBERSHIP (0x10)
|
||||
|
||||
#define NDR_SAMR_LOOKUPNAMES (0x11)
|
||||
|
||||
#define NDR_SAMR_LOOKUPRIDS (0x12)
|
||||
|
||||
#define NDR_SAMR_OPENGROUP (0x13)
|
||||
|
||||
#define NDR_SAMR_QUERYGROUPINFO (0x14)
|
||||
|
||||
#define NDR_SAMR_SETGROUPINFO (0x15)
|
||||
|
||||
#define NDR_SAMR_ADDGROUPMEMBER (0x16)
|
||||
|
||||
#define NDR_SAMR_DELETEDOMAINGROUP (0x17)
|
||||
|
||||
#define NDR_SAMR_DELETEGROUPMEMBER (0x18)
|
||||
|
||||
#define NDR_SAMR_QUERYGROUPMEMBER (0x19)
|
||||
|
||||
#define NDR_SAMR_SETMEMBERATTRIBUTESOFGROUP (0x1a)
|
||||
|
||||
#define NDR_SAMR_OPENALIAS (0x1b)
|
||||
|
||||
#define NDR_SAMR_QUERYALIASINFO (0x1c)
|
||||
|
||||
#define NDR_SAMR_SETALIASINFO (0x1d)
|
||||
|
||||
#define NDR_SAMR_DELETEDOMALIAS (0x1e)
|
||||
|
||||
#define NDR_SAMR_ADDALIASMEMBER (0x1f)
|
||||
|
||||
#define NDR_SAMR_DELETEALIASMEMBER (0x20)
|
||||
|
||||
#define NDR_SAMR_GETMEMBERSINALIAS (0x21)
|
||||
|
||||
#define NDR_SAMR_OPENUSER (0x22)
|
||||
|
||||
#define NDR_SAMR_DELETEUSER (0x23)
|
||||
|
||||
#define NDR_SAMR_QUERYUSERINFO (0x24)
|
||||
|
||||
#define NDR_SAMR_SETUSERINFO (0x25)
|
||||
|
||||
#define NDR_SAMR_CHANGEPASSWORDUSER (0x26)
|
||||
|
||||
#define NDR_SAMR_GETGROUPSFORUSER (0x27)
|
||||
|
||||
#define NDR_SAMR_QUERYDISPLAYINFO (0x28)
|
||||
|
||||
#define NDR_SAMR_GETDISPLAYENUMERATIONINDEX (0x29)
|
||||
|
||||
#define NDR_SAMR_TESTPRIVATEFUNCTIONSDOMAIN (0x2a)
|
||||
|
||||
#define NDR_SAMR_TESTPRIVATEFUNCTIONSUSER (0x2b)
|
||||
|
||||
#define NDR_SAMR_GETUSERPWINFO (0x2c)
|
||||
|
||||
#define NDR_SAMR_REMOVEMEMBERFROMFOREIGNDOMAIN (0x2d)
|
||||
|
||||
#define NDR_SAMR_QUERYDOMAININFO2 (0x2e)
|
||||
|
||||
#define NDR_SAMR_QUERYUSERINFO2 (0x2f)
|
||||
|
||||
#define NDR_SAMR_QUERYDISPLAYINFO2 (0x30)
|
||||
|
||||
#define NDR_SAMR_GETDISPLAYENUMERATIONINDEX2 (0x31)
|
||||
|
||||
#define NDR_SAMR_CREATEUSER2 (0x32)
|
||||
|
||||
#define NDR_SAMR_QUERYDISPLAYINFO3 (0x33)
|
||||
|
||||
#define NDR_SAMR_ADDMULTIPLEMEMBERSTOALIAS (0x34)
|
||||
|
||||
#define NDR_SAMR_REMOVEMULTIPLEMEMBERSFROMALIAS (0x35)
|
||||
|
||||
#define NDR_SAMR_OEMCHANGEPASSWORDUSER2 (0x36)
|
||||
|
||||
#define NDR_SAMR_CHANGEPASSWORDUSER2 (0x37)
|
||||
|
||||
#define NDR_SAMR_GETDOMPWINFO (0x38)
|
||||
|
||||
#define NDR_SAMR_CONNECT2 (0x39)
|
||||
|
||||
#define NDR_SAMR_SETUSERINFO2 (0x3a)
|
||||
|
||||
#define NDR_SAMR_SETBOOTKEYINFORMATION (0x3b)
|
||||
|
||||
#define NDR_SAMR_GETBOOTKEYINFORMATION (0x3c)
|
||||
|
||||
#define NDR_SAMR_CONNECT3 (0x3d)
|
||||
|
||||
#define NDR_SAMR_CONNECT4 (0x3e)
|
||||
|
||||
#define NDR_SAMR_CHANGEPASSWORDUSER3 (0x3f)
|
||||
|
||||
#define NDR_SAMR_CONNECT5 (0x40)
|
||||
|
||||
#define NDR_SAMR_RIDTOSID (0x41)
|
||||
|
||||
#define NDR_SAMR_SETDSRMPASSWORD (0x42)
|
||||
|
||||
#define NDR_SAMR_VALIDATEPASSWORD (0x43)
|
||||
|
||||
#define NDR_SAMR_CALL_COUNT (68)
|
||||
enum ndr_err_code ndr_push_samr_AcctFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r);
|
||||
enum ndr_err_code ndr_pull_samr_AcctFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
|
||||
void ndr_print_samr_AcctFlags(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
void ndr_print_samr_ConnectAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
void ndr_print_samr_UserAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
void ndr_print_samr_DomainAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
void ndr_print_samr_GroupAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
void ndr_print_samr_AliasAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
void ndr_print_samr_SamEntry(struct ndr_print *ndr, const char *name, const struct samr_SamEntry *r);
|
||||
void ndr_print_samr_SamArray(struct ndr_print *ndr, const char *name, const struct samr_SamArray *r);
|
||||
void ndr_print_samr_DomainInfoClass(struct ndr_print *ndr, const char *name, enum samr_DomainInfoClass r);
|
||||
void ndr_print_samr_Role(struct ndr_print *ndr, const char *name, enum samr_Role r);
|
||||
enum ndr_err_code ndr_push_samr_PasswordProperties(struct ndr_push *ndr, int ndr_flags, uint32_t r);
|
||||
enum ndr_err_code ndr_pull_samr_PasswordProperties(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
|
||||
void ndr_print_samr_PasswordProperties(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
void ndr_print_samr_DomainServerState(struct ndr_print *ndr, const char *name, enum samr_DomainServerState r);
|
||||
void ndr_print_samr_DomInfo1(struct ndr_print *ndr, const char *name, const struct samr_DomInfo1 *r);
|
||||
void ndr_print_samr_DomGeneralInformation(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation *r);
|
||||
void ndr_print_samr_DomInfo3(struct ndr_print *ndr, const char *name, const struct samr_DomInfo3 *r);
|
||||
void ndr_print_samr_DomOEMInformation(struct ndr_print *ndr, const char *name, const struct samr_DomOEMInformation *r);
|
||||
void ndr_print_samr_DomInfo5(struct ndr_print *ndr, const char *name, const struct samr_DomInfo5 *r);
|
||||
void ndr_print_samr_DomInfo6(struct ndr_print *ndr, const char *name, const struct samr_DomInfo6 *r);
|
||||
void ndr_print_samr_DomInfo7(struct ndr_print *ndr, const char *name, const struct samr_DomInfo7 *r);
|
||||
void ndr_print_samr_DomInfo8(struct ndr_print *ndr, const char *name, const struct samr_DomInfo8 *r);
|
||||
void ndr_print_samr_DomInfo9(struct ndr_print *ndr, const char *name, const struct samr_DomInfo9 *r);
|
||||
void ndr_print_samr_DomGeneralInformation2(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation2 *r);
|
||||
void ndr_print_samr_DomInfo12(struct ndr_print *ndr, const char *name, const struct samr_DomInfo12 *r);
|
||||
void ndr_print_samr_DomInfo13(struct ndr_print *ndr, const char *name, const struct samr_DomInfo13 *r);
|
||||
void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name, const union samr_DomainInfo *r);
|
||||
void ndr_print_samr_Ids(struct ndr_print *ndr, const char *name, const struct samr_Ids *r);
|
||||
void ndr_print_samr_GroupInfoAll(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAll *r);
|
||||
void ndr_print_samr_GroupInfoAttributes(struct ndr_print *ndr, const char *name, const struct samr_GroupInfoAttributes *r);
|
||||
void ndr_print_samr_GroupInfoEnum(struct ndr_print *ndr, const char *name, enum samr_GroupInfoEnum r);
|
||||
void ndr_print_samr_GroupInfo(struct ndr_print *ndr, const char *name, const union samr_GroupInfo *r);
|
||||
void ndr_print_samr_RidAttrArray(struct ndr_print *ndr, const char *name, const struct samr_RidAttrArray *r);
|
||||
void ndr_print_samr_AliasInfoAll(struct ndr_print *ndr, const char *name, const struct samr_AliasInfoAll *r);
|
||||
void ndr_print_samr_AliasInfoEnum(struct ndr_print *ndr, const char *name, enum samr_AliasInfoEnum r);
|
||||
void ndr_print_samr_AliasInfo(struct ndr_print *ndr, const char *name, const union samr_AliasInfo *r);
|
||||
void ndr_print_samr_UserInfoLevel(struct ndr_print *ndr, const char *name, enum samr_UserInfoLevel r);
|
||||
void ndr_print_samr_UserInfo1(struct ndr_print *ndr, const char *name, const struct samr_UserInfo1 *r);
|
||||
void ndr_print_samr_UserInfo2(struct ndr_print *ndr, const char *name, const struct samr_UserInfo2 *r);
|
||||
enum ndr_err_code ndr_push_samr_LogonHours(struct ndr_push *ndr, int ndr_flags, const struct samr_LogonHours *r);
|
||||
enum ndr_err_code ndr_pull_samr_LogonHours(struct ndr_pull *ndr, int ndr_flags, struct samr_LogonHours *r);
|
||||
void ndr_print_samr_LogonHours(struct ndr_print *ndr, const char *name, const struct samr_LogonHours *r);
|
||||
void ndr_print_samr_UserInfo3(struct ndr_print *ndr, const char *name, const struct samr_UserInfo3 *r);
|
||||
void ndr_print_samr_UserInfo4(struct ndr_print *ndr, const char *name, const struct samr_UserInfo4 *r);
|
||||
void ndr_print_samr_UserInfo5(struct ndr_print *ndr, const char *name, const struct samr_UserInfo5 *r);
|
||||
void ndr_print_samr_UserInfo6(struct ndr_print *ndr, const char *name, const struct samr_UserInfo6 *r);
|
||||
void ndr_print_samr_UserInfo7(struct ndr_print *ndr, const char *name, const struct samr_UserInfo7 *r);
|
||||
void ndr_print_samr_UserInfo8(struct ndr_print *ndr, const char *name, const struct samr_UserInfo8 *r);
|
||||
void ndr_print_samr_UserInfo9(struct ndr_print *ndr, const char *name, const struct samr_UserInfo9 *r);
|
||||
void ndr_print_samr_UserInfo10(struct ndr_print *ndr, const char *name, const struct samr_UserInfo10 *r);
|
||||
void ndr_print_samr_UserInfo11(struct ndr_print *ndr, const char *name, const struct samr_UserInfo11 *r);
|
||||
void ndr_print_samr_UserInfo12(struct ndr_print *ndr, const char *name, const struct samr_UserInfo12 *r);
|
||||
void ndr_print_samr_UserInfo13(struct ndr_print *ndr, const char *name, const struct samr_UserInfo13 *r);
|
||||
void ndr_print_samr_UserInfo14(struct ndr_print *ndr, const char *name, const struct samr_UserInfo14 *r);
|
||||
void ndr_print_samr_UserInfo16(struct ndr_print *ndr, const char *name, const struct samr_UserInfo16 *r);
|
||||
void ndr_print_samr_UserInfo17(struct ndr_print *ndr, const char *name, const struct samr_UserInfo17 *r);
|
||||
enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_flags, const struct samr_Password *r);
|
||||
enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_flags, struct samr_Password *r);
|
||||
void ndr_print_samr_Password(struct ndr_print *ndr, const char *name, const struct samr_Password *r);
|
||||
void ndr_print_samr_UserInfo18(struct ndr_print *ndr, const char *name, const struct samr_UserInfo18 *r);
|
||||
void ndr_print_samr_UserInfo20(struct ndr_print *ndr, const char *name, const struct samr_UserInfo20 *r);
|
||||
void ndr_print_samr_FieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
void ndr_print_samr_UserInfo21(struct ndr_print *ndr, const char *name, const struct samr_UserInfo21 *r);
|
||||
enum ndr_err_code ndr_push_samr_CryptPassword(struct ndr_push *ndr, int ndr_flags, const struct samr_CryptPassword *r);
|
||||
enum ndr_err_code ndr_pull_samr_CryptPassword(struct ndr_pull *ndr, int ndr_flags, struct samr_CryptPassword *r);
|
||||
void ndr_print_samr_CryptPassword(struct ndr_print *ndr, const char *name, const struct samr_CryptPassword *r);
|
||||
void ndr_print_samr_UserInfo23(struct ndr_print *ndr, const char *name, const struct samr_UserInfo23 *r);
|
||||
void ndr_print_samr_UserInfo24(struct ndr_print *ndr, const char *name, const struct samr_UserInfo24 *r);
|
||||
void ndr_print_samr_CryptPasswordEx(struct ndr_print *ndr, const char *name, const struct samr_CryptPasswordEx *r);
|
||||
void ndr_print_samr_UserInfo25(struct ndr_print *ndr, const char *name, const struct samr_UserInfo25 *r);
|
||||
void ndr_print_samr_UserInfo26(struct ndr_print *ndr, const char *name, const struct samr_UserInfo26 *r);
|
||||
void ndr_print_samr_UserInfo(struct ndr_print *ndr, const char *name, const union samr_UserInfo *r);
|
||||
enum ndr_err_code ndr_push_samr_RidWithAttribute(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttribute *r);
|
||||
enum ndr_err_code ndr_pull_samr_RidWithAttribute(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttribute *r);
|
||||
void ndr_print_samr_RidWithAttribute(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttribute *r);
|
||||
enum ndr_err_code ndr_push_samr_RidWithAttributeArray(struct ndr_push *ndr, int ndr_flags, const struct samr_RidWithAttributeArray *r);
|
||||
enum ndr_err_code ndr_pull_samr_RidWithAttributeArray(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttributeArray *r);
|
||||
void ndr_print_samr_RidWithAttributeArray(struct ndr_print *ndr, const char *name, const struct samr_RidWithAttributeArray *r);
|
||||
void ndr_print_samr_DispEntryGeneral(struct ndr_print *ndr, const char *name, const struct samr_DispEntryGeneral *r);
|
||||
void ndr_print_samr_DispInfoGeneral(struct ndr_print *ndr, const char *name, const struct samr_DispInfoGeneral *r);
|
||||
void ndr_print_samr_DispEntryFull(struct ndr_print *ndr, const char *name, const struct samr_DispEntryFull *r);
|
||||
void ndr_print_samr_DispInfoFull(struct ndr_print *ndr, const char *name, const struct samr_DispInfoFull *r);
|
||||
void ndr_print_samr_DispEntryFullGroup(struct ndr_print *ndr, const char *name, const struct samr_DispEntryFullGroup *r);
|
||||
void ndr_print_samr_DispInfoFullGroups(struct ndr_print *ndr, const char *name, const struct samr_DispInfoFullGroups *r);
|
||||
void ndr_print_samr_DispEntryAscii(struct ndr_print *ndr, const char *name, const struct samr_DispEntryAscii *r);
|
||||
void ndr_print_samr_DispInfoAscii(struct ndr_print *ndr, const char *name, const struct samr_DispInfoAscii *r);
|
||||
void ndr_print_samr_DispInfo(struct ndr_print *ndr, const char *name, const union samr_DispInfo *r);
|
||||
void ndr_print_samr_PwInfo(struct ndr_print *ndr, const char *name, const struct samr_PwInfo *r);
|
||||
void ndr_print_samr_ConnectVersion(struct ndr_print *ndr, const char *name, enum samr_ConnectVersion r);
|
||||
enum ndr_err_code ndr_push_samPwdChangeReason(struct ndr_push *ndr, int ndr_flags, enum samPwdChangeReason r);
|
||||
enum ndr_err_code ndr_pull_samPwdChangeReason(struct ndr_pull *ndr, int ndr_flags, enum samPwdChangeReason *r);
|
||||
void ndr_print_samPwdChangeReason(struct ndr_print *ndr, const char *name, enum samPwdChangeReason r);
|
||||
void ndr_print_userPwdChangeFailureInformation(struct ndr_print *ndr, const char *name, const struct userPwdChangeFailureInformation *r);
|
||||
void ndr_print_samr_ConnectInfo1(struct ndr_print *ndr, const char *name, const struct samr_ConnectInfo1 *r);
|
||||
void ndr_print_samr_ConnectInfo(struct ndr_print *ndr, const char *name, const union samr_ConnectInfo *r);
|
||||
void ndr_print_samr_ValidateFieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
void ndr_print_samr_ValidatePasswordLevel(struct ndr_print *ndr, const char *name, enum samr_ValidatePasswordLevel r);
|
||||
void ndr_print_samr_ValidationStatus(struct ndr_print *ndr, const char *name, enum samr_ValidationStatus r);
|
||||
void ndr_print_samr_ValidationBlob(struct ndr_print *ndr, const char *name, const struct samr_ValidationBlob *r);
|
||||
void ndr_print_samr_ValidatePasswordInfo(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordInfo *r);
|
||||
void ndr_print_samr_ValidatePasswordRepCtr(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordRepCtr *r);
|
||||
void ndr_print_samr_ValidatePasswordRep(struct ndr_print *ndr, const char *name, const union samr_ValidatePasswordRep *r);
|
||||
void ndr_print_samr_ValidatePasswordReq3(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq3 *r);
|
||||
void ndr_print_samr_ValidatePasswordReq2(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq2 *r);
|
||||
void ndr_print_samr_ValidatePasswordReq1(struct ndr_print *ndr, const char *name, const struct samr_ValidatePasswordReq1 *r);
|
||||
void ndr_print_samr_ValidatePasswordReq(struct ndr_print *ndr, const char *name, const union samr_ValidatePasswordReq *r);
|
||||
void ndr_print_samr_Connect(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect *r);
|
||||
enum ndr_err_code ndr_push_samr_Close(struct ndr_push *ndr, int flags, const struct samr_Close *r);
|
||||
enum ndr_err_code ndr_pull_samr_Close(struct ndr_pull *ndr, int flags, struct samr_Close *r);
|
||||
void ndr_print_samr_Close(struct ndr_print *ndr, const char *name, int flags, const struct samr_Close *r);
|
||||
void ndr_print_samr_SetSecurity(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetSecurity *r);
|
||||
void ndr_print_samr_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct samr_QuerySecurity *r);
|
||||
void ndr_print_samr_Shutdown(struct ndr_print *ndr, const char *name, int flags, const struct samr_Shutdown *r);
|
||||
void ndr_print_samr_LookupDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupDomain *r);
|
||||
void ndr_print_samr_EnumDomains(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomains *r);
|
||||
enum ndr_err_code ndr_push_samr_OpenDomain(struct ndr_push *ndr, int flags, const struct samr_OpenDomain *r);
|
||||
enum ndr_err_code ndr_pull_samr_OpenDomain(struct ndr_pull *ndr, int flags, struct samr_OpenDomain *r);
|
||||
void ndr_print_samr_OpenDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenDomain *r);
|
||||
void ndr_print_samr_QueryDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDomainInfo *r);
|
||||
void ndr_print_samr_SetDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetDomainInfo *r);
|
||||
void ndr_print_samr_CreateDomainGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateDomainGroup *r);
|
||||
void ndr_print_samr_EnumDomainGroups(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainGroups *r);
|
||||
void ndr_print_samr_CreateUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateUser *r);
|
||||
void ndr_print_samr_EnumDomainUsers(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainUsers *r);
|
||||
void ndr_print_samr_CreateDomAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateDomAlias *r);
|
||||
void ndr_print_samr_EnumDomainAliases(struct ndr_print *ndr, const char *name, int flags, const struct samr_EnumDomainAliases *r);
|
||||
void ndr_print_samr_GetAliasMembership(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetAliasMembership *r);
|
||||
enum ndr_err_code ndr_push_samr_LookupNames(struct ndr_push *ndr, int flags, const struct samr_LookupNames *r);
|
||||
enum ndr_err_code ndr_pull_samr_LookupNames(struct ndr_pull *ndr, int flags, struct samr_LookupNames *r);
|
||||
void ndr_print_samr_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupNames *r);
|
||||
void ndr_print_samr_LookupRids(struct ndr_print *ndr, const char *name, int flags, const struct samr_LookupRids *r);
|
||||
void ndr_print_samr_OpenGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenGroup *r);
|
||||
void ndr_print_samr_QueryGroupInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryGroupInfo *r);
|
||||
void ndr_print_samr_SetGroupInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetGroupInfo *r);
|
||||
void ndr_print_samr_AddGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddGroupMember *r);
|
||||
void ndr_print_samr_DeleteDomainGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteDomainGroup *r);
|
||||
void ndr_print_samr_DeleteGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteGroupMember *r);
|
||||
void ndr_print_samr_QueryGroupMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryGroupMember *r);
|
||||
void ndr_print_samr_SetMemberAttributesOfGroup(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetMemberAttributesOfGroup *r);
|
||||
void ndr_print_samr_OpenAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenAlias *r);
|
||||
void ndr_print_samr_QueryAliasInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryAliasInfo *r);
|
||||
void ndr_print_samr_SetAliasInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetAliasInfo *r);
|
||||
void ndr_print_samr_DeleteDomAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteDomAlias *r);
|
||||
void ndr_print_samr_AddAliasMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddAliasMember *r);
|
||||
void ndr_print_samr_DeleteAliasMember(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteAliasMember *r);
|
||||
void ndr_print_samr_GetMembersInAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetMembersInAlias *r);
|
||||
enum ndr_err_code ndr_push_samr_OpenUser(struct ndr_push *ndr, int flags, const struct samr_OpenUser *r);
|
||||
enum ndr_err_code ndr_pull_samr_OpenUser(struct ndr_pull *ndr, int flags, struct samr_OpenUser *r);
|
||||
void ndr_print_samr_OpenUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_OpenUser *r);
|
||||
void ndr_print_samr_DeleteUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_DeleteUser *r);
|
||||
enum ndr_err_code ndr_push_samr_QueryUserInfo(struct ndr_push *ndr, int flags, const struct samr_QueryUserInfo *r);
|
||||
enum ndr_err_code ndr_pull_samr_QueryUserInfo(struct ndr_pull *ndr, int flags, struct samr_QueryUserInfo *r);
|
||||
void ndr_print_samr_QueryUserInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryUserInfo *r);
|
||||
enum ndr_err_code ndr_push_samr_SetUserInfo(struct ndr_push *ndr, int flags, const struct samr_SetUserInfo *r);
|
||||
enum ndr_err_code ndr_pull_samr_SetUserInfo(struct ndr_pull *ndr, int flags, struct samr_SetUserInfo *r);
|
||||
void ndr_print_samr_SetUserInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetUserInfo *r);
|
||||
void ndr_print_samr_ChangePasswordUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser *r);
|
||||
void ndr_print_samr_GetGroupsForUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetGroupsForUser *r);
|
||||
void ndr_print_samr_QueryDisplayInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo *r);
|
||||
void ndr_print_samr_GetDisplayEnumerationIndex(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDisplayEnumerationIndex *r);
|
||||
void ndr_print_samr_TestPrivateFunctionsDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_TestPrivateFunctionsDomain *r);
|
||||
void ndr_print_samr_TestPrivateFunctionsUser(struct ndr_print *ndr, const char *name, int flags, const struct samr_TestPrivateFunctionsUser *r);
|
||||
enum ndr_err_code ndr_push_samr_GetUserPwInfo(struct ndr_push *ndr, int flags, const struct samr_GetUserPwInfo *r);
|
||||
enum ndr_err_code ndr_pull_samr_GetUserPwInfo(struct ndr_pull *ndr, int flags, struct samr_GetUserPwInfo *r);
|
||||
void ndr_print_samr_GetUserPwInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetUserPwInfo *r);
|
||||
void ndr_print_samr_RemoveMemberFromForeignDomain(struct ndr_print *ndr, const char *name, int flags, const struct samr_RemoveMemberFromForeignDomain *r);
|
||||
void ndr_print_samr_QueryDomainInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDomainInfo2 *r);
|
||||
void ndr_print_samr_QueryUserInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryUserInfo2 *r);
|
||||
void ndr_print_samr_QueryDisplayInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo2 *r);
|
||||
void ndr_print_samr_GetDisplayEnumerationIndex2(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDisplayEnumerationIndex2 *r);
|
||||
void ndr_print_samr_CreateUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_CreateUser2 *r);
|
||||
void ndr_print_samr_QueryDisplayInfo3(struct ndr_print *ndr, const char *name, int flags, const struct samr_QueryDisplayInfo3 *r);
|
||||
void ndr_print_samr_AddMultipleMembersToAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_AddMultipleMembersToAlias *r);
|
||||
void ndr_print_samr_RemoveMultipleMembersFromAlias(struct ndr_print *ndr, const char *name, int flags, const struct samr_RemoveMultipleMembersFromAlias *r);
|
||||
void ndr_print_samr_OemChangePasswordUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_OemChangePasswordUser2 *r);
|
||||
void ndr_print_samr_ChangePasswordUser2(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser2 *r);
|
||||
void ndr_print_samr_GetDomPwInfo(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetDomPwInfo *r);
|
||||
void ndr_print_samr_Connect2(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect2 *r);
|
||||
enum ndr_err_code ndr_push_samr_SetUserInfo2(struct ndr_push *ndr, int flags, const struct samr_SetUserInfo2 *r);
|
||||
enum ndr_err_code ndr_pull_samr_SetUserInfo2(struct ndr_pull *ndr, int flags, struct samr_SetUserInfo2 *r);
|
||||
void ndr_print_samr_SetUserInfo2(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetUserInfo2 *r);
|
||||
void ndr_print_samr_SetBootKeyInformation(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetBootKeyInformation *r);
|
||||
void ndr_print_samr_GetBootKeyInformation(struct ndr_print *ndr, const char *name, int flags, const struct samr_GetBootKeyInformation *r);
|
||||
void ndr_print_samr_Connect3(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect3 *r);
|
||||
void ndr_print_samr_Connect4(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect4 *r);
|
||||
enum ndr_err_code ndr_push_samr_ChangePasswordUser3(struct ndr_push *ndr, int flags, const struct samr_ChangePasswordUser3 *r);
|
||||
enum ndr_err_code ndr_pull_samr_ChangePasswordUser3(struct ndr_pull *ndr, int flags, struct samr_ChangePasswordUser3 *r);
|
||||
void ndr_print_samr_ChangePasswordUser3(struct ndr_print *ndr, const char *name, int flags, const struct samr_ChangePasswordUser3 *r);
|
||||
enum ndr_err_code ndr_push_samr_Connect5(struct ndr_push *ndr, int flags, const struct samr_Connect5 *r);
|
||||
enum ndr_err_code ndr_pull_samr_Connect5(struct ndr_pull *ndr, int flags, struct samr_Connect5 *r);
|
||||
void ndr_print_samr_Connect5(struct ndr_print *ndr, const char *name, int flags, const struct samr_Connect5 *r);
|
||||
void ndr_print_samr_RidToSid(struct ndr_print *ndr, const char *name, int flags, const struct samr_RidToSid *r);
|
||||
void ndr_print_samr_SetDsrmPassword(struct ndr_print *ndr, const char *name, int flags, const struct samr_SetDsrmPassword *r);
|
||||
void ndr_print_samr_ValidatePassword(struct ndr_print *ndr, const char *name, int flags, const struct samr_ValidatePassword *r);
|
||||
#endif /* _HEADER_NDR_samr */
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,188 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#include <ndr.h>
|
||||
#include <gen_ndr/svcctl.h>
|
||||
|
||||
#ifndef _HEADER_NDR_svcctl
|
||||
#define _HEADER_NDR_svcctl
|
||||
|
||||
#include <ndr/ndr_svcctl.h>
|
||||
#define NDR_SVCCTL_UUID "367abb81-9844-35f1-ad32-98f038001003"
|
||||
#define NDR_SVCCTL_VERSION 2.0
|
||||
#define NDR_SVCCTL_NAME "svcctl"
|
||||
#define NDR_SVCCTL_HELPSTRING "Service Control"
|
||||
extern const struct ndr_interface_table ndr_table_svcctl;
|
||||
#define NDR_SVCCTL_CLOSESERVICEHANDLE (0x00)
|
||||
|
||||
#define NDR_SVCCTL_CONTROLSERVICE (0x01)
|
||||
|
||||
#define NDR_SVCCTL_DELETESERVICE (0x02)
|
||||
|
||||
#define NDR_SVCCTL_LOCKSERVICEDATABASE (0x03)
|
||||
|
||||
#define NDR_SVCCTL_QUERYSERVICEOBJECTSECURITY (0x04)
|
||||
|
||||
#define NDR_SVCCTL_SETSERVICEOBJECTSECURITY (0x05)
|
||||
|
||||
#define NDR_SVCCTL_QUERYSERVICESTATUS (0x06)
|
||||
|
||||
#define NDR_SVCCTL_SETSERVICESTATUS (0x07)
|
||||
|
||||
#define NDR_SVCCTL_UNLOCKSERVICEDATABASE (0x08)
|
||||
|
||||
#define NDR_SVCCTL_NOTIFYBOOTCONFIGSTATUS (0x09)
|
||||
|
||||
#define NDR_SVCCTL_SCSETSERVICEBITSW (0x0a)
|
||||
|
||||
#define NDR_SVCCTL_CHANGESERVICECONFIGW (0x0b)
|
||||
|
||||
#define NDR_SVCCTL_CREATESERVICEW (0x0c)
|
||||
|
||||
#define NDR_SVCCTL_ENUMDEPENDENTSERVICESW (0x0d)
|
||||
|
||||
#define NDR_SVCCTL_ENUMSERVICESSTATUSW (0x0e)
|
||||
|
||||
#define NDR_SVCCTL_OPENSCMANAGERW (0x0f)
|
||||
|
||||
#define NDR_SVCCTL_OPENSERVICEW (0x10)
|
||||
|
||||
#define NDR_SVCCTL_QUERYSERVICECONFIGW (0x11)
|
||||
|
||||
#define NDR_SVCCTL_QUERYSERVICELOCKSTATUSW (0x12)
|
||||
|
||||
#define NDR_SVCCTL_STARTSERVICEW (0x13)
|
||||
|
||||
#define NDR_SVCCTL_GETSERVICEDISPLAYNAMEW (0x14)
|
||||
|
||||
#define NDR_SVCCTL_GETSERVICEKEYNAMEW (0x15)
|
||||
|
||||
#define NDR_SVCCTL_SCSETSERVICEBITSA (0x16)
|
||||
|
||||
#define NDR_SVCCTL_CHANGESERVICECONFIGA (0x17)
|
||||
|
||||
#define NDR_SVCCTL_CREATESERVICEA (0x18)
|
||||
|
||||
#define NDR_SVCCTL_ENUMDEPENDENTSERVICESA (0x19)
|
||||
|
||||
#define NDR_SVCCTL_ENUMSERVICESSTATUSA (0x1a)
|
||||
|
||||
#define NDR_SVCCTL_OPENSCMANAGERA (0x1b)
|
||||
|
||||
#define NDR_SVCCTL_OPENSERVICEA (0x1c)
|
||||
|
||||
#define NDR_SVCCTL_QUERYSERVICECONFIGA (0x1d)
|
||||
|
||||
#define NDR_SVCCTL_QUERYSERVICELOCKSTATUSA (0x1e)
|
||||
|
||||
#define NDR_SVCCTL_STARTSERVICEA (0x1f)
|
||||
|
||||
#define NDR_SVCCTL_GETSERVICEDISPLAYNAMEA (0x20)
|
||||
|
||||
#define NDR_SVCCTL_GETSERVICEKEYNAMEA (0x21)
|
||||
|
||||
#define NDR_SVCCTL_GETCURRENTGROUPESTATEW (0x22)
|
||||
|
||||
#define NDR_SVCCTL_ENUMSERVICEGROUPW (0x23)
|
||||
|
||||
#define NDR_SVCCTL_CHANGESERVICECONFIG2A (0x24)
|
||||
|
||||
#define NDR_SVCCTL_CHANGESERVICECONFIG2W (0x25)
|
||||
|
||||
#define NDR_SVCCTL_QUERYSERVICECONFIG2A (0x26)
|
||||
|
||||
#define NDR_SVCCTL_QUERYSERVICECONFIG2W (0x27)
|
||||
|
||||
#define NDR_SVCCTL_QUERYSERVICESTATUSEX (0x28)
|
||||
|
||||
#define NDR_ENUMSERVICESSTATUSEXA (0x29)
|
||||
|
||||
#define NDR_ENUMSERVICESSTATUSEXW (0x2a)
|
||||
|
||||
#define NDR_SVCCTL_SCSENDTSMESSAGE (0x2b)
|
||||
|
||||
#define NDR_SVCCTL_CALL_COUNT (44)
|
||||
void ndr_print_SERVICE_LOCK_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_LOCK_STATUS *r);
|
||||
void ndr_print_svcctl_ServiceStatus(struct ndr_print *ndr, const char *name, enum svcctl_ServiceStatus r);
|
||||
void ndr_print_svcctl_ControlsAccepted(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
void ndr_print_SERVICE_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_STATUS *r);
|
||||
enum ndr_err_code ndr_push_SERVICE_STATUS_PROCESS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_STATUS_PROCESS *r);
|
||||
enum ndr_err_code ndr_pull_SERVICE_STATUS_PROCESS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_STATUS_PROCESS *r);
|
||||
void ndr_print_SERVICE_STATUS_PROCESS(struct ndr_print *ndr, const char *name, const struct SERVICE_STATUS_PROCESS *r);
|
||||
enum ndr_err_code ndr_push_ENUM_SERVICE_STATUSW(struct ndr_push *ndr, int ndr_flags, const struct ENUM_SERVICE_STATUSW *r);
|
||||
enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUSW(struct ndr_pull *ndr, int ndr_flags, struct ENUM_SERVICE_STATUSW *r);
|
||||
void ndr_print_ENUM_SERVICE_STATUSW(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUSW *r);
|
||||
size_t ndr_size_ENUM_SERVICE_STATUSW(const struct ENUM_SERVICE_STATUSW *r, int flags);
|
||||
enum ndr_err_code ndr_push_ENUM_SERVICE_STATUSA(struct ndr_push *ndr, int ndr_flags, const struct ENUM_SERVICE_STATUSA *r);
|
||||
enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUSA(struct ndr_pull *ndr, int ndr_flags, struct ENUM_SERVICE_STATUSA *r);
|
||||
void ndr_print_ENUM_SERVICE_STATUSA(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUSA *r);
|
||||
size_t ndr_size_ENUM_SERVICE_STATUSA(const struct ENUM_SERVICE_STATUSA *r, int flags);
|
||||
void ndr_print_SERVICE_CONTROL(struct ndr_print *ndr, const char *name, enum SERVICE_CONTROL r);
|
||||
void ndr_print_svcctl_ErrorControl(struct ndr_print *ndr, const char *name, enum svcctl_ErrorControl r);
|
||||
void ndr_print_svcctl_StartType(struct ndr_print *ndr, const char *name, enum svcctl_StartType r);
|
||||
void ndr_print_svcctl_ServiceState(struct ndr_print *ndr, const char *name, enum svcctl_ServiceState r);
|
||||
void ndr_print_svcctl_MgrAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
void ndr_print_svcctl_ServiceAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
|
||||
enum ndr_err_code ndr_push_QUERY_SERVICE_CONFIG(struct ndr_push *ndr, int ndr_flags, const struct QUERY_SERVICE_CONFIG *r);
|
||||
enum ndr_err_code ndr_pull_QUERY_SERVICE_CONFIG(struct ndr_pull *ndr, int ndr_flags, struct QUERY_SERVICE_CONFIG *r);
|
||||
void ndr_print_QUERY_SERVICE_CONFIG(struct ndr_print *ndr, const char *name, const struct QUERY_SERVICE_CONFIG *r);
|
||||
size_t ndr_size_QUERY_SERVICE_CONFIG(const struct QUERY_SERVICE_CONFIG *r, int flags);
|
||||
void ndr_print_svcctl_ArgumentString(struct ndr_print *ndr, const char *name, const struct svcctl_ArgumentString *r);
|
||||
void ndr_print_svcctl_ConfigLevel(struct ndr_print *ndr, const char *name, enum svcctl_ConfigLevel r);
|
||||
enum ndr_err_code ndr_push_SERVICE_DESCRIPTION(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_DESCRIPTION *r);
|
||||
enum ndr_err_code ndr_pull_SERVICE_DESCRIPTION(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_DESCRIPTION *r);
|
||||
void ndr_print_SERVICE_DESCRIPTION(struct ndr_print *ndr, const char *name, const struct SERVICE_DESCRIPTION *r);
|
||||
size_t ndr_size_SERVICE_DESCRIPTION(const struct SERVICE_DESCRIPTION *r, int flags);
|
||||
void ndr_print_SC_ACTION_TYPE(struct ndr_print *ndr, const char *name, enum SC_ACTION_TYPE r);
|
||||
void ndr_print_SC_ACTION(struct ndr_print *ndr, const char *name, const struct SC_ACTION *r);
|
||||
enum ndr_err_code ndr_push_SERVICE_FAILURE_ACTIONS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_FAILURE_ACTIONS *r);
|
||||
enum ndr_err_code ndr_pull_SERVICE_FAILURE_ACTIONS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_FAILURE_ACTIONS *r);
|
||||
void ndr_print_SERVICE_FAILURE_ACTIONS(struct ndr_print *ndr, const char *name, const struct SERVICE_FAILURE_ACTIONS *r);
|
||||
size_t ndr_size_SERVICE_FAILURE_ACTIONS(const struct SERVICE_FAILURE_ACTIONS *r, int flags);
|
||||
void ndr_print_svcctl_StatusLevel(struct ndr_print *ndr, const char *name, enum svcctl_StatusLevel r);
|
||||
void ndr_print_svcctl_CloseServiceHandle(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CloseServiceHandle *r);
|
||||
void ndr_print_svcctl_ControlService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ControlService *r);
|
||||
void ndr_print_svcctl_DeleteService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_DeleteService *r);
|
||||
void ndr_print_svcctl_LockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_LockServiceDatabase *r);
|
||||
void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceObjectSecurity *r);
|
||||
void ndr_print_svcctl_SetServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceObjectSecurity *r);
|
||||
void ndr_print_svcctl_QueryServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatus *r);
|
||||
void ndr_print_svcctl_SetServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceStatus *r);
|
||||
void ndr_print_svcctl_UnlockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_UnlockServiceDatabase *r);
|
||||
void ndr_print_svcctl_NotifyBootConfigStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_NotifyBootConfigStatus *r);
|
||||
void ndr_print_svcctl_SCSetServiceBitsW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsW *r);
|
||||
enum ndr_err_code ndr_push_svcctl_ChangeServiceConfigW(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfigW *r);
|
||||
enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfigW(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfigW *r);
|
||||
void ndr_print_svcctl_ChangeServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigW *r);
|
||||
void ndr_print_svcctl_CreateServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceW *r);
|
||||
void ndr_print_svcctl_EnumDependentServicesW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesW *r);
|
||||
void ndr_print_svcctl_EnumServicesStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusW *r);
|
||||
void ndr_print_svcctl_OpenSCManagerW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerW *r);
|
||||
void ndr_print_svcctl_OpenServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceW *r);
|
||||
void ndr_print_svcctl_QueryServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigW *r);
|
||||
void ndr_print_svcctl_QueryServiceLockStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusW *r);
|
||||
void ndr_print_svcctl_StartServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceW *r);
|
||||
void ndr_print_svcctl_GetServiceDisplayNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameW *r);
|
||||
void ndr_print_svcctl_GetServiceKeyNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameW *r);
|
||||
void ndr_print_svcctl_SCSetServiceBitsA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsA *r);
|
||||
void ndr_print_svcctl_ChangeServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigA *r);
|
||||
void ndr_print_svcctl_CreateServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceA *r);
|
||||
void ndr_print_svcctl_EnumDependentServicesA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesA *r);
|
||||
void ndr_print_svcctl_EnumServicesStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusA *r);
|
||||
void ndr_print_svcctl_OpenSCManagerA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerA *r);
|
||||
void ndr_print_svcctl_OpenServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceA *r);
|
||||
void ndr_print_svcctl_QueryServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigA *r);
|
||||
void ndr_print_svcctl_QueryServiceLockStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusA *r);
|
||||
void ndr_print_svcctl_StartServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceA *r);
|
||||
void ndr_print_svcctl_GetServiceDisplayNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameA *r);
|
||||
void ndr_print_svcctl_GetServiceKeyNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameA *r);
|
||||
void ndr_print_svcctl_GetCurrentGroupeStateW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetCurrentGroupeStateW *r);
|
||||
void ndr_print_svcctl_EnumServiceGroupW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServiceGroupW *r);
|
||||
void ndr_print_svcctl_ChangeServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2A *r);
|
||||
void ndr_print_svcctl_ChangeServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2W *r);
|
||||
void ndr_print_svcctl_QueryServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2A *r);
|
||||
void ndr_print_svcctl_QueryServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2W *r);
|
||||
void ndr_print_svcctl_QueryServiceStatusEx(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatusEx *r);
|
||||
void ndr_print_EnumServicesStatusExA(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExA *r);
|
||||
void ndr_print_EnumServicesStatusExW(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExW *r);
|
||||
void ndr_print_svcctl_SCSendTSMessage(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSendTSMessage *r);
|
||||
#endif /* _HEADER_NDR_svcctl */
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,549 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#ifndef _PIDL_HEADER_security
|
||||
#define _PIDL_HEADER_security
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <core/ntstatus.h>
|
||||
|
||||
#include <gen_ndr/misc.h>
|
||||
#define dom_sid2 dom_sid
|
||||
#define dom_sid28 dom_sid
|
||||
#define dom_sid0 dom_sid
|
||||
#ifndef _HEADER_security
|
||||
#define _HEADER_security
|
||||
|
||||
#define SEC_MASK_GENERIC ( 0xF0000000 )
|
||||
#define SEC_MASK_FLAGS ( 0x0F000000 )
|
||||
#define SEC_MASK_STANDARD ( 0x00FF0000 )
|
||||
#define SEC_MASK_SPECIFIC ( 0x0000FFFF )
|
||||
#define SEC_GENERIC_ALL ( 0x10000000 )
|
||||
#define SEC_GENERIC_EXECUTE ( 0x20000000 )
|
||||
#define SEC_GENERIC_WRITE ( 0x40000000 )
|
||||
#define SEC_GENERIC_READ ( 0x80000000 )
|
||||
#define SEC_FLAG_SYSTEM_SECURITY ( 0x01000000 )
|
||||
#define SEC_FLAG_MAXIMUM_ALLOWED ( 0x02000000 )
|
||||
#define SEC_STD_DELETE ( 0x00010000 )
|
||||
#define SEC_STD_READ_CONTROL ( 0x00020000 )
|
||||
#define SEC_STD_WRITE_DAC ( 0x00040000 )
|
||||
#define SEC_STD_WRITE_OWNER ( 0x00080000 )
|
||||
#define SEC_STD_SYNCHRONIZE ( 0x00100000 )
|
||||
#define SEC_STD_REQUIRED ( 0x000F0000 )
|
||||
#define SEC_STD_ALL ( 0x001F0000 )
|
||||
#define SEC_FILE_READ_DATA ( 0x00000001 )
|
||||
#define SEC_FILE_WRITE_DATA ( 0x00000002 )
|
||||
#define SEC_FILE_APPEND_DATA ( 0x00000004 )
|
||||
#define SEC_FILE_READ_EA ( 0x00000008 )
|
||||
#define SEC_FILE_WRITE_EA ( 0x00000010 )
|
||||
#define SEC_FILE_EXECUTE ( 0x00000020 )
|
||||
#define SEC_FILE_READ_ATTRIBUTE ( 0x00000080 )
|
||||
#define SEC_FILE_WRITE_ATTRIBUTE ( 0x00000100 )
|
||||
#define SEC_FILE_ALL ( 0x000001ff )
|
||||
#define SEC_DIR_LIST ( 0x00000001 )
|
||||
#define SEC_DIR_ADD_FILE ( 0x00000002 )
|
||||
#define SEC_DIR_ADD_SUBDIR ( 0x00000004 )
|
||||
#define SEC_DIR_READ_EA ( 0x00000008 )
|
||||
#define SEC_DIR_WRITE_EA ( 0x00000010 )
|
||||
#define SEC_DIR_TRAVERSE ( 0x00000020 )
|
||||
#define SEC_DIR_DELETE_CHILD ( 0x00000040 )
|
||||
#define SEC_DIR_READ_ATTRIBUTE ( 0x00000080 )
|
||||
#define SEC_DIR_WRITE_ATTRIBUTE ( 0x00000100 )
|
||||
#define SEC_REG_QUERY_VALUE ( 0x00000001 )
|
||||
#define SEC_REG_SET_VALUE ( 0x00000002 )
|
||||
#define SEC_REG_CREATE_SUBKEY ( 0x00000004 )
|
||||
#define SEC_REG_ENUM_SUBKEYS ( 0x00000008 )
|
||||
#define SEC_REG_NOTIFY ( 0x00000010 )
|
||||
#define SEC_REG_CREATE_LINK ( 0x00000020 )
|
||||
#define SEC_ADS_CREATE_CHILD ( 0x00000001 )
|
||||
#define SEC_ADS_DELETE_CHILD ( 0x00000002 )
|
||||
#define SEC_ADS_LIST ( 0x00000004 )
|
||||
#define SEC_ADS_SELF_WRITE ( 0x00000008 )
|
||||
#define SEC_ADS_READ_PROP ( 0x00000010 )
|
||||
#define SEC_ADS_WRITE_PROP ( 0x00000020 )
|
||||
#define SEC_ADS_DELETE_TREE ( 0x00000040 )
|
||||
#define SEC_ADS_LIST_OBJECT ( 0x00000080 )
|
||||
#define SEC_ADS_CONTROL_ACCESS ( 0x00000100 )
|
||||
#define SEC_MASK_INVALID ( 0x0ce0fe00 )
|
||||
#define SEC_RIGHTS_FILE_READ ( SEC_STD_READ_CONTROL|SEC_STD_SYNCHRONIZE|SEC_FILE_READ_DATA|SEC_FILE_READ_ATTRIBUTE|SEC_FILE_READ_EA )
|
||||
#define SEC_RIGHTS_FILE_WRITE ( SEC_STD_READ_CONTROL|SEC_STD_SYNCHRONIZE|SEC_FILE_WRITE_DATA|SEC_FILE_WRITE_ATTRIBUTE|SEC_FILE_WRITE_EA|SEC_FILE_APPEND_DATA )
|
||||
#define SEC_RIGHTS_FILE_EXECUTE ( SEC_STD_SYNCHRONIZE|SEC_STD_READ_CONTROL|SEC_FILE_READ_ATTRIBUTE|SEC_FILE_EXECUTE )
|
||||
#define SEC_RIGHTS_FILE_ALL ( SEC_STD_ALL|SEC_FILE_ALL )
|
||||
#define SEC_RIGHTS_DIR_READ ( SEC_RIGHTS_FILE_READ )
|
||||
#define SEC_RIGHTS_DIR_WRITE ( SEC_RIGHTS_FILE_WRITE )
|
||||
#define SEC_RIGHTS_DIR_EXECUTE ( SEC_RIGHTS_FILE_EXECUTE )
|
||||
#define SEC_RIGHTS_DIR_ALL ( SEC_RIGHTS_FILE_ALL )
|
||||
#define SEC_RIGHTS_PRIV_BACKUP ( SEC_STD_READ_CONTROL|SEC_FLAG_SYSTEM_SECURITY|SEC_RIGHTS_FILE_READ|SEC_DIR_TRAVERSE )
|
||||
#define SEC_RIGHTS_PRIV_RESTORE ( SEC_STD_WRITE_DAC|SEC_STD_WRITE_OWNER|SEC_FLAG_SYSTEM_SECURITY|SEC_RIGHTS_FILE_WRITE|SEC_DIR_ADD_FILE|SEC_DIR_ADD_SUBDIR|SEC_STD_DELETE )
|
||||
#define STANDARD_RIGHTS_ALL_ACCESS ( SEC_STD_ALL )
|
||||
#define STANDARD_RIGHTS_MODIFY_ACCESS ( SEC_STD_READ_CONTROL )
|
||||
#define STANDARD_RIGHTS_EXECUTE_ACCESS ( SEC_STD_READ_CONTROL )
|
||||
#define STANDARD_RIGHTS_READ_ACCESS ( SEC_STD_READ_CONTROL )
|
||||
#define STANDARD_RIGHTS_WRITE_ACCESS ( (SEC_STD_WRITE_OWNER|SEC_STD_WRITE_DAC|SEC_STD_DELETE) )
|
||||
#define STANDARD_RIGHTS_REQUIRED_ACCESS ( (SEC_STD_DELETE|SEC_STD_READ_CONTROL|SEC_STD_WRITE_DAC|SEC_STD_WRITE_OWNER) )
|
||||
#define SEC_ADS_GENERIC_ALL_DS ( (SEC_STD_DELETE|SEC_STD_WRITE_DAC|SEC_STD_WRITE_OWNER|SEC_ADS_CREATE_CHILD|SEC_ADS_DELETE_CHILD|SEC_ADS_DELETE_TREE|SEC_ADS_CONTROL_ACCESS) )
|
||||
#define SEC_ADS_GENERIC_EXECUTE ( SEC_STD_READ_CONTROL|SEC_ADS_LIST )
|
||||
#define SEC_ADS_GENERIC_WRITE ( (SEC_STD_READ_CONTROL|SEC_ADS_SELF_WRITE|SEC_ADS_WRITE_PROP) )
|
||||
#define SEC_ADS_GENERIC_READ ( (SEC_STD_READ_CONTROL|SEC_ADS_LIST|SEC_ADS_READ_PROP|SEC_ADS_LIST_OBJECT) )
|
||||
#define SEC_ADS_GENERIC_ALL ( (SEC_ADS_GENERIC_EXECUTE|SEC_ADS_GENERIC_WRITE|SEC_ADS_GENERIC_READ|SEC_ADS_GENERIC_ALL_DS) )
|
||||
#define SID_NULL ( "S-1-0-0" )
|
||||
#define NAME_WORLD ( "WORLD" )
|
||||
#define SID_WORLD_DOMAIN ( "S-1-1" )
|
||||
#define SID_WORLD ( "S-1-1-0" )
|
||||
#define SID_CREATOR_OWNER_DOMAIN ( "S-1-3" )
|
||||
#define SID_CREATOR_OWNER ( "S-1-3-0" )
|
||||
#define SID_CREATOR_GROUP ( "S-1-3-1" )
|
||||
#define SID_OWNER_RIGHTS ( "S-1-3-4" )
|
||||
#define NAME_NT_AUTHORITY ( "NT AUTHORITY" )
|
||||
#define SID_NT_AUTHORITY ( "S-1-5" )
|
||||
#define SID_NT_DIALUP ( "S-1-5-1" )
|
||||
#define SID_NT_NETWORK ( "S-1-5-2" )
|
||||
#define SID_NT_BATCH ( "S-1-5-3" )
|
||||
#define SID_NT_INTERACTIVE ( "S-1-5-4" )
|
||||
#define SID_NT_SERVICE ( "S-1-5-6" )
|
||||
#define SID_NT_ANONYMOUS ( "S-1-5-7" )
|
||||
#define SID_NT_PROXY ( "S-1-5-8" )
|
||||
#define SID_NT_ENTERPRISE_DCS ( "S-1-5-9" )
|
||||
#define SID_NT_SELF ( "S-1-5-10" )
|
||||
#define SID_NT_AUTHENTICATED_USERS ( "S-1-5-11" )
|
||||
#define SID_NT_RESTRICTED ( "S-1-5-12" )
|
||||
#define SID_NT_TERMINAL_SERVER_USERS ( "S-1-5-13" )
|
||||
#define SID_NT_REMOTE_INTERACTIVE ( "S-1-5-14" )
|
||||
#define SID_NT_THIS_ORGANISATION ( "S-1-5-15" )
|
||||
#define SID_NT_IUSR ( "S-1-5-17" )
|
||||
#define SID_NT_SYSTEM ( "S-1-5-18" )
|
||||
#define SID_NT_LOCAL_SERVICE ( "S-1-5-19" )
|
||||
#define SID_NT_NETWORK_SERVICE ( "S-1-5-20" )
|
||||
#define SID_NT_DIGEST_AUTHENTICATION ( "S-1-5-64-21" )
|
||||
#define SID_NT_NTLM_AUTHENTICATION ( "S-1-5-64-10" )
|
||||
#define SID_NT_SCHANNEL_AUTHENTICATION ( "S-1-5-64-14" )
|
||||
#define SID_NT_OTHER_ORGANISATION ( "S-1-5-1000" )
|
||||
#define NAME_BUILTIN ( "BUILTIN" )
|
||||
#define SID_BUILTIN ( "S-1-5-32" )
|
||||
#define SID_BUILTIN_ADMINISTRATORS ( "S-1-5-32-544" )
|
||||
#define SID_BUILTIN_USERS ( "S-1-5-32-545" )
|
||||
#define SID_BUILTIN_GUESTS ( "S-1-5-32-546" )
|
||||
#define SID_BUILTIN_POWER_USERS ( "S-1-5-32-547" )
|
||||
#define SID_BUILTIN_ACCOUNT_OPERATORS ( "S-1-5-32-548" )
|
||||
#define SID_BUILTIN_SERVER_OPERATORS ( "S-1-5-32-549" )
|
||||
#define SID_BUILTIN_PRINT_OPERATORS ( "S-1-5-32-550" )
|
||||
#define SID_BUILTIN_BACKUP_OPERATORS ( "S-1-5-32-551" )
|
||||
#define SID_BUILTIN_REPLICATOR ( "S-1-5-32-552" )
|
||||
#define SID_BUILTIN_RAS_SERVERS ( "S-1-5-32-553" )
|
||||
#define SID_BUILTIN_PREW2K ( "S-1-5-32-554" )
|
||||
#define SID_BUILTIN_REMOTE_DESKTOP_USERS ( "S-1-5-32-555" )
|
||||
#define SID_BUILTIN_NETWORK_CONF_OPERATORS ( "S-1-5-32-556" )
|
||||
#define SID_BUILTIN_INCOMING_FOREST_TRUST ( "S-1-5-32-557" )
|
||||
#define SID_BUILTIN_PERFMON_USERS ( "S-1-5-32-558" )
|
||||
#define SID_BUILTIN_PERFLOG_USERS ( "S-1-5-32-559" )
|
||||
#define SID_BUILTIN_AUTH_ACCESS ( "S-1-5-32-560" )
|
||||
#define SID_BUILTIN_TS_LICENSE_SERVERS ( "S-1-5-32-561" )
|
||||
#define SID_BUILTIN_DISTRIBUTED_COM_USERS ( "S-1-5-32-562" )
|
||||
#define SID_BUILTIN_CRYPTO_OPERATORS ( "S-1-5-32-569" )
|
||||
#define SID_BUILTIN_EVENT_LOG_READERS ( "S-1-5-32-573" )
|
||||
#define SID_BUILTIN_CERT_SERV_DCOM_ACCESS ( "S-1-5-32-574" )
|
||||
#define SID_SAMBA_UNIX_USER_OWNER ( "S-1-22-1" )
|
||||
#define SID_SAMBA_UNIX_GROUP_OWNER ( "S-1-22-2" )
|
||||
#define SID_SAMBA_SMB3 ( "S-1-22-1397571891" )
|
||||
#define NAME_NT_SERVICE ( "NT SERVICE" )
|
||||
#define SID_NT_NT_SERVICE ( "S-1-5-80" )
|
||||
#define SID_NT_TRUSTED_INSTALLER ( "S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464" )
|
||||
#define SID_AUTHENTICATION_AUTHORITY_ASSERTED_IDENTITY ( "S-1-18-1" )
|
||||
#define SID_SERVICE_ASSERTED_IDENTITY ( "S-1-18-2" )
|
||||
#define SID_COMPOUNDED_AUTHENTICATION ( "S-1-5-21-0-0-0-496" )
|
||||
#define SID_CLAIMS_VALID ( "S-1-5-21-0-0-0-497" )
|
||||
#define SID_NT_NFS_SUBSYSTEM ( "S-1-5-88" )
|
||||
#define SID_NT_NFS_USER ( "S-1-5-88-1" )
|
||||
#define SID_NT_NFS_GROUP ( "S-1-5-88-2" )
|
||||
#define SID_NT_NFS_MASK ( "S-1-5-88-3" )
|
||||
#define SID_NT_NFS_OTHERS ( "S-1-5-88-4" )
|
||||
#define DOMAIN_RID_LOGON ( 9 )
|
||||
#define DOMAIN_RID_ENTERPRISE_READONLY_DCS ( 498 )
|
||||
#define DOMAIN_RID_ADMINISTRATOR ( 500 )
|
||||
#define DOMAIN_RID_GUEST ( 501 )
|
||||
#define DOMAIN_RID_KRBTGT ( 502 )
|
||||
#define DOMAIN_RID_ADMINS ( 512 )
|
||||
#define DOMAIN_RID_USERS ( 513 )
|
||||
#define DOMAIN_RID_GUESTS ( 514 )
|
||||
#define DOMAIN_RID_DOMAIN_MEMBERS ( 515 )
|
||||
#define DOMAIN_RID_DCS ( 516 )
|
||||
#define DOMAIN_RID_CERT_ADMINS ( 517 )
|
||||
#define DOMAIN_RID_SCHEMA_ADMINS ( 518 )
|
||||
#define DOMAIN_RID_ENTERPRISE_ADMINS ( 519 )
|
||||
#define DOMAIN_RID_POLICY_ADMINS ( 520 )
|
||||
#define DOMAIN_RID_READONLY_DCS ( 521 )
|
||||
#define DOMAIN_RID_RAS_SERVERS ( 553 )
|
||||
#define DOMAIN_RID_RODC_ALLOW ( 571 )
|
||||
#define DOMAIN_RID_RODC_DENY ( 572 )
|
||||
#define BUILTIN_RID_ADMINISTRATORS ( 544 )
|
||||
#define BUILTIN_RID_USERS ( 545 )
|
||||
#define BUILTIN_RID_GUESTS ( 546 )
|
||||
#define BUILTIN_RID_POWER_USERS ( 547 )
|
||||
#define BUILTIN_RID_ACCOUNT_OPERATORS ( 548 )
|
||||
#define BUILTIN_RID_SERVER_OPERATORS ( 549 )
|
||||
#define BUILTIN_RID_PRINT_OPERATORS ( 550 )
|
||||
#define BUILTIN_RID_BACKUP_OPERATORS ( 551 )
|
||||
#define BUILTIN_RID_REPLICATOR ( 552 )
|
||||
#define BUILTIN_RID_RAS_SERVERS ( 553 )
|
||||
#define BUILTIN_RID_PRE_2K_ACCESS ( 554 )
|
||||
#define BUILTIN_RID_REMOTE_DESKTOP_USERS ( 555 )
|
||||
#define BUILTIN_RID_NETWORK_CONF_OPERATORS ( 556 )
|
||||
#define BUILTIN_RID_INCOMING_FOREST_TRUST ( 557 )
|
||||
#define BUILTIN_RID_PERFMON_USERS ( 558 )
|
||||
#define BUILTIN_RID_PERFLOG_USERS ( 559 )
|
||||
#define BUILTIN_RID_AUTH_ACCESS ( 560 )
|
||||
#define BUILTIN_RID_TS_LICENSE_SERVERS ( 561 )
|
||||
#define BUILTIN_RID_DISTRIBUTED_COM_USERS ( 562 )
|
||||
#define BUILTIN_RID_CRYPTO_OPERATORS ( 569 )
|
||||
#define BUILTIN_RID_EVENT_LOG_READERS ( 573 )
|
||||
#define BUILTIN_RID_CERT_SERV_DCOM_ACCESS ( 574 )
|
||||
#define NT4_ACL_REVISION ( SECURITY_ACL_REVISION_NT4 )
|
||||
#define SD_REVISION ( SECURITY_DESCRIPTOR_REVISION_1 )
|
||||
#define SMB_SUPPORTED_SECINFO_FLAGS ( (SECINFO_OWNER|SECINFO_GROUP|SECINFO_DACL|SECINFO_SACL|SECINFO_LABEL|SECINFO_ATTRIBUTE|SECINFO_SCOPE|SECINFO_BACKUP|0) )
|
||||
#define GUID_DRS_ALLOCATE_RIDS ( "1abd7cf8-0a99-11d1-adbb-00c04fd8d5cd" )
|
||||
#define GUID_DRS_CHANGE_DOMAIN_MASTER ( "014bf69c-7b3b-11d1-85f6-08002be74fab" )
|
||||
#define GUID_DRS_CHANGE_INFR_MASTER ( "cc17b1fb-33d9-11d2-97d4-00c04fd8d5cd" )
|
||||
#define GUID_DRS_CHANGE_PDC ( "bae50096-4752-11d1-9052-00c04fc2d4cf" )
|
||||
#define GUID_DRS_CHANGE_RID_MASTER ( "d58d5f36-0a98-11d1-adbb-00c04fd8d5cd" )
|
||||
#define GUID_DRS_CHANGE_SCHEMA_MASTER ( "e12b56b6-0a95-11d1-adbb-00c04fd8d5cd" )
|
||||
#define GUID_DRS_GET_CHANGES ( "1131f6aa-9c07-11d1-f79f-00c04fc2dcd2" )
|
||||
#define GUID_DRS_REPL_SYNCRONIZE ( "1131f6ab-9c07-11d1-f79f-00c04fc2dcd2" )
|
||||
#define GUID_DRS_MANAGE_TOPOLOGY ( "1131f6ac-9c07-11d1-f79f-00c04fc2dcd2" )
|
||||
#define GUID_DRS_GET_ALL_CHANGES ( "1131f6ad-9c07-11d1-f79f-00c04fc2dcd2" )
|
||||
#define GUID_DRS_RO_REPL_SECRET_SYNC ( "1131f6ae-9c07-11d1-f79f-00c04fc2dcd2" )
|
||||
#define GUID_DRS_GET_FILTERED_ATTRIBUTES ( "89e95b76-444d-4c62-991a-0facbeda640c" )
|
||||
#define GUID_DRS_MONITOR_TOPOLOGY ( "f98340fb-7c5b-4cdb-a00b-2ebdfa115a96" )
|
||||
#define GUID_DRS_USER_CHANGE_PASSWORD ( "ab721a53-1e2f-11d0-9819-00aa0040529b" )
|
||||
#define GUID_DRS_FORCE_CHANGE_PASSWORD ( "00299570-246d-11d0-a768-00aa006e0529" )
|
||||
#define GUID_DRS_UPDATE_PASSWORD_NOT_REQUIRED_BIT ( "280f369c-67c7-438e-ae98-1d46f3c6f541" )
|
||||
#define GUID_DRS_UNEXPIRE_PASSWORD ( "ccc2dc7d-a6ad-4a7a-8846-c04e3cc53501" )
|
||||
#define GUID_DRS_ENABLE_PER_USER_REVERSIBLY_ENCRYPTED_PASSWORD ( "05c74c5e-4deb-43b4-bd9f-86664c2a7fd5" )
|
||||
#define GUID_DRS_DS_INSTALL_REPLICA ( "9923a32a-3607-11d2-b9be-0000f87a36b2" )
|
||||
#define GUID_DRS_REANIMATE_TOMBSTONE ( "45ec5156-db7e-47bb-b53f-dbeb2d03c40f" )
|
||||
#define GUID_DRS_ALLOWED_TO_AUTHENTICATE ( "68b1d179-0d15-4D4F-ab71-46152e79a7bc" )
|
||||
#define GUID_DRS_VALIDATE_SPN ( "f3a64788-5306-11d1-a9c5-0000f80367c1" )
|
||||
#define GUID_DRS_SELF_MEMBERSHIP ( "bf9679c0-0de6-11d0-a285-00aa003049e2" )
|
||||
#define GUID_DRS_DNS_HOST_NAME ( "72e39547-7b18-11d1-adef-00c04fd8d5cd" )
|
||||
#define GUID_DRS_ADD_DNS_HOST_NAME ( "80863791-dbe9-4eb8-837e-7f0ab55d9ac7" )
|
||||
#define GUID_DRS_BEHAVIOR_VERSION ( "d31a8757-2447-4545-8081-3bb610cacbf2" )
|
||||
struct dom_sid {
|
||||
uint8_t sid_rev_num;
|
||||
int8_t num_auths;/* [range(0,15)] */
|
||||
uint8_t id_auth[6];
|
||||
uint32_t sub_auths[15];
|
||||
}/* [gensize,noprint,nopull,nopush,nosize,public] */;
|
||||
|
||||
enum sec_privilege
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
SEC_PRIV_INVALID=(int)(0x0),
|
||||
SEC_PRIV_INCREASE_QUOTA=(int)(0x5),
|
||||
SEC_PRIV_MACHINE_ACCOUNT=(int)(0x6),
|
||||
SEC_PRIV_SECURITY=(int)(0x8),
|
||||
SEC_PRIV_TAKE_OWNERSHIP=(int)(0x09),
|
||||
SEC_PRIV_LOAD_DRIVER=(int)(0x0a),
|
||||
SEC_PRIV_SYSTEM_PROFILE=(int)(0x0b),
|
||||
SEC_PRIV_SYSTEMTIME=(int)(0x0c),
|
||||
SEC_PRIV_PROFILE_SINGLE_PROCESS=(int)(0x0d),
|
||||
SEC_PRIV_INCREASE_BASE_PRIORITY=(int)(0x0e),
|
||||
SEC_PRIV_CREATE_PAGEFILE=(int)(0x0f),
|
||||
SEC_PRIV_BACKUP=(int)(0x11),
|
||||
SEC_PRIV_RESTORE=(int)(0x12),
|
||||
SEC_PRIV_SHUTDOWN=(int)(0x13),
|
||||
SEC_PRIV_DEBUG=(int)(0x14),
|
||||
SEC_PRIV_SYSTEM_ENVIRONMENT=(int)(0x16),
|
||||
SEC_PRIV_CHANGE_NOTIFY=(int)(0x17),
|
||||
SEC_PRIV_REMOTE_SHUTDOWN=(int)(0x18),
|
||||
SEC_PRIV_UNDOCK=(int)(0x19),
|
||||
SEC_PRIV_ENABLE_DELEGATION=(int)(0x1b),
|
||||
SEC_PRIV_MANAGE_VOLUME=(int)(0x1c),
|
||||
SEC_PRIV_IMPERSONATE=(int)(0x1d),
|
||||
SEC_PRIV_CREATE_GLOBAL=(int)(0x1e),
|
||||
SEC_PRIV_PRINT_OPERATOR=(int)(0x1001),
|
||||
SEC_PRIV_ADD_USERS=(int)(0x1002),
|
||||
SEC_PRIV_DISK_OPERATOR=(int)(0x1003)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_sec_privilege=0x7FFFFFFF}
|
||||
#define SEC_PRIV_INVALID ( 0x0 )
|
||||
#define SEC_PRIV_INCREASE_QUOTA ( 0x5 )
|
||||
#define SEC_PRIV_MACHINE_ACCOUNT ( 0x6 )
|
||||
#define SEC_PRIV_SECURITY ( 0x8 )
|
||||
#define SEC_PRIV_TAKE_OWNERSHIP ( 0x09 )
|
||||
#define SEC_PRIV_LOAD_DRIVER ( 0x0a )
|
||||
#define SEC_PRIV_SYSTEM_PROFILE ( 0x0b )
|
||||
#define SEC_PRIV_SYSTEMTIME ( 0x0c )
|
||||
#define SEC_PRIV_PROFILE_SINGLE_PROCESS ( 0x0d )
|
||||
#define SEC_PRIV_INCREASE_BASE_PRIORITY ( 0x0e )
|
||||
#define SEC_PRIV_CREATE_PAGEFILE ( 0x0f )
|
||||
#define SEC_PRIV_BACKUP ( 0x11 )
|
||||
#define SEC_PRIV_RESTORE ( 0x12 )
|
||||
#define SEC_PRIV_SHUTDOWN ( 0x13 )
|
||||
#define SEC_PRIV_DEBUG ( 0x14 )
|
||||
#define SEC_PRIV_SYSTEM_ENVIRONMENT ( 0x16 )
|
||||
#define SEC_PRIV_CHANGE_NOTIFY ( 0x17 )
|
||||
#define SEC_PRIV_REMOTE_SHUTDOWN ( 0x18 )
|
||||
#define SEC_PRIV_UNDOCK ( 0x19 )
|
||||
#define SEC_PRIV_ENABLE_DELEGATION ( 0x1b )
|
||||
#define SEC_PRIV_MANAGE_VOLUME ( 0x1c )
|
||||
#define SEC_PRIV_IMPERSONATE ( 0x1d )
|
||||
#define SEC_PRIV_CREATE_GLOBAL ( 0x1e )
|
||||
#define SEC_PRIV_PRINT_OPERATOR ( 0x1001 )
|
||||
#define SEC_PRIV_ADD_USERS ( 0x1002 )
|
||||
#define SEC_PRIV_DISK_OPERATOR ( 0x1003 )
|
||||
#endif
|
||||
;
|
||||
|
||||
/* bitmap se_privilege */
|
||||
#define SEC_PRIV_MACHINE_ACCOUNT_BIT ( 0x00000010 )
|
||||
#define SEC_PRIV_PRINT_OPERATOR_BIT ( 0x00000020 )
|
||||
#define SEC_PRIV_ADD_USERS_BIT ( 0x00000040 )
|
||||
#define SEC_PRIV_DISK_OPERATOR_BIT ( 0x00000080 )
|
||||
#define SEC_PRIV_REMOTE_SHUTDOWN_BIT ( 0x00000100 )
|
||||
#define SEC_PRIV_BACKUP_BIT ( 0x00000200 )
|
||||
#define SEC_PRIV_RESTORE_BIT ( 0x00000400 )
|
||||
#define SEC_PRIV_TAKE_OWNERSHIP_BIT ( 0x00000800 )
|
||||
#define SEC_PRIV_INCREASE_QUOTA_BIT ( 0x00001000 )
|
||||
#define SEC_PRIV_SECURITY_BIT ( 0x00002000 )
|
||||
#define SEC_PRIV_LOAD_DRIVER_BIT ( 0x00004000 )
|
||||
#define SEC_PRIV_SYSTEM_PROFILE_BIT ( 0x00008000 )
|
||||
#define SEC_PRIV_SYSTEMTIME_BIT ( 0x00010000 )
|
||||
#define SEC_PRIV_PROFILE_SINGLE_PROCESS_BIT ( 0x00020000 )
|
||||
#define SEC_PRIV_INCREASE_BASE_PRIORITY_BIT ( 0x00040000 )
|
||||
#define SEC_PRIV_CREATE_PAGEFILE_BIT ( 0x00080000 )
|
||||
#define SEC_PRIV_SHUTDOWN_BIT ( 0x00100000 )
|
||||
#define SEC_PRIV_DEBUG_BIT ( 0x00200000 )
|
||||
#define SEC_PRIV_SYSTEM_ENVIRONMENT_BIT ( 0x00400000 )
|
||||
#define SEC_PRIV_CHANGE_NOTIFY_BIT ( 0x00800000 )
|
||||
#define SEC_PRIV_UNDOCK_BIT ( 0x01000000 )
|
||||
#define SEC_PRIV_ENABLE_DELEGATION_BIT ( 0x02000000 )
|
||||
#define SEC_PRIV_MANAGE_VOLUME_BIT ( 0x04000000 )
|
||||
#define SEC_PRIV_IMPERSONATE_BIT ( 0x08000000 )
|
||||
#define SEC_PRIV_CREATE_GLOBAL_BIT ( 0x10000000 )
|
||||
|
||||
/* bitmap lsa_SystemAccessModeFlags */
|
||||
#define LSA_POLICY_MODE_INTERACTIVE ( 0x00000001 )
|
||||
#define LSA_POLICY_MODE_NETWORK ( 0x00000002 )
|
||||
#define LSA_POLICY_MODE_BATCH ( 0x00000004 )
|
||||
#define LSA_POLICY_MODE_SERVICE ( 0x00000010 )
|
||||
#define LSA_POLICY_MODE_PROXY ( 0x00000020 )
|
||||
#define LSA_POLICY_MODE_DENY_INTERACTIVE ( 0x00000040 )
|
||||
#define LSA_POLICY_MODE_DENY_NETWORK ( 0x00000080 )
|
||||
#define LSA_POLICY_MODE_DENY_BATCH ( 0x00000100 )
|
||||
#define LSA_POLICY_MODE_DENY_SERVICE ( 0x00000200 )
|
||||
#define LSA_POLICY_MODE_REMOTE_INTERACTIVE ( 0x00000400 )
|
||||
#define LSA_POLICY_MODE_DENY_REMOTE_INTERACTIVE ( 0x00000800 )
|
||||
#define LSA_POLICY_MODE_ALL ( 0x00000FF7 )
|
||||
#define LSA_POLICY_MODE_ALL_NT4 ( 0x00000037 )
|
||||
|
||||
/* bitmap security_ace_flags */
|
||||
#define SEC_ACE_FLAG_OBJECT_INHERIT ( 0x01 )
|
||||
#define SEC_ACE_FLAG_CONTAINER_INHERIT ( 0x02 )
|
||||
#define SEC_ACE_FLAG_NO_PROPAGATE_INHERIT ( 0x04 )
|
||||
#define SEC_ACE_FLAG_INHERIT_ONLY ( 0x08 )
|
||||
#define SEC_ACE_FLAG_INHERITED_ACE ( 0x10 )
|
||||
#define SEC_ACE_FLAG_VALID_INHERIT ( 0x0f )
|
||||
#define SEC_ACE_FLAG_SUCCESSFUL_ACCESS ( 0x40 )
|
||||
#define SEC_ACE_FLAG_FAILED_ACCESS ( 0x80 )
|
||||
|
||||
enum security_ace_type
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
SEC_ACE_TYPE_ACCESS_ALLOWED=(int)(0),
|
||||
SEC_ACE_TYPE_ACCESS_DENIED=(int)(1),
|
||||
SEC_ACE_TYPE_SYSTEM_AUDIT=(int)(2),
|
||||
SEC_ACE_TYPE_SYSTEM_ALARM=(int)(3),
|
||||
SEC_ACE_TYPE_ALLOWED_COMPOUND=(int)(4),
|
||||
SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT=(int)(5),
|
||||
SEC_ACE_TYPE_ACCESS_DENIED_OBJECT=(int)(6),
|
||||
SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT=(int)(7),
|
||||
SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT=(int)(8)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_security_ace_type=0x7FFFFFFF}
|
||||
#define SEC_ACE_TYPE_ACCESS_ALLOWED ( 0 )
|
||||
#define SEC_ACE_TYPE_ACCESS_DENIED ( 1 )
|
||||
#define SEC_ACE_TYPE_SYSTEM_AUDIT ( 2 )
|
||||
#define SEC_ACE_TYPE_SYSTEM_ALARM ( 3 )
|
||||
#define SEC_ACE_TYPE_ALLOWED_COMPOUND ( 4 )
|
||||
#define SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT ( 5 )
|
||||
#define SEC_ACE_TYPE_ACCESS_DENIED_OBJECT ( 6 )
|
||||
#define SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT ( 7 )
|
||||
#define SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT ( 8 )
|
||||
#endif
|
||||
;
|
||||
|
||||
/* bitmap security_ace_object_flags */
|
||||
#define SEC_ACE_OBJECT_TYPE_PRESENT ( 0x00000001 )
|
||||
#define SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT ( 0x00000002 )
|
||||
|
||||
union security_ace_object_type {
|
||||
struct GUID type;/* [case(SEC_ACE_OBJECT_TYPE_PRESENT)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
union security_ace_object_inherited_type {
|
||||
struct GUID inherited_type;/* [case(SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct security_ace_object {
|
||||
uint32_t flags;
|
||||
union security_ace_object_type type;/* [switch_is(flags&SEC_ACE_OBJECT_TYPE_PRESENT)] */
|
||||
union security_ace_object_inherited_type inherited_type;/* [switch_is(flags&SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT)] */
|
||||
};
|
||||
|
||||
union security_ace_object_ctr {
|
||||
struct security_ace_object object;/* [case(SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT)] */
|
||||
}/* [nodiscriminant,public] */;
|
||||
|
||||
struct security_ace {
|
||||
enum security_ace_type type;
|
||||
uint8_t flags;
|
||||
uint16_t size;/* [value(ndr_size_security_ace(r,ndr->flags))] */
|
||||
uint32_t access_mask;
|
||||
union security_ace_object_ctr object;/* [switch_is(type)] */
|
||||
struct dom_sid trustee;
|
||||
}/* [gensize,nopull,nosize,public] */;
|
||||
|
||||
enum security_acl_revision
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
SECURITY_ACL_REVISION_NT4=(int)(2),
|
||||
SECURITY_ACL_REVISION_ADS=(int)(4)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_security_acl_revision=0x7FFFFFFF}
|
||||
#define SECURITY_ACL_REVISION_NT4 ( 2 )
|
||||
#define SECURITY_ACL_REVISION_ADS ( 4 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct security_acl {
|
||||
enum security_acl_revision revision;
|
||||
uint16_t size;/* [value(ndr_size_security_acl(r,ndr->flags))] */
|
||||
uint32_t num_aces;/* [range(0,2000)] */
|
||||
struct security_ace *aces;
|
||||
}/* [gensize,nosize,public] */;
|
||||
|
||||
enum security_descriptor_revision
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
SECURITY_DESCRIPTOR_REVISION_1=(int)(1)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_security_descriptor_revision=0x7FFFFFFF}
|
||||
#define SECURITY_DESCRIPTOR_REVISION_1 ( 1 )
|
||||
#endif
|
||||
;
|
||||
|
||||
/* bitmap security_descriptor_type */
|
||||
#define SEC_DESC_OWNER_DEFAULTED ( 0x0001 )
|
||||
#define SEC_DESC_GROUP_DEFAULTED ( 0x0002 )
|
||||
#define SEC_DESC_DACL_PRESENT ( 0x0004 )
|
||||
#define SEC_DESC_DACL_DEFAULTED ( 0x0008 )
|
||||
#define SEC_DESC_SACL_PRESENT ( 0x0010 )
|
||||
#define SEC_DESC_SACL_DEFAULTED ( 0x0020 )
|
||||
#define SEC_DESC_DACL_TRUSTED ( 0x0040 )
|
||||
#define SEC_DESC_SERVER_SECURITY ( 0x0080 )
|
||||
#define SEC_DESC_DACL_AUTO_INHERIT_REQ ( 0x0100 )
|
||||
#define SEC_DESC_SACL_AUTO_INHERIT_REQ ( 0x0200 )
|
||||
#define SEC_DESC_DACL_AUTO_INHERITED ( 0x0400 )
|
||||
#define SEC_DESC_SACL_AUTO_INHERITED ( 0x0800 )
|
||||
#define SEC_DESC_DACL_PROTECTED ( 0x1000 )
|
||||
#define SEC_DESC_SACL_PROTECTED ( 0x2000 )
|
||||
#define SEC_DESC_RM_CONTROL_VALID ( 0x4000 )
|
||||
#define SEC_DESC_SELF_RELATIVE ( 0x8000 )
|
||||
|
||||
struct security_descriptor {
|
||||
enum security_descriptor_revision revision;
|
||||
uint16_t type;
|
||||
struct dom_sid *owner_sid;/* [relative] */
|
||||
struct dom_sid *group_sid;/* [relative] */
|
||||
struct security_acl *sacl;/* [relative] */
|
||||
struct security_acl *dacl;/* [relative] */
|
||||
}/* [flag(LIBNDR_FLAG_LITTLE_ENDIAN),gensize,nosize,public] */;
|
||||
|
||||
struct sec_desc_buf {
|
||||
uint32_t sd_size;/* [range(0,0x40000),value(ndr_size_security_descriptor(sd,ndr->flags))] */
|
||||
struct security_descriptor *sd;/* [subcontext(4),unique] */
|
||||
}/* [public] */;
|
||||
|
||||
/* bitmap security_GroupAttrs */
|
||||
#define SE_GROUP_MANDATORY ( 0x00000001 )
|
||||
#define SE_GROUP_ENABLED_BY_DEFAULT ( 0x00000002 )
|
||||
#define SE_GROUP_ENABLED ( 0x00000004 )
|
||||
#define SE_GROUP_OWNER ( 0x00000008 )
|
||||
#define SE_GROUP_USE_FOR_DENY_ONLY ( 0x00000010 )
|
||||
#define SE_GROUP_INTEGRITY ( 0x00000020 )
|
||||
#define SE_GROUP_INTEGRITY_ENABLED ( 0x00000040 )
|
||||
#define SE_GROUP_RESOURCE ( 0x20000000 )
|
||||
#define SE_GROUP_LOGON_ID ( 0xC0000000 )
|
||||
|
||||
struct security_token {
|
||||
uint32_t num_sids;
|
||||
struct dom_sid *sids;/* [size_is(num_sids)] */
|
||||
uint64_t privilege_mask;
|
||||
uint32_t rights_mask;
|
||||
}/* [public] */;
|
||||
|
||||
struct security_unix_token {
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
uint32_t ngroups;
|
||||
gid_t *groups;/* [size_is(ngroups)] */
|
||||
}/* [public] */;
|
||||
|
||||
/* bitmap security_secinfo */
|
||||
#define SECINFO_OWNER ( 0x00000001 )
|
||||
#define SECINFO_GROUP ( 0x00000002 )
|
||||
#define SECINFO_DACL ( 0x00000004 )
|
||||
#define SECINFO_SACL ( 0x00000008 )
|
||||
#define SECINFO_LABEL ( 0x00000010 )
|
||||
#define SECINFO_ATTRIBUTE ( 0x00000020 )
|
||||
#define SECINFO_SCOPE ( 0x00000040 )
|
||||
#define SECINFO_BACKUP ( 0x00010000 )
|
||||
#define SECINFO_UNPROTECTED_SACL ( 0x10000000 )
|
||||
#define SECINFO_UNPROTECTED_DACL ( 0x20000000 )
|
||||
#define SECINFO_PROTECTED_SACL ( 0x40000000 )
|
||||
#define SECINFO_PROTECTED_DACL ( 0x80000000 )
|
||||
|
||||
struct LSAP_TOKEN_INFO_INTEGRITY {
|
||||
uint32_t Flags;
|
||||
uint32_t TokenIL;
|
||||
uint8_t MachineId[32];
|
||||
}/* [flag(LIBNDR_PRINT_ARRAY_HEX),gensize,public] */;
|
||||
|
||||
/* bitmap kerb_EncTypes */
|
||||
#define KERB_ENCTYPE_DES_CBC_CRC ( 0x00000001 )
|
||||
#define KERB_ENCTYPE_DES_CBC_MD5 ( 0x00000002 )
|
||||
#define KERB_ENCTYPE_RC4_HMAC_MD5 ( 0x00000004 )
|
||||
#define KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96 ( 0x00000008 )
|
||||
#define KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96 ( 0x00000010 )
|
||||
#define KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96_SK ( 0x00000020 )
|
||||
#define KERB_ENCTYPE_FAST_SUPPORTED ( 0x00010000 )
|
||||
#define KERB_ENCTYPE_COMPOUND_IDENTITY_SUPPORTED ( 0x00020000 )
|
||||
#define KERB_ENCTYPE_CLAIMS_SUPPORTED ( 0x00040000 )
|
||||
#define KERB_ENCTYPE_RESOURCE_SID_COMPRESSION_DISABLED ( 0x00080000 )
|
||||
|
||||
/* bitmap security_autoinherit */
|
||||
#define SEC_DACL_AUTO_INHERIT ( 0x00000001 )
|
||||
#define SEC_SACL_AUTO_INHERIT ( 0x00000002 )
|
||||
#define SEC_DEFAULT_DESCRIPTOR ( 0x00000004 )
|
||||
#define SEC_OWNER_FROM_PARENT ( 0x00000008 )
|
||||
#define SEC_GROUP_FROM_PARENT ( 0x00000010 )
|
||||
|
||||
struct generic_mapping {
|
||||
uint32_t generic_read;
|
||||
uint32_t generic_write;
|
||||
uint32_t generic_execute;
|
||||
uint32_t generic_all;
|
||||
};
|
||||
|
||||
struct standard_mapping {
|
||||
uint32_t std_read;
|
||||
uint32_t std_write;
|
||||
uint32_t std_execute;
|
||||
uint32_t std_all;
|
||||
};
|
||||
|
||||
#endif /* _HEADER_security */
|
||||
#endif /* _PIDL_HEADER_security */
|
||||
@ -0,0 +1,23 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#ifndef _PIDL_HEADER_server_id
|
||||
#define _PIDL_HEADER_server_id
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <core/ntstatus.h>
|
||||
|
||||
#ifndef _HEADER_server_id
|
||||
#define _HEADER_server_id
|
||||
|
||||
#define NONCLUSTER_VNN ( 0xFFFFFFFF )
|
||||
#define SERVERID_UNIQUE_ID_NOT_TO_VERIFY ( 0xFFFFFFFFFFFFFFFFULL )
|
||||
struct server_id {
|
||||
uint64_t pid;
|
||||
uint32_t task_id;
|
||||
uint32_t vnn;
|
||||
uint64_t unique_id;
|
||||
}/* [public] */;
|
||||
|
||||
#endif /* _HEADER_server_id */
|
||||
#endif /* _PIDL_HEADER_server_id */
|
||||
@ -0,0 +1,961 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#ifndef _PIDL_HEADER_svcctl
|
||||
#define _PIDL_HEADER_svcctl
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <core/ntstatus.h>
|
||||
|
||||
#include <gen_ndr/misc.h>
|
||||
#include <gen_ndr/security.h>
|
||||
#ifndef _HEADER_svcctl
|
||||
#define _HEADER_svcctl
|
||||
|
||||
#define MAX_SERVICE_NAME_LENGTH ( 256 )
|
||||
#define SC_MAX_DEPEND_SIZE ( 4*1024 )
|
||||
#define SC_MAX_NAME_LENGTH ( MAX_SERVICE_NAME_LENGTH+1 )
|
||||
#define SC_MAX_PATH_LENGTH ( 32*1024 )
|
||||
#define SC_MAX_PWD_SIZE ( 514 )
|
||||
#define SC_MAX_COMPUTER_NAME_LENGTH ( 1024 )
|
||||
#define SC_MAX_ACCOUNT_NAME_LENGTH ( 2*1024 )
|
||||
#define SC_MAX_COMMENT_LENGTH ( 128 )
|
||||
#define SC_MAX_ARGUMENT_LENGTH ( 1024 )
|
||||
#define SC_MAX_ARGUMENTS ( 1024 )
|
||||
#define SVCCTL_ACCEPT_NONE ( 0x00000000 )
|
||||
#define SERVICE_TYPE_KERNEL_DRIVER ( 0x01 )
|
||||
#define SERVICE_TYPE_FS_DRIVER ( 0x02 )
|
||||
#define SERVICE_TYPE_ADAPTER ( 0x04 )
|
||||
#define SERVICE_TYPE_RECOGNIZER_DRIVER ( 0x08 )
|
||||
#define SERVICE_TYPE_DRIVER ( SERVICE_TYPE_KERNEL_DRIVER|SERVICE_TYPE_FS_DRIVER|SERVICE_TYPE_RECOGNIZER_DRIVER )
|
||||
#define SERVICE_TYPE_WIN32_OWN_PROCESS ( 0x10 )
|
||||
#define SERVICE_TYPE_WIN32_SHARE_PROCESS ( 0x20 )
|
||||
#define SERVICE_TYPE_WIN32 ( SERVICE_TYPE_WIN32_OWN_PROCESS|SERVICE_TYPE_WIN32_SHARE_PROCESS )
|
||||
#define SERVICE_TYPE_INTERACTIVE_PROCESS ( 0x100 )
|
||||
#define SC_MANAGER_READ_ACCESS ( (SEC_STD_READ_CONTROL|SC_RIGHT_MGR_CONNECT|SC_RIGHT_MGR_ENUMERATE_SERVICE|SC_RIGHT_MGR_QUERY_LOCK_STATUS) )
|
||||
#define SC_MANAGER_EXECUTE_ACCESS ( SC_MANAGER_READ_ACCESS )
|
||||
#define SC_MANAGER_WRITE_ACCESS ( (SEC_STD_REQUIRED|SC_MANAGER_READ_ACCESS|SC_RIGHT_MGR_CREATE_SERVICE|SC_RIGHT_MGR_LOCK|SC_RIGHT_MGR_MODIFY_BOOT_CONFIG) )
|
||||
#define SC_MANAGER_ALL_ACCESS ( SC_MANAGER_WRITE_ACCESS )
|
||||
#define SERVICE_READ_ACCESS ( (SEC_STD_READ_CONTROL|SC_RIGHT_SVC_ENUMERATE_DEPENDENTS|SC_RIGHT_SVC_INTERROGATE|SC_RIGHT_SVC_QUERY_CONFIG|SC_RIGHT_SVC_QUERY_STATUS|SC_RIGHT_SVC_USER_DEFINED_CONTROL) )
|
||||
#define SERVICE_EXECUTE_ACCESS ( (SERVICE_READ_ACCESS|SC_RIGHT_SVC_START|SC_RIGHT_SVC_STOP|SC_RIGHT_SVC_PAUSE_CONTINUE) )
|
||||
#define SERVICE_WRITE_ACCESS ( (SEC_STD_REQUIRED|SERVICE_READ_ACCESS|SERVICE_EXECUTE_ACCESS|SC_RIGHT_SVC_CHANGE_CONFIG) )
|
||||
#define SERVICE_ALL_ACCESS ( SERVICE_WRITE_ACCESS )
|
||||
#define SC_MAX_ARGUMENT_LENGTH ( 1024 )
|
||||
#define SC_MAX_ARGUMENTS ( 1024 )
|
||||
struct SERVICE_LOCK_STATUS {
|
||||
uint32_t is_locked;
|
||||
const char *lock_owner;/* [charset(UTF16),unique] */
|
||||
uint32_t lock_duration;
|
||||
};
|
||||
|
||||
enum svcctl_ServiceStatus
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
SVCCTL_STATE_UNKNOWN=(int)(0x00000000),
|
||||
SVCCTL_STOPPED=(int)(0x00000001),
|
||||
SVCCTL_START_PENDING=(int)(0x00000002),
|
||||
SVCCTL_STOP_PENDING=(int)(0x00000003),
|
||||
SVCCTL_RUNNING=(int)(0x00000004),
|
||||
SVCCTL_CONTINUE_PENDING=(int)(0x00000005),
|
||||
SVCCTL_PAUSE_PENDING=(int)(0x00000006),
|
||||
SVCCTL_PAUSED=(int)(0x00000007)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_svcctl_ServiceStatus=0x7FFFFFFF}
|
||||
#define SVCCTL_STATE_UNKNOWN ( 0x00000000 )
|
||||
#define SVCCTL_STOPPED ( 0x00000001 )
|
||||
#define SVCCTL_START_PENDING ( 0x00000002 )
|
||||
#define SVCCTL_STOP_PENDING ( 0x00000003 )
|
||||
#define SVCCTL_RUNNING ( 0x00000004 )
|
||||
#define SVCCTL_CONTINUE_PENDING ( 0x00000005 )
|
||||
#define SVCCTL_PAUSE_PENDING ( 0x00000006 )
|
||||
#define SVCCTL_PAUSED ( 0x00000007 )
|
||||
#endif
|
||||
;
|
||||
|
||||
/* bitmap svcctl_ControlsAccepted */
|
||||
#define SVCCTL_ACCEPT_STOP ( 0x00000001 )
|
||||
#define SVCCTL_ACCEPT_PAUSE_CONTINUE ( 0x00000002 )
|
||||
#define SVCCTL_ACCEPT_SHUTDOWN ( 0x00000004 )
|
||||
#define SVCCTL_ACCEPT_PARAMCHANGE ( 0x00000008 )
|
||||
#define SVCCTL_ACCEPT_NETBINDCHANGE ( 0x00000010 )
|
||||
#define SVCCTL_ACCEPT_HARDWAREPROFILECHANGE ( 0x00000020 )
|
||||
#define SVCCTL_ACCEPT_POWEREVENT ( 0x00000040 )
|
||||
|
||||
struct SERVICE_STATUS {
|
||||
uint32_t type;
|
||||
enum svcctl_ServiceStatus state;
|
||||
uint32_t controls_accepted;
|
||||
WERROR win32_exit_code;
|
||||
uint32_t service_exit_code;
|
||||
uint32_t check_point;
|
||||
uint32_t wait_hint;
|
||||
};
|
||||
|
||||
struct SERVICE_STATUS_PROCESS {
|
||||
struct SERVICE_STATUS status;
|
||||
uint32_t process_id;
|
||||
uint32_t service_flags;
|
||||
}/* [public] */;
|
||||
|
||||
struct ENUM_SERVICE_STATUSW {
|
||||
const char * service_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2),relative] */
|
||||
const char * display_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2),relative] */
|
||||
struct SERVICE_STATUS status;
|
||||
}/* [gensize,public] */;
|
||||
|
||||
struct ENUM_SERVICE_STATUSA {
|
||||
const char * service_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM),relative] */
|
||||
const char * display_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM),relative] */
|
||||
struct SERVICE_STATUS status;
|
||||
}/* [gensize,public] */;
|
||||
|
||||
enum SERVICE_CONTROL
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
SVCCTL_CONTROL_STOP=(int)(0x00000001),
|
||||
SVCCTL_CONTROL_PAUSE=(int)(0x00000002),
|
||||
SVCCTL_CONTROL_CONTINUE=(int)(0x00000003),
|
||||
SVCCTL_CONTROL_INTERROGATE=(int)(0x00000004),
|
||||
SVCCTL_CONTROL_SHUTDOWN=(int)(0x00000005)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_SERVICE_CONTROL=0x7FFFFFFF}
|
||||
#define SVCCTL_CONTROL_STOP ( 0x00000001 )
|
||||
#define SVCCTL_CONTROL_PAUSE ( 0x00000002 )
|
||||
#define SVCCTL_CONTROL_CONTINUE ( 0x00000003 )
|
||||
#define SVCCTL_CONTROL_INTERROGATE ( 0x00000004 )
|
||||
#define SVCCTL_CONTROL_SHUTDOWN ( 0x00000005 )
|
||||
#endif
|
||||
;
|
||||
|
||||
enum svcctl_ErrorControl
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
SVCCTL_SVC_ERROR_IGNORE=(int)(0x00000000),
|
||||
SVCCTL_SVC_ERROR_NORMAL=(int)(0x00000001),
|
||||
SVCCTL_SVC_ERROR_CRITICAL=(int)(0x00000002),
|
||||
SVCCTL_SVC_ERROR_SEVERE=(int)(0x00000003)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_svcctl_ErrorControl=0x7FFFFFFF}
|
||||
#define SVCCTL_SVC_ERROR_IGNORE ( 0x00000000 )
|
||||
#define SVCCTL_SVC_ERROR_NORMAL ( 0x00000001 )
|
||||
#define SVCCTL_SVC_ERROR_CRITICAL ( 0x00000002 )
|
||||
#define SVCCTL_SVC_ERROR_SEVERE ( 0x00000003 )
|
||||
#endif
|
||||
;
|
||||
|
||||
enum svcctl_StartType
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
SVCCTL_BOOT_START=(int)(0x00000000),
|
||||
SVCCTL_SYSTEM_START=(int)(0x00000001),
|
||||
SVCCTL_AUTO_START=(int)(0x00000002),
|
||||
SVCCTL_DEMAND_START=(int)(0x00000003),
|
||||
SVCCTL_DISABLED=(int)(0x00000004)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_svcctl_StartType=0x7FFFFFFF}
|
||||
#define SVCCTL_BOOT_START ( 0x00000000 )
|
||||
#define SVCCTL_SYSTEM_START ( 0x00000001 )
|
||||
#define SVCCTL_AUTO_START ( 0x00000002 )
|
||||
#define SVCCTL_DEMAND_START ( 0x00000003 )
|
||||
#define SVCCTL_DISABLED ( 0x00000004 )
|
||||
#endif
|
||||
;
|
||||
|
||||
enum svcctl_ServiceState
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
SERVICE_STATE_ACTIVE=(int)(0x00000001),
|
||||
SERVICE_STATE_INACTIVE=(int)(0x00000002),
|
||||
SERVICE_STATE_ALL=(int)((SERVICE_STATE_ACTIVE|SERVICE_STATE_INACTIVE))
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_svcctl_ServiceState=0x7FFFFFFF}
|
||||
#define SERVICE_STATE_ACTIVE ( 0x00000001 )
|
||||
#define SERVICE_STATE_INACTIVE ( 0x00000002 )
|
||||
#define SERVICE_STATE_ALL ( (SERVICE_STATE_ACTIVE|SERVICE_STATE_INACTIVE) )
|
||||
#endif
|
||||
;
|
||||
|
||||
/* bitmap svcctl_MgrAccessMask */
|
||||
#define SC_RIGHT_MGR_CONNECT ( 0x0001 )
|
||||
#define SC_RIGHT_MGR_CREATE_SERVICE ( 0x0002 )
|
||||
#define SC_RIGHT_MGR_ENUMERATE_SERVICE ( 0x0004 )
|
||||
#define SC_RIGHT_MGR_LOCK ( 0x0008 )
|
||||
#define SC_RIGHT_MGR_QUERY_LOCK_STATUS ( 0x0010 )
|
||||
#define SC_RIGHT_MGR_MODIFY_BOOT_CONFIG ( 0x0020 )
|
||||
|
||||
/* bitmap svcctl_ServiceAccessMask */
|
||||
#define SC_RIGHT_SVC_QUERY_CONFIG ( 0x0001 )
|
||||
#define SC_RIGHT_SVC_CHANGE_CONFIG ( 0x0002 )
|
||||
#define SC_RIGHT_SVC_QUERY_STATUS ( 0x0004 )
|
||||
#define SC_RIGHT_SVC_ENUMERATE_DEPENDENTS ( 0x0008 )
|
||||
#define SC_RIGHT_SVC_START ( 0x0010 )
|
||||
#define SC_RIGHT_SVC_STOP ( 0x0020 )
|
||||
#define SC_RIGHT_SVC_PAUSE_CONTINUE ( 0x0040 )
|
||||
#define SC_RIGHT_SVC_INTERROGATE ( 0x0080 )
|
||||
#define SC_RIGHT_SVC_USER_DEFINED_CONTROL ( 0x0100 )
|
||||
|
||||
struct QUERY_SERVICE_CONFIG {
|
||||
uint32_t service_type;
|
||||
enum svcctl_StartType start_type;
|
||||
enum svcctl_ErrorControl error_control;
|
||||
const char *executablepath;/* [charset(UTF16),range(0,8192),unique] */
|
||||
const char *loadordergroup;/* [charset(UTF16),range(0,8192),unique] */
|
||||
uint32_t tag_id;
|
||||
const char *dependencies;/* [charset(UTF16),range(0,8192),unique] */
|
||||
const char *startname;/* [charset(UTF16),range(0,8192),unique] */
|
||||
const char *displayname;/* [charset(UTF16),range(0,8192),unique] */
|
||||
}/* [gensize,public] */;
|
||||
|
||||
struct svcctl_ArgumentString {
|
||||
const char *string;/* [charset(UTF16),range(0,SC_MAX_ARGUMENT_LENGTH),unique] */
|
||||
};
|
||||
|
||||
enum svcctl_ConfigLevel
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
SERVICE_CONFIG_DESCRIPTION=(int)(0x00000001),
|
||||
SERVICE_CONFIG_FAILURE_ACTIONS=(int)(0x00000002)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_svcctl_ConfigLevel=0x7FFFFFFF}
|
||||
#define SERVICE_CONFIG_DESCRIPTION ( 0x00000001 )
|
||||
#define SERVICE_CONFIG_FAILURE_ACTIONS ( 0x00000002 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct SERVICE_DESCRIPTION {
|
||||
const char * description;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2),relative] */
|
||||
}/* [gensize,public] */;
|
||||
|
||||
enum SC_ACTION_TYPE
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
SC_ACTION_NONE=(int)(0),
|
||||
SC_ACTION_RESTART=(int)(1),
|
||||
SC_ACTION_REBOOT=(int)(2),
|
||||
SC_ACTION_RUN_COMMAND=(int)(3)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_SC_ACTION_TYPE=0x7FFFFFFF}
|
||||
#define SC_ACTION_NONE ( 0 )
|
||||
#define SC_ACTION_RESTART ( 1 )
|
||||
#define SC_ACTION_REBOOT ( 2 )
|
||||
#define SC_ACTION_RUN_COMMAND ( 3 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct SC_ACTION {
|
||||
enum SC_ACTION_TYPE type;
|
||||
uint32_t delay;
|
||||
};
|
||||
|
||||
struct SERVICE_FAILURE_ACTIONS {
|
||||
uint32_t reset_period;
|
||||
const char * rebootmsg;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2),relative] */
|
||||
const char * command;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2),relative] */
|
||||
uint32_t num_actions;/* [range(0,1024)] */
|
||||
struct SC_ACTION *actions;/* [relative,size_is(num_actions)] */
|
||||
}/* [gensize,public] */;
|
||||
|
||||
enum svcctl_StatusLevel
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
SVC_STATUS_PROCESS_INFO=(int)(0x00000000)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_svcctl_StatusLevel=0x7FFFFFFF}
|
||||
#define SVC_STATUS_PROCESS_INFO ( 0x00000000 )
|
||||
#endif
|
||||
;
|
||||
|
||||
|
||||
struct svcctl_CloseServiceHandle {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_ControlService {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
enum SERVICE_CONTROL control;
|
||||
} in;
|
||||
|
||||
struct {
|
||||
struct SERVICE_STATUS *service_status;/* [ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_DeleteService {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_LockServiceDatabase {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
struct policy_handle *lock;/* [ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_QueryServiceObjectSecurity {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
uint32_t security_flags;
|
||||
uint32_t offered;/* [range(0,0x40000)] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
uint8_t *buffer;/* [ref,size_is(offered)] */
|
||||
uint32_t *needed;/* [range(0,0x40000),ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_SetServiceObjectSecurity {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
uint32_t security_flags;
|
||||
uint8_t *buffer;/* [ref,size_is(offered)] */
|
||||
uint32_t offered;
|
||||
} in;
|
||||
|
||||
struct {
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_QueryServiceStatus {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
struct SERVICE_STATUS *service_status;/* [ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_SetServiceStatus {
|
||||
struct {
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_UnlockServiceDatabase {
|
||||
struct {
|
||||
struct policy_handle *lock;/* [ref] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
struct policy_handle *lock;/* [ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_NotifyBootConfigStatus {
|
||||
struct {
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_SCSetServiceBitsW {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
uint32_t bits;
|
||||
uint32_t bitson;
|
||||
uint32_t immediate;
|
||||
} in;
|
||||
|
||||
struct {
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_ChangeServiceConfigW {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
uint32_t type;
|
||||
enum svcctl_StartType start_type;
|
||||
enum svcctl_ErrorControl error_control;
|
||||
const char *binary_path;/* [charset(UTF16),unique] */
|
||||
const char *load_order_group;/* [charset(UTF16),unique] */
|
||||
const char *dependencies;/* [charset(UTF16),size_is(dwDependSize),unique] */
|
||||
uint32_t dwDependSize;/* [range(0,SC_MAX_DEPEND_SIZE)] */
|
||||
const char *service_start_name;/* [charset(UTF16),range(0,SC_MAX_ACCOUNT_NAME_LENGTH),unique] */
|
||||
const char *password;/* [charset(UTF16),size_is(dwPwSize),unique] */
|
||||
uint32_t dwPwSize;/* [range(0,SC_MAX_PWD_SIZE)] */
|
||||
const char *display_name;/* [charset(UTF16),range(0,SC_MAX_NAME_LENGTH),unique] */
|
||||
uint32_t *tag_id;/* [unique] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
uint32_t *tag_id;/* [unique] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_CreateServiceW {
|
||||
struct {
|
||||
struct policy_handle *scmanager_handle;/* [ref] */
|
||||
const char *ServiceName;/* [charset(UTF16)] */
|
||||
const char *DisplayName;/* [charset(UTF16),unique] */
|
||||
uint32_t desired_access;
|
||||
uint32_t type;
|
||||
enum svcctl_StartType start_type;
|
||||
enum svcctl_ErrorControl error_control;
|
||||
const char *binary_path;/* [charset(UTF16)] */
|
||||
const char *LoadOrderGroupKey;/* [charset(UTF16),unique] */
|
||||
uint8_t *dependencies;/* [size_is(dependencies_size),unique] */
|
||||
uint32_t dependencies_size;
|
||||
const char *service_start_name;/* [charset(UTF16),unique] */
|
||||
uint8_t *password;/* [size_is(password_size),unique] */
|
||||
uint32_t password_size;
|
||||
uint32_t *TagId;/* [unique] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
uint32_t *TagId;/* [unique] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_EnumDependentServicesW {
|
||||
struct {
|
||||
struct policy_handle *service;/* [ref] */
|
||||
enum svcctl_ServiceState state;
|
||||
uint32_t offered;/* [range(0,0x40000)] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
uint8_t *service_status;/* [ref,size_is(offered)] */
|
||||
uint32_t *needed;/* [range(0,0x40000),ref] */
|
||||
uint32_t *services_returned;/* [range(0,0x40000),ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_EnumServicesStatusW {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
uint32_t type;
|
||||
enum svcctl_ServiceState state;
|
||||
uint32_t offered;/* [range(0,0x40000)] */
|
||||
uint32_t *resume_handle;/* [unique] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
uint8_t *service;/* [ref,size_is(offered)] */
|
||||
uint32_t *needed;/* [range(0,0x40000),ref] */
|
||||
uint32_t *services_returned;/* [range(0,0x40000),ref] */
|
||||
uint32_t *resume_handle;/* [unique] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_OpenSCManagerW {
|
||||
struct {
|
||||
const char *MachineName;/* [charset(UTF16),unique] */
|
||||
const char *DatabaseName;/* [charset(UTF16),unique] */
|
||||
uint32_t access_mask;
|
||||
} in;
|
||||
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_OpenServiceW {
|
||||
struct {
|
||||
struct policy_handle *scmanager_handle;/* [ref] */
|
||||
const char *ServiceName;/* [charset(UTF16)] */
|
||||
uint32_t access_mask;
|
||||
} in;
|
||||
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_QueryServiceConfigW {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
uint32_t offered;/* [range(0,8192)] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
struct QUERY_SERVICE_CONFIG *query;/* [ref] */
|
||||
uint32_t *needed;/* [range(0,8192),ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_QueryServiceLockStatusW {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
uint32_t offered;
|
||||
} in;
|
||||
|
||||
struct {
|
||||
struct SERVICE_LOCK_STATUS *lock_status;/* [ref] */
|
||||
uint32_t *needed;/* [ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_StartServiceW {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
uint32_t NumArgs;/* [range(0,SC_MAX_ARGUMENTS)] */
|
||||
struct svcctl_ArgumentString *Arguments;/* [size_is(NumArgs),unique] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_GetServiceDisplayNameW {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
const char *service_name;/* [charset(UTF16),unique] */
|
||||
uint32_t *display_name_length;/* [unique] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
const char **display_name;/* [charset(UTF16),ref] */
|
||||
uint32_t *display_name_length;/* [unique] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_GetServiceKeyNameW {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
const char *service_name;/* [charset(UTF16),unique] */
|
||||
uint32_t *display_name_length;/* [unique] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
const char **key_name;/* [charset(UTF16),ref] */
|
||||
uint32_t *display_name_length;/* [unique] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_SCSetServiceBitsA {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
uint32_t bits;
|
||||
uint32_t bitson;
|
||||
uint32_t immediate;
|
||||
} in;
|
||||
|
||||
struct {
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_ChangeServiceConfigA {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
uint32_t type;
|
||||
enum svcctl_StartType start_type;
|
||||
enum svcctl_ErrorControl error_control;
|
||||
const char *binary_path;/* [charset(UTF16),unique] */
|
||||
const char *load_order_group;/* [charset(UTF16),unique] */
|
||||
const char *dependencies;/* [charset(UTF16),unique] */
|
||||
const char *service_start_name;/* [charset(UTF16),unique] */
|
||||
const char *password;/* [charset(UTF16),unique] */
|
||||
const char *display_name;/* [charset(UTF16),unique] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
uint32_t *tag_id;/* [ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_CreateServiceA {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
const char *ServiceName;/* [charset(UTF16),unique] */
|
||||
const char *DisplayName;/* [charset(UTF16),unique] */
|
||||
uint32_t desired_access;
|
||||
uint32_t type;
|
||||
enum svcctl_StartType start_type;
|
||||
enum svcctl_ErrorControl error_control;
|
||||
const char *binary_path;/* [charset(UTF16),unique] */
|
||||
const char *LoadOrderGroupKey;/* [charset(UTF16),unique] */
|
||||
const char *dependencies;/* [charset(UTF16),unique] */
|
||||
const char *service_start_name;/* [charset(UTF16),unique] */
|
||||
const char *password;/* [charset(UTF16),unique] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
uint32_t *TagId;/* [unique] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_EnumDependentServicesA {
|
||||
struct {
|
||||
struct policy_handle *service;/* [ref] */
|
||||
enum svcctl_ServiceState state;
|
||||
uint32_t offered;
|
||||
} in;
|
||||
|
||||
struct {
|
||||
struct ENUM_SERVICE_STATUSA *service_status;/* [unique] */
|
||||
uint32_t *needed;/* [ref] */
|
||||
uint32_t *services_returned;/* [ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_EnumServicesStatusA {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
uint32_t type;
|
||||
enum svcctl_ServiceState state;
|
||||
uint32_t offered;
|
||||
uint32_t *resume_handle;/* [unique] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
uint8_t *service;/* [size_is(offered)] */
|
||||
uint32_t *needed;/* [ref] */
|
||||
uint32_t *services_returned;/* [ref] */
|
||||
uint32_t *resume_handle;/* [unique] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_OpenSCManagerA {
|
||||
struct {
|
||||
const char *MachineName;/* [charset(UTF16),unique] */
|
||||
const char *DatabaseName;/* [charset(UTF16),unique] */
|
||||
uint32_t access_mask;
|
||||
} in;
|
||||
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_OpenServiceA {
|
||||
struct {
|
||||
struct policy_handle *scmanager_handle;/* [ref] */
|
||||
const char *ServiceName;/* [charset(UTF16),unique] */
|
||||
uint32_t access_mask;
|
||||
} in;
|
||||
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_QueryServiceConfigA {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
uint32_t offered;
|
||||
} in;
|
||||
|
||||
struct {
|
||||
uint8_t *query;
|
||||
uint32_t *needed;/* [ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_QueryServiceLockStatusA {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
uint32_t offered;
|
||||
} in;
|
||||
|
||||
struct {
|
||||
struct SERVICE_LOCK_STATUS *lock_status;/* [ref] */
|
||||
uint32_t *needed;/* [ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_StartServiceA {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
uint32_t NumArgs;
|
||||
const char *Arguments;/* [charset(UTF16),unique] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_GetServiceDisplayNameA {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
const char *service_name;/* [charset(UTF16),unique] */
|
||||
uint32_t *display_name_length;/* [unique] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
const char **display_name;/* [charset(UTF16),ref] */
|
||||
uint32_t *display_name_length;/* [unique] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_GetServiceKeyNameA {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
const char *service_name;/* [charset(UTF16),unique] */
|
||||
uint32_t *display_name_length;/* [unique] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
const char **key_name;/* [charset(UTF16),ref] */
|
||||
uint32_t *display_name_length;/* [unique] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_GetCurrentGroupeStateW {
|
||||
struct {
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_EnumServiceGroupW {
|
||||
struct {
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_ChangeServiceConfig2A {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
uint32_t info_level;
|
||||
uint8_t *info;/* [unique] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_ChangeServiceConfig2W {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
uint32_t info_level;
|
||||
uint8_t *info;/* [unique] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_QueryServiceConfig2A {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
enum svcctl_ConfigLevel info_level;
|
||||
uint32_t offered;
|
||||
} in;
|
||||
|
||||
struct {
|
||||
uint8_t *buffer;
|
||||
uint32_t *needed;/* [ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_QueryServiceConfig2W {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
enum svcctl_ConfigLevel info_level;
|
||||
uint32_t offered;/* [range(0,8192)] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
uint8_t *buffer;/* [ref,size_is(offered)] */
|
||||
uint32_t *needed;/* [range(0,8192),ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_QueryServiceStatusEx {
|
||||
struct {
|
||||
struct policy_handle *handle;/* [ref] */
|
||||
enum svcctl_StatusLevel info_level;
|
||||
uint32_t offered;/* [range(0,8192)] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
uint8_t *buffer;/* [ref,size_is(offered)] */
|
||||
uint32_t *needed;/* [range(0,8192),ref] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct EnumServicesStatusExA {
|
||||
struct {
|
||||
struct policy_handle *scmanager;/* [ref] */
|
||||
uint32_t info_level;
|
||||
uint32_t type;
|
||||
enum svcctl_ServiceState state;
|
||||
uint32_t offered;
|
||||
uint32_t *resume_handle;/* [unique] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
uint8_t *services;
|
||||
uint32_t *needed;/* [ref] */
|
||||
uint32_t *service_returned;/* [ref] */
|
||||
const char **group_name;/* [charset(UTF16),ref] */
|
||||
uint32_t *resume_handle;/* [unique] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct EnumServicesStatusExW {
|
||||
struct {
|
||||
struct policy_handle *scmanager;/* [ref] */
|
||||
uint32_t info_level;
|
||||
uint32_t type;
|
||||
enum svcctl_ServiceState state;
|
||||
uint32_t offered;/* [range(0,0x40000)] */
|
||||
const char *group_name;/* [charset(UTF16),unique] */
|
||||
uint32_t *resume_handle;/* [range(0,0x40000),unique] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
uint8_t *services;/* [ref,size_is(offered)] */
|
||||
uint32_t *needed;/* [range(0,0x40000),ref] */
|
||||
uint32_t *service_returned;/* [range(0,0x40000),ref] */
|
||||
uint32_t *resume_handle;/* [range(0,0x40000),unique] */
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct svcctl_SCSendTSMessage {
|
||||
struct {
|
||||
WERROR result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
#endif /* _HEADER_svcctl */
|
||||
#endif /* _PIDL_HEADER_svcctl */
|
||||
@ -0,0 +1,70 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
database wrap headers
|
||||
|
||||
Copyright (C) Andrew Tridgell 2004
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _LDB_WRAP_H_
|
||||
#define _LDB_WRAP_H_
|
||||
|
||||
#include <talloc.h>
|
||||
|
||||
struct auth_session_info;
|
||||
struct ldb_message;
|
||||
struct ldb_dn;
|
||||
struct cli_credentials;
|
||||
struct loadparm_context;
|
||||
struct tevent_context;
|
||||
|
||||
char *wrap_casefold(void *context, void *mem_ctx, const char *s, size_t n);
|
||||
|
||||
struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct loadparm_context *lp_ctx,
|
||||
const char *url,
|
||||
struct auth_session_info *session_info,
|
||||
struct cli_credentials *credentials,
|
||||
unsigned int flags);
|
||||
|
||||
void ldb_wrap_fork_hook(void);
|
||||
|
||||
struct ldb_context *samba_ldb_init(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct auth_session_info *session_info,
|
||||
struct cli_credentials *credentials);
|
||||
struct ldb_context *ldb_wrap_find(const char *url,
|
||||
struct tevent_context *ev,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct auth_session_info *session_info,
|
||||
struct cli_credentials *credentials,
|
||||
unsigned int flags);
|
||||
bool ldb_wrap_add(const char *url, struct tevent_context *ev,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct auth_session_info *session_info,
|
||||
struct cli_credentials *credentials,
|
||||
unsigned int flags,
|
||||
struct ldb_context *ldb);
|
||||
char *ldb_relative_path(struct ldb_context *ldb,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const char *name);
|
||||
|
||||
int samba_ldb_connect(struct ldb_context *ldb, struct loadparm_context *lp_ctx,
|
||||
const char *url, unsigned int flags);
|
||||
|
||||
#endif /* _LDB_WRAP_H_ */
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,96 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
uid/user handling
|
||||
Copyright (C) Andrew Tridgell 1992-1998
|
||||
Copyright (C) Gerald (Jerry) Carter 2003
|
||||
Copyright (C) Volker Lendecke 2005
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _PASSDB_LOOKUP_SID_H_
|
||||
#define _PASSDB_LOOKUP_SID_H_
|
||||
|
||||
#include <gen_ndr/lsa.h>
|
||||
|
||||
struct passwd;
|
||||
struct unixid;
|
||||
|
||||
#define LOOKUP_NAME_NONE 0x00000000
|
||||
#define LOOKUP_NAME_ISOLATED 0x00000001 /* Look up unqualified names */
|
||||
#define LOOKUP_NAME_REMOTE 0x00000002 /* Ask others */
|
||||
#define LOOKUP_NAME_GROUP 0x00000004 /* This is a NASTY hack for
|
||||
valid users = @foo where foo also
|
||||
exists in as user. */
|
||||
#define LOOKUP_NAME_NO_NSS 0x00000008 /* no NSS calls to avoid
|
||||
winbind recursions */
|
||||
#define LOOKUP_NAME_BUILTIN 0x00000010 /* builtin names */
|
||||
#define LOOKUP_NAME_WKN 0x00000020 /* well known names */
|
||||
#define LOOKUP_NAME_DOMAIN 0x00000040 /* only lookup own domain */
|
||||
#define LOOKUP_NAME_LOCAL (LOOKUP_NAME_ISOLATED\
|
||||
|LOOKUP_NAME_BUILTIN\
|
||||
|LOOKUP_NAME_WKN\
|
||||
|LOOKUP_NAME_DOMAIN)
|
||||
#define LOOKUP_NAME_ALL (LOOKUP_NAME_ISOLATED\
|
||||
|LOOKUP_NAME_REMOTE\
|
||||
|LOOKUP_NAME_BUILTIN\
|
||||
|LOOKUP_NAME_WKN\
|
||||
|LOOKUP_NAME_DOMAIN)
|
||||
|
||||
struct lsa_dom_info {
|
||||
bool valid;
|
||||
struct dom_sid sid;
|
||||
const char *name;
|
||||
int num_idxs;
|
||||
int *idxs;
|
||||
};
|
||||
|
||||
struct lsa_name_info {
|
||||
uint32_t rid;
|
||||
enum lsa_SidType type;
|
||||
const char *name;
|
||||
int dom_idx;
|
||||
};
|
||||
|
||||
/* The following definitions come from passdb/lookup_sid.c */
|
||||
|
||||
bool lookup_name(TALLOC_CTX *mem_ctx,
|
||||
const char *full_name, int flags,
|
||||
const char **ret_domain, const char **ret_name,
|
||||
struct dom_sid *ret_sid, enum lsa_SidType *ret_type);
|
||||
bool lookup_name_smbconf(TALLOC_CTX *mem_ctx,
|
||||
const char *full_name, int flags,
|
||||
const char **ret_domain, const char **ret_name,
|
||||
struct dom_sid *ret_sid, enum lsa_SidType *ret_type);
|
||||
NTSTATUS lookup_sids(TALLOC_CTX *mem_ctx, int num_sids,
|
||||
const struct dom_sid **sids, int level,
|
||||
struct lsa_dom_info **ret_domains,
|
||||
struct lsa_name_info **ret_names);
|
||||
bool lookup_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
|
||||
const char **ret_domain, const char **ret_name,
|
||||
enum lsa_SidType *ret_type);
|
||||
void uid_to_sid(struct dom_sid *psid, uid_t uid);
|
||||
void gid_to_sid(struct dom_sid *psid, gid_t gid);
|
||||
void xid_to_sid(struct dom_sid *psid, const struct unixid *xid);
|
||||
bool sid_to_uid(const struct dom_sid *psid, uid_t *puid);
|
||||
bool sid_to_gid(const struct dom_sid *psid, gid_t *pgid);
|
||||
bool sids_to_unixids(const struct dom_sid *sids, uint32_t num_sids,
|
||||
struct unixid *ids);
|
||||
NTSTATUS get_primary_group_sid(TALLOC_CTX *mem_ctx,
|
||||
const char *username,
|
||||
struct passwd **_pwd,
|
||||
struct dom_sid **_group_sid);
|
||||
|
||||
#endif /* _PASSDB_LOOKUP_SID_H_ */
|
||||
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Unix SMB/CIFS implementation.
|
||||
* Password and authentication handling
|
||||
* Copyright (C) Jeremy Allison 1996-2002
|
||||
* Copyright (C) Andrew Tridgell 2002
|
||||
* Copyright (C) Gerald (Jerry) Carter 2000
|
||||
* Copyright (C) Stefan (metze) Metzmacher 2002
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* The following definitions come from passdb/machine_sid.c */
|
||||
|
||||
#ifndef _PASSDB_MACHINE_SID_H_
|
||||
#define _PASSDB_MACHINE_SID_H_
|
||||
|
||||
struct dom_sid *get_global_sam_sid(void);
|
||||
void reset_global_sam_sid(void) ;
|
||||
bool sid_check_is_our_sam(const struct dom_sid *sid);
|
||||
bool sid_check_is_in_our_sam(const struct dom_sid *sid);
|
||||
|
||||
#endif /* _PASSDB_MACHINE_SID_H_ */
|
||||
@ -0,0 +1,838 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
rpc interface definitions
|
||||
|
||||
Copyright (C) Andrew Tridgell 2003
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* This is a public header file that is installed as part of Samba.
|
||||
* If you remove any functions or change their signature, update
|
||||
* the so version number. */
|
||||
|
||||
#ifndef __LIBNDR_H__
|
||||
#define __LIBNDR_H__
|
||||
|
||||
#include <talloc.h>
|
||||
#include <util/discard.h>
|
||||
#include <util/data_blob.h>
|
||||
#include <util/time.h>
|
||||
#include <charset.h>
|
||||
|
||||
/*
|
||||
this provides definitions for the libcli/rpc/ MSRPC library
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
We store the token mapping in an array that is resized as necessary.
|
||||
*/
|
||||
struct ndr_token;
|
||||
|
||||
struct ndr_token_list {
|
||||
struct ndr_token *tokens;
|
||||
uint32_t count;
|
||||
};
|
||||
|
||||
struct ndr_compression_state;
|
||||
|
||||
/* this is the base structure passed to routines that
|
||||
parse MSRPC formatted data
|
||||
|
||||
note that in Samba4 we use separate routines and structures for
|
||||
MSRPC marshalling and unmarshalling. Also note that these routines
|
||||
are being kept deliberately very simple, and are not tied to a
|
||||
particular transport
|
||||
*/
|
||||
struct ndr_pull {
|
||||
uint32_t flags; /* LIBNDR_FLAG_* */
|
||||
uint8_t *data;
|
||||
uint32_t data_size;
|
||||
uint32_t offset;
|
||||
|
||||
uint32_t relative_highest_offset;
|
||||
uint32_t relative_base_offset;
|
||||
uint32_t relative_rap_convert;
|
||||
struct ndr_token_list relative_base_list;
|
||||
|
||||
struct ndr_token_list relative_list;
|
||||
struct ndr_token_list array_size_list;
|
||||
struct ndr_token_list array_length_list;
|
||||
struct ndr_token_list switch_list;
|
||||
|
||||
struct ndr_compression_state *cstate;
|
||||
|
||||
TALLOC_CTX *current_mem_ctx;
|
||||
|
||||
/* this is used to ensure we generate unique reference IDs
|
||||
between request and reply */
|
||||
uint32_t ptr_count;
|
||||
uint32_t recursion_depth;
|
||||
/*
|
||||
* The global maximum depth for recursion. When set it overrides the
|
||||
* value supplied by the max_recursion idl attribute. This is needed
|
||||
* for fuzzing as ASAN uses a low threshold for stack depth to check
|
||||
* for stack overflow.
|
||||
*/
|
||||
uint32_t global_max_recursion;
|
||||
};
|
||||
|
||||
/* structure passed to functions that generate NDR formatted data */
|
||||
struct ndr_push {
|
||||
uint32_t flags; /* LIBNDR_FLAG_* */
|
||||
uint8_t *data;
|
||||
uint32_t alloc_size;
|
||||
uint32_t offset;
|
||||
bool fixed_buf_size;
|
||||
|
||||
uint32_t relative_base_offset;
|
||||
uint32_t relative_end_offset;
|
||||
struct ndr_token_list relative_base_list;
|
||||
|
||||
struct ndr_token_list switch_list;
|
||||
struct ndr_token_list relative_list;
|
||||
struct ndr_token_list relative_begin_list;
|
||||
struct ndr_token_list nbt_string_list;
|
||||
struct ndr_token_list dns_string_list;
|
||||
struct ndr_token_list full_ptr_list;
|
||||
|
||||
struct ndr_compression_state *cstate;
|
||||
|
||||
/* this is used to ensure we generate unique reference IDs */
|
||||
uint32_t ptr_count;
|
||||
};
|
||||
|
||||
/* structure passed to functions that print IDL structures */
|
||||
struct ndr_print {
|
||||
uint32_t flags; /* LIBNDR_FLAG_* */
|
||||
uint32_t depth;
|
||||
struct ndr_token_list switch_list;
|
||||
void (*print)(struct ndr_print *, const char *, ...) PRINTF_ATTRIBUTE(2,3);
|
||||
void *private_data;
|
||||
bool no_newline;
|
||||
bool print_secrets;
|
||||
};
|
||||
|
||||
#define LIBNDR_FLAG_BIGENDIAN (1U<<0)
|
||||
#define LIBNDR_FLAG_NOALIGN (1U<<1)
|
||||
|
||||
#define LIBNDR_FLAG_STR_ASCII (1U<<2)
|
||||
#define LIBNDR_FLAG_STR_LEN4 (1U<<3)
|
||||
#define LIBNDR_FLAG_STR_SIZE4 (1U<<4)
|
||||
#define LIBNDR_FLAG_STR_NOTERM (1U<<5)
|
||||
#define LIBNDR_FLAG_STR_NULLTERM (1U<<6)
|
||||
#define LIBNDR_FLAG_STR_SIZE2 (1U<<7)
|
||||
#define LIBNDR_FLAG_STR_BYTESIZE (1U<<8)
|
||||
#define LIBNDR_FLAG_STR_CONFORMANT (1U<<10)
|
||||
#define LIBNDR_FLAG_STR_CHARLEN (1U<<11)
|
||||
#define LIBNDR_FLAG_STR_UTF8 (1U<<12)
|
||||
#define LIBNDR_FLAG_STR_RAW8 (1U<<13)
|
||||
#define LIBNDR_STRING_FLAGS (0U | \
|
||||
LIBNDR_FLAG_STR_ASCII | \
|
||||
LIBNDR_FLAG_STR_LEN4 | \
|
||||
LIBNDR_FLAG_STR_SIZE4 | \
|
||||
LIBNDR_FLAG_STR_NOTERM | \
|
||||
LIBNDR_FLAG_STR_NULLTERM | \
|
||||
LIBNDR_FLAG_STR_SIZE2 | \
|
||||
LIBNDR_FLAG_STR_BYTESIZE | \
|
||||
LIBNDR_FLAG_STR_CONFORMANT | \
|
||||
LIBNDR_FLAG_STR_CHARLEN | \
|
||||
LIBNDR_FLAG_STR_UTF8 | \
|
||||
LIBNDR_FLAG_STR_RAW8 | \
|
||||
0)
|
||||
|
||||
/*
|
||||
* Mark an element as SECRET, it won't be printed by
|
||||
* via ndr_print* unless NDR_PRINT_SECRETS is specified.
|
||||
*/
|
||||
#define LIBNDR_FLAG_IS_SECRET (1U<<14)
|
||||
|
||||
/* Disable string token compression */
|
||||
#define LIBNDR_FLAG_NO_COMPRESSION (1U<<15)
|
||||
|
||||
/*
|
||||
* don't debug NDR_ERR_BUFSIZE failures,
|
||||
* as the available buffer might be incomplete.
|
||||
*
|
||||
* return NDR_ERR_INCOMPLETE_BUFFER instead.
|
||||
*/
|
||||
#define LIBNDR_FLAG_INCOMPLETE_BUFFER (1U<<16)
|
||||
|
||||
/*
|
||||
* This lets ndr_pull_subcontext_end() return
|
||||
* NDR_ERR_UNREAD_BYTES.
|
||||
*/
|
||||
#define LIBNDR_FLAG_SUBCONTEXT_NO_UNREAD_BYTES (1U<<17)
|
||||
|
||||
/* set if relative pointers should *not* be marshalled in reverse order */
|
||||
#define LIBNDR_FLAG_NO_RELATIVE_REVERSE (1U<<18)
|
||||
|
||||
/* set if relative pointers are marshalled in reverse order */
|
||||
#define LIBNDR_FLAG_RELATIVE_REVERSE (1U<<19)
|
||||
|
||||
#define LIBNDR_FLAG_REF_ALLOC (1U<<20)
|
||||
#define LIBNDR_FLAG_REMAINING (1U<<21)
|
||||
#define LIBNDR_FLAG_ALIGN2 (1U<<22)
|
||||
#define LIBNDR_FLAG_ALIGN4 (1U<<23)
|
||||
#define LIBNDR_FLAG_ALIGN8 (1U<<24)
|
||||
|
||||
#define LIBNDR_ALIGN_FLAGS ( 0 | \
|
||||
LIBNDR_FLAG_NOALIGN | \
|
||||
LIBNDR_FLAG_REMAINING | \
|
||||
LIBNDR_FLAG_ALIGN2 | \
|
||||
LIBNDR_FLAG_ALIGN4 | \
|
||||
LIBNDR_FLAG_ALIGN8 | \
|
||||
0)
|
||||
|
||||
#define LIBNDR_PRINT_ARRAY_HEX (1U<<25)
|
||||
#define LIBNDR_PRINT_SET_VALUES (1U<<26)
|
||||
|
||||
/* used to force a section of IDL to be little-endian */
|
||||
#define LIBNDR_FLAG_LITTLE_ENDIAN (1U<<27)
|
||||
|
||||
/* used to check if alignment padding is zero */
|
||||
#define LIBNDR_FLAG_PAD_CHECK (1U<<28)
|
||||
|
||||
#define LIBNDR_FLAG_NDR64 (1U<<29)
|
||||
|
||||
/* set if an object uuid will be present */
|
||||
#define LIBNDR_FLAG_OBJECT_PRESENT (1U<<30)
|
||||
|
||||
/* set to avoid recursion in ndr_size_*() calculation */
|
||||
#define LIBNDR_FLAG_NO_NDR_SIZE (1U<<31)
|
||||
|
||||
/* useful macro for debugging */
|
||||
#define NDR_PRINT_DEBUG(type, p) ndr_print_debug((ndr_print_fn_t)ndr_print_ ##type, #p, p)
|
||||
#define NDR_PRINT_DEBUGC(dbgc_class, type, p) ndr_print_debugc(dbgc_class, (ndr_print_fn_t)ndr_print_ ##type, #p, p)
|
||||
#define NDR_PRINT_UNION_DEBUG(type, level, p) ndr_print_union_debug((ndr_print_fn_t)ndr_print_ ##type, #p, level, p)
|
||||
#define NDR_PRINT_FUNCTION_DEBUG(type, flags, p) ndr_print_function_debug((ndr_print_function_t)ndr_print_ ##type, #type, flags, p)
|
||||
#define NDR_PRINT_BOTH_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_BOTH, p)
|
||||
#define NDR_PRINT_OUT_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_OUT, p)
|
||||
#define NDR_PRINT_IN_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_IN | NDR_SET_VALUES, p)
|
||||
|
||||
/* useful macro for debugging in strings */
|
||||
#define NDR_PRINT_STRUCT_STRING(ctx, type, p) ndr_print_struct_string(ctx, (ndr_print_fn_t)ndr_print_ ##type, #p, p)
|
||||
#define NDR_PRINT_UNION_STRING(ctx, type, level, p) ndr_print_union_string(ctx, (ndr_print_fn_t)ndr_print_ ##type, #p, level, p)
|
||||
#define NDR_PRINT_FUNCTION_STRING(ctx, type, flags, p) ndr_print_function_string(ctx, (ndr_print_function_t)ndr_print_ ##type, #type, flags, p)
|
||||
#define NDR_PRINT_BOTH_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_BOTH, p)
|
||||
#define NDR_PRINT_OUT_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_OUT, p)
|
||||
#define NDR_PRINT_IN_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_IN | NDR_SET_VALUES, p)
|
||||
|
||||
#define NDR_HIDE_SECRET(ndr) \
|
||||
(unlikely(((ndr)->flags & LIBNDR_FLAG_IS_SECRET) && !(ndr)->print_secrets))
|
||||
|
||||
#define NDR_BE(ndr) (unlikely(((ndr)->flags & (LIBNDR_FLAG_BIGENDIAN|LIBNDR_FLAG_LITTLE_ENDIAN)) == LIBNDR_FLAG_BIGENDIAN))
|
||||
|
||||
enum ndr_err_code {
|
||||
NDR_ERR_SUCCESS = 0,
|
||||
NDR_ERR_ARRAY_SIZE,
|
||||
NDR_ERR_BAD_SWITCH,
|
||||
NDR_ERR_OFFSET,
|
||||
NDR_ERR_RELATIVE,
|
||||
NDR_ERR_CHARCNV,
|
||||
NDR_ERR_LENGTH,
|
||||
NDR_ERR_SUBCONTEXT,
|
||||
NDR_ERR_COMPRESSION,
|
||||
NDR_ERR_STRING,
|
||||
NDR_ERR_VALIDATE,
|
||||
NDR_ERR_BUFSIZE,
|
||||
NDR_ERR_ALLOC,
|
||||
NDR_ERR_RANGE,
|
||||
NDR_ERR_TOKEN,
|
||||
NDR_ERR_IPV4ADDRESS,
|
||||
NDR_ERR_IPV6ADDRESS,
|
||||
NDR_ERR_INVALID_POINTER,
|
||||
NDR_ERR_UNREAD_BYTES,
|
||||
NDR_ERR_NDR64,
|
||||
NDR_ERR_FLAGS,
|
||||
NDR_ERR_INCOMPLETE_BUFFER,
|
||||
NDR_ERR_MAX_RECURSION_EXCEEDED,
|
||||
NDR_ERR_UNDERFLOW
|
||||
};
|
||||
|
||||
#define NDR_ERR_CODE_IS_SUCCESS(x) (x == NDR_ERR_SUCCESS)
|
||||
|
||||
#define NDR_ERR_HAVE_NO_MEMORY(x) do { \
|
||||
if (NULL == (x)) { \
|
||||
return NDR_ERR_ALLOC; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
enum ndr_compression_alg {
|
||||
NDR_COMPRESSION_MSZIP_CAB = 1,
|
||||
NDR_COMPRESSION_MSZIP = 2,
|
||||
NDR_COMPRESSION_XPRESS = 3
|
||||
};
|
||||
|
||||
/*
|
||||
flags passed to control parse flow
|
||||
These are deliberately in a different range to the NDR_IN/NDR_OUT
|
||||
flags to catch mixups
|
||||
*/
|
||||
#define NDR_SCALARS 0x100
|
||||
#define NDR_BUFFERS 0x200
|
||||
|
||||
/*
|
||||
flags passed to ndr_print_*() and ndr pull/push for functions
|
||||
These are deliberately in a different range to the NDR_SCALARS/NDR_BUFFERS
|
||||
flags to catch mixups
|
||||
*/
|
||||
#define NDR_IN 0x10
|
||||
#define NDR_OUT 0x20
|
||||
#define NDR_BOTH 0x30
|
||||
#define NDR_SET_VALUES 0x40
|
||||
|
||||
|
||||
#define NDR_PULL_CHECK_FLAGS(ndr, ndr_flags) do { \
|
||||
if ((ndr_flags) & ~(NDR_SCALARS|NDR_BUFFERS)) { \
|
||||
return ndr_pull_error(ndr, NDR_ERR_FLAGS, "Invalid pull struct ndr_flags 0x%x", ndr_flags); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags) do { \
|
||||
if ((ndr_flags) & ~(NDR_SCALARS|NDR_BUFFERS)) \
|
||||
return ndr_push_error(ndr, NDR_ERR_FLAGS, "Invalid push struct ndr_flags 0x%x", ndr_flags); \
|
||||
} while (0)
|
||||
|
||||
#define NDR_PULL_CHECK_FN_FLAGS(ndr, flags) do { \
|
||||
if ((flags) & ~(NDR_BOTH|NDR_SET_VALUES)) { \
|
||||
return ndr_pull_error(ndr, NDR_ERR_FLAGS, "Invalid fn pull flags 0x%x", flags); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define NDR_PUSH_CHECK_FN_FLAGS(ndr, flags) do { \
|
||||
if ((flags) & ~(NDR_BOTH|NDR_SET_VALUES)) \
|
||||
return ndr_push_error(ndr, NDR_ERR_FLAGS, "Invalid fn push flags 0x%x", flags); \
|
||||
} while (0)
|
||||
|
||||
#define NDR_PULL_NEED_BYTES(ndr, n) do { \
|
||||
if (unlikely(\
|
||||
(n) > ndr->data_size || \
|
||||
ndr->offset + (n) > ndr->data_size || \
|
||||
ndr->offset + (n) < ndr->offset)) { \
|
||||
if (ndr->flags & LIBNDR_FLAG_INCOMPLETE_BUFFER) { \
|
||||
uint32_t _available = ndr->data_size - ndr->offset; \
|
||||
uint32_t _missing = n - _available; \
|
||||
ndr->relative_highest_offset = _missing; \
|
||||
} \
|
||||
return ndr_pull_error(ndr, NDR_ERR_BUFSIZE, "Pull bytes %u (%s)", (unsigned)n, __location__); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define NDR_ALIGN(ndr, n) ndr_align_size(ndr->offset, n)
|
||||
|
||||
#define NDR_ROUND(size, n) (((size)+((n)-1)) & ~((n)-1))
|
||||
|
||||
#define NDR_PULL_ALIGN(ndr, n) do { \
|
||||
if (unlikely(!(ndr->flags & LIBNDR_FLAG_NOALIGN))) { \
|
||||
if (unlikely(ndr->flags & LIBNDR_FLAG_PAD_CHECK)) { \
|
||||
ndr_check_padding(ndr, n); \
|
||||
} \
|
||||
if(unlikely( \
|
||||
((ndr->offset + (n-1)) & (~(n-1))) < ndr->offset)) {\
|
||||
return ndr_pull_error( \
|
||||
ndr, \
|
||||
NDR_ERR_BUFSIZE, \
|
||||
"Pull align (overflow) %u", (unsigned)n); \
|
||||
} \
|
||||
ndr->offset = (ndr->offset + (n-1)) & ~(n-1); \
|
||||
} \
|
||||
if (unlikely(ndr->offset > ndr->data_size)) { \
|
||||
if (ndr->flags & LIBNDR_FLAG_INCOMPLETE_BUFFER) { \
|
||||
uint32_t _missing = ndr->offset - ndr->data_size; \
|
||||
ndr->relative_highest_offset = _missing; \
|
||||
} \
|
||||
return ndr_pull_error(ndr, NDR_ERR_BUFSIZE, "Pull align %u", (unsigned)n); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define NDR_PUSH_NEED_BYTES(ndr, n) NDR_CHECK(ndr_push_expand(ndr, n))
|
||||
|
||||
#define NDR_PUSH_ALIGN(ndr, n) do { \
|
||||
if (likely(!(ndr->flags & LIBNDR_FLAG_NOALIGN))) { \
|
||||
uint32_t _pad = ((ndr->offset + (n-1)) & ~(n-1)) - ndr->offset; \
|
||||
while (_pad--) NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0)); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define NDR_RECURSION_CHECK(ndr, d) do { \
|
||||
uint32_t _ndr_min_ = (d); \
|
||||
if (ndr->global_max_recursion && ndr->global_max_recursion < (d)) { \
|
||||
_ndr_min_ = ndr->global_max_recursion; \
|
||||
} \
|
||||
ndr->recursion_depth++; \
|
||||
if (unlikely(ndr->recursion_depth > _ndr_min_)) { \
|
||||
return ndr_pull_error( \
|
||||
ndr, \
|
||||
NDR_ERR_MAX_RECURSION_EXCEEDED, \
|
||||
"Depth of recursion exceeds (%u)", \
|
||||
(unsigned) d); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define NDR_RECURSION_UNWIND(ndr) do { \
|
||||
if (unlikely(ndr->recursion_depth == 0)) { \
|
||||
return ndr_pull_error( \
|
||||
ndr, \
|
||||
NDR_ERR_UNDERFLOW, \
|
||||
"ndr_pull.recursion_depth is 0"); \
|
||||
} \
|
||||
ndr->recursion_depth--; \
|
||||
} while (0)
|
||||
|
||||
/* these are used to make the error checking on each element in libndr
|
||||
less tedious, hopefully making the code more readable */
|
||||
#define NDR_CHECK(call) do { \
|
||||
enum ndr_err_code _status; \
|
||||
_status = call; \
|
||||
if (unlikely(!NDR_ERR_CODE_IS_SUCCESS(_status))) { \
|
||||
return _status; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* if the call fails then free the ndr pointer */
|
||||
#define NDR_CHECK_FREE(call) do { \
|
||||
enum ndr_err_code _status; \
|
||||
_status = call; \
|
||||
if (unlikely(!NDR_ERR_CODE_IS_SUCCESS(_status))) { \
|
||||
talloc_free(ndr); \
|
||||
return _status; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define NDR_PULL_GET_MEM_CTX(ndr) (ndr->current_mem_ctx)
|
||||
|
||||
#define NDR_PULL_SET_MEM_CTX(ndr, mem_ctx, flgs) do {\
|
||||
if ( (flgs == 0) || (ndr->flags & flgs) ) {\
|
||||
if (!(mem_ctx)) {\
|
||||
return ndr_pull_error(ndr, NDR_ERR_ALLOC, "NDR_PULL_SET_MEM_CTX(NULL): %s\n", __location__); \
|
||||
}\
|
||||
ndr->current_mem_ctx = discard_const(mem_ctx);\
|
||||
}\
|
||||
} while(0)
|
||||
|
||||
#define _NDR_PULL_FIX_CURRENT_MEM_CTX(ndr) do {\
|
||||
if (!ndr->current_mem_ctx) {\
|
||||
ndr->current_mem_ctx = talloc_new(ndr);\
|
||||
if (!ndr->current_mem_ctx) {\
|
||||
return ndr_pull_error(ndr, NDR_ERR_ALLOC, "_NDR_PULL_FIX_CURRENT_MEM_CTX() failed: %s\n", __location__); \
|
||||
}\
|
||||
}\
|
||||
} while(0)
|
||||
|
||||
#define NDR_PULL_ALLOC(ndr, s) do { \
|
||||
_NDR_PULL_FIX_CURRENT_MEM_CTX(ndr);\
|
||||
(s) = talloc_ptrtype(ndr->current_mem_ctx, (s)); \
|
||||
if (unlikely(!(s))) return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Alloc %s failed: %s\n", # s, __location__); \
|
||||
} while (0)
|
||||
|
||||
#define NDR_PULL_ALLOC_N(ndr, s, n) do { \
|
||||
_NDR_PULL_FIX_CURRENT_MEM_CTX(ndr);\
|
||||
(s) = talloc_array_ptrtype(ndr->current_mem_ctx, (s), n); \
|
||||
if (unlikely(!(s))) return ndr_pull_error(ndr, NDR_ERR_ALLOC, "Alloc %u * %s failed: %s\n", (unsigned)n, # s, __location__); \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define NDR_PUSH_ALLOC_SIZE(ndr, s, size) do { \
|
||||
(s) = talloc_array(ndr, uint8_t, size); \
|
||||
if (unlikely(!(s))) return ndr_push_error(ndr, NDR_ERR_ALLOC, "push alloc %u failed: %s\n", (unsigned)size, __location__); \
|
||||
} while (0)
|
||||
|
||||
#define NDR_PUSH_ALLOC(ndr, s) do { \
|
||||
(s) = talloc_ptrtype(ndr, (s)); \
|
||||
if (unlikely(!(s))) return ndr_push_error(ndr, NDR_ERR_ALLOC, "push alloc %s failed: %s\n", # s, __location__); \
|
||||
} while (0)
|
||||
|
||||
#define NDR_ZERO_STRUCT(x) ndr_zero_memory(&(x), sizeof(x))
|
||||
#define NDR_ZERO_STRUCTP(x) do { \
|
||||
if ((x) != NULL) { \
|
||||
ndr_zero_memory((x), sizeof(*(x))); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
/* these are used when generic fn pointers are needed for ndr push/pull fns */
|
||||
typedef enum ndr_err_code (*ndr_push_flags_fn_t)(struct ndr_push *, int ndr_flags, const void *);
|
||||
typedef enum ndr_err_code (*ndr_pull_flags_fn_t)(struct ndr_pull *, int ndr_flags, void *);
|
||||
typedef void (*ndr_print_fn_t)(struct ndr_print *, const char *, const void *);
|
||||
typedef void (*ndr_print_function_t)(struct ndr_print *, const char *, int, const void *);
|
||||
|
||||
#include <core/error.h>
|
||||
#include <gen_ndr/misc.h>
|
||||
|
||||
extern const struct ndr_syntax_id ndr_transfer_syntax_ndr;
|
||||
extern const struct ndr_syntax_id ndr_transfer_syntax_ndr64;
|
||||
extern const struct ndr_syntax_id ndr_syntax_id_null;
|
||||
|
||||
struct ndr_interface_call_pipe {
|
||||
const char *name;
|
||||
const char *chunk_struct_name;
|
||||
size_t chunk_struct_size;
|
||||
ndr_push_flags_fn_t ndr_push;
|
||||
ndr_pull_flags_fn_t ndr_pull;
|
||||
ndr_print_fn_t ndr_print;
|
||||
};
|
||||
|
||||
struct ndr_interface_call_pipes {
|
||||
uint32_t num_pipes;
|
||||
const struct ndr_interface_call_pipe *pipes;
|
||||
};
|
||||
|
||||
struct ndr_interface_call {
|
||||
const char *name;
|
||||
size_t struct_size;
|
||||
ndr_push_flags_fn_t ndr_push;
|
||||
ndr_pull_flags_fn_t ndr_pull;
|
||||
ndr_print_function_t ndr_print;
|
||||
struct ndr_interface_call_pipes in_pipes;
|
||||
struct ndr_interface_call_pipes out_pipes;
|
||||
};
|
||||
|
||||
struct ndr_interface_public_struct {
|
||||
const char *name;
|
||||
size_t struct_size;
|
||||
ndr_push_flags_fn_t ndr_push;
|
||||
ndr_pull_flags_fn_t ndr_pull;
|
||||
ndr_print_function_t ndr_print;
|
||||
};
|
||||
|
||||
struct ndr_interface_string_array {
|
||||
uint32_t count;
|
||||
const char * const *names;
|
||||
};
|
||||
|
||||
struct ndr_interface_table {
|
||||
const char *name;
|
||||
struct ndr_syntax_id syntax_id;
|
||||
const char *helpstring;
|
||||
uint32_t num_calls;
|
||||
const struct ndr_interface_call *calls;
|
||||
uint32_t num_public_structs;
|
||||
const struct ndr_interface_public_struct *public_structs;
|
||||
const struct ndr_interface_string_array *endpoints;
|
||||
const struct ndr_interface_string_array *authservices;
|
||||
};
|
||||
|
||||
struct ndr_interface_list {
|
||||
struct ndr_interface_list *prev, *next;
|
||||
const struct ndr_interface_table *table;
|
||||
};
|
||||
|
||||
struct sockaddr_storage;
|
||||
|
||||
/*********************************************************************
|
||||
Map an NT error code from a NDR error code.
|
||||
*********************************************************************/
|
||||
NTSTATUS ndr_map_error2ntstatus(enum ndr_err_code ndr_err);
|
||||
int ndr_map_error2errno(enum ndr_err_code ndr_err);
|
||||
const char *ndr_map_error2string(enum ndr_err_code ndr_err);
|
||||
#define ndr_errstr ndr_map_error2string
|
||||
|
||||
/* FIXME: Use represent_as instead */
|
||||
struct dom_sid;
|
||||
enum ndr_err_code ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
|
||||
enum ndr_err_code ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
|
||||
void ndr_print_dom_sid2(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
|
||||
enum ndr_err_code ndr_push_dom_sid28(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
|
||||
enum ndr_err_code ndr_pull_dom_sid28(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
|
||||
void ndr_print_dom_sid28(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
|
||||
size_t ndr_size_dom_sid28(const struct dom_sid *sid, int flags);
|
||||
enum ndr_err_code ndr_push_dom_sid0(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
|
||||
enum ndr_err_code ndr_pull_dom_sid0(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
|
||||
void ndr_print_dom_sid0(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
|
||||
size_t ndr_size_dom_sid0(const struct dom_sid *sid, int flags);
|
||||
void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *guid);
|
||||
void ndr_print_sockaddr_storage(struct ndr_print *ndr, const char *name, const struct sockaddr_storage *ss);
|
||||
void ndr_zero_memory(void *ptr, size_t len);
|
||||
bool ndr_syntax_id_equal(const struct ndr_syntax_id *i1, const struct ndr_syntax_id *i2);
|
||||
|
||||
struct ndr_syntax_id_buf { char buf[39 /*GUID*/ + 3 /* "/0x" */ + 8]; };
|
||||
char *ndr_syntax_id_buf_string(
|
||||
const struct ndr_syntax_id *id, struct ndr_syntax_id_buf *buf);
|
||||
char *ndr_syntax_id_to_string(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *id);
|
||||
|
||||
bool ndr_syntax_id_from_string(const char *s, struct ndr_syntax_id *id);
|
||||
enum ndr_err_code ndr_push_struct_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, const void *p, ndr_push_flags_fn_t fn);
|
||||
enum ndr_err_code ndr_push_struct_into_fixed_blob(DATA_BLOB *blob,
|
||||
const void *p,
|
||||
ndr_push_flags_fn_t fn);
|
||||
enum ndr_err_code ndr_push_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p, uint32_t level, ndr_push_flags_fn_t fn);
|
||||
size_t ndr_size_struct(const void *p, int flags, ndr_push_flags_fn_t push);
|
||||
size_t ndr_size_union(const void *p, int flags, uint32_t level, ndr_push_flags_fn_t push);
|
||||
uint32_t ndr_push_get_relative_base_offset(struct ndr_push *ndr);
|
||||
void ndr_push_restore_relative_base_offset(struct ndr_push *ndr, uint32_t offset);
|
||||
enum ndr_err_code ndr_push_setup_relative_base_offset1(struct ndr_push *ndr, const void *p, uint32_t offset);
|
||||
enum ndr_err_code ndr_push_setup_relative_base_offset2(struct ndr_push *ndr, const void *p);
|
||||
enum ndr_err_code ndr_push_relative_ptr1(struct ndr_push *ndr, const void *p);
|
||||
enum ndr_err_code ndr_push_short_relative_ptr1(struct ndr_push *ndr, const void *p);
|
||||
enum ndr_err_code ndr_push_relative_ptr2_start(struct ndr_push *ndr, const void *p);
|
||||
enum ndr_err_code ndr_push_relative_ptr2_end(struct ndr_push *ndr, const void *p);
|
||||
enum ndr_err_code ndr_push_short_relative_ptr2(struct ndr_push *ndr, const void *p);
|
||||
uint32_t ndr_pull_get_relative_base_offset(struct ndr_pull *ndr);
|
||||
void ndr_pull_restore_relative_base_offset(struct ndr_pull *ndr, uint32_t offset);
|
||||
enum ndr_err_code ndr_pull_setup_relative_base_offset1(struct ndr_pull *ndr, const void *p, uint32_t offset);
|
||||
enum ndr_err_code ndr_pull_setup_relative_base_offset2(struct ndr_pull *ndr, const void *p);
|
||||
enum ndr_err_code ndr_pull_relative_ptr1(struct ndr_pull *ndr, const void *p, uint32_t rel_offset);
|
||||
enum ndr_err_code ndr_pull_relative_ptr2(struct ndr_pull *ndr, const void *p);
|
||||
enum ndr_err_code ndr_pull_relative_ptr_short(struct ndr_pull *ndr, uint16_t *v);
|
||||
size_t ndr_align_size(uint32_t offset, size_t n);
|
||||
struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx);
|
||||
enum ndr_err_code ndr_pull_append(struct ndr_pull *ndr, DATA_BLOB *blob);
|
||||
enum ndr_err_code ndr_pull_pop(struct ndr_pull *ndr);
|
||||
enum ndr_err_code ndr_pull_advance(struct ndr_pull *ndr, uint32_t size);
|
||||
struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx);
|
||||
DATA_BLOB ndr_push_blob(struct ndr_push *ndr);
|
||||
enum ndr_err_code ndr_push_expand(struct ndr_push *ndr, uint32_t extra_size);
|
||||
void ndr_print_debug_helper(struct ndr_print *ndr, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
|
||||
void ndr_print_debugc_helper(struct ndr_print *ndr, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
|
||||
void ndr_print_printf_helper(struct ndr_print *ndr, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
|
||||
void ndr_print_string_helper(struct ndr_print *ndr, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
|
||||
void ndr_print_debug(ndr_print_fn_t fn, const char *name, void *ptr);
|
||||
void ndr_print_debugc(int dbgc_class, ndr_print_fn_t fn, const char *name, void *ptr);
|
||||
void ndr_print_union_debug(ndr_print_fn_t fn, const char *name, uint32_t level, void *ptr);
|
||||
void ndr_print_function_debug(ndr_print_function_t fn, const char *name, int flags, void *ptr);
|
||||
char *ndr_print_struct_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, const char *name, void *ptr);
|
||||
char *ndr_print_union_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, const char *name, uint32_t level, void *ptr);
|
||||
char *ndr_print_function_string(TALLOC_CTX *mem_ctx,
|
||||
ndr_print_function_t fn, const char *name,
|
||||
int flags, void *ptr);
|
||||
void ndr_set_flags(uint32_t *pflags, uint32_t new_flags);
|
||||
enum ndr_err_code _ndr_pull_error(struct ndr_pull *ndr,
|
||||
enum ndr_err_code ndr_err,
|
||||
const char *function,
|
||||
const char *location,
|
||||
const char *format, ...) PRINTF_ATTRIBUTE(5,6);
|
||||
#define ndr_pull_error(ndr, ndr_err, ...) \
|
||||
_ndr_pull_error(ndr, \
|
||||
ndr_err, \
|
||||
__FUNCTION__, \
|
||||
__location__, \
|
||||
__VA_ARGS__)
|
||||
enum ndr_err_code _ndr_push_error(struct ndr_push *ndr,
|
||||
enum ndr_err_code ndr_err,
|
||||
const char *function,
|
||||
const char *location,
|
||||
const char *format, ...) PRINTF_ATTRIBUTE(5,6);
|
||||
#define ndr_push_error(ndr, ndr_err, ...) \
|
||||
_ndr_push_error(ndr, \
|
||||
ndr_err, \
|
||||
__FUNCTION__, \
|
||||
__location__, \
|
||||
__VA_ARGS__)
|
||||
enum ndr_err_code ndr_pull_subcontext_start(struct ndr_pull *ndr,
|
||||
struct ndr_pull **_subndr,
|
||||
size_t header_size,
|
||||
ssize_t size_is);
|
||||
enum ndr_err_code ndr_pull_subcontext_end(struct ndr_pull *ndr,
|
||||
struct ndr_pull *subndr,
|
||||
size_t header_size,
|
||||
ssize_t size_is);
|
||||
enum ndr_err_code ndr_push_subcontext_start(struct ndr_push *ndr,
|
||||
struct ndr_push **_subndr,
|
||||
size_t header_size,
|
||||
ssize_t size_is);
|
||||
enum ndr_err_code ndr_push_subcontext_end(struct ndr_push *ndr,
|
||||
struct ndr_push *subndr,
|
||||
size_t header_size,
|
||||
ssize_t size_is);
|
||||
enum ndr_err_code ndr_token_store(TALLOC_CTX *mem_ctx,
|
||||
struct ndr_token_list *list,
|
||||
const void *key,
|
||||
uint32_t value);
|
||||
enum ndr_err_code ndr_token_retrieve_cmp_fn(struct ndr_token_list *list, const void *key, uint32_t *v,
|
||||
int(*_cmp_fn)(const void*,const void*), bool erase);
|
||||
enum ndr_err_code ndr_token_retrieve(struct ndr_token_list *list, const void *key, uint32_t *v);
|
||||
enum ndr_err_code ndr_token_peek(struct ndr_token_list *list, const void *key, uint32_t *v);
|
||||
enum ndr_err_code ndr_pull_array_size(struct ndr_pull *ndr, const void *p);
|
||||
enum ndr_err_code ndr_get_array_size(struct ndr_pull *ndr, const void *p, uint32_t *size);
|
||||
enum ndr_err_code ndr_steal_array_size(struct ndr_pull *ndr, const void *p, uint32_t *size);
|
||||
enum ndr_err_code ndr_check_array_size(struct ndr_pull *ndr, const void *p, uint32_t size);
|
||||
enum ndr_err_code ndr_check_steal_array_size(struct ndr_pull *ndr, const void *p, uint32_t size);
|
||||
enum ndr_err_code ndr_pull_array_length(struct ndr_pull *ndr, const void *p);
|
||||
enum ndr_err_code ndr_get_array_length(struct ndr_pull *ndr, const void *p, uint32_t *length);
|
||||
enum ndr_err_code ndr_steal_array_length(struct ndr_pull *ndr, const void *p, uint32_t *length);
|
||||
enum ndr_err_code ndr_check_array_length(struct ndr_pull *ndr, const void *p, uint32_t length);
|
||||
enum ndr_err_code ndr_check_steal_array_length(struct ndr_pull *ndr, const void *p, uint32_t length);
|
||||
enum ndr_err_code ndr_push_pipe_chunk_trailer(struct ndr_push *ndr, int ndr_flags, uint32_t count);
|
||||
enum ndr_err_code ndr_check_pipe_chunk_trailer(struct ndr_pull *ndr, int ndr_flags, uint32_t count);
|
||||
enum ndr_err_code ndr_push_set_switch_value(struct ndr_push *ndr, const void *p, uint32_t val);
|
||||
enum ndr_err_code ndr_pull_set_switch_value(struct ndr_pull *ndr, const void *p, uint32_t val);
|
||||
enum ndr_err_code ndr_print_set_switch_value(struct ndr_print *ndr, const void *p, uint32_t val);
|
||||
/* retrieve a switch value (for push) and remove it from the list */
|
||||
enum ndr_err_code ndr_push_steal_switch_value(struct ndr_push *ndr,
|
||||
const void *p,
|
||||
uint32_t *v);
|
||||
/* retrieve a switch value and remove it from the list */
|
||||
uint32_t ndr_print_steal_switch_value(struct ndr_print *ndr, const void *p);
|
||||
/* retrieve a switch value and remove it from the list */
|
||||
enum ndr_err_code ndr_pull_steal_switch_value(struct ndr_pull *ndr,
|
||||
const void *p,
|
||||
uint32_t *v);
|
||||
enum ndr_err_code ndr_pull_struct_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p, ndr_pull_flags_fn_t fn);
|
||||
enum ndr_err_code ndr_pull_struct_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p, ndr_pull_flags_fn_t fn);
|
||||
enum ndr_err_code ndr_pull_struct_blob_all_noalloc(const DATA_BLOB *blob,
|
||||
void *p, ndr_pull_flags_fn_t fn);
|
||||
enum ndr_err_code ndr_pull_union_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p, uint32_t level, ndr_pull_flags_fn_t fn);
|
||||
enum ndr_err_code ndr_pull_union_blob_all(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx, void *p, uint32_t level, ndr_pull_flags_fn_t fn);
|
||||
|
||||
/* from libndr_basic.h */
|
||||
#define NDR_SCALAR_PROTO(name, type) \
|
||||
enum ndr_err_code ndr_push_ ## name(struct ndr_push *ndr, int ndr_flags, type v); \
|
||||
enum ndr_err_code ndr_pull_ ## name(struct ndr_pull *ndr, int ndr_flags, type *v); \
|
||||
void ndr_print_ ## name(struct ndr_print *ndr, const char *var_name, type v);
|
||||
|
||||
#define NDR_SCALAR_PTR_PROTO(name, type) \
|
||||
enum ndr_err_code ndr_push_ ## name(struct ndr_push *ndr, int ndr_flags, const type *v); \
|
||||
enum ndr_err_code ndr_pull_ ## name(struct ndr_pull *ndr, int ndr_flags, type **v); \
|
||||
void ndr_print_ ## name(struct ndr_print *ndr, const char *var_name, const type *v);
|
||||
|
||||
#define NDR_BUFFER_PROTO(name, type) \
|
||||
enum ndr_err_code ndr_push_ ## name(struct ndr_push *ndr, int ndr_flags, const type *v); \
|
||||
enum ndr_err_code ndr_pull_ ## name(struct ndr_pull *ndr, int ndr_flags, type *v); \
|
||||
void ndr_print_ ## name(struct ndr_print *ndr, const char *var_name, const type *v);
|
||||
|
||||
NDR_SCALAR_PROTO(uint8, uint8_t)
|
||||
NDR_SCALAR_PROTO(int8, int8_t)
|
||||
NDR_SCALAR_PROTO(uint16, uint16_t)
|
||||
NDR_SCALAR_PROTO(int16, int16_t)
|
||||
NDR_SCALAR_PROTO(uint1632, uint16_t)
|
||||
NDR_SCALAR_PROTO(uint32, uint32_t)
|
||||
NDR_SCALAR_PROTO(uint3264, uint32_t)
|
||||
NDR_SCALAR_PROTO(int32, int32_t)
|
||||
NDR_SCALAR_PROTO(int3264, int32_t)
|
||||
NDR_SCALAR_PROTO(udlong, uint64_t)
|
||||
NDR_SCALAR_PROTO(udlongr, uint64_t)
|
||||
NDR_SCALAR_PROTO(dlong, int64_t)
|
||||
NDR_SCALAR_PROTO(hyper, uint64_t)
|
||||
NDR_SCALAR_PROTO(pointer, void *)
|
||||
NDR_SCALAR_PROTO(time_t, time_t)
|
||||
NDR_SCALAR_PROTO(uid_t, uid_t)
|
||||
NDR_SCALAR_PROTO(gid_t, gid_t)
|
||||
NDR_SCALAR_PROTO(NTSTATUS, NTSTATUS)
|
||||
NDR_SCALAR_PROTO(WERROR, WERROR)
|
||||
NDR_SCALAR_PROTO(HRESULT, HRESULT)
|
||||
NDR_SCALAR_PROTO(NTTIME, NTTIME)
|
||||
NDR_SCALAR_PROTO(NTTIME_1sec, NTTIME)
|
||||
NDR_SCALAR_PROTO(NTTIME_hyper, NTTIME)
|
||||
NDR_SCALAR_PROTO(DATA_BLOB, DATA_BLOB)
|
||||
NDR_SCALAR_PROTO(ipv4address, const char *)
|
||||
NDR_SCALAR_PROTO(ipv6address, const char *)
|
||||
NDR_SCALAR_PROTO(string, const char *)
|
||||
NDR_SCALAR_PROTO(double, double)
|
||||
|
||||
enum ndr_err_code ndr_pull_policy_handle(struct ndr_pull *ndr, int ndr_flags, struct policy_handle *r);
|
||||
enum ndr_err_code ndr_push_policy_handle(struct ndr_push *ndr, int ndr_flags, const struct policy_handle *r);
|
||||
void ndr_print_policy_handle(struct ndr_print *ndr, const char *name, const struct policy_handle *r);
|
||||
bool ndr_policy_handle_empty(const struct policy_handle *h);
|
||||
#define is_valid_policy_hnd(hnd) (!ndr_policy_handle_empty(hnd))
|
||||
bool ndr_policy_handle_equal(const struct policy_handle *hnd1,
|
||||
const struct policy_handle *hnd2);
|
||||
|
||||
void ndr_check_padding(struct ndr_pull *ndr, size_t n);
|
||||
enum ndr_err_code ndr_pull_generic_ptr(struct ndr_pull *ndr, uint32_t *v);
|
||||
enum ndr_err_code ndr_pull_ref_ptr(struct ndr_pull *ndr, uint32_t *v);
|
||||
enum ndr_err_code ndr_pull_bytes(struct ndr_pull *ndr, uint8_t *data, uint32_t n);
|
||||
enum ndr_err_code ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *data, uint32_t n);
|
||||
enum ndr_err_code ndr_push_align(struct ndr_push *ndr, size_t size);
|
||||
enum ndr_err_code ndr_pull_align(struct ndr_pull *ndr, size_t size);
|
||||
enum ndr_err_code ndr_push_union_align(struct ndr_push *ndr, size_t size);
|
||||
enum ndr_err_code ndr_pull_union_align(struct ndr_pull *ndr, size_t size);
|
||||
enum ndr_err_code ndr_push_trailer_align(struct ndr_push *ndr, size_t size);
|
||||
enum ndr_err_code ndr_pull_trailer_align(struct ndr_pull *ndr, size_t size);
|
||||
enum ndr_err_code ndr_push_bytes(struct ndr_push *ndr, const uint8_t *data, uint32_t n);
|
||||
enum ndr_err_code ndr_push_zero(struct ndr_push *ndr, uint32_t n);
|
||||
enum ndr_err_code ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const uint8_t *data, uint32_t n);
|
||||
enum ndr_err_code ndr_push_unique_ptr(struct ndr_push *ndr, const void *p);
|
||||
enum ndr_err_code ndr_push_full_ptr(struct ndr_push *ndr, const void *p);
|
||||
enum ndr_err_code ndr_push_ref_ptr(struct ndr_push *ndr);
|
||||
void ndr_print_struct(struct ndr_print *ndr, const char *name, const char *type);
|
||||
void ndr_print_null(struct ndr_print *ndr);
|
||||
void ndr_print_enum(struct ndr_print *ndr, const char *name, const char *type, const char *val, uint32_t value);
|
||||
void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size, const char *flag_name, uint32_t flag, uint32_t value);
|
||||
void ndr_print_bitmap_flag(struct ndr_print *ndr, size_t size, const char *flag_name, uint32_t flag, uint32_t value);
|
||||
void ndr_print_ptr(struct ndr_print *ndr, const char *name, const void *p);
|
||||
void ndr_print_union(struct ndr_print *ndr, const char *name, int level, const char *type);
|
||||
void ndr_print_bad_level(struct ndr_print *ndr, const char *name, uint16_t level);
|
||||
void ndr_print_array_uint8(struct ndr_print *ndr, const char *name, const uint8_t *data, uint32_t count);
|
||||
uint32_t ndr_size_DATA_BLOB(int ret, const DATA_BLOB *data, int flags);
|
||||
|
||||
/* strings */
|
||||
uint32_t ndr_charset_length(const void *var, charset_t chset);
|
||||
size_t ndr_string_array_size(struct ndr_push *ndr, const char *s);
|
||||
uint32_t ndr_size_string(int ret, const char * const* string, int flags);
|
||||
enum ndr_err_code ndr_pull_string_array(struct ndr_pull *ndr, int ndr_flags, const char ***_a);
|
||||
enum ndr_err_code ndr_push_string_array(struct ndr_push *ndr, int ndr_flags, const char **a);
|
||||
void ndr_print_string_array(struct ndr_print *ndr, const char *name, const char **a);
|
||||
size_t ndr_size_string_array(const char **a, uint32_t count, int flags);
|
||||
uint32_t ndr_string_length(const void *_var, uint32_t element_size);
|
||||
enum ndr_err_code ndr_check_string_terminator(struct ndr_pull *ndr, uint32_t count, uint32_t element_size);
|
||||
enum ndr_err_code ndr_pull_charset(struct ndr_pull *ndr, int ndr_flags, const char **var, uint32_t length, uint8_t byte_mul, charset_t chset);
|
||||
enum ndr_err_code ndr_pull_charset_to_null(struct ndr_pull *ndr, int ndr_flags, const char **var, uint32_t length, uint8_t byte_mul, charset_t chset);
|
||||
enum ndr_err_code ndr_push_charset(struct ndr_push *ndr, int ndr_flags, const char *var, uint32_t length, uint8_t byte_mul, charset_t chset);
|
||||
enum ndr_err_code ndr_push_charset_to_null(struct ndr_push *ndr, int ndr_flags, const char *var, uint32_t length, uint8_t byte_mul, charset_t chset);
|
||||
|
||||
/* GUIDs */
|
||||
bool GUID_equal(const struct GUID *u1, const struct GUID *u2);
|
||||
struct GUID_ndr_buf { uint8_t buf[16]; };
|
||||
NTSTATUS GUID_to_ndr_buf(const struct GUID *guid, struct GUID_ndr_buf *buf);
|
||||
NTSTATUS GUID_to_ndr_blob(const struct GUID *guid, TALLOC_CTX *mem_ctx, DATA_BLOB *b);
|
||||
NTSTATUS GUID_from_ndr_blob(const DATA_BLOB *b, struct GUID *guid);
|
||||
NTSTATUS GUID_from_data_blob(const DATA_BLOB *s, struct GUID *guid);
|
||||
NTSTATUS GUID_from_string(const char *s, struct GUID *guid);
|
||||
struct GUID GUID_zero(void);
|
||||
bool GUID_all_zero(const struct GUID *u);
|
||||
int GUID_compare(const struct GUID *u1, const struct GUID *u2);
|
||||
char *GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid);
|
||||
char *GUID_string2(TALLOC_CTX *mem_ctx, const struct GUID *guid);
|
||||
char *GUID_hexstring(TALLOC_CTX *mem_ctx, const struct GUID *guid);
|
||||
struct GUID GUID_random(void);
|
||||
|
||||
/* Format is "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x" */
|
||||
/* 32 chars + 4 ' ' + \0 + 2 for adding {} */
|
||||
struct GUID_txt_buf { char buf[39]; };
|
||||
_PUBLIC_ char* GUID_buf_string(const struct GUID *guid,
|
||||
struct GUID_txt_buf *dst);
|
||||
|
||||
_PUBLIC_ enum ndr_err_code ndr_pull_enum_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *v);
|
||||
_PUBLIC_ enum ndr_err_code ndr_pull_enum_uint16(struct ndr_pull *ndr, int ndr_flags, uint16_t *v);
|
||||
_PUBLIC_ enum ndr_err_code ndr_pull_enum_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *v);
|
||||
_PUBLIC_ enum ndr_err_code ndr_pull_enum_uint1632(struct ndr_pull *ndr, int ndr_flags, uint16_t *v);
|
||||
_PUBLIC_ enum ndr_err_code ndr_push_enum_uint8(struct ndr_push *ndr, int ndr_flags, uint8_t v);
|
||||
_PUBLIC_ enum ndr_err_code ndr_push_enum_uint16(struct ndr_push *ndr, int ndr_flags, uint16_t v);
|
||||
_PUBLIC_ enum ndr_err_code ndr_push_enum_uint32(struct ndr_push *ndr, int ndr_flags, uint32_t v);
|
||||
_PUBLIC_ enum ndr_err_code ndr_push_enum_uint1632(struct ndr_push *ndr, int ndr_flags, uint16_t v);
|
||||
|
||||
_PUBLIC_ void ndr_print_bool(struct ndr_print *ndr, const char *name, const bool b);
|
||||
|
||||
_PUBLIC_ enum ndr_err_code ndr_push_timespec(struct ndr_push *ndr,
|
||||
int ndr_flags,
|
||||
const struct timespec *t);
|
||||
_PUBLIC_ enum ndr_err_code ndr_pull_timespec(struct ndr_pull *ndr,
|
||||
int ndr_flags,
|
||||
struct timespec *t);
|
||||
_PUBLIC_ void ndr_print_timespec(struct ndr_print *ndr, const char *name,
|
||||
const struct timespec *t);
|
||||
|
||||
_PUBLIC_ enum ndr_err_code ndr_push_timeval(struct ndr_push *ndr,
|
||||
int ndr_flags,
|
||||
const struct timeval *t);
|
||||
_PUBLIC_ enum ndr_err_code ndr_pull_timeval(struct ndr_pull *ndr,
|
||||
int ndr_flags,
|
||||
struct timeval *t);
|
||||
_PUBLIC_ void ndr_print_timeval(struct ndr_print *ndr, const char *name,
|
||||
const struct timeval *t);
|
||||
|
||||
|
||||
|
||||
#endif /* __LIBNDR_H__ */
|
||||
@ -0,0 +1,29 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
Manually parsed structures found in the DCERPC protocol
|
||||
|
||||
Copyright (C) Stefan Metzmacher 2014
|
||||
Copyright (C) Gregor Beck 2014
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
enum ndr_err_code ndr_pop_dcerpc_sec_verification_trailer(
|
||||
struct ndr_pull *ndr, TALLOC_CTX *mem_ctx,
|
||||
struct dcerpc_sec_verification_trailer **_r);
|
||||
|
||||
#ifndef NDR_DCERPC_REQUEST_OBJECT_PRESENT
|
||||
#define NDR_DCERPC_REQUEST_OBJECT_PRESENT (ndr->flags & LIBNDR_FLAG_OBJECT_PRESENT)
|
||||
#endif /* NDR_DCERPC_REQUEST_OBJECT_PRESENT */
|
||||
@ -0,0 +1,23 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
Manually parsed structures found in the DRS protocol
|
||||
|
||||
Copyright (C) Andrew Bartlett <abartlet@samba.org> 2008
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
_PUBLIC_ enum ndr_err_code ndr_pull_trustDomainPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustDomainPasswords *r);
|
||||
_PUBLIC_ void ndr_print_drsuapi_MSPrefixMap_Entry(struct ndr_print *ndr, const char *name, const struct drsuapi_MSPrefixMap_Entry *r);
|
||||
@ -0,0 +1,34 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
routines for printing some linked list structs in DRSUAPI
|
||||
|
||||
Copyright (C) Stefan (metze) Metzmacher 2005-2006
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _LIBRPC_NDR_NDR_DRSUAPI_H
|
||||
#define _LIBRPC_NDR_NDR_DRSUAPI_H
|
||||
|
||||
void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name,
|
||||
const struct drsuapi_DsReplicaObjectListItem *r);
|
||||
|
||||
void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const char *name,
|
||||
const struct drsuapi_DsReplicaObjectListItemEx *r);
|
||||
|
||||
size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(const struct drsuapi_DsReplicaObjectIdentifier3Binary *r, int flags);
|
||||
|
||||
|
||||
#endif /* _LIBRPC_NDR_NDR_DRSUAPI_H */
|
||||
@ -0,0 +1,26 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
routines for marshalling/unmarshalling spoolss subcontext buffer structures
|
||||
|
||||
Copyright (C) Stefan Metzmacher 2005
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include <gen_ndr/ndr_krb5pac.h>
|
||||
|
||||
size_t _ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags);
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
#/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
routines for marshalling/unmarshalling special netlogon types
|
||||
|
||||
Copyright (C) Andrew Tridgell 2005
|
||||
Copyright (C) Andrew Bartlett <abartlet@samba.org> 2008
|
||||
Copyright (C) Guenther Deschner 2011
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* The following definitions come from ../librpc/ndr/ndr_nbt.c */
|
||||
|
||||
#ifndef _LIBRPC_NDR_NDR_NBT_H
|
||||
#define _LIBRPC_NDR_NDR_NBT_H
|
||||
|
||||
#include <gen_ndr/nbt.h>
|
||||
|
||||
NDR_SCALAR_PROTO(nbt_string, const char *)
|
||||
|
||||
enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_REQUEST(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_REQUEST *r);
|
||||
enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_REQUEST(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_REQUEST *r);
|
||||
enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX_with_flags(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_RESPONSE_EX *r);
|
||||
enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_EX_with_flags(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_RESPONSE_EX *r,
|
||||
uint32_t nt_version_flags);
|
||||
enum ndr_err_code ndr_push_netlogon_samlogon_response(struct ndr_push *ndr, int ndr_flags, const struct netlogon_samlogon_response *r);
|
||||
enum ndr_err_code ndr_pull_netlogon_samlogon_response(struct ndr_pull *ndr, int ndr_flags, struct netlogon_samlogon_response *r);
|
||||
void ndr_print_netlogon_samlogon_response(struct ndr_print *ndr, const char *name, struct netlogon_samlogon_response *r);
|
||||
|
||||
#endif /* _LIBRPC_NDR_NDR_NBT_H */
|
||||
@ -0,0 +1,24 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
routines for marshalling/unmarshalling special svcctl types
|
||||
|
||||
Copyright (C) Guenther Deschner 2009
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
_PUBLIC_ enum ndr_err_code ndr_push_ENUM_SERVICE_STATUSW_array(struct ndr_push *ndr, uint32_t count, struct ENUM_SERVICE_STATUSW *r);
|
||||
_PUBLIC_ enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUSW_array(struct ndr_pull *ndr, uint32_t count, struct ENUM_SERVICE_STATUSW *r);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,281 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
Generic parameter parsing interface
|
||||
Copyright (C) Jelmer Vernooij 2005
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _PARAM_H /* _PARAM_H */
|
||||
#define _PARAM_H
|
||||
|
||||
#include <talloc.h>
|
||||
|
||||
struct loadparm_s3_helpers;
|
||||
struct loadparm_substitution;
|
||||
|
||||
struct parmlist_entry;
|
||||
|
||||
struct param_context {
|
||||
struct param_section *sections;
|
||||
};
|
||||
|
||||
struct param_section {
|
||||
const char *name;
|
||||
struct param_section *prev, *next;
|
||||
struct parmlist *parameters;
|
||||
};
|
||||
|
||||
struct param_context;
|
||||
struct smbsrv_connection;
|
||||
|
||||
#define Auto (2)
|
||||
|
||||
struct loadparm_context;
|
||||
struct loadparm_service;
|
||||
struct smbcli_options;
|
||||
struct smbcli_session_options;
|
||||
struct gensec_settings;
|
||||
struct bitmap;
|
||||
struct file_lists;
|
||||
|
||||
#ifdef CONFIG_H_IS_FROM_SAMBA
|
||||
#include "lib/param/param_proto.h"
|
||||
#include "lib/param/param_functions.h"
|
||||
#endif
|
||||
|
||||
const char **lpcfg_interfaces(struct loadparm_context *);
|
||||
const char *lpcfg_realm(struct loadparm_context *);
|
||||
const char *lpcfg_netbios_name(struct loadparm_context *);
|
||||
const char *lpcfg_private_dir(struct loadparm_context *);
|
||||
const char *lpcfg_binddns_dir(struct loadparm_context *);
|
||||
int lpcfg_server_role(struct loadparm_context *);
|
||||
int lpcfg_allow_dns_updates(struct loadparm_context *);
|
||||
|
||||
void reload_charcnv(struct loadparm_context *lp_ctx);
|
||||
|
||||
struct loadparm_service *lpcfg_default_service(struct loadparm_context *lp_ctx);
|
||||
bool lpcfg_autoloaded(struct loadparm_service *, struct loadparm_service *);
|
||||
|
||||
char *lpcfg_tls_keyfile(TALLOC_CTX *mem_ctx, struct loadparm_context *);
|
||||
char *lpcfg_tls_certfile(TALLOC_CTX *mem_ctx, struct loadparm_context *);
|
||||
char *lpcfg_tls_cafile(TALLOC_CTX *mem_ctx, struct loadparm_context *);
|
||||
char *lpcfg_tls_dhpfile(TALLOC_CTX *mem_ctx, struct loadparm_context *);
|
||||
char *lpcfg_tls_crlfile(TALLOC_CTX *mem_ctx, struct loadparm_context *);
|
||||
|
||||
const char *lpcfg_dnsdomain(struct loadparm_context *);
|
||||
|
||||
const char *lpcfg_servicename(const struct loadparm_service *service);
|
||||
|
||||
|
||||
const char *lpcfg_get_parametric(struct loadparm_context *lp_ctx,
|
||||
struct loadparm_service *service,
|
||||
const char *type, const char *option);
|
||||
|
||||
const char *lpcfg_parm_string(struct loadparm_context *lp_ctx,
|
||||
struct loadparm_service *service, const char *type,
|
||||
const char *option);
|
||||
const char **lpcfg_parm_string_list(TALLOC_CTX *mem_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct loadparm_service *service,
|
||||
const char *type,
|
||||
const char *option, const char *separator);
|
||||
int lpcfg_parm_int(struct loadparm_context *lp_ctx,
|
||||
struct loadparm_service *service, const char *type,
|
||||
const char *option, int default_v);
|
||||
int lpcfg_parm_bytes(struct loadparm_context *lp_ctx,
|
||||
struct loadparm_service *service, const char *type,
|
||||
const char *option, int default_v);
|
||||
unsigned long lpcfg_parm_ulong(struct loadparm_context *lp_ctx,
|
||||
struct loadparm_service *service, const char *type,
|
||||
const char *option, unsigned long default_v);
|
||||
unsigned long long lpcfg_parm_ulonglong(struct loadparm_context *lp_ctx,
|
||||
struct loadparm_service *service,
|
||||
const char *type, const char *option,
|
||||
unsigned long long default_v);
|
||||
long lpcfg_parm_long(struct loadparm_context *lp_ctx,
|
||||
struct loadparm_service *service, const char *type,
|
||||
const char *option, long default_v);
|
||||
double lpcfg_parm_double(struct loadparm_context *lp_ctx,
|
||||
struct loadparm_service *service, const char *type,
|
||||
const char *option, double default_v);
|
||||
bool lpcfg_parm_bool(struct loadparm_context *lp_ctx,
|
||||
struct loadparm_service *service, const char *type,
|
||||
const char *option, bool default_v);
|
||||
struct loadparm_service *lpcfg_add_service(struct loadparm_context *lp_ctx,
|
||||
const struct loadparm_service *pservice,
|
||||
const char *name);
|
||||
struct parm_struct *lpcfg_parm_struct(struct loadparm_context *lp_ctx, const char *name);
|
||||
void *lpcfg_parm_ptr(struct loadparm_context *lp_ctx,
|
||||
struct loadparm_service *service, struct parm_struct *parm);
|
||||
bool lpcfg_parm_is_cmdline(struct loadparm_context *lp_ctx, const char *name);
|
||||
bool lpcfg_parm_is_unspecified(struct loadparm_context *lp_ctx, const char *name);
|
||||
|
||||
bool lpcfg_do_global_parameter(struct loadparm_context *lp_ctx,
|
||||
const char *pszParmName, const char *pszParmValue);
|
||||
bool lpcfg_do_service_parameter(struct loadparm_context *lp_ctx,
|
||||
struct loadparm_service *service,
|
||||
const char *pszParmName, const char *pszParmValue);
|
||||
|
||||
/**
|
||||
* Process a parameter.
|
||||
*/
|
||||
bool lpcfg_do_global_parameter_var(struct loadparm_context *lp_ctx,
|
||||
const char *pszParmName, const char *fmt, ...);
|
||||
bool lpcfg_set_cmdline(struct loadparm_context *lp_ctx, const char *pszParmName,
|
||||
const char *pszParmValue);
|
||||
bool lpcfg_set_option(struct loadparm_context *lp_ctx, const char *option);
|
||||
|
||||
/**
|
||||
* Display the contents of a single services record.
|
||||
*/
|
||||
bool lpcfg_dump_a_parameter(struct loadparm_context *lp_ctx,
|
||||
struct loadparm_service *service,
|
||||
const char *parm_name, FILE * f);
|
||||
|
||||
/**
|
||||
* Initialise the global parameter structure.
|
||||
*/
|
||||
struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx);
|
||||
struct loadparm_context *loadparm_init_global(bool load_default);
|
||||
const char *lpcfg_configfile(struct loadparm_context *lp_ctx);
|
||||
bool lpcfg_load_default(struct loadparm_context *lp_ctx);
|
||||
const char *lp_default_path(void);
|
||||
|
||||
/**
|
||||
* Load the services array from the services file.
|
||||
*
|
||||
* Return True on success, False on failure.
|
||||
*/
|
||||
bool lpcfg_load(struct loadparm_context *lp_ctx, const char *filename);
|
||||
|
||||
/**
|
||||
* Return the max number of services.
|
||||
*/
|
||||
int lpcfg_numservices(struct loadparm_context *lp_ctx);
|
||||
|
||||
/**
|
||||
* Display the contents of the services array in human-readable form.
|
||||
*/
|
||||
void lpcfg_dump(struct loadparm_context *lp_ctx, FILE *f, bool show_defaults,
|
||||
int maxtoprint);
|
||||
|
||||
/**
|
||||
* Display the contents of one service in human-readable form.
|
||||
*/
|
||||
void lpcfg_dump_one(FILE *f, bool show_defaults, struct loadparm_service *service, struct loadparm_service *sDefault);
|
||||
struct loadparm_service *lpcfg_servicebynum(struct loadparm_context *lp_ctx,
|
||||
int snum);
|
||||
struct loadparm_service *lpcfg_service(struct loadparm_context *lp_ctx,
|
||||
const char *service_name);
|
||||
|
||||
struct smb_iconv_handle *lpcfg_iconv_handle(struct loadparm_context *lp_ctx);
|
||||
void lpcfg_smbcli_options(struct loadparm_context *lp_ctx,
|
||||
struct smbcli_options *options);
|
||||
void lpcfg_smbcli_session_options(struct loadparm_context *lp_ctx,
|
||||
struct smbcli_session_options *options);
|
||||
const char **lpcfg_smb_ports(struct loadparm_context *);
|
||||
const char *lpcfg_socket_options(struct loadparm_context *);
|
||||
struct dcerpc_server_info *lpcfg_dcerpc_server_info(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx);
|
||||
struct gensec_settings *lpcfg_gensec_settings(TALLOC_CTX *, struct loadparm_context *);
|
||||
|
||||
/* The following definitions come from param/util.c */
|
||||
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Misc utility functions
|
||||
*/
|
||||
bool lpcfg_is_mydomain(struct loadparm_context *lp_ctx,
|
||||
const char *domain);
|
||||
|
||||
bool lpcfg_is_my_domain_or_realm(struct loadparm_context *lp_ctx,
|
||||
const char *domain);
|
||||
|
||||
/**
|
||||
see if a string matches either our primary or one of our secondary
|
||||
netbios aliases. do a case insensitive match
|
||||
*/
|
||||
bool lpcfg_is_myname(struct loadparm_context *lp_ctx, const char *name);
|
||||
|
||||
/**
|
||||
A useful function for returning a path in the Samba lock directory.
|
||||
**/
|
||||
char *lpcfg_lock_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx,
|
||||
const char *name);
|
||||
|
||||
/**
|
||||
* @brief Returns an absolute path to a file in the directory containing the current config file
|
||||
*
|
||||
* @param name File to find, relative to the config file directory.
|
||||
*
|
||||
* @retval Pointer to a talloc'ed string containing the full path.
|
||||
**/
|
||||
char *lpcfg_config_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx,
|
||||
const char *name);
|
||||
|
||||
/**
|
||||
* @brief Returns an absolute path to a file in the Samba private directory.
|
||||
*
|
||||
* @param name File to find, relative to PRIVATEDIR.
|
||||
* if name is not relative, then use it as-is
|
||||
*
|
||||
* @retval Pointer to a talloc'ed string containing the full path.
|
||||
**/
|
||||
char *lpcfg_private_path(TALLOC_CTX* mem_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
const char *name);
|
||||
|
||||
/**
|
||||
* @brief Returns an absolute path to a NTDB or TDB file in the Samba
|
||||
* private directory.
|
||||
*
|
||||
* @param name File to find, relative to PRIVATEDIR, without .tdb extension.
|
||||
*
|
||||
* @retval Pointer to a talloc'ed string containing the full path, for
|
||||
* use with dbwrap_local_open().
|
||||
**/
|
||||
char *lpcfg_private_db_path(TALLOC_CTX *mem_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
const char *name);
|
||||
|
||||
/**
|
||||
return a path in the smbd.tmp directory, where all temporary file
|
||||
for smbd go. If NULL is passed for name then return the directory
|
||||
path itself
|
||||
*/
|
||||
char *smbd_tmp_path(TALLOC_CTX *mem_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
const char *name);
|
||||
|
||||
const char *lpcfg_imessaging_path(TALLOC_CTX *mem_ctx,
|
||||
struct loadparm_context *lp_ctx);
|
||||
const char *lpcfg_sam_name(struct loadparm_context *lp_ctx);
|
||||
const char *lpcfg_sam_dnsname(struct loadparm_context *lp_ctx);
|
||||
|
||||
void lpcfg_default_kdc_policy(TALLOC_CTX *mem_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
time_t *svc_tkt_lifetime,
|
||||
time_t *usr_tkt_lifetime,
|
||||
time_t *renewal_lifetime);
|
||||
|
||||
int lpcfg_rpc_port_low(struct loadparm_context *lp_ctx);
|
||||
int lpcfg_rpc_port_high(struct loadparm_context *lp_ctx);
|
||||
|
||||
/* The following definitions come from lib/version.c */
|
||||
|
||||
const char *samba_version_string(void);
|
||||
|
||||
|
||||
#endif /* _PARAM_H */
|
||||
@ -0,0 +1,990 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
passdb structures and parameters
|
||||
Copyright (C) Gerald Carter 2001
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1998 - 2000
|
||||
Copyright (C) Andrew Bartlett 2002
|
||||
Copyright (C) Simo Sorce 2003
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _PASSDB_H
|
||||
#define _PASSDB_H
|
||||
|
||||
#ifndef NT_HASH_LEN
|
||||
#define NT_HASH_LEN 16
|
||||
#endif
|
||||
|
||||
#ifndef LM_HASH_LEN
|
||||
#define LM_HASH_LEN 16
|
||||
#endif
|
||||
|
||||
#include <gen_ndr/lsa.h>
|
||||
#include <tevent.h>
|
||||
struct unixid;
|
||||
struct cli_credentials;
|
||||
|
||||
/* group mapping headers */
|
||||
|
||||
#define ENUM_ONLY_MAPPED True
|
||||
#define ENUM_ALL_MAPPED False
|
||||
|
||||
typedef struct _GROUP_MAP {
|
||||
struct pdb_methods *methods;
|
||||
gid_t gid;
|
||||
struct dom_sid sid;
|
||||
enum lsa_SidType sid_name_use;
|
||||
char *nt_name;
|
||||
char *comment;
|
||||
} GROUP_MAP;
|
||||
|
||||
struct acct_info {
|
||||
char *acct_name; /* account name */
|
||||
char *acct_desc; /* account name */
|
||||
uint32_t rid; /* domain-relative RID */
|
||||
};
|
||||
|
||||
/* The following definitions come from groupdb/mapping.c */
|
||||
|
||||
NTSTATUS add_initial_entry(gid_t gid, const char *sid, enum lsa_SidType sid_name_use, const char *nt_name, const char *comment);
|
||||
bool get_domain_group_from_sid(struct dom_sid sid, GROUP_MAP *map);
|
||||
int smb_create_group(const char *unix_group, gid_t *new_gid);
|
||||
int smb_delete_group(const char *unix_group);
|
||||
int smb_set_primary_group(const char *unix_group, const char* unix_user);
|
||||
int smb_add_user_group(const char *unix_group, const char *unix_user);
|
||||
int smb_delete_user_group(const char *unix_group, const char *unix_user);
|
||||
NTSTATUS pdb_default_getgrsid(struct pdb_methods *methods, GROUP_MAP *map,
|
||||
struct dom_sid sid);
|
||||
NTSTATUS pdb_default_getgrgid(struct pdb_methods *methods, GROUP_MAP *map,
|
||||
gid_t gid);
|
||||
NTSTATUS pdb_default_getgrnam(struct pdb_methods *methods, GROUP_MAP *map,
|
||||
const char *name);
|
||||
NTSTATUS pdb_default_add_group_mapping_entry(struct pdb_methods *methods,
|
||||
GROUP_MAP *map);
|
||||
NTSTATUS pdb_default_update_group_mapping_entry(struct pdb_methods *methods,
|
||||
GROUP_MAP *map);
|
||||
NTSTATUS pdb_default_delete_group_mapping_entry(struct pdb_methods *methods,
|
||||
struct dom_sid sid);
|
||||
NTSTATUS pdb_default_enum_group_mapping(struct pdb_methods *methods,
|
||||
const struct dom_sid *sid,
|
||||
enum lsa_SidType sid_name_use,
|
||||
GROUP_MAP ***pp_rmap,
|
||||
size_t *p_num_entries,
|
||||
bool unix_only);
|
||||
NTSTATUS pdb_default_create_alias(struct pdb_methods *methods,
|
||||
const char *name, uint32_t *rid);
|
||||
NTSTATUS pdb_default_delete_alias(struct pdb_methods *methods,
|
||||
const struct dom_sid *sid);
|
||||
NTSTATUS pdb_default_get_aliasinfo(struct pdb_methods *methods,
|
||||
const struct dom_sid *sid,
|
||||
struct acct_info *info);
|
||||
NTSTATUS pdb_default_set_aliasinfo(struct pdb_methods *methods,
|
||||
const struct dom_sid *sid,
|
||||
struct acct_info *info);
|
||||
NTSTATUS pdb_default_add_aliasmem(struct pdb_methods *methods,
|
||||
const struct dom_sid *alias, const struct dom_sid *member);
|
||||
NTSTATUS pdb_default_del_aliasmem(struct pdb_methods *methods,
|
||||
const struct dom_sid *alias, const struct dom_sid *member);
|
||||
NTSTATUS pdb_default_enum_aliasmem(struct pdb_methods *methods,
|
||||
const struct dom_sid *alias, TALLOC_CTX *mem_ctx,
|
||||
struct dom_sid **pp_members,
|
||||
size_t *p_num_members);
|
||||
NTSTATUS pdb_default_alias_memberships(struct pdb_methods *methods,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct dom_sid *domain_sid,
|
||||
const struct dom_sid *members,
|
||||
size_t num_members,
|
||||
uint32_t **pp_alias_rids,
|
||||
size_t *p_num_alias_rids);
|
||||
NTSTATUS pdb_nop_getgrsid(struct pdb_methods *methods, GROUP_MAP *map,
|
||||
struct dom_sid sid);
|
||||
NTSTATUS pdb_nop_getgrgid(struct pdb_methods *methods, GROUP_MAP *map,
|
||||
gid_t gid);
|
||||
NTSTATUS pdb_nop_getgrnam(struct pdb_methods *methods, GROUP_MAP *map,
|
||||
const char *name);
|
||||
NTSTATUS pdb_nop_add_group_mapping_entry(struct pdb_methods *methods,
|
||||
GROUP_MAP *map);
|
||||
NTSTATUS pdb_nop_update_group_mapping_entry(struct pdb_methods *methods,
|
||||
GROUP_MAP *map);
|
||||
NTSTATUS pdb_nop_delete_group_mapping_entry(struct pdb_methods *methods,
|
||||
struct dom_sid sid);
|
||||
NTSTATUS pdb_nop_enum_group_mapping(struct pdb_methods *methods,
|
||||
enum lsa_SidType sid_name_use,
|
||||
GROUP_MAP **rmap, size_t *num_entries,
|
||||
bool unix_only);
|
||||
NTSTATUS pdb_create_builtin_alias(uint32_t rid, gid_t gid);
|
||||
|
||||
|
||||
/* passdb headers */
|
||||
|
||||
/**********************************************************************
|
||||
* Masks for mappings between unix uid and gid types and
|
||||
* NT RIDS.
|
||||
**********************************************************************/
|
||||
|
||||
/* Take the bottom bit. */
|
||||
#define RID_TYPE_MASK 1
|
||||
#define RID_MULTIPLIER 2
|
||||
|
||||
/* The two common types. */
|
||||
#define USER_RID_TYPE 0
|
||||
#define GROUP_RID_TYPE 1
|
||||
|
||||
/*
|
||||
* Flags for local user manipulation.
|
||||
*/
|
||||
|
||||
#define LOCAL_ADD_USER 0x1
|
||||
#define LOCAL_DELETE_USER 0x2
|
||||
#define LOCAL_DISABLE_USER 0x4
|
||||
#define LOCAL_ENABLE_USER 0x8
|
||||
#define LOCAL_TRUST_ACCOUNT 0x10
|
||||
#define LOCAL_SET_NO_PASSWORD 0x20
|
||||
#define LOCAL_SET_PASSWORD 0x40
|
||||
#define LOCAL_SET_LDAP_ADMIN_PW 0x80
|
||||
#define LOCAL_INTERDOM_ACCOUNT 0x100
|
||||
#define LOCAL_AM_ROOT 0x200 /* Act as root */
|
||||
|
||||
/*
|
||||
* Size of new password account encoding string. This is enough space to
|
||||
* hold 11 ACB characters, plus the surrounding [] and a terminating null.
|
||||
* Do not change unless you are adding new ACB bits!
|
||||
*/
|
||||
|
||||
#define NEW_PW_FORMAT_SPACE_PADDED_LEN 14
|
||||
|
||||
/* Password history contants. */
|
||||
#define PW_HISTORY_SALT_LEN 16
|
||||
#define SALTED_MD5_HASH_LEN 16
|
||||
#define PW_HISTORY_ENTRY_LEN (PW_HISTORY_SALT_LEN+SALTED_MD5_HASH_LEN)
|
||||
#define MAX_PW_HISTORY_LEN 24
|
||||
|
||||
/*
|
||||
* bit flags representing initialized fields in struct samu
|
||||
*/
|
||||
enum pdb_elements {
|
||||
PDB_UNINIT,
|
||||
PDB_SMBHOME,
|
||||
PDB_PROFILE,
|
||||
PDB_DRIVE,
|
||||
PDB_LOGONSCRIPT,
|
||||
PDB_LOGONTIME,
|
||||
PDB_LOGOFFTIME,
|
||||
PDB_KICKOFFTIME,
|
||||
PDB_BAD_PASSWORD_TIME,
|
||||
PDB_CANCHANGETIME,
|
||||
PDB_PLAINTEXT_PW,
|
||||
PDB_USERNAME,
|
||||
PDB_FULLNAME,
|
||||
PDB_DOMAIN,
|
||||
PDB_NTUSERNAME,
|
||||
PDB_HOURSLEN,
|
||||
PDB_LOGONDIVS,
|
||||
PDB_USERSID,
|
||||
PDB_GROUPSID,
|
||||
PDB_ACCTCTRL,
|
||||
PDB_PASSLASTSET,
|
||||
PDB_ACCTDESC,
|
||||
PDB_WORKSTATIONS,
|
||||
PDB_COMMENT,
|
||||
PDB_MUNGEDDIAL,
|
||||
PDB_HOURS,
|
||||
PDB_FIELDS_PRESENT,
|
||||
PDB_BAD_PASSWORD_COUNT,
|
||||
PDB_LOGON_COUNT,
|
||||
PDB_COUNTRY_CODE,
|
||||
PDB_CODE_PAGE,
|
||||
PDB_UNKNOWN6,
|
||||
PDB_LMPASSWD,
|
||||
PDB_NTPASSWD,
|
||||
PDB_PWHISTORY,
|
||||
PDB_BACKEND_PRIVATE_DATA,
|
||||
|
||||
/* this must be the last element */
|
||||
PDB_COUNT
|
||||
};
|
||||
|
||||
enum pdb_group_elements {
|
||||
PDB_GROUP_NAME,
|
||||
PDB_GROUP_SID,
|
||||
PDB_GROUP_SID_NAME_USE,
|
||||
PDB_GROUP_MEMBERS,
|
||||
|
||||
/* this must be the last element */
|
||||
PDB_GROUP_COUNT
|
||||
};
|
||||
|
||||
|
||||
enum pdb_value_state {
|
||||
PDB_DEFAULT=0,
|
||||
PDB_SET,
|
||||
PDB_CHANGED
|
||||
};
|
||||
|
||||
#define IS_SAM_SET(x, flag) (pdb_get_init_flags(x, flag) == PDB_SET)
|
||||
#define IS_SAM_CHANGED(x, flag) (pdb_get_init_flags(x, flag) == PDB_CHANGED)
|
||||
#define IS_SAM_DEFAULT(x, flag) (pdb_get_init_flags(x, flag) == PDB_DEFAULT)
|
||||
|
||||
/* cache for bad password lockout data, to be used on replicated SAMs */
|
||||
struct login_cache {
|
||||
time_t entry_timestamp;
|
||||
uint32_t acct_ctrl;
|
||||
uint16_t bad_password_count;
|
||||
time_t bad_password_time;
|
||||
};
|
||||
|
||||
#define SAMU_BUFFER_V0 0
|
||||
#define SAMU_BUFFER_V1 1
|
||||
#define SAMU_BUFFER_V2 2
|
||||
#define SAMU_BUFFER_V3 3
|
||||
/* nothing changed from V3 to V4 */
|
||||
#define SAMU_BUFFER_V4 4
|
||||
#define SAMU_BUFFER_LATEST SAMU_BUFFER_V4
|
||||
|
||||
#define MAX_HOURS_LEN 32
|
||||
|
||||
struct samu {
|
||||
struct pdb_methods *methods;
|
||||
|
||||
/* initialization flags */
|
||||
struct bitmap *change_flags;
|
||||
struct bitmap *set_flags;
|
||||
|
||||
time_t logon_time; /* logon time */
|
||||
time_t logoff_time; /* logoff time */
|
||||
time_t kickoff_time; /* kickoff time */
|
||||
time_t bad_password_time; /* last bad password entered */
|
||||
time_t pass_last_set_time; /* password last set time */
|
||||
time_t pass_can_change_time; /* password can change time */
|
||||
|
||||
const char *username; /* UNIX username string */
|
||||
const char *domain; /* Windows Domain name */
|
||||
const char *nt_username; /* Windows username string */
|
||||
const char *full_name; /* user's full name string */
|
||||
const char *home_dir; /* home directory string */
|
||||
const char *dir_drive; /* home directory drive string */
|
||||
const char *logon_script; /* logon script string */
|
||||
const char *profile_path; /* profile path string */
|
||||
const char *acct_desc; /* user description string */
|
||||
const char *workstations; /* login from workstations string */
|
||||
const char *comment;
|
||||
const char *munged_dial; /* munged path name and dial-back tel number */
|
||||
|
||||
struct dom_sid user_sid;
|
||||
struct dom_sid *group_sid;
|
||||
|
||||
DATA_BLOB lm_pw; /* .data is Null if no password */
|
||||
DATA_BLOB nt_pw; /* .data is Null if no password */
|
||||
DATA_BLOB nt_pw_his; /* nt hashed password history .data is Null if not available */
|
||||
char* plaintext_pw; /* is Null if not available */
|
||||
|
||||
uint32_t acct_ctrl; /* account info (ACB_xxxx bit-mask) */
|
||||
uint32_t fields_present; /* 0x00ff ffff */
|
||||
|
||||
uint16_t logon_divs; /* 168 - number of hours in a week */
|
||||
uint32_t hours_len; /* normally 21 bytes */
|
||||
uint8_t hours[MAX_HOURS_LEN];
|
||||
|
||||
/* Was unknown_5. */
|
||||
uint16_t bad_password_count;
|
||||
uint16_t logon_count;
|
||||
|
||||
uint16_t country_code;
|
||||
uint16_t code_page;
|
||||
|
||||
uint32_t unknown_6; /* 0x0000 04ec */
|
||||
|
||||
/* a tag for who added the private methods */
|
||||
|
||||
const struct pdb_methods *backend_private_methods;
|
||||
void *backend_private_data;
|
||||
void (*backend_private_data_free_fn)(void **);
|
||||
|
||||
/* maintain a copy of the user's struct passwd */
|
||||
|
||||
struct passwd *unix_pw;
|
||||
};
|
||||
|
||||
struct samr_displayentry {
|
||||
uint32_t idx;
|
||||
uint32_t rid;
|
||||
uint32_t acct_flags;
|
||||
const char *account_name;
|
||||
const char *fullname;
|
||||
const char *description;
|
||||
};
|
||||
|
||||
enum pdb_search_type {
|
||||
PDB_USER_SEARCH,
|
||||
PDB_GROUP_SEARCH,
|
||||
PDB_ALIAS_SEARCH
|
||||
};
|
||||
|
||||
struct pdb_search {
|
||||
enum pdb_search_type type;
|
||||
struct samr_displayentry *cache;
|
||||
uint32_t num_entries;
|
||||
ssize_t cache_size;
|
||||
bool search_ended;
|
||||
void *private_data;
|
||||
bool (*next_entry)(struct pdb_search *search,
|
||||
struct samr_displayentry *entry);
|
||||
void (*search_end)(struct pdb_search *search);
|
||||
};
|
||||
|
||||
struct pdb_domain_info {
|
||||
char *name;
|
||||
char *dns_domain;
|
||||
char *dns_forest;
|
||||
struct dom_sid sid;
|
||||
struct GUID guid;
|
||||
};
|
||||
|
||||
struct pdb_trusted_domain {
|
||||
char *domain_name;
|
||||
char *netbios_name;
|
||||
struct dom_sid security_identifier;
|
||||
DATA_BLOB trust_auth_incoming;
|
||||
DATA_BLOB trust_auth_outgoing;
|
||||
uint32_t trust_direction;
|
||||
uint32_t trust_type;
|
||||
uint32_t trust_attributes;
|
||||
uint32_t *trust_posix_offset;
|
||||
uint32_t *supported_enc_type;
|
||||
DATA_BLOB trust_forest_trust_info;
|
||||
};
|
||||
|
||||
/*
|
||||
* trusted domain entry/entries returned by secrets_get_trusted_domains
|
||||
* (used in _lsa_enum_trust_dom call)
|
||||
*/
|
||||
struct trustdom_info {
|
||||
char *name;
|
||||
struct dom_sid sid;
|
||||
};
|
||||
|
||||
/*
|
||||
* Types of account policy.
|
||||
*/
|
||||
enum pdb_policy_type {
|
||||
PDB_POLICY_MIN_PASSWORD_LEN = 1,
|
||||
PDB_POLICY_PASSWORD_HISTORY = 2,
|
||||
PDB_POLICY_USER_MUST_LOGON_TO_CHG_PASS = 3,
|
||||
PDB_POLICY_MAX_PASSWORD_AGE = 4,
|
||||
PDB_POLICY_MIN_PASSWORD_AGE = 5,
|
||||
PDB_POLICY_LOCK_ACCOUNT_DURATION = 6,
|
||||
PDB_POLICY_RESET_COUNT_TIME = 7,
|
||||
PDB_POLICY_BAD_ATTEMPT_LOCKOUT = 8,
|
||||
PDB_POLICY_TIME_TO_LOGOUT = 9,
|
||||
PDB_POLICY_REFUSE_MACHINE_PW_CHANGE = 10
|
||||
};
|
||||
|
||||
#define PDB_CAP_STORE_RIDS 0x0001
|
||||
#define PDB_CAP_ADS 0x0002
|
||||
#define PDB_CAP_TRUSTED_DOMAINS_EX 0x0004
|
||||
|
||||
/*****************************************************************
|
||||
Functions to be implemented by the new (v2) passdb API
|
||||
****************************************************************/
|
||||
|
||||
/*
|
||||
* This next constant specifies the version number of the PASSDB interface
|
||||
* this SAMBA will load. Increment this if *ANY* changes are made to the interface.
|
||||
* Changed interface to fix int -> size_t problems. JRA.
|
||||
* There's no point in allocating arrays in
|
||||
* samr_lookup_rids twice. It was done in the srv_samr_nt.c code as well as in
|
||||
* the pdb module. Remove the latter, this might happen more often. VL.
|
||||
* changed to version 14 to move lookup_rids and lookup_names to return
|
||||
* enum lsa_SidType rather than uint32_t.
|
||||
* Changed to 16 for access to the trusted domain passwords (obnox).
|
||||
* Changed to 17, the sampwent interface is gone.
|
||||
* Changed to 18, pdb_rid_algorithm -> pdb_capabilities
|
||||
* Changed to 19, removed uid_to_rid
|
||||
* Changed to 20, pdb_secret calls
|
||||
* Changed to 21, set/enum_upn_suffixes. AB.
|
||||
* Changed to 22, idmap control functions
|
||||
* Changed to 23, new idmap control functions
|
||||
* Changed to 24, removed uid_to_sid and gid_to_sid, replaced with id_to_sid
|
||||
* Leave at 24, add optional get_trusteddom_creds()
|
||||
* Change to 25, loadable modules now have a TALLOC_CTX * parameter in init.
|
||||
*/
|
||||
|
||||
#define PASSDB_INTERFACE_VERSION 25
|
||||
|
||||
struct pdb_methods
|
||||
{
|
||||
const char *name; /* What name got this module */
|
||||
|
||||
struct pdb_domain_info *(*get_domain_info)(struct pdb_methods *,
|
||||
TALLOC_CTX *mem_ctx);
|
||||
|
||||
NTSTATUS (*getsampwnam)(struct pdb_methods *, struct samu *sam_acct, const char *username);
|
||||
|
||||
NTSTATUS (*getsampwsid)(struct pdb_methods *, struct samu *sam_acct, const struct dom_sid *sid);
|
||||
|
||||
NTSTATUS (*create_user)(struct pdb_methods *, TALLOC_CTX *tmp_ctx,
|
||||
const char *name, uint32_t acct_flags,
|
||||
uint32_t *rid);
|
||||
|
||||
NTSTATUS (*delete_user)(struct pdb_methods *, TALLOC_CTX *tmp_ctx,
|
||||
struct samu *sam_acct);
|
||||
|
||||
NTSTATUS (*add_sam_account)(struct pdb_methods *, struct samu *sampass);
|
||||
|
||||
NTSTATUS (*update_sam_account)(struct pdb_methods *, struct samu *sampass);
|
||||
|
||||
NTSTATUS (*delete_sam_account)(struct pdb_methods *, struct samu *username);
|
||||
|
||||
NTSTATUS (*rename_sam_account)(struct pdb_methods *, struct samu *oldname, const char *newname);
|
||||
|
||||
NTSTATUS (*update_login_attempts)(struct pdb_methods *methods, struct samu *sam_acct, bool success);
|
||||
|
||||
NTSTATUS (*getgrsid)(struct pdb_methods *methods, GROUP_MAP *map, struct dom_sid sid);
|
||||
|
||||
NTSTATUS (*getgrgid)(struct pdb_methods *methods, GROUP_MAP *map, gid_t gid);
|
||||
|
||||
NTSTATUS (*getgrnam)(struct pdb_methods *methods, GROUP_MAP *map, const char *name);
|
||||
|
||||
NTSTATUS (*create_dom_group)(struct pdb_methods *methods,
|
||||
TALLOC_CTX *mem_ctx, const char *name,
|
||||
uint32_t *rid);
|
||||
|
||||
NTSTATUS (*delete_dom_group)(struct pdb_methods *methods,
|
||||
TALLOC_CTX *mem_ctx, uint32_t rid);
|
||||
|
||||
NTSTATUS (*add_group_mapping_entry)(struct pdb_methods *methods,
|
||||
GROUP_MAP *map);
|
||||
|
||||
NTSTATUS (*update_group_mapping_entry)(struct pdb_methods *methods,
|
||||
GROUP_MAP *map);
|
||||
|
||||
NTSTATUS (*delete_group_mapping_entry)(struct pdb_methods *methods,
|
||||
struct dom_sid sid);
|
||||
|
||||
NTSTATUS (*enum_group_mapping)(struct pdb_methods *methods,
|
||||
const struct dom_sid *sid, enum lsa_SidType sid_name_use,
|
||||
GROUP_MAP ***pp_rmap, size_t *p_num_entries,
|
||||
bool unix_only);
|
||||
|
||||
NTSTATUS (*enum_group_members)(struct pdb_methods *methods,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct dom_sid *group,
|
||||
uint32_t **pp_member_rids,
|
||||
size_t *p_num_members);
|
||||
|
||||
NTSTATUS (*enum_group_memberships)(struct pdb_methods *methods,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct samu *user,
|
||||
struct dom_sid **pp_sids, gid_t **pp_gids,
|
||||
uint32_t *p_num_groups);
|
||||
|
||||
NTSTATUS (*set_unix_primary_group)(struct pdb_methods *methods,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct samu *user);
|
||||
|
||||
NTSTATUS (*add_groupmem)(struct pdb_methods *methods,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32_t group_rid, uint32_t member_rid);
|
||||
|
||||
NTSTATUS (*del_groupmem)(struct pdb_methods *methods,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32_t group_rid, uint32_t member_rid);
|
||||
|
||||
NTSTATUS (*create_alias)(struct pdb_methods *methods,
|
||||
const char *name, uint32_t *rid);
|
||||
|
||||
NTSTATUS (*delete_alias)(struct pdb_methods *methods,
|
||||
const struct dom_sid *sid);
|
||||
|
||||
NTSTATUS (*get_aliasinfo)(struct pdb_methods *methods,
|
||||
const struct dom_sid *sid,
|
||||
struct acct_info *info);
|
||||
|
||||
NTSTATUS (*set_aliasinfo)(struct pdb_methods *methods,
|
||||
const struct dom_sid *sid,
|
||||
struct acct_info *info);
|
||||
|
||||
NTSTATUS (*add_aliasmem)(struct pdb_methods *methods,
|
||||
const struct dom_sid *alias, const struct dom_sid *member);
|
||||
NTSTATUS (*del_aliasmem)(struct pdb_methods *methods,
|
||||
const struct dom_sid *alias, const struct dom_sid *member);
|
||||
NTSTATUS (*enum_aliasmem)(struct pdb_methods *methods,
|
||||
const struct dom_sid *alias, TALLOC_CTX *mem_ctx,
|
||||
struct dom_sid **members, size_t *p_num_members);
|
||||
NTSTATUS (*enum_alias_memberships)(struct pdb_methods *methods,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct dom_sid *domain_sid,
|
||||
const struct dom_sid *members,
|
||||
size_t num_members,
|
||||
uint32_t **pp_alias_rids,
|
||||
size_t *p_num_alias_rids);
|
||||
|
||||
NTSTATUS (*lookup_rids)(struct pdb_methods *methods,
|
||||
const struct dom_sid *domain_sid,
|
||||
int num_rids,
|
||||
uint32_t *rids,
|
||||
const char **pp_names,
|
||||
enum lsa_SidType *attrs);
|
||||
|
||||
NTSTATUS (*lookup_names)(struct pdb_methods *methods,
|
||||
const struct dom_sid *domain_sid,
|
||||
int num_names,
|
||||
const char **pp_names,
|
||||
uint32_t *rids,
|
||||
enum lsa_SidType *attrs);
|
||||
|
||||
NTSTATUS (*get_account_policy)(struct pdb_methods *methods,
|
||||
enum pdb_policy_type type,
|
||||
uint32_t *value);
|
||||
|
||||
NTSTATUS (*set_account_policy)(struct pdb_methods *methods,
|
||||
enum pdb_policy_type type,
|
||||
uint32_t value);
|
||||
|
||||
NTSTATUS (*get_seq_num)(struct pdb_methods *methods, time_t *seq_num);
|
||||
|
||||
bool (*search_users)(struct pdb_methods *methods,
|
||||
struct pdb_search *search,
|
||||
uint32_t acct_flags);
|
||||
bool (*search_groups)(struct pdb_methods *methods,
|
||||
struct pdb_search *search);
|
||||
bool (*search_aliases)(struct pdb_methods *methods,
|
||||
struct pdb_search *search,
|
||||
const struct dom_sid *sid);
|
||||
|
||||
/*
|
||||
* Instead of passing down a gid or uid, this function sends down a pointer
|
||||
* to a unixid.
|
||||
*
|
||||
* This acts as an in-out variable so that the idmap functions can correctly
|
||||
* receive ID_TYPE_BOTH, filling in cache details correctly rather than forcing
|
||||
* the cache to store ID_TYPE_UID or ID_TYPE_GID.
|
||||
*/
|
||||
bool (*id_to_sid)(struct pdb_methods *methods, struct unixid *id,
|
||||
struct dom_sid *sid);
|
||||
bool (*sid_to_id)(struct pdb_methods *methods, const struct dom_sid *sid,
|
||||
struct unixid *id);
|
||||
|
||||
uint32_t (*capabilities)(struct pdb_methods *methods);
|
||||
bool (*new_rid)(struct pdb_methods *methods, uint32_t *rid);
|
||||
|
||||
|
||||
bool (*get_trusteddom_pw)(struct pdb_methods *methods,
|
||||
const char *domain, char** pwd,
|
||||
struct dom_sid *sid, time_t *pass_last_set_time);
|
||||
NTSTATUS (*get_trusteddom_creds)(struct pdb_methods *methods,
|
||||
const char *domain,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct cli_credentials **creds);
|
||||
bool (*set_trusteddom_pw)(struct pdb_methods *methods,
|
||||
const char* domain, const char* pwd,
|
||||
const struct dom_sid *sid);
|
||||
bool (*del_trusteddom_pw)(struct pdb_methods *methods,
|
||||
const char *domain);
|
||||
NTSTATUS (*enum_trusteddoms)(struct pdb_methods *methods,
|
||||
TALLOC_CTX *mem_ctx, uint32_t *num_domains,
|
||||
struct trustdom_info ***domains);
|
||||
|
||||
NTSTATUS (*get_trusted_domain)(struct pdb_methods *methods,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const char *domain,
|
||||
struct pdb_trusted_domain **td);
|
||||
NTSTATUS (*get_trusted_domain_by_sid)(struct pdb_methods *methods,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct dom_sid *sid,
|
||||
struct pdb_trusted_domain **td);
|
||||
NTSTATUS (*set_trusted_domain)(struct pdb_methods *methods,
|
||||
const char* domain,
|
||||
const struct pdb_trusted_domain *td);
|
||||
NTSTATUS (*del_trusted_domain)(struct pdb_methods *methods,
|
||||
const char *domain);
|
||||
NTSTATUS (*enum_trusted_domains)(struct pdb_methods *methods,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32_t *num_domains,
|
||||
struct pdb_trusted_domain ***domains);
|
||||
|
||||
NTSTATUS (*get_secret)(struct pdb_methods *methods,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const char *secret_name,
|
||||
DATA_BLOB *secret_current,
|
||||
NTTIME *secret_current_lastchange,
|
||||
DATA_BLOB *secret_old,
|
||||
NTTIME *secret_old_lastchange,
|
||||
struct security_descriptor **sd);
|
||||
NTSTATUS (*set_secret)(struct pdb_methods *methods,
|
||||
const char *secret_name,
|
||||
DATA_BLOB *secret_current,
|
||||
DATA_BLOB *secret_old,
|
||||
struct security_descriptor *sd);
|
||||
NTSTATUS (*delete_secret)(struct pdb_methods *methods,
|
||||
const char *secret_name);
|
||||
|
||||
NTSTATUS (*enum_upn_suffixes)(struct pdb_methods *methods,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32_t *num_suffixes,
|
||||
char ***suffixes);
|
||||
|
||||
NTSTATUS (*set_upn_suffixes)(struct pdb_methods *methods,
|
||||
uint32_t num_suffixes,
|
||||
const char **suffixes);
|
||||
|
||||
bool (*is_responsible_for_our_sam)(struct pdb_methods *methods);
|
||||
bool (*is_responsible_for_builtin)(struct pdb_methods *methods);
|
||||
bool (*is_responsible_for_wellknown)(struct pdb_methods *methods);
|
||||
bool (*is_responsible_for_unix_users)(struct pdb_methods *methods);
|
||||
bool (*is_responsible_for_unix_groups)(struct pdb_methods *methods);
|
||||
bool (*is_responsible_for_everything_else)(struct pdb_methods *methods);
|
||||
|
||||
void *private_data; /* Private data of some kind */
|
||||
|
||||
void (*free_private_data)(void **);
|
||||
};
|
||||
|
||||
typedef NTSTATUS (*pdb_init_function)(struct pdb_methods **, const char *);
|
||||
|
||||
struct pdb_init_function_entry {
|
||||
const char *name;
|
||||
|
||||
/* Function to create a member of the pdb_methods list */
|
||||
pdb_init_function init;
|
||||
|
||||
struct pdb_init_function_entry *prev, *next;
|
||||
};
|
||||
|
||||
/* The following definitions come from passdb/account_pol.c */
|
||||
|
||||
void account_policy_names_list(TALLOC_CTX *mem_ctx, const char ***names, int *num_names);
|
||||
const char *decode_account_policy_name(enum pdb_policy_type type);
|
||||
const char *get_account_policy_attr(enum pdb_policy_type type);
|
||||
const char *account_policy_get_desc(enum pdb_policy_type type);
|
||||
enum pdb_policy_type account_policy_name_to_typenum(const char *name);
|
||||
bool account_policy_get_default(enum pdb_policy_type type, uint32_t *val);
|
||||
bool init_account_policy(void);
|
||||
bool account_policy_get(enum pdb_policy_type type, uint32_t *value);
|
||||
bool account_policy_set(enum pdb_policy_type type, uint32_t value);
|
||||
bool cache_account_policy_set(enum pdb_policy_type type, uint32_t value);
|
||||
bool cache_account_policy_get(enum pdb_policy_type type, uint32_t *value);
|
||||
struct db_context *get_account_pol_db( void );
|
||||
|
||||
/* The following definitions come from passdb/login_cache.c */
|
||||
|
||||
bool login_cache_init(void);
|
||||
bool login_cache_shutdown(void);
|
||||
bool login_cache_read(struct samu *sampass, struct login_cache *entry);
|
||||
bool login_cache_write(const struct samu *sampass,
|
||||
const struct login_cache *entry);
|
||||
bool login_cache_delentry(const struct samu *sampass);
|
||||
|
||||
/* The following definitions come from passdb/passdb.c */
|
||||
|
||||
struct samu *samu_new( TALLOC_CTX *ctx );
|
||||
NTSTATUS samu_set_unix(struct samu *user, const struct passwd *pwd);
|
||||
NTSTATUS samu_alloc_rid_unix(struct pdb_methods *methods,
|
||||
struct samu *user, const struct passwd *pwd);
|
||||
char *pdb_encode_acct_ctrl(uint32_t acct_ctrl, size_t length);
|
||||
uint32_t pdb_decode_acct_ctrl(const char *p);
|
||||
void pdb_sethexpwd(char p[33], const unsigned char *pwd, uint32_t acct_ctrl);
|
||||
bool pdb_gethexpwd(const char *p, unsigned char *pwd);
|
||||
void pdb_sethexhours(char *p, const unsigned char *hours);
|
||||
bool pdb_gethexhours(const char *p, unsigned char *hours);
|
||||
int algorithmic_rid_base(void);
|
||||
uid_t algorithmic_pdb_user_rid_to_uid(uint32_t user_rid);
|
||||
uid_t max_algorithmic_uid(void);
|
||||
uint32_t algorithmic_pdb_uid_to_user_rid(uid_t uid);
|
||||
gid_t pdb_group_rid_to_gid(uint32_t group_rid);
|
||||
gid_t max_algorithmic_gid(void);
|
||||
uint32_t algorithmic_pdb_gid_to_group_rid(gid_t gid);
|
||||
bool algorithmic_pdb_rid_is_user(uint32_t rid);
|
||||
bool lookup_global_sam_name(const char *name, int flags, uint32_t *rid,
|
||||
enum lsa_SidType *type);
|
||||
NTSTATUS local_password_change(const char *user_name,
|
||||
int local_flags,
|
||||
const char *new_passwd,
|
||||
char **pp_err_str,
|
||||
char **pp_msg_str);
|
||||
bool init_samu_from_buffer(struct samu *sampass, uint32_t level,
|
||||
uint8_t *buf, uint32_t buflen);
|
||||
uint32_t init_buffer_from_samu (uint8_t **buf, struct samu *sampass, bool size_only);
|
||||
bool pdb_copy_sam_account(struct samu *dst, struct samu *src );
|
||||
bool pdb_update_bad_password_count(struct samu *sampass, bool *updated);
|
||||
bool pdb_update_autolock_flag(struct samu *sampass, bool *updated);
|
||||
bool pdb_increment_bad_password_count(struct samu *sampass);
|
||||
bool is_dc_trusted_domain_situation(const char *domain_name);
|
||||
bool get_trust_pw_clear(const char *domain, char **ret_pwd,
|
||||
const char **account_name,
|
||||
enum netr_SchannelType *channel);
|
||||
bool get_trust_pw_hash(const char *domain, uint8_t ret_pwd[16],
|
||||
const char **account_name,
|
||||
enum netr_SchannelType *channel);
|
||||
struct cli_credentials;
|
||||
NTSTATUS pdb_get_trust_credentials(const char *netbios_domain,
|
||||
const char *dns_domain, /* optional */
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct cli_credentials **_creds);
|
||||
|
||||
/* The following definitions come from passdb/pdb_compat.c */
|
||||
|
||||
uint32_t pdb_get_user_rid (const struct samu *sampass);
|
||||
uint32_t pdb_get_group_rid (struct samu *sampass);
|
||||
bool pdb_set_user_sid_from_rid (struct samu *sampass, uint32_t rid, enum pdb_value_state flag);
|
||||
bool pdb_set_group_sid_from_rid (struct samu *sampass, uint32_t grid, enum pdb_value_state flag);
|
||||
|
||||
/* The following definitions come from passdb/pdb_get_set.c */
|
||||
|
||||
bool pdb_is_password_change_time_max(time_t test_time);
|
||||
uint32_t pdb_get_acct_ctrl(const struct samu *sampass);
|
||||
time_t pdb_get_logon_time(const struct samu *sampass);
|
||||
time_t pdb_get_logoff_time(const struct samu *sampass);
|
||||
time_t pdb_get_kickoff_time(const struct samu *sampass);
|
||||
time_t pdb_get_bad_password_time(const struct samu *sampass);
|
||||
time_t pdb_get_pass_last_set_time(const struct samu *sampass);
|
||||
time_t pdb_get_pass_can_change_time(const struct samu *sampass);
|
||||
time_t pdb_get_pass_can_change_time_noncalc(const struct samu *sampass);
|
||||
time_t pdb_get_pass_must_change_time(const struct samu *sampass);
|
||||
bool pdb_get_pass_can_change(const struct samu *sampass);
|
||||
uint16_t pdb_get_logon_divs(const struct samu *sampass);
|
||||
uint32_t pdb_get_hours_len(const struct samu *sampass);
|
||||
const uint8_t *pdb_get_hours(const struct samu *sampass);
|
||||
const uint8_t *pdb_get_nt_passwd(const struct samu *sampass);
|
||||
const uint8_t *pdb_get_lanman_passwd(const struct samu *sampass);
|
||||
const uint8_t *pdb_get_pw_history(const struct samu *sampass, uint32_t *current_hist_len);
|
||||
const char *pdb_get_plaintext_passwd(const struct samu *sampass);
|
||||
const struct dom_sid *pdb_get_user_sid(const struct samu *sampass);
|
||||
const struct dom_sid *pdb_get_group_sid(struct samu *sampass);
|
||||
enum pdb_value_state pdb_get_init_flags(const struct samu *sampass, enum pdb_elements element);
|
||||
const char *pdb_get_username(const struct samu *sampass);
|
||||
const char *pdb_get_domain(const struct samu *sampass);
|
||||
const char *pdb_get_nt_username(const struct samu *sampass);
|
||||
const char *pdb_get_fullname(const struct samu *sampass);
|
||||
const char *pdb_get_homedir(const struct samu *sampass);
|
||||
const char *pdb_get_dir_drive(const struct samu *sampass);
|
||||
const char *pdb_get_logon_script(const struct samu *sampass);
|
||||
const char *pdb_get_profile_path(const struct samu *sampass);
|
||||
const char *pdb_get_acct_desc(const struct samu *sampass);
|
||||
const char *pdb_get_workstations(const struct samu *sampass);
|
||||
const char *pdb_get_comment(const struct samu *sampass);
|
||||
const char *pdb_get_munged_dial(const struct samu *sampass);
|
||||
uint16_t pdb_get_bad_password_count(const struct samu *sampass);
|
||||
uint16_t pdb_get_logon_count(const struct samu *sampass);
|
||||
uint16_t pdb_get_country_code(const struct samu *sampass);
|
||||
uint16_t pdb_get_code_page(const struct samu *sampass);
|
||||
uint32_t pdb_get_unknown_6(const struct samu *sampass);
|
||||
void *pdb_get_backend_private_data(const struct samu *sampass, const struct pdb_methods *my_methods);
|
||||
bool pdb_set_acct_ctrl(struct samu *sampass, uint32_t acct_ctrl, enum pdb_value_state flag);
|
||||
bool pdb_set_logon_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
|
||||
bool pdb_set_logoff_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
|
||||
bool pdb_set_kickoff_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
|
||||
bool pdb_set_bad_password_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
|
||||
bool pdb_set_pass_can_change_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
|
||||
bool pdb_set_pass_last_set_time(struct samu *sampass, time_t mytime, enum pdb_value_state flag);
|
||||
bool pdb_set_hours_len(struct samu *sampass, uint32_t len, enum pdb_value_state flag);
|
||||
bool pdb_set_logon_divs(struct samu *sampass, uint16_t hours, enum pdb_value_state flag);
|
||||
bool pdb_set_init_flags(struct samu *sampass, enum pdb_elements element, enum pdb_value_state value_flag);
|
||||
bool pdb_set_user_sid(struct samu *sampass, const struct dom_sid *u_sid, enum pdb_value_state flag);
|
||||
bool pdb_set_user_sid_from_string(struct samu *sampass, const char *u_sid, enum pdb_value_state flag);
|
||||
bool pdb_set_group_sid(struct samu *sampass, const struct dom_sid *g_sid, enum pdb_value_state flag);
|
||||
bool pdb_set_username(struct samu *sampass, const char *username, enum pdb_value_state flag);
|
||||
bool pdb_set_domain(struct samu *sampass, const char *domain, enum pdb_value_state flag);
|
||||
bool pdb_set_nt_username(struct samu *sampass, const char *nt_username, enum pdb_value_state flag);
|
||||
bool pdb_set_fullname(struct samu *sampass, const char *full_name, enum pdb_value_state flag);
|
||||
bool pdb_set_logon_script(struct samu *sampass, const char *logon_script, enum pdb_value_state flag);
|
||||
bool pdb_set_profile_path(struct samu *sampass, const char *profile_path, enum pdb_value_state flag);
|
||||
bool pdb_set_dir_drive(struct samu *sampass, const char *dir_drive, enum pdb_value_state flag);
|
||||
bool pdb_set_homedir(struct samu *sampass, const char *home_dir, enum pdb_value_state flag);
|
||||
bool pdb_set_acct_desc(struct samu *sampass, const char *acct_desc, enum pdb_value_state flag);
|
||||
bool pdb_set_workstations(struct samu *sampass, const char *workstations, enum pdb_value_state flag);
|
||||
bool pdb_set_comment(struct samu *sampass, const char *comment, enum pdb_value_state flag);
|
||||
bool pdb_set_munged_dial(struct samu *sampass, const char *munged_dial, enum pdb_value_state flag);
|
||||
bool pdb_set_nt_passwd(struct samu *sampass, const uint8_t pwd[NT_HASH_LEN], enum pdb_value_state flag);
|
||||
bool pdb_set_lanman_passwd(struct samu *sampass, const uint8_t pwd[LM_HASH_LEN], enum pdb_value_state flag);
|
||||
bool pdb_set_pw_history(struct samu *sampass, const uint8_t *pwd, uint32_t historyLen, enum pdb_value_state flag);
|
||||
bool pdb_set_plaintext_pw_only(struct samu *sampass, const char *password, enum pdb_value_state flag);
|
||||
bool pdb_update_history(struct samu *sampass, const uint8_t new_nt[NT_HASH_LEN]);
|
||||
bool pdb_set_bad_password_count(struct samu *sampass, uint16_t bad_password_count, enum pdb_value_state flag);
|
||||
bool pdb_set_logon_count(struct samu *sampass, uint16_t logon_count, enum pdb_value_state flag);
|
||||
bool pdb_set_country_code(struct samu *sampass, uint16_t country_code,
|
||||
enum pdb_value_state flag);
|
||||
bool pdb_set_code_page(struct samu *sampass, uint16_t code_page,
|
||||
enum pdb_value_state flag);
|
||||
bool pdb_set_unknown_6(struct samu *sampass, uint32_t unkn, enum pdb_value_state flag);
|
||||
bool pdb_set_hours(struct samu *sampass, const uint8_t *hours, int hours_len,
|
||||
enum pdb_value_state flag);
|
||||
bool pdb_set_backend_private_data(struct samu *sampass, void *private_data,
|
||||
void (*free_fn)(void **),
|
||||
const struct pdb_methods *my_methods,
|
||||
enum pdb_value_state flag);
|
||||
bool pdb_set_pass_can_change(struct samu *sampass, bool canchange);
|
||||
bool pdb_set_plaintext_passwd(struct samu *sampass, const char *plaintext);
|
||||
uint32_t pdb_build_fields_present(struct samu *sampass);
|
||||
bool pdb_element_is_changed(const struct samu *sampass,
|
||||
enum pdb_elements element);
|
||||
bool pdb_element_is_set_or_changed(const struct samu *sampass,
|
||||
enum pdb_elements element);
|
||||
|
||||
/* The following definitions come from passdb/pdb_interface.c */
|
||||
|
||||
NTSTATUS smb_register_passdb(int version, const char *name, pdb_init_function init) ;
|
||||
struct pdb_init_function_entry *pdb_find_backend_entry(const char *name);
|
||||
const struct pdb_init_function_entry *pdb_get_backends(void);
|
||||
struct tevent_context *pdb_get_tevent_context(void);
|
||||
NTSTATUS make_pdb_method_name(struct pdb_methods **methods, const char *selected);
|
||||
struct pdb_domain_info *pdb_get_domain_info(TALLOC_CTX *mem_ctx);
|
||||
bool pdb_getsampwnam(struct samu *sam_acct, const char *username) ;
|
||||
bool pdb_getsampwsid(struct samu *sam_acct, const struct dom_sid *sid) ;
|
||||
NTSTATUS pdb_create_user(TALLOC_CTX *mem_ctx, const char *name, uint32_t flags,
|
||||
uint32_t *rid);
|
||||
NTSTATUS pdb_delete_user(TALLOC_CTX *mem_ctx, struct samu *sam_acct);
|
||||
NTSTATUS pdb_add_sam_account(struct samu *sam_acct) ;
|
||||
NTSTATUS pdb_update_sam_account(struct samu *sam_acct) ;
|
||||
NTSTATUS pdb_delete_sam_account(struct samu *sam_acct) ;
|
||||
NTSTATUS pdb_rename_sam_account(struct samu *oldname, const char *newname);
|
||||
NTSTATUS pdb_update_login_attempts(struct samu *sam_acct, bool success);
|
||||
bool pdb_getgrsid(GROUP_MAP *map, struct dom_sid sid);
|
||||
bool pdb_getgrgid(GROUP_MAP *map, gid_t gid);
|
||||
bool pdb_getgrnam(GROUP_MAP *map, const char *name);
|
||||
NTSTATUS pdb_create_dom_group(TALLOC_CTX *mem_ctx, const char *name,
|
||||
uint32_t *rid);
|
||||
NTSTATUS pdb_delete_dom_group(TALLOC_CTX *mem_ctx, uint32_t rid);
|
||||
NTSTATUS pdb_add_group_mapping_entry(GROUP_MAP *map);
|
||||
NTSTATUS pdb_update_group_mapping_entry(GROUP_MAP *map);
|
||||
NTSTATUS pdb_delete_group_mapping_entry(struct dom_sid sid);
|
||||
bool pdb_enum_group_mapping(const struct dom_sid *sid,
|
||||
enum lsa_SidType sid_name_use,
|
||||
GROUP_MAP ***pp_rmap,
|
||||
size_t *p_num_entries,
|
||||
bool unix_only);
|
||||
NTSTATUS pdb_enum_group_members(TALLOC_CTX *mem_ctx,
|
||||
const struct dom_sid *sid,
|
||||
uint32_t **pp_member_rids,
|
||||
size_t *p_num_members);
|
||||
NTSTATUS pdb_enum_group_memberships(TALLOC_CTX *mem_ctx, struct samu *user,
|
||||
struct dom_sid **pp_sids, gid_t **pp_gids,
|
||||
uint32_t *p_num_groups);
|
||||
NTSTATUS pdb_set_unix_primary_group(TALLOC_CTX *mem_ctx, struct samu *user);
|
||||
NTSTATUS pdb_add_groupmem(TALLOC_CTX *mem_ctx, uint32_t group_rid,
|
||||
uint32_t member_rid);
|
||||
NTSTATUS pdb_del_groupmem(TALLOC_CTX *mem_ctx, uint32_t group_rid,
|
||||
uint32_t member_rid);
|
||||
NTSTATUS pdb_create_alias(const char *name, uint32_t *rid);
|
||||
NTSTATUS pdb_delete_alias(const struct dom_sid *sid);
|
||||
NTSTATUS pdb_get_aliasinfo(const struct dom_sid *sid, struct acct_info *info);
|
||||
NTSTATUS pdb_set_aliasinfo(const struct dom_sid *sid, struct acct_info *info);
|
||||
NTSTATUS pdb_add_aliasmem(const struct dom_sid *alias, const struct dom_sid *member);
|
||||
NTSTATUS pdb_del_aliasmem(const struct dom_sid *alias, const struct dom_sid *member);
|
||||
NTSTATUS pdb_enum_aliasmem(const struct dom_sid *alias, TALLOC_CTX *mem_ctx,
|
||||
struct dom_sid **pp_members, size_t *p_num_members);
|
||||
NTSTATUS pdb_enum_alias_memberships(TALLOC_CTX *mem_ctx,
|
||||
const struct dom_sid *domain_sid,
|
||||
const struct dom_sid *members, size_t num_members,
|
||||
uint32_t **pp_alias_rids,
|
||||
size_t *p_num_alias_rids);
|
||||
NTSTATUS pdb_lookup_rids(const struct dom_sid *domain_sid,
|
||||
int num_rids,
|
||||
uint32_t *rids,
|
||||
const char **names,
|
||||
enum lsa_SidType *attrs);
|
||||
bool pdb_get_account_policy(enum pdb_policy_type type, uint32_t *value);
|
||||
bool pdb_set_account_policy(enum pdb_policy_type type, uint32_t value);
|
||||
bool pdb_get_seq_num(time_t *seq_num);
|
||||
/*
|
||||
* Instead of passing down a gid or uid, this function sends down a pointer
|
||||
* to a unixid.
|
||||
*
|
||||
* This acts as an in-out variable so that the idmap functions can correctly
|
||||
* receive ID_TYPE_BOTH, filling in cache details correctly rather than forcing
|
||||
* the cache to store ID_TYPE_UID or ID_TYPE_GID.
|
||||
*/
|
||||
bool pdb_id_to_sid(struct unixid *id, struct dom_sid *sid);
|
||||
bool pdb_sid_to_id(const struct dom_sid *sid, struct unixid *id);
|
||||
uint32_t pdb_capabilities(void);
|
||||
bool pdb_new_rid(uint32_t *rid);
|
||||
bool initialize_password_db(bool reload, struct tevent_context *tevent_ctx);
|
||||
struct pdb_search *pdb_search_init(TALLOC_CTX *mem_ctx,
|
||||
enum pdb_search_type type);
|
||||
struct pdb_search *pdb_search_users(TALLOC_CTX *mem_ctx, uint32_t acct_flags);
|
||||
struct pdb_search *pdb_search_groups(TALLOC_CTX *mem_ctx);
|
||||
struct pdb_search *pdb_search_aliases(TALLOC_CTX *mem_ctx, const struct dom_sid *sid);
|
||||
uint32_t pdb_search_entries(struct pdb_search *search,
|
||||
uint32_t start_idx, uint32_t max_entries,
|
||||
struct samr_displayentry **result);
|
||||
bool pdb_get_trusteddom_pw(const char *domain, char** pwd, struct dom_sid *sid,
|
||||
time_t *pass_last_set_time);
|
||||
NTSTATUS pdb_get_trusteddom_creds(const char *domain, TALLOC_CTX *mem_ctx,
|
||||
struct cli_credentials **creds);
|
||||
bool pdb_set_trusteddom_pw(const char* domain, const char* pwd,
|
||||
const struct dom_sid *sid);
|
||||
bool pdb_del_trusteddom_pw(const char *domain);
|
||||
NTSTATUS pdb_enum_trusteddoms(TALLOC_CTX *mem_ctx, uint32_t *num_domains,
|
||||
struct trustdom_info ***domains);
|
||||
NTSTATUS pdb_get_trusted_domain(TALLOC_CTX *mem_ctx, const char *domain,
|
||||
struct pdb_trusted_domain **td);
|
||||
NTSTATUS pdb_get_trusted_domain_by_sid(TALLOC_CTX *mem_ctx, struct dom_sid *sid,
|
||||
struct pdb_trusted_domain **td);
|
||||
NTSTATUS pdb_set_trusted_domain(const char* domain,
|
||||
const struct pdb_trusted_domain *td);
|
||||
NTSTATUS pdb_del_trusted_domain(const char *domain);
|
||||
NTSTATUS pdb_enum_trusted_domains(TALLOC_CTX *mem_ctx, uint32_t *num_domains,
|
||||
struct pdb_trusted_domain ***domains);
|
||||
NTSTATUS make_pdb_method( struct pdb_methods **methods ) ;
|
||||
NTSTATUS pdb_get_secret(TALLOC_CTX *mem_ctx,
|
||||
const char *secret_name,
|
||||
DATA_BLOB *secret_current,
|
||||
NTTIME *secret_current_lastchange,
|
||||
DATA_BLOB *secret_old,
|
||||
NTTIME *secret_old_lastchange,
|
||||
struct security_descriptor **sd);
|
||||
NTSTATUS pdb_set_secret(const char *secret_name,
|
||||
DATA_BLOB *secret_current,
|
||||
DATA_BLOB *secret_old,
|
||||
struct security_descriptor *sd);
|
||||
NTSTATUS pdb_delete_secret(const char *secret_name);
|
||||
bool pdb_sid_to_id_unix_users_and_groups(const struct dom_sid *sid,
|
||||
struct unixid *id);
|
||||
|
||||
NTSTATUS pdb_enum_upn_suffixes(TALLOC_CTX *mem_ctx,
|
||||
uint32_t *num_suffixes,
|
||||
char ***suffixes);
|
||||
|
||||
NTSTATUS pdb_set_upn_suffixes(uint32_t num_suffixes,
|
||||
const char **suffixes);
|
||||
bool pdb_is_responsible_for_our_sam(void);
|
||||
bool pdb_is_responsible_for_builtin(void);
|
||||
bool pdb_is_responsible_for_wellknown(void);
|
||||
bool pdb_is_responsible_for_unix_users(void);
|
||||
bool pdb_is_responsible_for_unix_groups(void);
|
||||
bool pdb_is_responsible_for_everything_else(void);
|
||||
|
||||
/* The following definitions come from passdb/pdb_util.c */
|
||||
|
||||
NTSTATUS pdb_create_builtin(uint32_t rid);
|
||||
NTSTATUS create_builtin_users(const struct dom_sid *sid);
|
||||
NTSTATUS create_builtin_administrators(const struct dom_sid *sid);
|
||||
NTSTATUS create_builtin_guests(const struct dom_sid *dom_sid);
|
||||
|
||||
#include <machine_sid.h>
|
||||
#include <lookup_sid.h>
|
||||
|
||||
/* The following definitions come from passdb/pdb_secrets.c
|
||||
* and should be used by PDB modules if they need to store
|
||||
* sid/guid information for the domain in secrets database
|
||||
*/
|
||||
bool PDB_secrets_mark_domain_protected(const char *domain);
|
||||
bool PDB_secrets_clear_domain_protection(const char *domain);
|
||||
bool PDB_secrets_store_domain_sid(const char *domain, const struct dom_sid *sid);
|
||||
bool PDB_secrets_fetch_domain_sid(const char *domain, struct dom_sid *sid);
|
||||
bool PDB_secrets_store_domain_guid(const char *domain, struct GUID *guid);
|
||||
bool PDB_secrets_fetch_domain_guid(const char *domain, struct GUID *guid);
|
||||
|
||||
#endif /* _PASSDB_H */
|
||||
@ -0,0 +1,410 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
Copyright (C) Stefan Metzmacher 2010-2011
|
||||
Copyright (C) Andrew Tridgell 2010-2011
|
||||
Copyright (C) Simo Sorce 2010
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __DEFAULT_LIBRPC_RPCCOMMON_H__
|
||||
#define __DEFAULT_LIBRPC_RPCCOMMON_H__
|
||||
|
||||
#include <util/data_blob.h>
|
||||
|
||||
#include <gen_ndr/dcerpc.h>
|
||||
#include <util/attr.h>
|
||||
|
||||
struct dcerpc_binding_handle;
|
||||
struct GUID;
|
||||
struct ndr_interface_table;
|
||||
struct ndr_interface_call;
|
||||
struct ndr_push;
|
||||
struct ndr_pull;
|
||||
struct ncacn_packet;
|
||||
struct epm_floor;
|
||||
struct epm_tower;
|
||||
struct tevent_context;
|
||||
struct tstream_context;
|
||||
struct gensec_security;
|
||||
|
||||
enum dcerpc_transport_t {
|
||||
NCA_UNKNOWN, NCACN_NP, NCACN_IP_TCP, NCACN_IP_UDP, NCACN_VNS_IPC,
|
||||
NCACN_VNS_SPP, NCACN_AT_DSP, NCADG_AT_DDP, NCALRPC, NCACN_UNIX_STREAM,
|
||||
NCADG_UNIX_DGRAM, NCACN_HTTP, NCADG_IPX, NCACN_SPX, NCACN_INTERNAL };
|
||||
|
||||
/** this describes a binding to a particular transport/pipe */
|
||||
struct dcerpc_binding;
|
||||
|
||||
/* dcerpc pipe flags */
|
||||
#define DCERPC_DEBUG_PRINT_IN (1<<0)
|
||||
#define DCERPC_DEBUG_PRINT_OUT (1<<1)
|
||||
#define DCERPC_DEBUG_PRINT_BOTH (DCERPC_DEBUG_PRINT_IN | DCERPC_DEBUG_PRINT_OUT)
|
||||
|
||||
#define DCERPC_DEBUG_VALIDATE_IN (1<<2)
|
||||
#define DCERPC_DEBUG_VALIDATE_OUT (1<<3)
|
||||
#define DCERPC_DEBUG_VALIDATE_BOTH (DCERPC_DEBUG_VALIDATE_IN | DCERPC_DEBUG_VALIDATE_OUT)
|
||||
|
||||
#define DCERPC_CONNECT (1<<4)
|
||||
#define DCERPC_SIGN (1<<5)
|
||||
#define DCERPC_SEAL (1<<6)
|
||||
|
||||
#define DCERPC_PUSH_BIGENDIAN (1<<7)
|
||||
#define DCERPC_PULL_BIGENDIAN (1<<8)
|
||||
|
||||
#define DCERPC_SCHANNEL (1<<9)
|
||||
|
||||
#define DCERPC_ANON_FALLBACK (1<<10)
|
||||
|
||||
/* use a 128 bit session key */
|
||||
#define DCERPC_SCHANNEL_128 (1<<12)
|
||||
|
||||
/* check incoming pad bytes */
|
||||
#define DCERPC_DEBUG_PAD_CHECK (1<<13)
|
||||
|
||||
/* set LIBNDR_FLAG_REF_ALLOC flag when decoding NDR */
|
||||
#define DCERPC_NDR_REF_ALLOC (1<<14)
|
||||
|
||||
#define DCERPC_AUTH_OPTIONS (DCERPC_SEAL|DCERPC_SIGN|DCERPC_SCHANNEL|DCERPC_AUTH_SPNEGO|DCERPC_AUTH_KRB5|DCERPC_AUTH_NTLM)
|
||||
|
||||
/* select spnego auth */
|
||||
#define DCERPC_AUTH_SPNEGO (1<<15)
|
||||
|
||||
/* select krb5 auth */
|
||||
#define DCERPC_AUTH_KRB5 (1<<16)
|
||||
|
||||
#define DCERPC_SMB2 (1<<17)
|
||||
|
||||
/* select NTLM auth */
|
||||
#define DCERPC_AUTH_NTLM (1<<18)
|
||||
|
||||
/* this triggers the DCERPC_PFC_FLAG_CONC_MPX flag in the bind request */
|
||||
#define DCERPC_CONCURRENT_MULTIPLEX (1<<19)
|
||||
|
||||
/* this indicates DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN flag was negotiated */
|
||||
#define DCERPC_HEADER_SIGNING (1<<20)
|
||||
|
||||
/* use NDR64 transport */
|
||||
#define DCERPC_NDR64 (1<<21)
|
||||
|
||||
/* handle upgrades or downgrades automatically */
|
||||
#define DCERPC_SCHANNEL_AUTO (1<<23)
|
||||
|
||||
/* use aes schannel with hmac-sh256 session key */
|
||||
#define DCERPC_SCHANNEL_AES (1<<24)
|
||||
|
||||
/* this triggers the DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN flag in the bind request */
|
||||
#define DCERPC_PROPOSE_HEADER_SIGNING (1<<25)
|
||||
|
||||
#define DCERPC_PACKET (1<<26)
|
||||
|
||||
#define DCERPC_SMB1 (1<<27)
|
||||
|
||||
/* The following definitions come from ../librpc/rpc/dcerpc_error.c */
|
||||
|
||||
const char *dcerpc_errstr(TALLOC_CTX *mem_ctx, uint32_t fault_code);
|
||||
NTSTATUS dcerpc_fault_to_nt_status(uint32_t fault_code);
|
||||
uint32_t dcerpc_fault_from_nt_status(NTSTATUS nt_status);
|
||||
|
||||
/* The following definitions come from ../librpc/rpc/binding.c */
|
||||
|
||||
const char *epm_floor_string(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor);
|
||||
char *dcerpc_floor_get_rhs_data(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor);
|
||||
enum dcerpc_transport_t dcerpc_transport_by_endpoint_protocol(int prot);
|
||||
struct dcerpc_binding *dcerpc_binding_dup(TALLOC_CTX *mem_ctx,
|
||||
const struct dcerpc_binding *b);
|
||||
NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx,
|
||||
const struct dcerpc_binding *binding,
|
||||
struct epm_tower *tower);
|
||||
NTSTATUS dcerpc_binding_from_tower(TALLOC_CTX *mem_ctx,
|
||||
struct epm_tower *tower,
|
||||
struct dcerpc_binding **b_out);
|
||||
NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_binding **b_out);
|
||||
char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_binding *b);
|
||||
struct GUID dcerpc_binding_get_object(const struct dcerpc_binding *b);
|
||||
NTSTATUS dcerpc_binding_set_object(struct dcerpc_binding *b,
|
||||
struct GUID object);
|
||||
enum dcerpc_transport_t dcerpc_binding_get_transport(const struct dcerpc_binding *b);
|
||||
NTSTATUS dcerpc_binding_set_transport(struct dcerpc_binding *b,
|
||||
enum dcerpc_transport_t transport);
|
||||
void dcerpc_binding_get_auth_info(const struct dcerpc_binding *b,
|
||||
enum dcerpc_AuthType *_auth_type,
|
||||
enum dcerpc_AuthLevel *_auth_level);
|
||||
uint32_t dcerpc_binding_get_assoc_group_id(const struct dcerpc_binding *b);
|
||||
NTSTATUS dcerpc_binding_set_assoc_group_id(struct dcerpc_binding *b,
|
||||
uint32_t assoc_group_id);
|
||||
struct ndr_syntax_id dcerpc_binding_get_abstract_syntax(const struct dcerpc_binding *b);
|
||||
NTSTATUS dcerpc_binding_set_abstract_syntax(struct dcerpc_binding *b,
|
||||
const struct ndr_syntax_id *syntax);
|
||||
const char *dcerpc_binding_get_string_option(const struct dcerpc_binding *b,
|
||||
const char *name);
|
||||
char *dcerpc_binding_copy_string_option(TALLOC_CTX *mem_ctx,
|
||||
const struct dcerpc_binding *b,
|
||||
const char *name);
|
||||
NTSTATUS dcerpc_binding_set_string_option(struct dcerpc_binding *b,
|
||||
const char *name,
|
||||
const char *value);
|
||||
uint32_t dcerpc_binding_get_flags(const struct dcerpc_binding *b);
|
||||
NTSTATUS dcerpc_binding_set_flags(struct dcerpc_binding *b,
|
||||
uint32_t additional,
|
||||
uint32_t clear);
|
||||
NTSTATUS dcerpc_floor_get_lhs_data(const struct epm_floor *epm_floor, struct ndr_syntax_id *syntax);
|
||||
const char *derpc_transport_string_by_transport(enum dcerpc_transport_t t);
|
||||
enum dcerpc_transport_t dcerpc_transport_by_name(const char *name);
|
||||
enum dcerpc_transport_t dcerpc_transport_by_tower(const struct epm_tower *tower);
|
||||
|
||||
/* The following definitions come from ../librpc/rpc/binding_handle.c */
|
||||
|
||||
struct dcerpc_binding_handle_ops {
|
||||
const char *name;
|
||||
|
||||
bool (*is_connected)(struct dcerpc_binding_handle *h);
|
||||
uint32_t (*set_timeout)(struct dcerpc_binding_handle *h,
|
||||
uint32_t timeout);
|
||||
|
||||
void (*auth_info)(struct dcerpc_binding_handle *h,
|
||||
enum dcerpc_AuthType *auth_type,
|
||||
enum dcerpc_AuthLevel *auth_level);
|
||||
|
||||
struct tevent_req *(*raw_call_send)(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct dcerpc_binding_handle *h,
|
||||
const struct GUID *object,
|
||||
uint32_t opnum,
|
||||
uint32_t in_flags,
|
||||
const uint8_t *in_data,
|
||||
size_t in_length);
|
||||
NTSTATUS (*raw_call_recv)(struct tevent_req *req,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint8_t **out_data,
|
||||
size_t *out_length,
|
||||
uint32_t *out_flags);
|
||||
|
||||
struct tevent_req *(*disconnect_send)(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct dcerpc_binding_handle *h);
|
||||
NTSTATUS (*disconnect_recv)(struct tevent_req *req);
|
||||
|
||||
/* TODO: remove the following functions */
|
||||
bool (*push_bigendian)(struct dcerpc_binding_handle *h);
|
||||
bool (*ref_alloc)(struct dcerpc_binding_handle *h);
|
||||
bool (*use_ndr64)(struct dcerpc_binding_handle *h);
|
||||
void (*do_ndr_print)(struct dcerpc_binding_handle *h,
|
||||
int ndr_flags,
|
||||
const void *struct_ptr,
|
||||
const struct ndr_interface_call *call);
|
||||
void (*ndr_push_failed)(struct dcerpc_binding_handle *h,
|
||||
NTSTATUS error,
|
||||
const void *struct_ptr,
|
||||
const struct ndr_interface_call *call);
|
||||
void (*ndr_pull_failed)(struct dcerpc_binding_handle *h,
|
||||
NTSTATUS error,
|
||||
const DATA_BLOB *blob,
|
||||
const struct ndr_interface_call *call);
|
||||
NTSTATUS (*ndr_validate_in)(struct dcerpc_binding_handle *h,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const DATA_BLOB *blob,
|
||||
const struct ndr_interface_call *call);
|
||||
NTSTATUS (*ndr_validate_out)(struct dcerpc_binding_handle *h,
|
||||
struct ndr_pull *pull_in,
|
||||
const void *struct_ptr,
|
||||
const struct ndr_interface_call *call);
|
||||
};
|
||||
|
||||
struct dcerpc_binding_handle *_dcerpc_binding_handle_create(TALLOC_CTX *mem_ctx,
|
||||
const struct dcerpc_binding_handle_ops *ops,
|
||||
const struct GUID *object,
|
||||
const struct ndr_interface_table *table,
|
||||
void *pstate,
|
||||
size_t psize,
|
||||
const char *type,
|
||||
const char *location);
|
||||
#define dcerpc_binding_handle_create(mem_ctx, ops, object, table, \
|
||||
state, type, location) \
|
||||
_dcerpc_binding_handle_create(mem_ctx, ops, object, table, \
|
||||
state, sizeof(type), #type, location)
|
||||
|
||||
void *_dcerpc_binding_handle_data(struct dcerpc_binding_handle *h);
|
||||
#define dcerpc_binding_handle_data(_h, _type) \
|
||||
talloc_get_type_abort(_dcerpc_binding_handle_data(_h), _type)
|
||||
|
||||
_DEPRECATED_ void dcerpc_binding_handle_set_sync_ev(struct dcerpc_binding_handle *h,
|
||||
struct tevent_context *ev);
|
||||
|
||||
bool dcerpc_binding_handle_is_connected(struct dcerpc_binding_handle *h);
|
||||
|
||||
uint32_t dcerpc_binding_handle_set_timeout(struct dcerpc_binding_handle *h,
|
||||
uint32_t timeout);
|
||||
|
||||
void dcerpc_binding_handle_auth_info(struct dcerpc_binding_handle *h,
|
||||
enum dcerpc_AuthType *auth_type,
|
||||
enum dcerpc_AuthLevel *auth_level);
|
||||
|
||||
struct tevent_req *dcerpc_binding_handle_raw_call_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct dcerpc_binding_handle *h,
|
||||
const struct GUID *object,
|
||||
uint32_t opnum,
|
||||
uint32_t in_flags,
|
||||
const uint8_t *in_data,
|
||||
size_t in_length);
|
||||
NTSTATUS dcerpc_binding_handle_raw_call_recv(struct tevent_req *req,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint8_t **out_data,
|
||||
size_t *out_length,
|
||||
uint32_t *out_flags);
|
||||
NTSTATUS dcerpc_binding_handle_raw_call(struct dcerpc_binding_handle *h,
|
||||
const struct GUID *object,
|
||||
uint32_t opnum,
|
||||
uint32_t in_flags,
|
||||
const uint8_t *in_data,
|
||||
size_t in_length,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint8_t **out_data,
|
||||
size_t *out_length,
|
||||
uint32_t *out_flags);
|
||||
|
||||
struct tevent_req *dcerpc_binding_handle_disconnect_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct dcerpc_binding_handle *h);
|
||||
NTSTATUS dcerpc_binding_handle_disconnect_recv(struct tevent_req *req);
|
||||
|
||||
struct tevent_req *dcerpc_binding_handle_call_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct dcerpc_binding_handle *h,
|
||||
const struct GUID *object,
|
||||
const struct ndr_interface_table *table,
|
||||
uint32_t opnum,
|
||||
TALLOC_CTX *r_mem,
|
||||
void *r_ptr);
|
||||
NTSTATUS dcerpc_binding_handle_call_recv(struct tevent_req *req);
|
||||
NTSTATUS dcerpc_binding_handle_call(struct dcerpc_binding_handle *h,
|
||||
const struct GUID *object,
|
||||
const struct ndr_interface_table *table,
|
||||
uint32_t opnum,
|
||||
TALLOC_CTX *r_mem,
|
||||
void *r_ptr);
|
||||
|
||||
/**
|
||||
* Extract header information from a ncacn_packet
|
||||
* as a dcerpc_sec_vt_header2 as used by the security verification trailer.
|
||||
*
|
||||
* @param[in] pkt a packet
|
||||
*
|
||||
* @return a dcerpc_sec_vt_header2
|
||||
*/
|
||||
struct dcerpc_sec_vt_header2 dcerpc_sec_vt_header2_from_ncacn_packet(const struct ncacn_packet *pkt);
|
||||
|
||||
|
||||
/**
|
||||
* Test if two dcerpc_sec_vt_header2 structures are equal
|
||||
* without consideration of reserved fields.
|
||||
*
|
||||
* @param v1 a pointer to a dcerpc_sec_vt_header2 structure
|
||||
* @param v2 a pointer to a dcerpc_sec_vt_header2 structure
|
||||
*
|
||||
* @retval true if *v1 equals *v2
|
||||
*/
|
||||
bool dcerpc_sec_vt_header2_equal(const struct dcerpc_sec_vt_header2 *v1,
|
||||
const struct dcerpc_sec_vt_header2 *v2);
|
||||
|
||||
/**
|
||||
* Check for consistency of the security verification trailer with the PDU header.
|
||||
* See <a href="http://msdn.microsoft.com/en-us/library/cc243559.aspx">MS-RPCE 2.2.2.13</a>.
|
||||
* A check with an empty trailer succeeds.
|
||||
*
|
||||
* @param[in] vt a pointer to the security verification trailer.
|
||||
* @param[in] bitmask1 which flags were negotiated on the connection.
|
||||
* @param[in] pcontext the syntaxes negotiatied for the presentation context.
|
||||
* @param[in] header2 some fields from the PDU header.
|
||||
*
|
||||
* @retval true on success.
|
||||
*/
|
||||
bool dcerpc_sec_verification_trailer_check(
|
||||
const struct dcerpc_sec_verification_trailer *vt,
|
||||
const uint32_t *bitmask1,
|
||||
const struct dcerpc_sec_vt_pcontext *pcontext,
|
||||
const struct dcerpc_sec_vt_header2 *header2);
|
||||
|
||||
/**
|
||||
* @brief check and optionally extract the Bind Time Features from
|
||||
* the given ndr_syntax_id.
|
||||
*
|
||||
* <a href="http://msdn.microsoft.com/en-us/library/cc243715.aspx">MS-RPCE 3.3.1.5.3 Bind Time Feature Negotiation</a>.
|
||||
*
|
||||
* @param[in] s the syntax that should be checked.
|
||||
*
|
||||
* @param[out] features This is optional, it will be filled with the extracted
|
||||
* features the on success, otherwise it's filled with 0.
|
||||
*
|
||||
* @return true if the syntax matches the 6CB71C2C-9812-4540 prefix with version 1, false otherwise.
|
||||
*
|
||||
* @see dcerpc_construct_bind_time_features
|
||||
*/
|
||||
bool dcerpc_extract_bind_time_features(struct ndr_syntax_id syntax, uint64_t *features);
|
||||
|
||||
/**
|
||||
* @brief Construct a ndr_syntax_id used for Bind Time Features Negotiation.
|
||||
*
|
||||
* <a href="http://msdn.microsoft.com/en-us/library/cc243715.aspx">MS-RPCE 3.3.1.5.3 Bind Time Feature Negotiation</a>.
|
||||
*
|
||||
* @param[in] features The supported features.
|
||||
*
|
||||
* @return The ndr_syntax_id with the given features.
|
||||
*
|
||||
* @see dcerpc_extract_bind_time_features
|
||||
*/
|
||||
struct ndr_syntax_id dcerpc_construct_bind_time_features(uint64_t features);
|
||||
|
||||
#define DCERPC_AUTH_PAD_LENGTH(stub_length) (\
|
||||
(((stub_length) % DCERPC_AUTH_PAD_ALIGNMENT) > 0)?\
|
||||
(DCERPC_AUTH_PAD_ALIGNMENT - (stub_length) % DCERPC_AUTH_PAD_ALIGNMENT):\
|
||||
0)
|
||||
|
||||
NTSTATUS dcerpc_generic_session_key(DATA_BLOB *session_key);
|
||||
|
||||
NTSTATUS dcerpc_ncacn_push_auth(DATA_BLOB *blob,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct ncacn_packet *pkt,
|
||||
struct dcerpc_auth *auth_info);
|
||||
|
||||
void dcerpc_log_packet(const char *packet_log_dir,
|
||||
const char *interface_name,
|
||||
uint32_t opnum, uint32_t flags,
|
||||
const DATA_BLOB *pkt,
|
||||
const char *why);
|
||||
|
||||
#ifdef DEVELOPER
|
||||
void dcerpc_save_ndr_fuzz_seed(TALLOC_CTX *mem_ctx,
|
||||
DATA_BLOB raw_blob,
|
||||
const char *dump_dir,
|
||||
const char *iface_name,
|
||||
int flags,
|
||||
int opnum,
|
||||
bool ndr64);
|
||||
#else
|
||||
static inline void dcerpc_save_ndr_fuzz_seed(TALLOC_CTX *mem_ctx,
|
||||
DATA_BLOB raw_blob,
|
||||
const char *dump_dir,
|
||||
const char *iface_name,
|
||||
int flags,
|
||||
int opnum,
|
||||
bool ndr64)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __DEFAULT_LIBRPC_RPCCOMMON_H__ */
|
||||
@ -0,0 +1,79 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
Process and provide the logged on user's authorization token
|
||||
Copyright (C) Andrew Bartlett 2001
|
||||
Copyright (C) Stefan Metzmacher 2005
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _SAMBA_AUTH_SESSION_H
|
||||
#define _SAMBA_AUTH_SESSION_H
|
||||
|
||||
#include <gen_ndr/security.h>
|
||||
#include <gen_ndr/netlogon.h>
|
||||
#include <gen_ndr/auth.h>
|
||||
|
||||
struct tevent_context;
|
||||
struct ldb_context;
|
||||
struct ldb_dn;
|
||||
/* Create a security token for a session SYSTEM (the most
|
||||
* trusted/prvilaged account), including the local machine account as
|
||||
* the off-host credentials */
|
||||
struct auth_session_info *system_session(struct loadparm_context *lp_ctx) ;
|
||||
|
||||
NTSTATUS auth_anonymous_user_info_dc(TALLOC_CTX *mem_ctx,
|
||||
const char *netbios_name,
|
||||
struct auth_user_info_dc **interim_info);
|
||||
NTSTATUS auth_generate_session_info(TALLOC_CTX *mem_ctx,
|
||||
struct loadparm_context *lp_ctx, /* Optional, if you don't want privilages */
|
||||
struct ldb_context *sam_ctx, /* Optional, if you don't want local groups */
|
||||
struct auth_user_info_dc *interim_info,
|
||||
uint32_t session_info_flags,
|
||||
struct auth_session_info **session_info);
|
||||
NTSTATUS auth_anonymous_session_info(TALLOC_CTX *parent_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct auth_session_info **session_info);
|
||||
struct auth_session_info *auth_session_info_from_transport(TALLOC_CTX *mem_ctx,
|
||||
struct auth_session_info_transport *session_info_transport,
|
||||
struct loadparm_context *lp_ctx,
|
||||
const char **reason);
|
||||
NTSTATUS auth_session_info_transport_from_session(TALLOC_CTX *mem_ctx,
|
||||
struct auth_session_info *session_info,
|
||||
struct tevent_context *event_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct auth_session_info_transport **transport_out);
|
||||
|
||||
/* Produce a session_info for an arbitary DN or principal in the local
|
||||
* DB, assuming the local DB holds all the groups
|
||||
*
|
||||
* Supply either a principal or a DN
|
||||
*/
|
||||
NTSTATUS authsam_get_session_info_principal(TALLOC_CTX *mem_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct ldb_context *sam_ctx,
|
||||
const char *principal,
|
||||
struct ldb_dn *user_dn,
|
||||
uint32_t session_info_flags,
|
||||
struct auth_session_info **session_info);
|
||||
|
||||
struct auth_session_info *anonymous_session(TALLOC_CTX *mem_ctx,
|
||||
struct loadparm_context *lp_ctx);
|
||||
|
||||
struct auth_session_info *admin_session(TALLOC_CTX *mem_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct dom_sid *domain_sid);
|
||||
|
||||
|
||||
#endif /* _SAMBA_AUTH_SESSION_H */
|
||||
@ -0,0 +1,14 @@
|
||||
/* Autogenerated by waf */
|
||||
#define SAMBA_VERSION_MAJOR 4
|
||||
#define SAMBA_VERSION_MINOR 15
|
||||
#define SAMBA_VERSION_RELEASE 13
|
||||
#define SAMBA_VERSION_OFFICIAL_STRING "4.15.13"
|
||||
|
||||
#ifdef SAMBA_VERSION_VENDOR_FUNCTION
|
||||
# define SAMBA_VERSION_STRING SAMBA_VERSION_VENDOR_FUNCTION
|
||||
#else /* SAMBA_VERSION_VENDOR_FUNCTION */
|
||||
# define SAMBA_VERSION_STRING "4.15.13"
|
||||
#endif
|
||||
/* Version for mkrelease.sh:
|
||||
SAMBA_VERSION_STRING=4.15.13
|
||||
*/
|
||||
@ -0,0 +1,149 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
Modular services configuration
|
||||
|
||||
Copyright (C) Simo Sorce 2006
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _SHARE_H
|
||||
#define _SHARE_H
|
||||
|
||||
struct share_ops;
|
||||
|
||||
struct share_context {
|
||||
const struct share_ops *ops;
|
||||
void *priv_data;
|
||||
};
|
||||
|
||||
struct share_config {
|
||||
const char *name;
|
||||
struct share_context *ctx;
|
||||
void *opaque;
|
||||
};
|
||||
|
||||
enum share_info_type {
|
||||
SHARE_INFO_STRING,
|
||||
SHARE_INFO_INT,
|
||||
SHARE_INFO_BLOB
|
||||
};
|
||||
|
||||
struct share_info {
|
||||
enum share_info_type type;
|
||||
const char *name;
|
||||
void *value;
|
||||
};
|
||||
|
||||
struct tevent_context;
|
||||
|
||||
struct share_ops {
|
||||
const char *name;
|
||||
NTSTATUS (*init)(TALLOC_CTX *, const struct share_ops*,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct share_context **);
|
||||
char *(*string_option)(TALLOC_CTX *, struct share_config *, const char *, const char *);
|
||||
int (*int_option)(struct share_config *, const char *, int);
|
||||
bool (*bool_option)(struct share_config *, const char *, bool);
|
||||
const char **(*string_list_option)(TALLOC_CTX *, struct share_config *, const char *);
|
||||
NTSTATUS (*list_all)(TALLOC_CTX *, struct share_context *, int *, const char ***);
|
||||
NTSTATUS (*get_config)(TALLOC_CTX *, struct share_context *, const char *, struct share_config **);
|
||||
NTSTATUS (*create)(struct share_context *, const char *, struct share_info *, int);
|
||||
NTSTATUS (*set)(struct share_context *, const char *, struct share_info *, int);
|
||||
NTSTATUS (*remove)(struct share_context *, const char *);
|
||||
};
|
||||
|
||||
struct loadparm_context;
|
||||
|
||||
char *share_string_option(TALLOC_CTX *mem_ctx, struct share_config *scfg, const char *opt_name, const char *defval);
|
||||
int share_int_option(struct share_config *scfg, const char *opt_name, int defval);
|
||||
bool share_bool_option(struct share_config *scfg, const char *opt_name, bool defval);
|
||||
const char **share_string_list_option(TALLOC_CTX *mem_ctx, struct share_config *scfg, const char *opt_name);
|
||||
NTSTATUS share_list_all(TALLOC_CTX *mem_ctx, struct share_context *sctx, int *count, const char ***names);
|
||||
NTSTATUS share_get_config(TALLOC_CTX *mem_ctx, struct share_context *sctx, const char *name, struct share_config **scfg);
|
||||
NTSTATUS share_create(struct share_context *sctx, const char *name, struct share_info *info, int count);
|
||||
NTSTATUS share_set(struct share_context *sctx, const char *name, struct share_info *info, int count);
|
||||
NTSTATUS share_remove(struct share_context *sctx, const char *name);
|
||||
NTSTATUS share_register(const struct share_ops *ops);
|
||||
NTSTATUS share_get_context(TALLOC_CTX *mem_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct share_context **ctx);
|
||||
NTSTATUS share_init(void);
|
||||
|
||||
/* list of shares options */
|
||||
|
||||
#define SHARE_NAME "name"
|
||||
#define SHARE_PATH "path"
|
||||
#define SHARE_COMMENT "comment"
|
||||
#define SHARE_PASSWORD "password"
|
||||
#define SHARE_HOSTS_ALLOW "hosts-allow"
|
||||
#define SHARE_HOSTS_DENY "hosts-deny"
|
||||
#define SHARE_NTVFS_HANDLER "ntvfs-handler"
|
||||
#define SHARE_TYPE "type"
|
||||
#define SHARE_CSC_POLICY "csc-policy"
|
||||
#define SHARE_AVAILABLE "available"
|
||||
#define SHARE_BROWSEABLE "browseable"
|
||||
#define SHARE_MAX_CONNECTIONS "max-connections"
|
||||
|
||||
/* I'd like to see the following options go away
|
||||
* and always use EAs and SECDESCs */
|
||||
#define SHARE_READONLY "readonly"
|
||||
#define SHARE_MAP_SYSTEM "map-system"
|
||||
#define SHARE_MAP_HIDDEN "map-hidden"
|
||||
#define SHARE_MAP_ARCHIVE "map-archive"
|
||||
|
||||
#define SHARE_STRICT_LOCKING "strict-locking"
|
||||
#define SHARE_OPLOCKS "oplocks"
|
||||
#define SHARE_STRICT_SYNC "strict-sync"
|
||||
#define SHARE_MSDFS_ROOT "msdfs-root"
|
||||
#define SHARE_CI_FILESYSTEM "ci-filesystem"
|
||||
|
||||
#define SHARE_DIR_MASK "directory mask"
|
||||
#define SHARE_CREATE_MASK "create mask"
|
||||
#define SHARE_FORCE_CREATE_MODE "force create mode"
|
||||
#define SHARE_FORCE_DIR_MODE "force directory mode"
|
||||
|
||||
/* defaults */
|
||||
|
||||
#define SHARE_HOST_ALLOW_DEFAULT NULL
|
||||
#define SHARE_HOST_DENY_DEFAULT NULL
|
||||
#define SHARE_VOLUME_DEFAULT NULL
|
||||
#define SHARE_TYPE_DEFAULT "DISK"
|
||||
#define SHARE_CSC_POLICY_DEFAULT 0
|
||||
#define SHARE_AVAILABLE_DEFAULT true
|
||||
#define SHARE_BROWSEABLE_DEFAULT true
|
||||
#define SHARE_MAX_CONNECTIONS_DEFAULT 0
|
||||
|
||||
#define SHARE_DIR_MASK_DEFAULT 0755
|
||||
#define SHARE_CREATE_MASK_DEFAULT 0744
|
||||
#define SHARE_FORCE_CREATE_MODE_DEFAULT 0000
|
||||
#define SHARE_FORCE_DIR_MODE_DEFAULT 0000
|
||||
|
||||
|
||||
|
||||
/* I'd like to see the following options go away
|
||||
* and always use EAs and SECDESCs */
|
||||
#define SHARE_READONLY_DEFAULT true
|
||||
#define SHARE_MAP_SYSTEM_DEFAULT false
|
||||
#define SHARE_MAP_HIDDEN_DEFAULT false
|
||||
#define SHARE_MAP_ARCHIVE_DEFAULT true
|
||||
|
||||
#define SHARE_STRICT_LOCKING_DEFAULT true
|
||||
#define SHARE_OPLOCKS_DEFAULT true
|
||||
#define SHARE_STRICT_SYNC_DEFAULT false
|
||||
#define SHARE_MSDFS_ROOT_DEFAULT false
|
||||
#define SHARE_CI_FILESYSTEM_DEFAULT false
|
||||
|
||||
#endif /* _SHARE_H */
|
||||
@ -0,0 +1,33 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#ifndef _PIDL_HEADER_smb2_lease_struct
|
||||
#define _PIDL_HEADER_smb2_lease_struct
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <core/ntstatus.h>
|
||||
|
||||
#ifndef _HEADER_smb2_lease_struct
|
||||
#define _HEADER_smb2_lease_struct
|
||||
|
||||
struct smb2_lease_key {
|
||||
uint64_t data[2];
|
||||
}/* [public] */;
|
||||
|
||||
/* bitmap smb2_lease_state */
|
||||
#define SMB2_LEASE_READ ( 0x01 )
|
||||
#define SMB2_LEASE_HANDLE ( 0x02 )
|
||||
#define SMB2_LEASE_WRITE ( 0x04 )
|
||||
|
||||
struct smb2_lease {
|
||||
struct smb2_lease_key lease_key;
|
||||
uint32_t lease_state;
|
||||
uint32_t lease_flags;
|
||||
uint64_t lease_duration;
|
||||
struct smb2_lease_key parent_lease_key;
|
||||
uint16_t lease_version;
|
||||
uint16_t lease_epoch;
|
||||
}/* [public] */;
|
||||
|
||||
#endif /* _HEADER_smb2_lease_struct */
|
||||
#endif /* _PIDL_HEADER_smb2_lease_struct */
|
||||
@ -0,0 +1,505 @@
|
||||
/*
|
||||
* Unix SMB/CIFS implementation.
|
||||
* libsmbconf - Samba configuration library
|
||||
* Copyright (C) Michael Adam 2008
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LIBSMBCONF_H__
|
||||
#define __LIBSMBCONF_H__
|
||||
|
||||
/**
|
||||
* @defgroup libsmbconf The smbconf API
|
||||
*
|
||||
* libsmbconf is a library to read or, based on the backend, modify the Samba
|
||||
* configuration.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Status codes returned from smbconf functions
|
||||
*/
|
||||
enum _sbcErrType {
|
||||
SBC_ERR_OK = 0, /**< Successful completion **/
|
||||
SBC_ERR_NOT_IMPLEMENTED, /**< Function not implemented **/
|
||||
SBC_ERR_NOT_SUPPORTED, /**< Function not supported **/
|
||||
SBC_ERR_UNKNOWN_FAILURE, /**< General failure **/
|
||||
SBC_ERR_NOMEM, /**< Memory allocation error **/
|
||||
SBC_ERR_INVALID_PARAM, /**< An Invalid parameter was supplied **/
|
||||
SBC_ERR_BADFILE, /**< A bad file was supplied **/
|
||||
SBC_ERR_NO_SUCH_SERVICE, /**< There is no such service provided **/
|
||||
SBC_ERR_IO_FAILURE, /**< There was an IO error **/
|
||||
SBC_ERR_CAN_NOT_COMPLETE,/**< Can not complete action **/
|
||||
SBC_ERR_NO_MORE_ITEMS, /**< No more items left **/
|
||||
SBC_ERR_FILE_EXISTS, /**< File already exists **/
|
||||
SBC_ERR_ACCESS_DENIED, /**< Access has been denied **/
|
||||
};
|
||||
|
||||
typedef enum _sbcErrType sbcErr;
|
||||
|
||||
#define SBC_ERROR_IS_OK(x) ((x) == SBC_ERR_OK)
|
||||
#define SBC_ERROR_EQUAL(x,y) ((x) == (y))
|
||||
|
||||
struct smbconf_ctx;
|
||||
|
||||
/* the change sequence number */
|
||||
struct smbconf_csn {
|
||||
uint64_t csn;
|
||||
};
|
||||
|
||||
/** Information about a service */
|
||||
struct smbconf_service {
|
||||
char *name; /**< The name of the share */
|
||||
uint32_t num_params; /**< List of length num_shares of parameter counts for each share */
|
||||
char **param_names; /**< List of lists of parameter names for each share */
|
||||
char **param_values; /**< List of lists of parameter values for each share */
|
||||
};
|
||||
|
||||
/*
|
||||
* The smbconf API functions
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Translate an error value into a string
|
||||
*
|
||||
* @param error
|
||||
*
|
||||
* @return a pointer to a static string
|
||||
**/
|
||||
const char *sbcErrorString(sbcErr error);
|
||||
|
||||
/**
|
||||
* @brief Check if the backend requires messaging to be set up.
|
||||
*
|
||||
* Tell whether the backend requires messaging to be set up
|
||||
* for the backend to work correctly.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to check.
|
||||
*
|
||||
* @return True if needed, false if not.
|
||||
*/
|
||||
bool smbconf_backend_requires_messaging(struct smbconf_ctx *ctx);
|
||||
|
||||
/**
|
||||
* @brief Tell whether the source is writeable.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to check.
|
||||
*
|
||||
* @return True if it is writeable, false if not.
|
||||
*/
|
||||
bool smbconf_is_writeable(struct smbconf_ctx *ctx);
|
||||
|
||||
/**
|
||||
* @brief Close the configuration.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to close.
|
||||
*/
|
||||
void smbconf_shutdown(struct smbconf_ctx *ctx);
|
||||
|
||||
/**
|
||||
* @brief Detect changes in the configuration.
|
||||
*
|
||||
* Get the change sequence number of the given service/parameter. Service and
|
||||
* parameter strings may be NULL.
|
||||
*
|
||||
* The given change sequence number (csn) struct is filled with the current
|
||||
* csn. smbconf_changed() can also be used for initial retrieval of the csn.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to check for changes.
|
||||
*
|
||||
* @param[inout] csn The smbconf csn to be filled.
|
||||
*
|
||||
* @param[in] service The service name to check or NULL.
|
||||
*
|
||||
* @param[in] param The param to check or NULL.
|
||||
*
|
||||
* @return True if it has been changed, false if not.
|
||||
*/
|
||||
bool smbconf_changed(struct smbconf_ctx *ctx, struct smbconf_csn *csn,
|
||||
const char *service, const char *param);
|
||||
|
||||
/**
|
||||
* @brief Drop the whole configuration (restarting empty).
|
||||
*
|
||||
* @param[in] ctx The smbconf context to drop the config.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*/
|
||||
sbcErr smbconf_drop(struct smbconf_ctx *ctx);
|
||||
|
||||
/**
|
||||
* @brief Get the whole configuration as lists of strings with counts.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to get the lists from.
|
||||
*
|
||||
* @param[in] mem_ctx The memory context to use.
|
||||
*
|
||||
* @param[in] num_shares A pointer to store the number of shares.
|
||||
*
|
||||
* @param[out] services A pointer to store the services.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*
|
||||
* @see smbconf_service
|
||||
*/
|
||||
sbcErr smbconf_get_config(struct smbconf_ctx *ctx,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32_t *num_shares,
|
||||
struct smbconf_service ***services);
|
||||
|
||||
/**
|
||||
* @brief Get the list of share names defined in the configuration.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to use.
|
||||
*
|
||||
* @param[in] mem_ctx The memory context to use.
|
||||
*
|
||||
* @param[in] num_shares A pointer to store the number of shares.
|
||||
*
|
||||
* @param[in] share_names A pointer to store the share names.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*/
|
||||
sbcErr smbconf_get_share_names(struct smbconf_ctx *ctx,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32_t *num_shares,
|
||||
char ***share_names);
|
||||
|
||||
/**
|
||||
* @brief Check if a share/service of a given name exists.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to use.
|
||||
*
|
||||
* @param[in] servicename The service name to check if it exists.
|
||||
*
|
||||
* @return True if it exists, false if not.
|
||||
*/
|
||||
bool smbconf_share_exists(struct smbconf_ctx *ctx, const char *servicename);
|
||||
|
||||
/**
|
||||
* @brief Add a service if it does not already exist.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to use.
|
||||
*
|
||||
* @param[in] servicename The name of the service to add.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*/
|
||||
sbcErr smbconf_create_share(struct smbconf_ctx *ctx, const char *servicename);
|
||||
|
||||
/**
|
||||
* @brief create and set the definition for a new service.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to use.
|
||||
*
|
||||
* @param[in] service The definition for the added service.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*/
|
||||
sbcErr smbconf_create_set_share(struct smbconf_ctx *ctx,
|
||||
struct smbconf_service *service);
|
||||
|
||||
/**
|
||||
* @brief Get a definition of a share (service) from configuration.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to use.
|
||||
*
|
||||
* @param[in] mem_ctx A memory context to allocate the result.
|
||||
*
|
||||
* @param[in] servicename The service name to get the information from.
|
||||
*
|
||||
* @param[out] service A pointer to store the service information about the
|
||||
* share.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*
|
||||
* @see smbconf_service
|
||||
*/
|
||||
sbcErr smbconf_get_share(struct smbconf_ctx *ctx,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const char *servicename,
|
||||
struct smbconf_service **service);
|
||||
|
||||
/**
|
||||
* @brief Delete a service from configuration.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to use.
|
||||
*
|
||||
* @param[in] servicename The service name to delete.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*/
|
||||
sbcErr smbconf_delete_share(struct smbconf_ctx *ctx,
|
||||
const char *servicename);
|
||||
|
||||
/**
|
||||
* @brief Set a configuration parameter to the value provided.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to use.
|
||||
*
|
||||
* @param[in] service The service name to set the parameter.
|
||||
*
|
||||
* @param[in] param The name of the parameter to set.
|
||||
*
|
||||
* @param[in] valstr The value to set.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*/
|
||||
sbcErr smbconf_set_parameter(struct smbconf_ctx *ctx,
|
||||
const char *service,
|
||||
const char *param,
|
||||
const char *valstr);
|
||||
|
||||
/**
|
||||
* @brief Set a global configuration parameter to the value provided.
|
||||
*
|
||||
* This adds a paramet in the [global] service. It also creates [global] if it
|
||||
* does't exist.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to use.
|
||||
*
|
||||
* @param[in] param The name of the parameter to set.
|
||||
*
|
||||
* @param[in] val The value to set.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*/
|
||||
sbcErr smbconf_set_global_parameter(struct smbconf_ctx *ctx,
|
||||
const char *param, const char *val);
|
||||
|
||||
/**
|
||||
* @brief Get the value of a configuration parameter as a string.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to use.
|
||||
*
|
||||
* @param[in] mem_ctx The memory context to allocate the string on.
|
||||
*
|
||||
* @param[in] service The name of the service where to find the parameter.
|
||||
*
|
||||
* @param[in] param The parameter to get.
|
||||
*
|
||||
* @param[out] valstr A pointer to store the value as a string.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*/
|
||||
sbcErr smbconf_get_parameter(struct smbconf_ctx *ctx,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const char *service,
|
||||
const char *param,
|
||||
char **valstr);
|
||||
|
||||
/**
|
||||
* @brief Get the value of a global configuration parameter as a string.
|
||||
*
|
||||
* It also creates [global] if it does't exist.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to use.
|
||||
*
|
||||
* @param[in] mem_ctx The memory context to allocate the string on.
|
||||
*
|
||||
* @param[in] param The parameter to get.
|
||||
*
|
||||
* @param[out] valstr A pointer to store the value as a string.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*/
|
||||
sbcErr smbconf_get_global_parameter(struct smbconf_ctx *ctx,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const char *param,
|
||||
char **valstr);
|
||||
|
||||
/**
|
||||
* @brief Delete a parameter from the configuration.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to use.
|
||||
*
|
||||
* @param[in] service The service where the parameter can be found.
|
||||
*
|
||||
* @param[in] param The name of the parameter to delete.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*/
|
||||
sbcErr smbconf_delete_parameter(struct smbconf_ctx *ctx,
|
||||
const char *service, const char *param);
|
||||
|
||||
/**
|
||||
* @brief Delete a global parameter from the configuration.
|
||||
*
|
||||
* It also creates [global] if it does't exist.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to use.
|
||||
*
|
||||
* @param[in] param The name of the parameter to delete.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*/
|
||||
sbcErr smbconf_delete_global_parameter(struct smbconf_ctx *ctx,
|
||||
const char *param);
|
||||
|
||||
/**
|
||||
* @brief Get the list of names of included files.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to use.
|
||||
*
|
||||
* @param[in] mem_ctx The memory context to allocate the names.
|
||||
*
|
||||
* @param[in] service The service name to get the include files.
|
||||
*
|
||||
* @param[out] num_includes A pointer to store the number of included files.
|
||||
*
|
||||
* @param[out] includes A pointer to store the paths of the included files.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*/
|
||||
sbcErr smbconf_get_includes(struct smbconf_ctx *ctx,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const char *service,
|
||||
uint32_t *num_includes, char ***includes);
|
||||
|
||||
/**
|
||||
* @brief Get the list of globally included files.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to use.
|
||||
*
|
||||
* @param[in] mem_ctx The memory context to allocate the names.
|
||||
*
|
||||
* @param[out] num_includes A pointer to store the number of included files.
|
||||
*
|
||||
* @param[out] includes A pointer to store the paths of the included files.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*/
|
||||
sbcErr smbconf_get_global_includes(struct smbconf_ctx *ctx,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint32_t *num_includes, char ***includes);
|
||||
|
||||
/**
|
||||
* @brief Set a list of config files to include on the given service.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to use.
|
||||
*
|
||||
* @param[in] service The service to add includes.
|
||||
*
|
||||
* @param[in] num_includes The number of includes to set.
|
||||
*
|
||||
* @param[in] includes A list of paths to include.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*/
|
||||
sbcErr smbconf_set_includes(struct smbconf_ctx *ctx,
|
||||
const char *service,
|
||||
uint32_t num_includes, const char **includes);
|
||||
|
||||
/**
|
||||
* @brief Set a list of config files to include globally.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to use.
|
||||
*
|
||||
* @param[in] num_includes The number of includes to set.
|
||||
*
|
||||
* @param[in] includes A list of paths to include.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*/
|
||||
sbcErr smbconf_set_global_includes(struct smbconf_ctx *ctx,
|
||||
uint32_t num_includes,
|
||||
const char **includes);
|
||||
|
||||
/**
|
||||
* @brief Delete include parameter on the given service.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to use.
|
||||
*
|
||||
* @param[in] service The name of the service to delete the includes from.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*/
|
||||
sbcErr smbconf_delete_includes(struct smbconf_ctx *ctx, const char *service);
|
||||
|
||||
/**
|
||||
* @brief Delete include parameter from the global service.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to use.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*/
|
||||
sbcErr smbconf_delete_global_includes(struct smbconf_ctx *ctx);
|
||||
|
||||
/**
|
||||
* @brief Start a transaction on the configuration backend.
|
||||
*
|
||||
* Transactions are exposed in order to make it possible
|
||||
* to create atomic compound writing commands.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to start the transaction.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*/
|
||||
sbcErr smbconf_transaction_start(struct smbconf_ctx *ctx);
|
||||
|
||||
/**
|
||||
* @brief Commit a transaction on the configuration backend.
|
||||
*
|
||||
* Transactions are exposed in order to make it possible
|
||||
* to create atomic compound writing commands.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to commit the transaction.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*
|
||||
* @see smbconf_transaction_start()
|
||||
*/
|
||||
sbcErr smbconf_transaction_commit(struct smbconf_ctx *ctx);
|
||||
|
||||
/**
|
||||
* @brief Cancel a transaction on the configuration backend.
|
||||
*
|
||||
* Transactions are exposed in order to make it possible
|
||||
* to create atomic compound writing commands.
|
||||
*
|
||||
* @param[in] ctx The smbconf context to cancel the transaction.
|
||||
*
|
||||
* @return SBC_ERR_OK on success, a corresponding sbcErr if an
|
||||
* error occurred.
|
||||
*
|
||||
* @see smbconf_transaction_start()
|
||||
*/
|
||||
sbcErr smbconf_transaction_cancel(struct smbconf_ctx *ctx);
|
||||
|
||||
/* @} ******************************************************************/
|
||||
|
||||
#endif /* _LIBSMBCONF_H_ */
|
||||
@ -0,0 +1,100 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
TDR definitions
|
||||
Copyright (C) Jelmer Vernooij 2005
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __TDR_H__
|
||||
#define __TDR_H__
|
||||
|
||||
#include <talloc.h>
|
||||
#include <charset.h>
|
||||
|
||||
#define TDR_BIG_ENDIAN 0x01
|
||||
#define TDR_ALIGN2 0x02
|
||||
#define TDR_ALIGN4 0x04
|
||||
#define TDR_ALIGN8 0x08
|
||||
#define TDR_REMAINING 0x10
|
||||
|
||||
struct tdr_pull {
|
||||
DATA_BLOB data;
|
||||
uint32_t offset;
|
||||
int flags;
|
||||
};
|
||||
|
||||
struct tdr_push {
|
||||
DATA_BLOB data;
|
||||
int flags;
|
||||
};
|
||||
|
||||
struct tdr_print {
|
||||
int level;
|
||||
void (*print)(struct tdr_print *, const char *, ...);
|
||||
int flags;
|
||||
};
|
||||
|
||||
#define TDR_CHECK(call) do { NTSTATUS _status; \
|
||||
_status = call; \
|
||||
if (!NT_STATUS_IS_OK(_status)) \
|
||||
return _status; \
|
||||
} while (0)
|
||||
|
||||
#define TDR_ALLOC(ctx, s, n) do { \
|
||||
(s) = talloc_array_ptrtype(ctx, (s), n); \
|
||||
if ((n) && !(s)) return NT_STATUS_NO_MEMORY; \
|
||||
} while (0)
|
||||
|
||||
typedef NTSTATUS (*tdr_push_fn_t) (struct tdr_push *, const void *);
|
||||
typedef NTSTATUS (*tdr_pull_fn_t) (struct tdr_pull *, TALLOC_CTX *, void *);
|
||||
|
||||
NTSTATUS tdr_push_expand(struct tdr_push *tdr, uint32_t size);
|
||||
NTSTATUS tdr_pull_uint8(struct tdr_pull *tdr, TALLOC_CTX *ctx, uint8_t *v);
|
||||
NTSTATUS tdr_push_uint8(struct tdr_push *tdr, const uint8_t *v);
|
||||
NTSTATUS tdr_print_uint8(struct tdr_print *tdr, const char *name, uint8_t *v);
|
||||
NTSTATUS tdr_pull_uint16(struct tdr_pull *tdr, TALLOC_CTX *ctx, uint16_t *v);
|
||||
NTSTATUS tdr_pull_uint1632(struct tdr_pull *tdr, TALLOC_CTX *ctx, uint16_t *v);
|
||||
NTSTATUS tdr_push_uint16(struct tdr_push *tdr, const uint16_t *v);
|
||||
NTSTATUS tdr_push_uint1632(struct tdr_push *tdr, const uint16_t *v);
|
||||
NTSTATUS tdr_print_uint16(struct tdr_print *tdr, const char *name, uint16_t *v);
|
||||
NTSTATUS tdr_pull_uint32(struct tdr_pull *tdr, TALLOC_CTX *ctx, uint32_t *v);
|
||||
NTSTATUS tdr_push_uint32(struct tdr_push *tdr, const uint32_t *v);
|
||||
NTSTATUS tdr_print_uint32(struct tdr_print *tdr, const char *name, uint32_t *v);
|
||||
NTSTATUS tdr_pull_charset(struct tdr_pull *tdr, TALLOC_CTX *ctx, const char **v, uint32_t length, uint32_t el_size, charset_t chset);
|
||||
NTSTATUS tdr_push_charset(struct tdr_push *tdr, const char **v, uint32_t length, uint32_t el_size, charset_t chset);
|
||||
NTSTATUS tdr_print_charset(struct tdr_print *tdr, const char *name, const char **v, uint32_t length, uint32_t el_size, charset_t chset);
|
||||
|
||||
NTSTATUS tdr_pull_hyper(struct tdr_pull *tdr, TALLOC_CTX *ctx, uint64_t *v);
|
||||
NTSTATUS tdr_push_hyper(struct tdr_push *tdr, uint64_t *v);
|
||||
|
||||
NTSTATUS tdr_push_NTTIME(struct tdr_push *tdr, NTTIME *t);
|
||||
NTSTATUS tdr_pull_NTTIME(struct tdr_pull *tdr, TALLOC_CTX *ctx, NTTIME *t);
|
||||
NTSTATUS tdr_print_NTTIME(struct tdr_print *tdr, const char *name, NTTIME *t);
|
||||
|
||||
NTSTATUS tdr_push_time_t(struct tdr_push *tdr, time_t *t);
|
||||
NTSTATUS tdr_pull_time_t(struct tdr_pull *tdr, TALLOC_CTX *ctx, time_t *t);
|
||||
NTSTATUS tdr_print_time_t(struct tdr_print *tdr, const char *name, time_t *t);
|
||||
|
||||
NTSTATUS tdr_print_DATA_BLOB(struct tdr_print *tdr, const char *name, DATA_BLOB *r);
|
||||
NTSTATUS tdr_push_DATA_BLOB(struct tdr_push *tdr, DATA_BLOB *blob);
|
||||
NTSTATUS tdr_pull_DATA_BLOB(struct tdr_pull *tdr, TALLOC_CTX *ctx, DATA_BLOB *blob);
|
||||
|
||||
struct tdr_push *tdr_push_init(TALLOC_CTX *mem_ctx);
|
||||
struct tdr_pull *tdr_pull_init(TALLOC_CTX *mem_ctx);
|
||||
|
||||
NTSTATUS tdr_push_to_fd(int fd, tdr_push_fn_t push_fn, const void *p);
|
||||
void tdr_print_debug_helper(struct tdr_print *tdr, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
|
||||
|
||||
#endif /* __TDR_H__ */
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,144 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
Copyright (C) Stefan Metzmacher 2009
|
||||
|
||||
** NOTE! The following LGPL license applies to the tsocket
|
||||
** library. This does NOT imply that all of Samba is released
|
||||
** under the LGPL
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 3 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _TSOCKET_INTERNAL_H
|
||||
#define _TSOCKET_INTERNAL_H
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
struct tsocket_address_ops {
|
||||
const char *name;
|
||||
|
||||
char *(*string)(const struct tsocket_address *addr,
|
||||
TALLOC_CTX *mem_ctx);
|
||||
|
||||
struct tsocket_address *(*copy)(const struct tsocket_address *addr,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const char *location);
|
||||
};
|
||||
|
||||
struct tsocket_address {
|
||||
const char *location;
|
||||
const struct tsocket_address_ops *ops;
|
||||
|
||||
void *private_data;
|
||||
};
|
||||
|
||||
struct tsocket_address *_tsocket_address_create(TALLOC_CTX *mem_ctx,
|
||||
const struct tsocket_address_ops *ops,
|
||||
void *pstate,
|
||||
size_t psize,
|
||||
const char *type,
|
||||
const char *location);
|
||||
#define tsocket_address_create(mem_ctx, ops, state, type, location) \
|
||||
_tsocket_address_create(mem_ctx, ops, state, sizeof(type), \
|
||||
#type, location)
|
||||
|
||||
struct tdgram_context_ops {
|
||||
const char *name;
|
||||
|
||||
struct tevent_req *(*recvfrom_send)(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct tdgram_context *dgram);
|
||||
ssize_t (*recvfrom_recv)(struct tevent_req *req,
|
||||
int *perrno,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uint8_t **buf,
|
||||
struct tsocket_address **src);
|
||||
|
||||
struct tevent_req *(*sendto_send)(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct tdgram_context *dgram,
|
||||
const uint8_t *buf, size_t len,
|
||||
const struct tsocket_address *dst);
|
||||
ssize_t (*sendto_recv)(struct tevent_req *req,
|
||||
int *perrno);
|
||||
|
||||
struct tevent_req *(*disconnect_send)(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct tdgram_context *dgram);
|
||||
int (*disconnect_recv)(struct tevent_req *req,
|
||||
int *perrno);
|
||||
};
|
||||
|
||||
struct tdgram_context *_tdgram_context_create(TALLOC_CTX *mem_ctx,
|
||||
const struct tdgram_context_ops *ops,
|
||||
void *pstate,
|
||||
size_t psize,
|
||||
const char *type,
|
||||
const char *location);
|
||||
#define tdgram_context_create(mem_ctx, ops, state, type, location) \
|
||||
_tdgram_context_create(mem_ctx, ops, state, sizeof(type), \
|
||||
#type, location)
|
||||
|
||||
void *_tdgram_context_data(struct tdgram_context *dgram);
|
||||
#define tdgram_context_data(_req, _type) \
|
||||
talloc_get_type_abort(_tdgram_context_data(_req), _type)
|
||||
|
||||
struct tstream_context_ops {
|
||||
const char *name;
|
||||
|
||||
ssize_t (*pending_bytes)(struct tstream_context *stream);
|
||||
|
||||
struct tevent_req *(*readv_send)(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct tstream_context *stream,
|
||||
struct iovec *vector,
|
||||
size_t count);
|
||||
int (*readv_recv)(struct tevent_req *req,
|
||||
int *perrno);
|
||||
|
||||
struct tevent_req *(*writev_send)(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct tstream_context *stream,
|
||||
const struct iovec *vector,
|
||||
size_t count);
|
||||
int (*writev_recv)(struct tevent_req *req,
|
||||
int *perrno);
|
||||
|
||||
struct tevent_req *(*disconnect_send)(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct tstream_context *stream);
|
||||
int (*disconnect_recv)(struct tevent_req *req,
|
||||
int *perrno);
|
||||
};
|
||||
|
||||
struct tstream_context *_tstream_context_create(TALLOC_CTX *mem_ctx,
|
||||
const struct tstream_context_ops *ops,
|
||||
void *pstate,
|
||||
size_t psize,
|
||||
const char *type,
|
||||
const char *location);
|
||||
#define tstream_context_create(mem_ctx, ops, state, type, location) \
|
||||
_tstream_context_create(mem_ctx, ops, state, sizeof(type), \
|
||||
#type, location)
|
||||
|
||||
void *_tstream_context_data(struct tstream_context *stream);
|
||||
#define tstream_context_data(_req, _type) \
|
||||
talloc_get_type_abort(_tstream_context_data(_req), _type)
|
||||
|
||||
int tsocket_simple_int_recv(struct tevent_req *req, int *perrno);
|
||||
|
||||
#endif /* _TSOCKET_H */
|
||||
|
||||
@ -0,0 +1,105 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
Samba utility functions
|
||||
Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __UTIL_ATTR_H__
|
||||
#define __UTIL_ATTR_H__
|
||||
|
||||
/* for old gcc releases that don't have the feature test macro __has_attribute */
|
||||
#ifndef __has_attribute
|
||||
#define __has_attribute(x) 0
|
||||
#endif
|
||||
|
||||
#ifndef _UNUSED_
|
||||
#if __has_attribute(unused) || ( (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) )
|
||||
/** gcc attribute used on function parameters so that it does not emit
|
||||
* warnings about them being unused. **/
|
||||
# define _UNUSED_ __attribute__ ((unused))
|
||||
#else
|
||||
# define _UNUSED_
|
||||
#endif
|
||||
#endif
|
||||
#ifndef UNUSED
|
||||
#define UNUSED(param) param _UNUSED_
|
||||
#endif
|
||||
|
||||
#ifndef _DEPRECATED_
|
||||
#if __has_attribute(deprecated) || ( (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) )
|
||||
#define _DEPRECATED_ __attribute__ ((deprecated))
|
||||
#else
|
||||
#define _DEPRECATED_
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _WARN_UNUSED_RESULT_
|
||||
#if __has_attribute(warn_unused_result) || ( (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) )
|
||||
#define _WARN_UNUSED_RESULT_ __attribute__ ((warn_unused_result))
|
||||
#else
|
||||
#define _WARN_UNUSED_RESULT_
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _NORETURN_
|
||||
#if __has_attribute(noreturn) || ( (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) )
|
||||
#define _NORETURN_ __attribute__ ((noreturn))
|
||||
#else
|
||||
#define _NORETURN_
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _PURE_
|
||||
#if __has_attribute(pure) || ( (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) )
|
||||
#define _PURE_ __attribute__((pure))
|
||||
#else
|
||||
#define _PURE_
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef NONNULL
|
||||
#if __has_attribute(nonnull) || ( (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) )
|
||||
#define NONNULL(param) param __attribute__((nonnull))
|
||||
#else
|
||||
#define NONNULL(param) param
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef PRINTF_ATTRIBUTE
|
||||
#if __has_attribute(format) || ( (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) )
|
||||
/** Use gcc attribute to check printf fns. a1 is the 1-based index of
|
||||
* the parameter containing the format, and a2 the index of the first
|
||||
* argument. Note that some gcc 2.x versions don't handle this
|
||||
* properly **/
|
||||
#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
|
||||
#else
|
||||
#define PRINTF_ATTRIBUTE(a1, a2)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef FORMAT_ATTRIBUTE
|
||||
#if __has_attribute(format) || ( (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) )
|
||||
/** Use gcc attribute to check printf fns. a1 is argument to format()
|
||||
* in the above macro. This is needed to support Heimdal's printf
|
||||
* decorations. Note that some gcc 2.x versions don't handle this
|
||||
* properly. **/
|
||||
#define FORMAT_ATTRIBUTE(a) __attribute__ ((format a))
|
||||
#else
|
||||
#define FORMAT_ATTRIBUTE(a)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __UTIL_ATTR_H__ */
|
||||
@ -0,0 +1,34 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
Samba utility functions
|
||||
Copyright (C) Andrew Tridgell 1992-1998
|
||||
Copyright (C) Jeremy Allison 2001-2002
|
||||
Copyright (C) Simo Sorce 2001
|
||||
Copyright (C) Jim McDonough (jmcd@us.ibm.com) 2003.
|
||||
Copyright (C) James J Myers 2003
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _SAMBA_BLOCKING_H_
|
||||
#define _SAMBA_BLOCKING_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
int set_blocking(int fd, bool set);
|
||||
bool smb_set_close_on_exec(int fd);
|
||||
|
||||
#define set_close_on_exec(fd) smb_set_close_on_exec(fd)
|
||||
|
||||
#endif /* _SAMBA_BLOCKING_H_ */
|
||||
@ -0,0 +1,131 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
DATA BLOB
|
||||
|
||||
Copyright (C) Andrew Tridgell 2001
|
||||
Copyright (C) Andrew Bartlett 2001
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* This is a public header file that is installed as part of Samba.
|
||||
* If you remove any functions or change their signature, update
|
||||
* the so version number. */
|
||||
|
||||
#ifndef _SAMBA_DATABLOB_H_
|
||||
#define _SAMBA_DATABLOB_H_
|
||||
|
||||
#ifndef _PUBLIC_
|
||||
#define _PUBLIC_
|
||||
#endif
|
||||
|
||||
#include <talloc.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/* used to hold an arbitrary blob of data */
|
||||
typedef struct datablob {
|
||||
uint8_t *data;
|
||||
size_t length;
|
||||
} DATA_BLOB;
|
||||
|
||||
/* by making struct ldb_val and DATA_BLOB the same, we can simplify
|
||||
a fair bit of code */
|
||||
#define ldb_val datablob
|
||||
|
||||
#define data_blob(ptr, size) data_blob_named(ptr, size, "DATA_BLOB: " __location__)
|
||||
#define data_blob_talloc(ctx, ptr, size) data_blob_talloc_named(ctx, ptr, size, "DATA_BLOB: " __location__)
|
||||
#define data_blob_dup_talloc(ctx, blob) data_blob_talloc_named(ctx, (blob).data, (blob).length, "DATA_BLOB: " __location__)
|
||||
|
||||
/**
|
||||
construct a data blob, must be freed with data_blob_free()
|
||||
you can pass NULL for p and get a blank data blob
|
||||
**/
|
||||
_PUBLIC_ DATA_BLOB data_blob_named(const void *p, size_t length, const char *name);
|
||||
|
||||
/**
|
||||
construct a data blob, using supplied TALLOC_CTX
|
||||
**/
|
||||
_PUBLIC_ DATA_BLOB data_blob_talloc_named(TALLOC_CTX *mem_ctx, const void *p, size_t length, const char *name);
|
||||
|
||||
/**
|
||||
construct a zero data blob, using supplied TALLOC_CTX.
|
||||
use this sparingly as it initialises data - better to initialise
|
||||
yourself if you want specific data in the blob
|
||||
**/
|
||||
_PUBLIC_ DATA_BLOB data_blob_talloc_zero(TALLOC_CTX *mem_ctx, size_t length);
|
||||
|
||||
/**
|
||||
free a data blob
|
||||
**/
|
||||
_PUBLIC_ void data_blob_free(DATA_BLOB *d);
|
||||
|
||||
/**
|
||||
clear a DATA_BLOB's contents
|
||||
**/
|
||||
_PUBLIC_ void data_blob_clear(DATA_BLOB *d);
|
||||
|
||||
/**
|
||||
free a data blob and clear its contents
|
||||
**/
|
||||
_PUBLIC_ void data_blob_clear_free(DATA_BLOB *d);
|
||||
|
||||
/**
|
||||
check if two data blobs are equal
|
||||
**/
|
||||
_PUBLIC_ int data_blob_cmp(const DATA_BLOB *d1, const DATA_BLOB *d2);
|
||||
|
||||
/**
|
||||
print the data_blob as hex string
|
||||
**/
|
||||
_PUBLIC_ char *data_blob_hex_string_upper(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob);
|
||||
|
||||
/**
|
||||
print the data_blob as hex string
|
||||
**/
|
||||
_PUBLIC_ char *data_blob_hex_string_lower(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob);
|
||||
|
||||
/**
|
||||
useful for constructing data blobs in test suites, while
|
||||
avoiding const warnings
|
||||
**/
|
||||
_PUBLIC_ DATA_BLOB data_blob_string_const(const char *str);
|
||||
|
||||
/**
|
||||
useful for constructing data blobs in test suites, while
|
||||
avoiding const warnings
|
||||
|
||||
includes the terminating null character (as opposed to data_blo_string_const)
|
||||
**/
|
||||
_PUBLIC_ DATA_BLOB data_blob_string_const_null(const char *str);
|
||||
|
||||
/**
|
||||
* Create a new data blob from const data
|
||||
*/
|
||||
_PUBLIC_ DATA_BLOB data_blob_const(const void *p, size_t length);
|
||||
|
||||
/**
|
||||
realloc a data_blob
|
||||
**/
|
||||
_PUBLIC_ bool data_blob_realloc(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, size_t length);
|
||||
|
||||
/**
|
||||
append some data to a data blob
|
||||
**/
|
||||
_PUBLIC_ bool data_blob_append(TALLOC_CTX *mem_ctx, DATA_BLOB *blob,
|
||||
const void *p, size_t length);
|
||||
|
||||
extern const DATA_BLOB data_blob_null;
|
||||
|
||||
#endif /* _SAMBA_DATABLOB_H_ */
|
||||
@ -0,0 +1,339 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
SMB debug stuff
|
||||
Copyright (C) Andrew Tridgell 1992-1998
|
||||
Copyright (C) John H Terpstra 1996-1998
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-1998
|
||||
Copyright (C) Paul Ashton 1998
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _SAMBA_DEBUG_H
|
||||
#define _SAMBA_DEBUG_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdarg.h>
|
||||
#include <util/attr.h>
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------------- **
|
||||
* Debugging code. See also debug.c
|
||||
*/
|
||||
|
||||
/* the maximum debug level to compile into the code. This assumes a good
|
||||
optimising compiler that can remove unused code
|
||||
for embedded or low-memory systems set this to a value like 2 to get
|
||||
only important messages. This gives *much* smaller binaries
|
||||
*/
|
||||
#ifndef MAX_DEBUG_LEVEL
|
||||
#define MAX_DEBUG_LEVEL 1000
|
||||
#endif
|
||||
|
||||
bool dbgtext_va(const char *, va_list ap) PRINTF_ATTRIBUTE(1,0);
|
||||
bool dbgtext( const char *, ... ) PRINTF_ATTRIBUTE(1,2);
|
||||
bool dbghdrclass( int level, int cls, const char *location, const char *func);
|
||||
bool dbgsetclass(int level, int cls);
|
||||
|
||||
/*
|
||||
* Define all new debug classes here. A class is represented by an entry in
|
||||
* the DEBUGLEVEL_CLASS array. Index zero of this arrray is equivalent to the
|
||||
* old DEBUGLEVEL. Any source file that does NOT add the following lines:
|
||||
*
|
||||
* #undef DBGC_CLASS
|
||||
* #define DBGC_CLASS DBGC_<your class name here>
|
||||
*
|
||||
* at the start of the file (after #include "includes.h") will default to
|
||||
* using index zero, so it will behaive just like it always has.
|
||||
*/
|
||||
#define DBGC_ALL 0 /* index equivalent to DEBUGLEVEL */
|
||||
|
||||
#define DBGC_TDB 1
|
||||
#define DBGC_PRINTDRIVERS 2
|
||||
#define DBGC_LANMAN 3
|
||||
#define DBGC_SMB 4
|
||||
#define DBGC_RPC_PARSE 5
|
||||
#define DBGC_RPC_SRV 6
|
||||
#define DBGC_RPC_CLI 7
|
||||
#define DBGC_PASSDB 8
|
||||
#define DBGC_SAM 9
|
||||
#define DBGC_AUTH 10
|
||||
#define DBGC_WINBIND 11
|
||||
#define DBGC_VFS 12
|
||||
#define DBGC_IDMAP 13
|
||||
#define DBGC_QUOTA 14
|
||||
#define DBGC_ACLS 15
|
||||
#define DBGC_LOCKING 16
|
||||
#define DBGC_MSDFS 17
|
||||
#define DBGC_DMAPI 18
|
||||
#define DBGC_REGISTRY 19
|
||||
#define DBGC_SCAVENGER 20
|
||||
#define DBGC_DNS 21
|
||||
#define DBGC_LDB 22
|
||||
#define DBGC_TEVENT 23
|
||||
#define DBGC_AUTH_AUDIT 24
|
||||
#define DBGC_AUTH_AUDIT_JSON 25
|
||||
#define DBGC_KERBEROS 26
|
||||
#define DBGC_DRS_REPL 27
|
||||
#define DBGC_SMB2 28
|
||||
#define DBGC_SMB2_CREDITS 29
|
||||
#define DBGC_DSDB_AUDIT 30
|
||||
#define DBGC_DSDB_AUDIT_JSON 31
|
||||
#define DBGC_DSDB_PWD_AUDIT 32
|
||||
#define DBGC_DSDB_PWD_AUDIT_JSON 33
|
||||
#define DBGC_DSDB_TXN_AUDIT 34
|
||||
#define DBGC_DSDB_TXN_AUDIT_JSON 35
|
||||
#define DBGC_DSDB_GROUP_AUDIT 36
|
||||
#define DBGC_DSDB_GROUP_AUDIT_JSON 37
|
||||
|
||||
/* So you can define DBGC_CLASS before including debug.h */
|
||||
#ifndef DBGC_CLASS
|
||||
#define DBGC_CLASS 0 /* override as shown above */
|
||||
#endif
|
||||
|
||||
#define DEBUGLEVEL debuglevel_get()
|
||||
|
||||
#define debuglevel_get() debuglevel_get_class(DBGC_ALL)
|
||||
#define debuglevel_set(lvl) debuglevel_set_class(DBGC_ALL, (lvl))
|
||||
|
||||
/* Debugging macros
|
||||
*
|
||||
* DEBUGLVL()
|
||||
* If the 'file specific' debug class level >= level OR the system-wide
|
||||
* DEBUGLEVEL (synomym for DEBUGLEVEL_CLASS[ DBGC_ALL ]) >= level then
|
||||
* generate a header using the default macros for file, line, and
|
||||
* function name. Returns True if the debug level was <= DEBUGLEVEL.
|
||||
*
|
||||
* Example: if( DEBUGLVL( 2 ) ) dbgtext( "Some text.\n" );
|
||||
*
|
||||
* DEBUG()
|
||||
* If the 'file specific' debug class level >= level OR the system-wide
|
||||
* DEBUGLEVEL (synomym for DEBUGLEVEL_CLASS[ DBGC_ALL ]) >= level then
|
||||
* generate a header using the default macros for file, line, and
|
||||
* function name. Each call to DEBUG() generates a new header *unless* the
|
||||
* previous debug output was unterminated (i.e. no '\n').
|
||||
* See debug.c:dbghdr() for more info.
|
||||
*
|
||||
* Example: DEBUG( 2, ("Some text and a value %d.\n", value) );
|
||||
*
|
||||
* DEBUGC()
|
||||
* If the 'macro specified' debug class level >= level OR the system-wide
|
||||
* DEBUGLEVEL (synomym for DEBUGLEVEL_CLASS[ DBGC_ALL ]) >= level then
|
||||
* generate a header using the default macros for file, line, and
|
||||
* function name. Each call to DEBUG() generates a new header *unless* the
|
||||
* previous debug output was unterminated (i.e. no '\n').
|
||||
* See debug.c:dbghdr() for more info.
|
||||
*
|
||||
* Example: DEBUGC( DBGC_TDB, 2, ("Some text and a value %d.\n", value) );
|
||||
*
|
||||
* DEBUGADD(), DEBUGADDC()
|
||||
* Same as DEBUG() and DEBUGC() except the text is appended to the previous
|
||||
* DEBUG(), DEBUGC(), DEBUGADD(), DEBUGADDC() with out another interviening
|
||||
* header.
|
||||
*
|
||||
* Example: DEBUGADD( 2, ("Some text and a value %d.\n", value) );
|
||||
* DEBUGADDC( DBGC_TDB, 2, ("Some text and a value %d.\n", value) );
|
||||
*
|
||||
* Note: If the debug class has not be redeined (see above) then the optimizer
|
||||
* will remove the extra conditional test.
|
||||
*/
|
||||
|
||||
/*
|
||||
* From talloc.c:
|
||||
*/
|
||||
|
||||
/* these macros gain us a few percent of speed on gcc */
|
||||
#if (__GNUC__ >= 3)
|
||||
/* the strange !! is to ensure that __builtin_expect() takes either 0 or 1
|
||||
as its first argument */
|
||||
#ifndef likely
|
||||
#define likely(x) __builtin_expect(!!(x), 1)
|
||||
#endif
|
||||
#ifndef unlikely
|
||||
#define unlikely(x) __builtin_expect(!!(x), 0)
|
||||
#endif
|
||||
#else
|
||||
#ifndef likely
|
||||
#define likely(x) (x)
|
||||
#endif
|
||||
#ifndef unlikely
|
||||
#define unlikely(x) (x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int debuglevel_get_class(size_t idx);
|
||||
void debuglevel_set_class(size_t idx, int level);
|
||||
|
||||
#define CHECK_DEBUGLVL( level ) \
|
||||
( ((level) <= MAX_DEBUG_LEVEL) && \
|
||||
unlikely(debuglevel_get_class(DBGC_CLASS) >= (level)))
|
||||
|
||||
#define CHECK_DEBUGLVLC( dbgc_class, level ) \
|
||||
( ((level) <= MAX_DEBUG_LEVEL) && \
|
||||
unlikely(debuglevel_get_class(dbgc_class) >= (level)))
|
||||
|
||||
#define DEBUGLVL( level ) \
|
||||
( CHECK_DEBUGLVL(level) \
|
||||
&& dbghdrclass( level, DBGC_CLASS, __location__, __FUNCTION__ ) )
|
||||
|
||||
#define DEBUGLVLC( dbgc_class, level ) \
|
||||
( CHECK_DEBUGLVLC( dbgc_class, level ) \
|
||||
&& dbghdrclass( level, dbgc_class, __location__, __FUNCTION__ ) )
|
||||
|
||||
#define DEBUG( level, body ) \
|
||||
(void)( ((level) <= MAX_DEBUG_LEVEL) && \
|
||||
unlikely(debuglevel_get_class(DBGC_CLASS) >= (level)) \
|
||||
&& (dbghdrclass( level, DBGC_CLASS, __location__, __FUNCTION__ )) \
|
||||
&& (dbgtext body) )
|
||||
|
||||
#define DEBUGC( dbgc_class, level, body ) \
|
||||
(void)( ((level) <= MAX_DEBUG_LEVEL) && \
|
||||
unlikely(debuglevel_get_class(dbgc_class) >= (level)) \
|
||||
&& (dbghdrclass( level, dbgc_class, __location__, __FUNCTION__ )) \
|
||||
&& (dbgtext body) )
|
||||
|
||||
#define DEBUGADD( level, body ) \
|
||||
(void)( ((level) <= MAX_DEBUG_LEVEL) && \
|
||||
unlikely(debuglevel_get_class(DBGC_CLASS) >= (level)) \
|
||||
&& (dbgsetclass(level, DBGC_CLASS)) \
|
||||
&& (dbgtext body) )
|
||||
|
||||
#define DEBUGADDC( dbgc_class, level, body ) \
|
||||
(void)( ((level) <= MAX_DEBUG_LEVEL) && \
|
||||
unlikely((debuglevel_get_class(dbgc_class) >= (level))) \
|
||||
&& (dbgsetclass(level, dbgc_class)) \
|
||||
&& (dbgtext body) )
|
||||
|
||||
/* Print a separator to the debug log. */
|
||||
#define DEBUGSEP(level)\
|
||||
DEBUG((level),("===============================================================\n"))
|
||||
|
||||
/* Prefix messages with the function name */
|
||||
#define DBG_PREFIX(level, body ) \
|
||||
(void)( ((level) <= MAX_DEBUG_LEVEL) && \
|
||||
unlikely(debuglevel_get_class(DBGC_CLASS) >= (level)) \
|
||||
&& (dbghdrclass(level, DBGC_CLASS, __location__, __func__ )) \
|
||||
&& (dbgtext("%s: ", __func__)) \
|
||||
&& (dbgtext body) )
|
||||
|
||||
/* Prefix messages with the function name - class specific */
|
||||
#define DBGC_PREFIX(dbgc_class, level, body ) \
|
||||
(void)( ((level) <= MAX_DEBUG_LEVEL) && \
|
||||
unlikely(debuglevel_get_class(dbgc_class) >= (level)) \
|
||||
&& (dbghdrclass(level, dbgc_class, __location__, __func__ )) \
|
||||
&& (dbgtext("%s: ", __func__)) \
|
||||
&& (dbgtext body) )
|
||||
|
||||
/*
|
||||
* Debug levels matching RFC 3164
|
||||
*/
|
||||
#define DBGLVL_ERR 0 /* error conditions */
|
||||
#define DBGLVL_WARNING 1 /* warning conditions */
|
||||
#define DBGLVL_NOTICE 3 /* normal, but significant, condition */
|
||||
#define DBGLVL_INFO 5 /* informational message */
|
||||
#define DBGLVL_DEBUG 10 /* debug-level message */
|
||||
|
||||
#define DBG_ERR(...) DBG_PREFIX(DBGLVL_ERR, (__VA_ARGS__))
|
||||
#define DBG_WARNING(...) DBG_PREFIX(DBGLVL_WARNING, (__VA_ARGS__))
|
||||
#define DBG_NOTICE(...) DBG_PREFIX(DBGLVL_NOTICE, (__VA_ARGS__))
|
||||
#define DBG_INFO(...) DBG_PREFIX(DBGLVL_INFO, (__VA_ARGS__))
|
||||
#define DBG_DEBUG(...) DBG_PREFIX(DBGLVL_DEBUG, (__VA_ARGS__))
|
||||
|
||||
#define DBGC_ERR(dbgc_class, ...) DBGC_PREFIX(dbgc_class, \
|
||||
DBGLVL_ERR, (__VA_ARGS__))
|
||||
#define DBGC_WARNING(dbgc_class, ...) DBGC_PREFIX(dbgc_class, \
|
||||
DBGLVL_WARNING, (__VA_ARGS__))
|
||||
#define DBGC_NOTICE(dbgc_class, ...) DBGC_PREFIX(dbgc_class, \
|
||||
DBGLVL_NOTICE, (__VA_ARGS__))
|
||||
#define DBGC_INFO(dbgc_class, ...) DBGC_PREFIX(dbgc_class, \
|
||||
DBGLVL_INFO, (__VA_ARGS__))
|
||||
#define DBGC_DEBUG(dbgc_class, ...) DBGC_PREFIX(dbgc_class, \
|
||||
DBGLVL_DEBUG, (__VA_ARGS__))
|
||||
|
||||
#define D_ERR(...) DEBUG(DBGLVL_ERR, (__VA_ARGS__))
|
||||
#define D_WARNING(...) DEBUG(DBGLVL_WARNING, (__VA_ARGS__))
|
||||
#define D_NOTICE(...) DEBUG(DBGLVL_NOTICE, (__VA_ARGS__))
|
||||
#define D_INFO(...) DEBUG(DBGLVL_INFO, (__VA_ARGS__))
|
||||
#define D_DEBUG(...) DEBUG(DBGLVL_DEBUG, (__VA_ARGS__))
|
||||
|
||||
#define DC_ERR(...) DEBUGC(dbgc_class, \
|
||||
DBGLVL_ERR, (__VA_ARGS__))
|
||||
#define DC_WARNING(...) DEBUGC(dbgc_class, \
|
||||
DBGLVL_WARNING, (__VA_ARGS__))
|
||||
#define DC_NOTICE(...) DEBUGC(dbgc_class, \
|
||||
DBGLVL_NOTICE, (__VA_ARGS__))
|
||||
#define DC_INFO(...) DEBUGC(dbgc_class, \
|
||||
DBGLVL_INFO, (__VA_ARGS__))
|
||||
#define DC_DEBUG(...) DEBUGC(dbgc_class, \
|
||||
DBGLVL_DEBUG, (__VA_ARGS__))
|
||||
|
||||
/* The following definitions come from lib/debug.c */
|
||||
|
||||
/** Possible destinations for the debug log (in order of precedence -
|
||||
* once set to DEBUG_FILE, it is not possible to reset to DEBUG_STDOUT
|
||||
* for example. This makes it easy to override for debug to stderr on
|
||||
* the command line, as the smb.conf cannot reset it back to
|
||||
* file-based logging */
|
||||
enum debug_logtype {
|
||||
DEBUG_DEFAULT_STDERR = 0,
|
||||
DEBUG_DEFAULT_STDOUT = 1,
|
||||
DEBUG_FILE = 2,
|
||||
DEBUG_STDOUT = 3,
|
||||
DEBUG_STDERR = 4,
|
||||
DEBUG_CALLBACK = 5
|
||||
};
|
||||
|
||||
struct debug_settings {
|
||||
size_t max_log_size;
|
||||
bool timestamp_logs;
|
||||
bool debug_prefix_timestamp;
|
||||
bool debug_hires_timestamp;
|
||||
bool debug_pid;
|
||||
bool debug_uid;
|
||||
bool debug_class;
|
||||
};
|
||||
|
||||
void setup_logging(const char *prog_name, enum debug_logtype new_logtype);
|
||||
|
||||
void gfree_debugsyms(void);
|
||||
int debug_add_class(const char *classname);
|
||||
bool debug_parse_levels(const char *params_str);
|
||||
void debug_setup_talloc_log(void);
|
||||
void debug_set_logfile(const char *name);
|
||||
void debug_set_settings(struct debug_settings *settings,
|
||||
const char *logging_param,
|
||||
int syslog_level, bool syslog_only);
|
||||
bool reopen_logs_internal( void );
|
||||
void force_check_log_size( void );
|
||||
bool need_to_check_log_size( void );
|
||||
void check_log_size( void );
|
||||
void dbgflush( void );
|
||||
enum debug_logtype debug_get_log_type(void);
|
||||
bool debug_get_output_is_stderr(void);
|
||||
bool debug_get_output_is_stdout(void);
|
||||
void debug_schedule_reopen_logs(void);
|
||||
char *debug_list_class_names_and_levels(void);
|
||||
|
||||
typedef void (*debug_callback_fn)(void *private_ptr, int level, const char *msg);
|
||||
|
||||
/**
|
||||
Set a callback for all debug messages. Use in dlz_bind9 to push output to the bind logs
|
||||
*/
|
||||
void debug_set_callback(void *private_ptr, debug_callback_fn fn);
|
||||
|
||||
char *debug_get_ringbuf(void);
|
||||
size_t debug_get_ringbuf_size(void);
|
||||
|
||||
#endif /* _SAMBA_DEBUG_H */
|
||||
@ -0,0 +1,51 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
Samba utility functions
|
||||
Copyright (C) Andrew Tridgell 1992-1999
|
||||
Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2008
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _SAMBA_DISCARD_H_
|
||||
#define _SAMBA_DISCARD_H_
|
||||
|
||||
/**
|
||||
this is a warning hack. The idea is to use this everywhere that we
|
||||
get the "discarding const" warning from gcc. That doesn't actually
|
||||
fix the problem of course, but it means that when we do get to
|
||||
cleaning them up we can do it by searching the code for
|
||||
discard_const.
|
||||
|
||||
It also means that other error types aren't as swamped by the noise
|
||||
of hundreds of const warnings, so we are more likely to notice when
|
||||
we get new errors.
|
||||
|
||||
Please only add more uses of this macro when you find it
|
||||
_really_ hard to fix const warnings. Our aim is to eventually use
|
||||
this function in only a very few places.
|
||||
|
||||
Also, please call this via the discard_const_p() macro interface, as that
|
||||
makes the return type safe.
|
||||
*/
|
||||
#ifndef discard_const
|
||||
#define discard_const(ptr) ((void *)((uintptr_t)(ptr)))
|
||||
#endif
|
||||
|
||||
/** Type-safe version of discard_const */
|
||||
#ifndef discard_const_p
|
||||
#define discard_const_p(type, ptr) ((type *)discard_const(ptr))
|
||||
#endif
|
||||
|
||||
#endif /* _SAMBA_DISCARD_H_ */
|
||||
@ -0,0 +1,59 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
Critical Fault handling
|
||||
Copyright (C) Andrew Tridgell 1992-1998
|
||||
Copyright (C) Tim Prouty 2009
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _SAMBA_FAULT_H_
|
||||
#define _SAMBA_FAULT_H_
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <util/attr.h>
|
||||
|
||||
/* Please include header file debug.h if you want to use macro SMB_ASSERT */
|
||||
|
||||
/**
|
||||
* assert macros
|
||||
*/
|
||||
#ifdef _SAMBA_DEBUG_H
|
||||
#define SMB_ASSERT(b) \
|
||||
do { \
|
||||
if (!(b)) { \
|
||||
DEBUG(0,("PANIC: assert failed at %s(%d): %s\n", \
|
||||
__FILE__, __LINE__, #b)); \
|
||||
smb_panic("assert failed: " #b); \
|
||||
} \
|
||||
} while(0)
|
||||
#endif /* _SAMBA_DEBUG_H */
|
||||
|
||||
extern const char *panic_action;
|
||||
|
||||
/**
|
||||
Something really nasty happened - panic !
|
||||
**/
|
||||
typedef void (*smb_panic_handler_t)(const char *why);
|
||||
|
||||
void fault_configure(smb_panic_handler_t panic_handler);
|
||||
void fault_setup(void);
|
||||
void fault_setup_disable(void);
|
||||
_NORETURN_ void smb_panic(const char *reason);
|
||||
void smb_panic_log(const char *reason);
|
||||
|
||||
void log_stack_trace(void);
|
||||
|
||||
#endif /* _SAMBA_FAULT_H_ */
|
||||
@ -0,0 +1,49 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
Functions to create reasonable random numbers for crypto use.
|
||||
|
||||
Copyright (C) Jeremy Allison 2001
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Generate random values for session and temporary keys.
|
||||
*
|
||||
* @param[in] out A pointer to the buffer to fill with random data.
|
||||
*
|
||||
* @param[in] len The size of the buffer to fill.
|
||||
*/
|
||||
void generate_random_buffer(uint8_t *out, int len);
|
||||
|
||||
/**
|
||||
* @brief Generate random values for long term keys and passwords.
|
||||
*
|
||||
* @param[in] out A pointer to the buffer to fill with random data.
|
||||
*
|
||||
* @param[in] len The size of the buffer to fill.
|
||||
*/
|
||||
void generate_secret_buffer(uint8_t *out, int len);
|
||||
|
||||
/**
|
||||
* @brief Generate random values for a nonce buffer.
|
||||
*
|
||||
* This is also known as initialization vector.
|
||||
*
|
||||
* @param[in] out A pointer to the buffer to fill with random data.
|
||||
*
|
||||
* @param[in] len The size of the buffer to fill.
|
||||
*/
|
||||
void generate_nonce_buffer(uint8_t *out, int len);
|
||||
@ -0,0 +1,63 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
very efficient functions to manage mapping a id (such as a fnum) to
|
||||
a pointer. This is used for fnum and search id allocation.
|
||||
|
||||
Copyright (C) Andrew Tridgell 2004
|
||||
|
||||
This code is derived from lib/idr.c in the 2.6 Linux kernel, which was
|
||||
written by Jim Houston jim.houston@ccur.com, and is
|
||||
Copyright (C) 2002 by Concurrent Computer Corporation
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _SAMBA_IDTREE_H_
|
||||
#define _SAMBA_IDTREE_H_
|
||||
|
||||
#include <talloc.h>
|
||||
|
||||
struct idr_context;
|
||||
|
||||
/**
|
||||
initialise a idr tree. The context return value must be passed to
|
||||
all subsequent idr calls. To destroy the idr tree use talloc_free()
|
||||
on this context
|
||||
*/
|
||||
struct idr_context *idr_init(TALLOC_CTX *mem_ctx);
|
||||
|
||||
/**
|
||||
allocate the next available id, and assign 'ptr' into its slot.
|
||||
you can retrieve later this pointer using idr_find()
|
||||
*/
|
||||
int idr_get_new(struct idr_context *idp, void *ptr, int limit);
|
||||
|
||||
/**
|
||||
allocate a new id, giving the first available value greater than or
|
||||
equal to the given starting id
|
||||
*/
|
||||
int idr_get_new_above(struct idr_context *idp, void *ptr, int starting_id, int limit);
|
||||
|
||||
/**
|
||||
find a pointer value previously set with idr_get_new given an id
|
||||
*/
|
||||
void *idr_find(struct idr_context *idp, int id);
|
||||
|
||||
/**
|
||||
remove an id from the idr tree
|
||||
*/
|
||||
int idr_remove(struct idr_context *idp, int id);
|
||||
|
||||
#endif /* _SAMBA_IDTREE_H_ */
|
||||
@ -0,0 +1,38 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
very efficient functions to manage mapping a id (such as a fnum) to
|
||||
a pointer. This is used for fnum and search id allocation.
|
||||
|
||||
Copyright (C) Andrew Tridgell 2004
|
||||
|
||||
This code is derived from lib/idr.c in the 2.6 Linux kernel, which was
|
||||
written by Jim Houston jim.houston@ccur.com, and is
|
||||
Copyright (C) 2002 by Concurrent Computer Corporation
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _SAMBA_IDTREE_RANDOM_H_
|
||||
#define _SAMBA_IDTREE_RANDOM_H_
|
||||
|
||||
#include <talloc.h>
|
||||
#include <util/idtree.h>
|
||||
|
||||
/**
|
||||
allocate a new id randomly in the given range
|
||||
*/
|
||||
int idr_get_new_random(struct idr_context *idp, void *ptr, int limit);
|
||||
|
||||
#endif /* _SAMBA_IDTREE_RANDOM_H_ */
|
||||
@ -0,0 +1,49 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
signal handling functions
|
||||
|
||||
Copyright (C) Andrew Tridgell 1998
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _SAMBA_UTIL_SIGNAL_H_
|
||||
#define _SAMBA_UTIL_SIGNAL_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
/**
|
||||
Block sigs.
|
||||
**/
|
||||
void BlockSignals(bool block, int signum);
|
||||
|
||||
/**
|
||||
Catch a signal. This should implement the following semantics:
|
||||
|
||||
1) The handler remains installed after being called.
|
||||
2) The signal should be blocked during handler execution.
|
||||
**/
|
||||
void (*CatchSignal(int signum,void (*handler)(int )))(int);
|
||||
|
||||
/**
|
||||
Ignore SIGCLD via whatever means is necessary for this OS.
|
||||
**/
|
||||
void (*CatchChild(void))(int);
|
||||
|
||||
/**
|
||||
Catch SIGCLD but leave the child around so it's status can be reaped.
|
||||
**/
|
||||
void (*CatchChildLeaveStatus(void))(int);
|
||||
|
||||
#endif /* _SAMBA_UTIL_SIGNAL_H_ */
|
||||
@ -0,0 +1,64 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
Samba utility functions
|
||||
|
||||
Copyright (C) Andrew Tridgell 1992-2001
|
||||
Copyright (C) Simo Sorce 2001-2002
|
||||
Copyright (C) Martin Pool 2003
|
||||
Copyright (C) James Peach 2005
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _SAMBA_SUBSTITUTE_H_
|
||||
#define _SAMBA_SUBSTITUTE_H_
|
||||
|
||||
#include <talloc.h>
|
||||
|
||||
/**
|
||||
Substitute a string for a pattern in another string. Make sure there is
|
||||
enough room!
|
||||
|
||||
This routine looks for pattern in s and replaces it with
|
||||
insert. It may do multiple replacements.
|
||||
|
||||
Any of " ; ' $ or ` in the insert string are replaced with _
|
||||
if len==0 then the string cannot be extended. This is different from the old
|
||||
use of len==0 which was for no length checks to be done.
|
||||
**/
|
||||
void string_sub(char *s,const char *pattern, const char *insert, size_t len);
|
||||
|
||||
/**
|
||||
Similar to string_sub() but allows for any character to be substituted.
|
||||
Use with caution!
|
||||
if len==0 then the string cannot be extended. This is different from the old
|
||||
use of len==0 which was for no length checks to be done.
|
||||
**/
|
||||
void all_string_sub(char *s,const char *pattern,const char *insert, size_t len);
|
||||
|
||||
char *talloc_string_sub2(TALLOC_CTX *mem_ctx, const char *src,
|
||||
const char *pattern,
|
||||
const char *insert,
|
||||
bool remove_unsafe_characters,
|
||||
bool replace_once,
|
||||
bool allow_trailing_dollar);
|
||||
char *talloc_string_sub(TALLOC_CTX *mem_ctx,
|
||||
const char *src,
|
||||
const char *pattern,
|
||||
const char *insert);
|
||||
char *talloc_all_string_sub(TALLOC_CTX *ctx,
|
||||
const char *src,
|
||||
const char *pattern,
|
||||
const char *insert);
|
||||
#endif /* _SAMBA_SUBSTITUTE_H_ */
|
||||
@ -0,0 +1,47 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
Wrap unix errno around tevent_req
|
||||
Copyright (C) Volker Lendecke 2009
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _TEVENT_NTSTATUS_H
|
||||
#define _TEVENT_NTSTATUS_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <core/ntstatus.h>
|
||||
#include <tevent.h>
|
||||
|
||||
bool _tevent_req_nterror(struct tevent_req *req,
|
||||
NTSTATUS status,
|
||||
const char *location);
|
||||
#define tevent_req_nterror(req, status) \
|
||||
_tevent_req_nterror(req, status, __location__)
|
||||
bool tevent_req_is_nterror(struct tevent_req *req, NTSTATUS *pstatus);
|
||||
NTSTATUS tevent_req_simple_recv_ntstatus(struct tevent_req *req);
|
||||
|
||||
/*
|
||||
* Helper routine to pass the subreq_ntstatus to the req embedded in
|
||||
* tevent_req_callback_data(subreq), which will be freed.
|
||||
*/
|
||||
void tevent_req_simple_finish_ntstatus(struct tevent_req *subreq,
|
||||
NTSTATUS subreq_status);
|
||||
|
||||
bool tevent_req_poll_ntstatus(struct tevent_req *req,
|
||||
struct tevent_context *ev,
|
||||
NTSTATUS *status);
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,34 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
Wrap unix errno around tevent_req
|
||||
Copyright (C) Volker Lendecke 2009
|
||||
|
||||
** NOTE! The following LGPL license applies to the tevent_unix
|
||||
** helper library. This does NOT imply that all of Samba is released
|
||||
** under the LGPL
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 3 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _TEVENT_UNIX_H
|
||||
#define _TEVENT_UNIX_H
|
||||
|
||||
#include <tevent.h>
|
||||
|
||||
bool tevent_req_is_unix_error(struct tevent_req *req, int *perrno);
|
||||
int tevent_req_simple_recv_unix(struct tevent_req *req);
|
||||
bool tevent_req_poll_unix(struct tevent_req *req, struct tevent_context *ev,
|
||||
int *err);
|
||||
|
||||
#endif
|
||||
@ -0,0 +1,46 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
Wrap win32 errors around tevent_req
|
||||
Copyright (C) Kai Blin 2010
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _TEVENT_WERROR_H
|
||||
#define _TEVENT_WERROR_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <core/werror.h>
|
||||
#include <tevent.h>
|
||||
|
||||
bool _tevent_req_werror(struct tevent_req *req,
|
||||
WERROR werror,
|
||||
const char *location);
|
||||
#define tevent_req_werror(req, werror) \
|
||||
_tevent_req_werror(req, werror, __location__)
|
||||
bool tevent_req_is_werror(struct tevent_req *req, WERROR *error);
|
||||
WERROR tevent_req_simple_recv_werror(struct tevent_req *req);
|
||||
|
||||
/*
|
||||
* Helper routine to pass the subreq_werror to the req embedded in
|
||||
* tevent_req_callback_data(subreq), which will be freed.
|
||||
*/
|
||||
void tevent_req_simple_finish_werror(struct tevent_req *subreq,
|
||||
WERROR subreq_error);
|
||||
|
||||
bool tevent_req_poll_werror(struct tevent_req *req,
|
||||
struct tevent_context *ev,
|
||||
WERROR *err);
|
||||
#endif
|
||||
@ -0,0 +1,111 @@
|
||||
/*
|
||||
fork on steroids to avoid SIGCHLD and waitpid
|
||||
|
||||
Copyright (C) Stefan Metzmacher 2010
|
||||
Copyright (C) Ralph Boehme 2017
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIB_UTIL_TFORK_H
|
||||
#define LIB_UTIL_TFORK_H
|
||||
|
||||
struct tfork;
|
||||
|
||||
/**
|
||||
* @brief a fork() that avoids SIGCHLD and waitpid
|
||||
*
|
||||
* This function is a solution to the problem of fork() requiring special
|
||||
* preparations in the caller to handle SIGCHLD signals and to reap the child by
|
||||
* wait()ing for it.
|
||||
*
|
||||
* The advantage over fork() is that the child process termination is signalled
|
||||
* to the caller by making a pipe fd readable returned by tfork_event_fd(), in
|
||||
* which case the exit status of the child can be fetched with tfork_status()
|
||||
* without blocking.
|
||||
*
|
||||
* The child process will start with SIGCHLD handler set to SIG_DFL.
|
||||
*
|
||||
* @return On success, a struct tfork. NULL on failure.
|
||||
* Use tfork_worker_pid() to get the pid of the created
|
||||
* child and tfork_event_fd() to get the file descriptor
|
||||
* that can be used to poll for process termination and
|
||||
* reading the child process exit status.
|
||||
*
|
||||
* @note There's one thing this thing can't protect us against and that is if a
|
||||
* process installs a SIGCHLD handler from one thread while another thread is
|
||||
* running inside tfork_create() or tfork_status() and the signal handler
|
||||
* doesn't forward signals for exitted childs it didn't fork, ie our childs.
|
||||
**/
|
||||
struct tfork *tfork_create(void);
|
||||
|
||||
/**
|
||||
* @brief Return the child pid from tfork_create()
|
||||
*
|
||||
* @param[in] t Pointer to struct tfork returned by tfork_create()
|
||||
*
|
||||
* @return In the caller this returns the pid of the child,
|
||||
* in the child this returns 0.
|
||||
**/
|
||||
pid_t tfork_child_pid(const struct tfork *t);
|
||||
|
||||
/**
|
||||
* @brief Return an event fd that signals child termination
|
||||
*
|
||||
* @param[in] t Pointer to struct tfork returned by tfork_create()
|
||||
*
|
||||
* It is the callers responsibility to ensure that the event fd returned by
|
||||
* tfork_event_fd() is closed. By calling tfork_event_fd() ownership of the fd
|
||||
* is transferred to the caller, calling tfork_event_fd() again will trigger an
|
||||
* abort().
|
||||
*
|
||||
* @return An fd that becomes readable when the child created with
|
||||
* tfork_create() terminates. It is guaranteed that a
|
||||
* subsequent call to tfork_status() will not block and return
|
||||
* the exit status of the child.
|
||||
**/
|
||||
int tfork_event_fd(struct tfork *t);
|
||||
|
||||
/**
|
||||
* @brief Wait for the child to terminate and return its exit status
|
||||
*
|
||||
* @param[in] t Pointer-pointer to a struct tfork returned by
|
||||
* tfork_create(). Upon successful completion t is freed and
|
||||
* set to NULL.
|
||||
*
|
||||
* @param[in] wait Whether to wait for the child to change state. If wait is
|
||||
* false, and the child hasn't changed state, tfork_status()
|
||||
* will return -1 with errno set to EAGAIN. If wait is true,
|
||||
* tfork_status() will block waiting for the child to change
|
||||
* runstate.
|
||||
*
|
||||
* @return The exit status of the child, -1 on error.
|
||||
*
|
||||
* @note We overload the return value a bit, but a process exit status is pretty
|
||||
* much guaranteed to be a 16-bit int and can't be -1.
|
||||
**/
|
||||
int tfork_status(struct tfork **_t, bool wait);
|
||||
|
||||
/**
|
||||
* @brief Terminate the child discarding the exit status
|
||||
*
|
||||
* @param[in] t Pointer-pointer to a struct tfork returned by
|
||||
* tfork_create(). Upon successful completion t is freed and
|
||||
* set to NULL.
|
||||
*
|
||||
* @return 0 on success, -1 on error.
|
||||
**/
|
||||
int tfork_destroy(struct tfork **_t);
|
||||
|
||||
#endif /* LIB_UTIL_TFORK_H */
|
||||
@ -0,0 +1,400 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
time utility functions
|
||||
|
||||
Copyright (C) Andrew Tridgell 1992-2004
|
||||
Copyright (C) Stefan (metze) Metzmacher 2002
|
||||
Copyright (C) Jeremy Allison 2007
|
||||
Copyright (C) Andrew Bartlett 2011
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _SAMBA_TIME_H_
|
||||
#define _SAMBA_TIME_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <talloc.h>
|
||||
|
||||
#ifndef TIME_T_MIN
|
||||
/* we use 0 here, because (time_t)-1 means error */
|
||||
#define TIME_T_MIN 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* we use the INT32_MAX here as on 64 bit systems,
|
||||
* gmtime() fails with INT64_MAX
|
||||
*/
|
||||
#ifndef TIME_T_MAX
|
||||
#define TIME_T_MAX MIN(INT32_MAX,_TYPE_MAXIMUM(time_t))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* According to Windows API FileTimeToSystemTime() documentation the highest
|
||||
* allowed value " ... must be less than 0x8000000000000000.".
|
||||
*/
|
||||
#define NTTIME_MAX INT64_MAX
|
||||
|
||||
/*
|
||||
* The lowest possible value when NTTIME=0 is used as sentinel value.
|
||||
*/
|
||||
#define NTTIME_MIN 1
|
||||
|
||||
/*
|
||||
* NTTIME_OMIT in a setinfo tells us to not modify the corresponding on-disk
|
||||
* timestamp value.
|
||||
*/
|
||||
#define NTTIME_OMIT 0
|
||||
|
||||
/*
|
||||
* Disable automatic timestamp updates, as described in MS-FSA. Samba doesn't
|
||||
* implement this yet.
|
||||
*/
|
||||
#define NTTIME_FREEZE UINT64_MAX
|
||||
#define NTTIME_THAW (UINT64_MAX - 1)
|
||||
|
||||
#define SAMBA_UTIME_NOW UTIME_NOW
|
||||
#define SAMBA_UTIME_OMIT UTIME_OMIT
|
||||
|
||||
/* 64 bit time (100 nanosec) 1601 - cifs6.txt, section 3.5, page 30, 4 byte aligned */
|
||||
typedef uint64_t NTTIME;
|
||||
|
||||
/**
|
||||
External access to time_t_min and time_t_max.
|
||||
**/
|
||||
time_t get_time_t_max(void);
|
||||
|
||||
/**
|
||||
a gettimeofday wrapper
|
||||
**/
|
||||
void GetTimeOfDay(struct timeval *tval);
|
||||
|
||||
/**
|
||||
a wrapper to preferably get the monotonic time
|
||||
**/
|
||||
void clock_gettime_mono(struct timespec *tp);
|
||||
|
||||
/**
|
||||
a wrapper to preferably get the monotonic time in s
|
||||
**/
|
||||
time_t time_mono(time_t *t);
|
||||
|
||||
/**
|
||||
interpret an 8 byte "filetime" structure to a time_t
|
||||
It's originally in "100ns units since jan 1st 1601"
|
||||
**/
|
||||
time_t nt_time_to_unix(NTTIME nt);
|
||||
|
||||
/**
|
||||
put a 8 byte filetime from a time_t
|
||||
This takes GMT as input
|
||||
**/
|
||||
void unix_to_nt_time(NTTIME *nt, time_t t);
|
||||
|
||||
/**
|
||||
check if it's a null unix time
|
||||
**/
|
||||
bool null_time(time_t t);
|
||||
|
||||
/**
|
||||
check if it's a null NTTIME
|
||||
**/
|
||||
bool null_nttime(NTTIME t);
|
||||
|
||||
/**
|
||||
put a dos date into a buffer (time/date format)
|
||||
This takes GMT time and puts local time in the buffer
|
||||
**/
|
||||
void push_dos_date(uint8_t *buf, int offset, time_t unixdate, int zone_offset);
|
||||
|
||||
/**
|
||||
put a dos date into a buffer (date/time format)
|
||||
This takes GMT time and puts local time in the buffer
|
||||
**/
|
||||
void push_dos_date2(uint8_t *buf,int offset,time_t unixdate, int zone_offset);
|
||||
|
||||
/**
|
||||
put a dos 32 bit "unix like" date into a buffer. This routine takes
|
||||
GMT and converts it to LOCAL time before putting it (most SMBs assume
|
||||
localtime for this sort of date)
|
||||
**/
|
||||
void push_dos_date3(uint8_t *buf,int offset,time_t unixdate, int zone_offset);
|
||||
|
||||
/**
|
||||
create a unix date (int GMT) from a dos date (which is actually in
|
||||
localtime)
|
||||
**/
|
||||
time_t pull_dos_date(const uint8_t *date_ptr, int zone_offset);
|
||||
|
||||
/**
|
||||
like make_unix_date() but the words are reversed
|
||||
**/
|
||||
time_t pull_dos_date2(const uint8_t *date_ptr, int zone_offset);
|
||||
|
||||
/**
|
||||
create a unix GMT date from a dos date in 32 bit "unix like" format
|
||||
these generally arrive as localtimes, with corresponding DST
|
||||
**/
|
||||
time_t pull_dos_date3(const uint8_t *date_ptr, int zone_offset);
|
||||
|
||||
/**
|
||||
Return a date and time as a string (optionally with microseconds)
|
||||
|
||||
format is %Y/%m/%d %H:%M:%S if strftime is available
|
||||
**/
|
||||
|
||||
char *timeval_string(TALLOC_CTX *ctx, const struct timeval *tp, bool hires);
|
||||
|
||||
struct timeval_buf;
|
||||
const char *timespec_string_buf(const struct timespec *tp,
|
||||
bool hires,
|
||||
struct timeval_buf *buf);
|
||||
|
||||
/**
|
||||
Return the current date and time as a string (optionally with microseconds)
|
||||
|
||||
format is %Y/%m/%d %H:%M:%S if strftime is available
|
||||
**/
|
||||
char *current_timestring(TALLOC_CTX *ctx, bool hires);
|
||||
|
||||
/**
|
||||
Return a date and time as a string (optionally with microseconds)
|
||||
|
||||
format is %Y%m%d_%H%M%S or %Y%m%d_%H%M%S_%us
|
||||
**/
|
||||
|
||||
char *minimal_timeval_string(TALLOC_CTX *ctx, const struct timeval *tp, bool hires);
|
||||
|
||||
/**
|
||||
Return the current date and time as a string (optionally with microseconds)
|
||||
|
||||
format is %Y%m%d_%H%M%S or %Y%m%d_%H%M%S_%us
|
||||
**/
|
||||
char *current_minimal_timestring(TALLOC_CTX *ctx, bool hires);
|
||||
|
||||
/**
|
||||
return a HTTP/1.0 time string
|
||||
**/
|
||||
char *http_timestring(TALLOC_CTX *mem_ctx, time_t t);
|
||||
|
||||
/**
|
||||
Return the date and time as a string
|
||||
|
||||
format is %a %b %e %X %Y %Z
|
||||
**/
|
||||
char *timestring(TALLOC_CTX *mem_ctx, time_t t);
|
||||
|
||||
/**
|
||||
return a talloced string representing a NTTIME for human consumption
|
||||
*/
|
||||
const char *nt_time_string(TALLOC_CTX *mem_ctx, NTTIME nt);
|
||||
|
||||
/**
|
||||
put a NTTIME into a packet
|
||||
*/
|
||||
void push_nttime(uint8_t *base, uint16_t offset, NTTIME t);
|
||||
|
||||
/**
|
||||
pull a NTTIME from a packet
|
||||
*/
|
||||
NTTIME pull_nttime(uint8_t *base, uint16_t offset);
|
||||
|
||||
/**
|
||||
return (tv1 - tv2) in microseconds
|
||||
*/
|
||||
int64_t usec_time_diff(const struct timeval *tv1, const struct timeval *tv2);
|
||||
|
||||
/**
|
||||
return (tp1 - tp2) in nanoseconds
|
||||
*/
|
||||
int64_t nsec_time_diff(const struct timespec *tp1, const struct timespec *tp2);
|
||||
|
||||
/**
|
||||
return a zero timeval
|
||||
*/
|
||||
struct timeval timeval_zero(void);
|
||||
|
||||
/**
|
||||
return true if a timeval is zero
|
||||
*/
|
||||
bool timeval_is_zero(const struct timeval *tv);
|
||||
|
||||
/**
|
||||
return a timeval for the current time
|
||||
*/
|
||||
struct timeval timeval_current(void);
|
||||
|
||||
/**
|
||||
return a timeval struct with the given elements
|
||||
*/
|
||||
struct timeval timeval_set(uint32_t secs, uint32_t usecs);
|
||||
|
||||
/**
|
||||
return a timeval ofs microseconds after tv
|
||||
*/
|
||||
struct timeval timeval_add(const struct timeval *tv,
|
||||
uint32_t secs, uint32_t usecs);
|
||||
|
||||
/**
|
||||
return the sum of two timeval structures
|
||||
*/
|
||||
struct timeval timeval_sum(const struct timeval *tv1,
|
||||
const struct timeval *tv2);
|
||||
|
||||
/**
|
||||
return a timeval secs/usecs into the future
|
||||
*/
|
||||
struct timeval timeval_current_ofs(uint32_t secs, uint32_t usecs);
|
||||
|
||||
/**
|
||||
return a timeval milliseconds into the future
|
||||
*/
|
||||
struct timeval timeval_current_ofs_msec(uint32_t msecs);
|
||||
|
||||
/**
|
||||
return a timeval microseconds into the future
|
||||
*/
|
||||
struct timeval timeval_current_ofs_usec(uint32_t usecs);
|
||||
|
||||
/**
|
||||
compare two timeval structures.
|
||||
Return -1 if tv1 < tv2
|
||||
Return 0 if tv1 == tv2
|
||||
Return 1 if tv1 > tv2
|
||||
*/
|
||||
int timeval_compare(const struct timeval *tv1, const struct timeval *tv2);
|
||||
|
||||
/**
|
||||
return true if a timer is in the past
|
||||
*/
|
||||
bool timeval_expired(const struct timeval *tv);
|
||||
|
||||
/**
|
||||
return the number of seconds elapsed between two times
|
||||
*/
|
||||
double timeval_elapsed2(const struct timeval *tv1, const struct timeval *tv2);
|
||||
|
||||
/**
|
||||
return the number of seconds elapsed since a given time
|
||||
*/
|
||||
double timeval_elapsed(const struct timeval *tv);
|
||||
|
||||
/**
|
||||
return the number of seconds elapsed between two times
|
||||
*/
|
||||
double timespec_elapsed2(const struct timespec *ts1,
|
||||
const struct timespec *ts2);
|
||||
/**
|
||||
return the number of seconds elapsed since a given time
|
||||
*/
|
||||
double timespec_elapsed(const struct timespec *ts);
|
||||
|
||||
/**
|
||||
return the lesser of two timevals
|
||||
*/
|
||||
struct timeval timeval_min(const struct timeval *tv1,
|
||||
const struct timeval *tv2);
|
||||
|
||||
/**
|
||||
return the greater of two timevals
|
||||
*/
|
||||
struct timeval timeval_max(const struct timeval *tv1,
|
||||
const struct timeval *tv2);
|
||||
|
||||
/**
|
||||
return the difference between two timevals as a timeval
|
||||
if tv1 comes after tv2, then return a zero timeval
|
||||
(this is *tv2 - *tv1)
|
||||
*/
|
||||
struct timeval timeval_until(const struct timeval *tv1,
|
||||
const struct timeval *tv2);
|
||||
|
||||
/**
|
||||
convert a timeval to a NTTIME
|
||||
*/
|
||||
NTTIME timeval_to_nttime(const struct timeval *tv);
|
||||
|
||||
/**
|
||||
convert a NTTIME to a timeval
|
||||
*/
|
||||
void nttime_to_timeval(struct timeval *tv, NTTIME t);
|
||||
|
||||
/**
|
||||
return the UTC offset in seconds west of UTC, or 0 if it cannot be determined
|
||||
*/
|
||||
int get_time_zone(time_t t);
|
||||
|
||||
/**
|
||||
check if 2 NTTIMEs are equal.
|
||||
*/
|
||||
bool nt_time_equal(NTTIME *t1, NTTIME *t2);
|
||||
|
||||
void interpret_dos_date(uint32_t date,int *year,int *month,int *day,int *hour,int *minute,int *second);
|
||||
|
||||
struct timespec nt_time_to_unix_timespec_raw(NTTIME nt);
|
||||
|
||||
struct timespec nt_time_to_unix_timespec(NTTIME nt);
|
||||
|
||||
time_t convert_timespec_to_time_t(struct timespec ts);
|
||||
|
||||
struct timespec convert_time_t_to_timespec(time_t t);
|
||||
|
||||
bool null_timespec(struct timespec ts);
|
||||
|
||||
struct timespec convert_timeval_to_timespec(const struct timeval tv);
|
||||
struct timeval convert_timespec_to_timeval(const struct timespec ts);
|
||||
struct timespec timespec_current(void);
|
||||
struct timespec timespec_min(const struct timespec *ts1,
|
||||
const struct timespec *ts2);
|
||||
int timespec_compare(const struct timespec *ts1, const struct timespec *ts2);
|
||||
void round_timespec_to_sec(struct timespec *ts);
|
||||
void round_timespec_to_usec(struct timespec *ts);
|
||||
void round_timespec_to_nttime(struct timespec *ts);
|
||||
NTTIME unix_timespec_to_nt_time(struct timespec ts);
|
||||
void normalize_timespec(struct timespec *ts);
|
||||
|
||||
/*
|
||||
* Functions supporting the full range of time_t and struct timespec values,
|
||||
* including 0, -1 and all other negative values. These functions don't use 0 or
|
||||
* -1 values as sentinel to denote "unset" variables, but use the POSIX 2008
|
||||
* define UTIME_OMIT from utimensat(2).
|
||||
*/
|
||||
bool is_omit_timespec(const struct timespec *ts);
|
||||
struct timespec make_omit_timespec(void);
|
||||
NTTIME full_timespec_to_nt_time(const struct timespec *ts);
|
||||
struct timespec nt_time_to_full_timespec(NTTIME nt);
|
||||
time_t full_timespec_to_time_t(const struct timespec *ts);
|
||||
time_t nt_time_to_full_time_t(NTTIME nt);
|
||||
struct timespec time_t_to_full_timespec(time_t t);
|
||||
|
||||
/*
|
||||
* Functions to get and set the number of nanoseconds for times in a stat field.
|
||||
* If the stat has timestamp granularity less than nanosecond, then the set_*
|
||||
* operations will be lossy.
|
||||
*/
|
||||
struct stat;
|
||||
time_t get_atimensec(const struct stat *);
|
||||
time_t get_mtimensec(const struct stat *);
|
||||
time_t get_ctimensec(const struct stat *);
|
||||
void set_atimensec(struct stat *, time_t);
|
||||
void set_mtimensec(struct stat *, time_t);
|
||||
void set_ctimensec(struct stat *, time_t);
|
||||
|
||||
/* These are convenience wrappers for the above getters. */
|
||||
struct timespec get_atimespec(const struct stat *);
|
||||
struct timespec get_mtimespec(const struct stat *);
|
||||
struct timespec get_ctimespec(const struct stat *);
|
||||
|
||||
#endif /* _SAMBA_TIME_H_ */
|
||||
@ -0,0 +1,50 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
common share info functions
|
||||
|
||||
Copyright (C) Andrew Tridgell 2004
|
||||
Copyright (C) Tim Potter 2004
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB_UTIL_UTIL_LDB_H__
|
||||
#define __LIB_UTIL_UTIL_LDB_H__
|
||||
|
||||
struct ldb_dn;
|
||||
|
||||
/* The following definitions come from lib/util/util_ldb.c */
|
||||
|
||||
int gendb_search_v(struct ldb_context *ldb,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct ldb_dn *basedn,
|
||||
struct ldb_message ***msgs,
|
||||
const char * const *attrs,
|
||||
const char *format,
|
||||
va_list ap) PRINTF_ATTRIBUTE(6,0);
|
||||
int gendb_search(struct ldb_context *ldb,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct ldb_dn *basedn,
|
||||
struct ldb_message ***res,
|
||||
const char * const *attrs,
|
||||
const char *format, ...) PRINTF_ATTRIBUTE(6,7);
|
||||
int gendb_search_dn(struct ldb_context *ldb,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct ldb_dn *dn,
|
||||
struct ldb_message ***res,
|
||||
const char * const *attrs);
|
||||
|
||||
#endif /* __LIB_UTIL_UTIL_LDB_H__ */
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>libsmbclient</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.kintan.ksplayer.libsmbclient</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>libsmbclient</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>87.88.520</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>87.88.520</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>13.0</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1,4 @@
|
||||
framework module libsmbclient [system] {
|
||||
umbrella "."
|
||||
export *
|
||||
}
|
||||
Binary file not shown.
@ -0,0 +1,269 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
charset defines
|
||||
Copyright (C) Andrew Tridgell 2001
|
||||
Copyright (C) Jelmer Vernooij 2002
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* This is a public header file that is installed as part of Samba.
|
||||
* If you remove any functions or change their signature, update
|
||||
* the so version number. */
|
||||
|
||||
#ifndef __CHARSET_H__
|
||||
#define __CHARSET_H__
|
||||
|
||||
#include <talloc.h>
|
||||
|
||||
/* this defines the charset types used in samba */
|
||||
typedef enum {CH_UTF16LE=0, CH_UTF16=0, CH_UNIX, CH_DOS, CH_UTF8, CH_UTF16BE, CH_UTF16MUNGED} charset_t;
|
||||
|
||||
#define NUM_CHARSETS 7
|
||||
|
||||
/*
|
||||
* SMB UCS2 (16-bit unicode) internal type.
|
||||
* smb_ucs2_t is *always* in little endian format.
|
||||
*/
|
||||
|
||||
typedef uint16_t smb_ucs2_t;
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#define UCS2_SHIFT 8
|
||||
#else
|
||||
#define UCS2_SHIFT 0
|
||||
#endif
|
||||
|
||||
/* turn a 7 bit character into a ucs2 character */
|
||||
#define UCS2_CHAR(c) ((c) << UCS2_SHIFT)
|
||||
|
||||
/*
|
||||
* for each charset we have a function that pulls from that charset to
|
||||
* a ucs2 buffer, and a function that pushes to a ucs2 buffer
|
||||
* */
|
||||
|
||||
struct charset_functions {
|
||||
const char *name;
|
||||
size_t (*pull)(void *, const char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft);
|
||||
size_t (*push)(void *, const char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft);
|
||||
bool samba_internal_charset;
|
||||
};
|
||||
|
||||
/* this type is used for manipulating unicode codepoints */
|
||||
typedef uint32_t codepoint_t;
|
||||
|
||||
#define INVALID_CODEPOINT ((codepoint_t)-1)
|
||||
|
||||
/* generic iconv conversion structure */
|
||||
typedef struct smb_iconv_s {
|
||||
size_t (*direct)(void *cd, const char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft);
|
||||
size_t (*pull)(void *cd, const char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft);
|
||||
size_t (*push)(void *cd, const char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft);
|
||||
void *cd_direct, *cd_pull, *cd_push;
|
||||
char *from_name, *to_name;
|
||||
} *smb_iconv_t;
|
||||
|
||||
/* string manipulation flags */
|
||||
#define STR_TERMINATE 1
|
||||
#define STR_UPPER 2
|
||||
#define STR_ASCII 4
|
||||
#define STR_UNICODE 8
|
||||
#define STR_NOALIGN 16
|
||||
#define STR_NO_RANGE_CHECK 32
|
||||
#define STR_LEN8BIT 64
|
||||
#define STR_TERMINATE_ASCII 128 /* only terminate if ascii */
|
||||
#define STR_LEN_NOTERM 256 /* the length field is the unterminated length */
|
||||
|
||||
struct loadparm_context;
|
||||
struct smb_iconv_handle;
|
||||
|
||||
size_t ucs2_align(const void *base_ptr, const void *p, int flags);
|
||||
|
||||
/**
|
||||
return the number of bytes occupied by a buffer in CH_UTF16 format
|
||||
the result includes the null termination
|
||||
**/
|
||||
size_t utf16_len(const void *buf);
|
||||
|
||||
/**
|
||||
return the number of bytes occupied by a buffer in CH_UTF16 format
|
||||
the result includes the null termination
|
||||
limited by 'n' bytes
|
||||
**/
|
||||
size_t utf16_len_n(const void *src, size_t n);
|
||||
|
||||
char *strchr_m(const char *s, char c);
|
||||
/**
|
||||
* Calculate the number of units (8 or 16-bit, depending on the
|
||||
* destination charset), that would be needed to convert the input
|
||||
* string which is expected to be in in src_charset encoding to the
|
||||
* destination charset (which should be a unicode charset).
|
||||
*/
|
||||
size_t strlen_m_ext_handle(struct smb_iconv_handle *ic,
|
||||
const char *s, charset_t src_charset, charset_t dst_charset);
|
||||
size_t strlen_m_ext(const char *s, charset_t src_charset, charset_t dst_charset);
|
||||
size_t strlen_m_ext_term(const char *s, charset_t src_charset,
|
||||
charset_t dst_charset);
|
||||
size_t strlen_m_ext_term_null(const char *s,
|
||||
charset_t src_charset,
|
||||
charset_t dst_charset);
|
||||
size_t strlen_m(const char *s);
|
||||
size_t strlen_m_term(const char *s);
|
||||
size_t strlen_m_term_null(const char *s);
|
||||
char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength);
|
||||
char *talloc_alpha_strcpy(TALLOC_CTX *mem_ctx,
|
||||
const char *src,
|
||||
const char *other_safe_chars);
|
||||
void string_replace_m(char *s, char oldc, char newc);
|
||||
bool strcsequal(const char *s1,const char *s2);
|
||||
bool strequal_m(const char *s1, const char *s2);
|
||||
int strncasecmp_m(const char *s1, const char *s2, size_t n);
|
||||
int strncasecmp_m_handle(struct smb_iconv_handle *iconv_handle,
|
||||
const char *s1, const char *s2, size_t n);
|
||||
bool next_token(const char **ptr,char *buff, const char *sep, size_t bufsize);
|
||||
int strcasecmp_m_handle(struct smb_iconv_handle *iconv_handle,
|
||||
const char *s1, const char *s2);
|
||||
int strcasecmp_m(const char *s1, const char *s2);
|
||||
size_t count_chars_m(const char *s, char c);
|
||||
char *strupper_talloc(TALLOC_CTX *ctx, const char *src);
|
||||
char *talloc_strdup_upper(TALLOC_CTX *ctx, const char *src);
|
||||
char *strupper_talloc_n_handle(struct smb_iconv_handle *iconv_handle,
|
||||
TALLOC_CTX *ctx, const char *src, size_t n);
|
||||
char *strupper_talloc_n(TALLOC_CTX *ctx, const char *src, size_t n);
|
||||
char *strlower_talloc_handle(struct smb_iconv_handle *iconv_handle,
|
||||
TALLOC_CTX *ctx, const char *src);
|
||||
char *strlower_talloc(TALLOC_CTX *ctx, const char *src);
|
||||
bool strhasupper(const char *string);
|
||||
bool strhaslower_handle(struct smb_iconv_handle *ic,
|
||||
const char *string);
|
||||
bool strhaslower(const char *string);
|
||||
bool strhasupper_handle(struct smb_iconv_handle *ic,
|
||||
const char *string);
|
||||
char *strrchr_m(const char *s, char c);
|
||||
char *strchr_m(const char *s, char c);
|
||||
char *strstr_m(const char *src, const char *findstr);
|
||||
|
||||
bool push_ascii_talloc(TALLOC_CTX *ctx, char **dest, const char *src, size_t *converted_size);
|
||||
bool push_ucs2_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src, size_t *converted_size);
|
||||
bool push_utf8_talloc(TALLOC_CTX *ctx, char **dest, const char *src, size_t *converted_size);
|
||||
bool pull_ascii_talloc(TALLOC_CTX *ctx, char **dest, const char *src, size_t *converted_size);
|
||||
bool pull_ucs2_talloc(TALLOC_CTX *ctx, char **dest, const smb_ucs2_t *src, size_t *converted_size);
|
||||
bool pull_utf8_talloc(TALLOC_CTX *ctx, char **dest, const char *src, size_t *converted_size);
|
||||
ssize_t push_string(void *dest, const char *src, size_t dest_len, int flags);
|
||||
ssize_t pull_string(char *dest, const void *src, size_t dest_len, size_t src_len, int flags);
|
||||
|
||||
bool convert_string_talloc(TALLOC_CTX *ctx,
|
||||
charset_t from, charset_t to,
|
||||
void const *src, size_t srclen,
|
||||
void *dest, size_t *converted_size);
|
||||
|
||||
bool convert_string(charset_t from, charset_t to,
|
||||
void const *src, size_t srclen,
|
||||
void *dest, size_t destlen,
|
||||
size_t *converted_size);
|
||||
bool convert_string_error(charset_t from, charset_t to,
|
||||
void const *src, size_t srclen,
|
||||
void *dest, size_t destlen,
|
||||
size_t *converted_size);
|
||||
|
||||
struct smb_iconv_handle *get_iconv_handle(void);
|
||||
struct smb_iconv_handle *get_iconv_testing_handle(TALLOC_CTX *mem_ctx,
|
||||
const char *dos_charset,
|
||||
const char *unix_charset,
|
||||
bool use_builtin_handlers);
|
||||
struct smb_iconv_handle *reinit_iconv_handle(TALLOC_CTX *mem_ctx,
|
||||
const char *dos_charset,
|
||||
const char *unix_charset);
|
||||
void free_iconv_handle(void);
|
||||
|
||||
smb_iconv_t get_conv_handle(struct smb_iconv_handle *ic,
|
||||
charset_t from, charset_t to);
|
||||
const char *charset_name(struct smb_iconv_handle *ic, charset_t ch);
|
||||
|
||||
codepoint_t next_codepoint_ext(const char *str, size_t len,
|
||||
charset_t src_charset, size_t *size);
|
||||
codepoint_t next_codepoint(const char *str, size_t *size);
|
||||
ssize_t push_codepoint(char *str, codepoint_t c);
|
||||
|
||||
/* codepoints */
|
||||
codepoint_t next_codepoint_handle_ext(struct smb_iconv_handle *ic,
|
||||
const char *str, size_t len,
|
||||
charset_t src_charset,
|
||||
size_t *size);
|
||||
codepoint_t next_codepoint_handle(struct smb_iconv_handle *ic,
|
||||
const char *str, size_t *size);
|
||||
ssize_t push_codepoint_handle(struct smb_iconv_handle *ic,
|
||||
char *str, codepoint_t c);
|
||||
|
||||
codepoint_t toupper_m(codepoint_t val);
|
||||
codepoint_t tolower_m(codepoint_t val);
|
||||
bool islower_m(codepoint_t val);
|
||||
bool isupper_m(codepoint_t val);
|
||||
int codepoint_cmpi(codepoint_t c1, codepoint_t c2);
|
||||
|
||||
/* Iconv convenience functions */
|
||||
struct smb_iconv_handle *smb_iconv_handle_reinit(TALLOC_CTX *mem_ctx,
|
||||
const char *dos_charset,
|
||||
const char *unix_charset,
|
||||
bool use_builtin_handlers,
|
||||
struct smb_iconv_handle *old_ic);
|
||||
|
||||
bool convert_string_handle(struct smb_iconv_handle *ic,
|
||||
charset_t from, charset_t to,
|
||||
void const *src, size_t srclen,
|
||||
void *dest, size_t destlen, size_t *converted_size);
|
||||
bool convert_string_error_handle(struct smb_iconv_handle *ic,
|
||||
charset_t from, charset_t to,
|
||||
void const *src, size_t srclen,
|
||||
void *dest, size_t destlen,
|
||||
size_t *converted_size);
|
||||
|
||||
bool convert_string_talloc_handle(TALLOC_CTX *ctx,
|
||||
struct smb_iconv_handle *ic,
|
||||
charset_t from, charset_t to,
|
||||
void const *src, size_t srclen,
|
||||
void *dest, size_t *converted_size);
|
||||
/* iconv */
|
||||
smb_iconv_t smb_iconv_open(const char *tocode, const char *fromcode);
|
||||
int smb_iconv_close(smb_iconv_t cd);
|
||||
size_t smb_iconv(smb_iconv_t cd,
|
||||
const char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft);
|
||||
smb_iconv_t smb_iconv_open_ex(TALLOC_CTX *mem_ctx, const char *tocode,
|
||||
const char *fromcode, bool use_builtin_handlers);
|
||||
|
||||
void smb_init_locale(void);
|
||||
|
||||
/* The following definitions come from util_unistr_w.c */
|
||||
|
||||
size_t strlen_w(const smb_ucs2_t *src);
|
||||
size_t strnlen_w(const smb_ucs2_t *src, size_t max);
|
||||
smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c);
|
||||
smb_ucs2_t *strchr_wa(const smb_ucs2_t *s, char c);
|
||||
smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c);
|
||||
smb_ucs2_t *strnrchr_w(const smb_ucs2_t *s, smb_ucs2_t c, unsigned int n);
|
||||
smb_ucs2_t *strstr_w(const smb_ucs2_t *s, const smb_ucs2_t *ins);
|
||||
bool strlower_w(smb_ucs2_t *s);
|
||||
bool strupper_w(smb_ucs2_t *s);
|
||||
int strcasecmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b);
|
||||
int strncasecmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b, size_t len);
|
||||
int strcmp_wa(const smb_ucs2_t *a, const char *b);
|
||||
smb_ucs2_t toupper_w(smb_ucs2_t v);
|
||||
|
||||
#endif /* __CHARSET_H__ */
|
||||
@ -0,0 +1,176 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
DOS error code constants
|
||||
Copyright (C) Andrew Tridgell 1992-2000
|
||||
Copyright (C) John H Terpstra 1996-2000
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-2000
|
||||
Copyright (C) Paul Ashton 1998-2000
|
||||
Copyright (C) Gerald (Jerry) Carter 2005
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _DOSERR_H
|
||||
#define _DOSERR_H
|
||||
|
||||
/* Error classes */
|
||||
|
||||
#define ERRDOS 0x01 /* Error is from the core DOS operating system set. */
|
||||
#define ERRSRV 0x02 /* Error is generated by the server network file manager.*/
|
||||
#define ERRHRD 0x03 /* Error is an hardware error. */
|
||||
#define ERRCMD 0xFF /* Command was not in the "SMB" format. */
|
||||
|
||||
/* SMB X/Open error codes for the ERRDOS error class */
|
||||
#define ERRsuccess 0 /* No error */
|
||||
#define ERRbadfunc 1 /* Invalid function (or system call) */
|
||||
#define ERRbadfile 2 /* File not found (pathname error) */
|
||||
#define ERRbadpath 3 /* Directory not found */
|
||||
#define ERRnofids 4 /* Too many open files */
|
||||
#define ERRnoaccess 5 /* Access denied */
|
||||
#define ERRbadfid 6 /* Invalid fid */
|
||||
#define ERRbadmcb 7 /* Memory control blocks destroyed. */
|
||||
#define ERRnomem 8 /* Out of memory */
|
||||
#define ERRbadmem 9 /* Invalid memory block address */
|
||||
#define ERRbadenv 10 /* Invalid environment */
|
||||
#define ERRbadformat 11 /* Bad Format */
|
||||
#define ERRbadaccess 12 /* Invalid open mode */
|
||||
#define ERRbaddata 13 /* Invalid data (only from ioctl call) */
|
||||
#define ERRres 14 /* reserved */
|
||||
#define ERRbaddrive 15 /* Invalid drive */
|
||||
#define ERRremcd 16 /* Attempt to delete current directory */
|
||||
#define ERRdiffdevice 17 /* rename/move across different filesystems */
|
||||
#define ERRnofiles 18 /* no more files found in file search */
|
||||
#define ERRgeneral 31 /* General failure */
|
||||
#define ERRbadshare 32 /* Share mode on file conflict with open mode */
|
||||
#define ERRlock 33 /* Lock request conflicts with existing lock */
|
||||
#define ERRunsup 50 /* Request unsupported, returned by Win 95, RJS 20Jun98 */
|
||||
#define ERRnetnamedel 64 /* Network name deleted or not available */
|
||||
#define ERRnosuchshare 67 /* You specified an invalid share name */
|
||||
#define ERRfilexists 80 /* File in operation already exists */
|
||||
#define ERRinvalidparam 87
|
||||
#define ERRcannotopen 110 /* Cannot open the file specified */
|
||||
#define ERRbufferoverflow 111
|
||||
#define ERRinsufficientbuffer 122
|
||||
#define ERRinvalidname 123 /* Invalid name */
|
||||
#define ERRunknownlevel 124
|
||||
#define ERRnotlocked 158 /* This region is not locked by this locking context. */
|
||||
#define ERRinvalidpath 161
|
||||
#define ERRcancelviolation 173
|
||||
#define ERRnoatomiclocks 174
|
||||
#define ERRrename 183
|
||||
#define ERRbadpipe 230 /* Named pipe invalid */
|
||||
#define ERRpipebusy 231 /* All instances of pipe are busy */
|
||||
#define ERRpipeclosing 232 /* named pipe close in progress */
|
||||
#define ERRnotconnected 233 /* No process on other end of named pipe */
|
||||
#define ERRmoredata 234 /* More data to be returned */
|
||||
#define ERReainconsistent 255 /* from EMC */
|
||||
#define ERRnomoreitems 259
|
||||
#define ERRbaddirectory 267 /* Invalid directory name in a path. */
|
||||
#define ERReasnotsupported 282 /* Extended attributes */
|
||||
#define ERRlogonfailure 1326 /* Unknown username or bad password */
|
||||
#define ERRbuftoosmall 2123
|
||||
#define ERRunknownipc 2142
|
||||
#define ERRnosuchprintjob 2151
|
||||
#define ERRinvgroup 2455
|
||||
|
||||
/* here's a special one from observing NT */
|
||||
#define ERRnoipc 66 /* don't support ipc */
|
||||
|
||||
/* These errors seem to be only returned by the NT printer driver system */
|
||||
#define ERRdriveralreadyinstalled 1795 /* ERROR_PRINTER_DRIVER_ALREADY_INSTALLED */
|
||||
#define ERRunknownprinterport 1796 /* ERROR_UNKNOWN_PORT */
|
||||
#define ERRunknownprinterdriver 1797 /* ERROR_UNKNOWN_PRINTER_DRIVER */
|
||||
#define ERRunknownprintprocessor 1798 /* ERROR_UNKNOWN_PRINTPROCESSOR */
|
||||
#define ERRinvalidseparatorfile 1799 /* ERROR_INVALID_SEPARATOR_FILE */
|
||||
#define ERRinvalidjobpriority 1800 /* ERROR_INVALID_PRIORITY */
|
||||
#define ERRinvalidprintername 1801 /* ERROR_INVALID_PRINTER_NAME */
|
||||
#define ERRprinteralreadyexists 1802 /* ERROR_PRINTER_ALREADY_EXISTS */
|
||||
#define ERRinvalidprintercommand 1803 /* ERROR_INVALID_PRINTER_COMMAND */
|
||||
#define ERRinvaliddatatype 1804 /* ERROR_INVALID_DATATYPE */
|
||||
#define ERRinvalidenvironment 1805 /* ERROR_INVALID_ENVIRONMENT */
|
||||
|
||||
#define ERRunknownprintmonitor 3000 /* ERROR_UNKNOWN_PRINT_MONITOR */
|
||||
#define ERRprinterdriverinuse 3001 /* ERROR_PRINTER_DRIVER_IN_USE */
|
||||
#define ERRspoolfilenotfound 3002 /* ERROR_SPOOL_FILE_NOT_FOUND */
|
||||
#define ERRnostartdoc 3003 /* ERROR_SPL_NO_STARTDOC */
|
||||
#define ERRnoaddjob 3004 /* ERROR_SPL_NO_ADDJOB */
|
||||
#define ERRprintprocessoralreadyinstalled 3005 /* ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED */
|
||||
#define ERRprintmonitoralreadyinstalled 3006 /* ERROR_PRINT_MONITOR_ALREADY_INSTALLED */
|
||||
#define ERRinvalidprintmonitor 3007 /* ERROR_INVALID_PRINT_MONITOR */
|
||||
#define ERRprintmonitorinuse 3008 /* ERROR_PRINT_MONITOR_IN_USE */
|
||||
#define ERRprinterhasjobsqueued 3009 /* ERROR_PRINTER_HAS_JOBS_QUEUED */
|
||||
|
||||
/* Error codes for the ERRSRV class */
|
||||
|
||||
#define ERRerror 1 /* Non specific error code */
|
||||
#define ERRbadpw 2 /* Bad password */
|
||||
#define ERRbadtype 3 /* reserved */
|
||||
#define ERRaccess 4 /* No permissions to do the requested operation */
|
||||
#define ERRinvnid 5 /* tid invalid */
|
||||
#define ERRinvnetname 6 /* Invalid servername */
|
||||
#define ERRinvdevice 7 /* Invalid device */
|
||||
#define ERRqfull 49 /* Print queue full */
|
||||
#define ERRqtoobig 50 /* Queued item too big */
|
||||
#define ERRinvpfid 52 /* Invalid print file in smb_fid */
|
||||
#define ERRsmbcmd 64 /* Unrecognised command */
|
||||
#define ERRsrverror 65 /* smb server internal error */
|
||||
#define ERRfilespecs 67 /* fid and pathname invalid combination */
|
||||
#define ERRbadlink 68 /* reserved */
|
||||
#define ERRbadpermits 69 /* Access specified for a file is not valid */
|
||||
#define ERRbadpid 70 /* reserved */
|
||||
#define ERRsetattrmode 71 /* attribute mode invalid */
|
||||
#define ERRpaused 81 /* Message server paused */
|
||||
#define ERRmsgoff 82 /* Not receiving messages */
|
||||
#define ERRnoroom 83 /* No room for message */
|
||||
#define ERRrmuns 87 /* too many remote usernames */
|
||||
#define ERRtimeout 88 /* operation timed out */
|
||||
#define ERRnoresource 89 /* No resources currently available for request. */
|
||||
#define ERRtoomanyuids 90 /* too many userids */
|
||||
#define ERRbaduid 91 /* bad userid */
|
||||
#define ERRuseMPX 250 /* temporarily unable to use raw mode, use MPX mode */
|
||||
#define ERRuseSTD 251 /* temporarily unable to use raw mode, use standard mode */
|
||||
#define ERRcontMPX 252 /* resume MPX mode */
|
||||
#define ERRbadPW /* reserved */
|
||||
#define ERRnosupport 0xFFFF
|
||||
#define ERRunknownsmb 22 /* from NT 3.5 response */
|
||||
|
||||
/* Error codes for the ERRHRD class */
|
||||
|
||||
#define ERRnowrite 19 /* read only media */
|
||||
#define ERRbadunit 20 /* Unknown device */
|
||||
#define ERRnotready 21 /* Drive not ready */
|
||||
#define ERRbadcmd 22 /* Unknown command */
|
||||
#define ERRdata 23 /* Data (CRC) error */
|
||||
#define ERRbadreq 24 /* Bad request structure length */
|
||||
#define ERRseek 25
|
||||
#define ERRbadmedia 26
|
||||
#define ERRbadsector 27
|
||||
#define ERRnopaper 28
|
||||
#define ERRwrite 29 /* write fault */
|
||||
#define ERRread 30 /* read fault */
|
||||
#define ERRgeneral 31 /* General hardware failure */
|
||||
#define ERRwrongdisk 34
|
||||
#define ERRFCBunavail 35
|
||||
#define ERRsharebufexc 36 /* share buffer exceeded */
|
||||
#define ERRdiskfull 39
|
||||
|
||||
#ifndef NERR_BASE
|
||||
#define NERR_BASE (2100)
|
||||
#endif
|
||||
|
||||
#ifndef FRS_ERR_BASE
|
||||
#define FRS_ERR_BASE (8000)
|
||||
#endif
|
||||
|
||||
#endif /* _DOSERR_H */
|
||||
@ -0,0 +1,59 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
Error handling code
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _SAMBA_ERROR_H_
|
||||
#define _SAMBA_ERROR_H_
|
||||
|
||||
#include <core/werror.h>
|
||||
#include <core/doserr.h>
|
||||
#include <core/ntstatus.h>
|
||||
#include <core/hresult.h>
|
||||
|
||||
/*****************************************************************************
|
||||
convert a NT status code to a dos class/code
|
||||
*****************************************************************************/
|
||||
void ntstatus_to_dos(NTSTATUS ntstatus, uint8_t *eclass, uint32_t *ecode);
|
||||
|
||||
/*****************************************************************************
|
||||
convert a WERROR to a NT status32 code
|
||||
*****************************************************************************/
|
||||
NTSTATUS werror_to_ntstatus(WERROR error);
|
||||
|
||||
/*****************************************************************************
|
||||
convert a NTSTATUS to a WERROR
|
||||
*****************************************************************************/
|
||||
WERROR ntstatus_to_werror(NTSTATUS error);
|
||||
|
||||
/*********************************************************************
|
||||
Map an NT error code from a Unix error code.
|
||||
*********************************************************************/
|
||||
NTSTATUS map_nt_error_from_unix_common(int unix_error);
|
||||
|
||||
/*********************************************************************
|
||||
Map a Unix error code from a NT error code.
|
||||
*********************************************************************/
|
||||
int map_errno_from_nt_status(NTSTATUS status);
|
||||
|
||||
NTSTATUS nt_status_squash(NTSTATUS nt_status);
|
||||
|
||||
/*****************************************************************************
|
||||
convert a Unix error to a WERROR
|
||||
*****************************************************************************/
|
||||
WERROR unix_to_werror(int unix_error);
|
||||
|
||||
#endif /* _SAMBA_ERROR_H */
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,200 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
NT error code constants
|
||||
Copyright (C) Andrew Tridgell 1992-2000
|
||||
Copyright (C) John H Terpstra 1996-2000
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-2000
|
||||
Copyright (C) Paul Ashton 1998-2000
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _NTSTATUS_H
|
||||
#define _NTSTATUS_H
|
||||
|
||||
#include <core/ntstatus_gen.h>
|
||||
|
||||
/* the following rather strange looking definitions of NTSTATUS
|
||||
are there in order to catch common coding errors where different error types
|
||||
are mixed up. This is especially important as we slowly convert Samba
|
||||
from using bool for internal functions
|
||||
*/
|
||||
|
||||
#if defined(HAVE_IMMEDIATE_STRUCTURES)
|
||||
typedef struct {uint32_t v;} NTSTATUS;
|
||||
#define NT_STATUS(x) ((NTSTATUS) { x })
|
||||
#define NT_STATUS_V(x) ((x).v)
|
||||
#else
|
||||
typedef uint32_t NTSTATUS;
|
||||
#define NT_STATUS(x) (x)
|
||||
#define NT_STATUS_V(x) (x)
|
||||
#endif
|
||||
|
||||
/* Win32 status codes. */
|
||||
#define ERROR_INVALID_PARAMETER NT_STATUS(0x0057)
|
||||
#define ERROR_INSUFFICIENT_BUFFER NT_STATUS(0x007a)
|
||||
#define NT_STATUS_ERROR_DS_OBJ_STRING_NAME_EXISTS NT_STATUS(0x2071)
|
||||
#define NT_STATUS_ERROR_DS_INCOMPATIBLE_VERSION NT_STATUS(0x2177)
|
||||
#define NT_STATUS_SMB_NO_PREAUTH_INTEGRITY_HASH_OVERLAP NT_STATUS(0xC05D0000)
|
||||
|
||||
/* Other error codes that aren't in the list we use */
|
||||
#define NT_STATUS_OK NT_STATUS_SUCCESS
|
||||
|
||||
#define STATUS_MORE_ENTRIES NT_STATUS_MORE_ENTRIES
|
||||
#define STATUS_BUFFER_OVERFLOW NT_STATUS_BUFFER_OVERFLOW
|
||||
#define STATUS_NO_MORE_FILES NT_STATUS_NO_MORE_FILES
|
||||
#define STATUS_INVALID_EA_NAME NT_STATUS_INVALID_EA_NAME
|
||||
#define STATUS_SOME_UNMAPPED NT_STATUS_SOME_NOT_MAPPED
|
||||
#define NT_STATUS_INACCESSIBLE_SYSTEM_SHORTCUT NT_STATUS(0x8000002d)
|
||||
|
||||
#define NT_STATUS_ABIOS_NOT_PRESENT NT_STATUS(0xC0000000 | 0x010f)
|
||||
#define NT_STATUS_ABIOS_LID_NOT_EXIST NT_STATUS(0xC0000000 | 0x0110)
|
||||
#define NT_STATUS_ABIOS_LID_ALREADY_OWNED NT_STATUS(0xC0000000 | 0x0111)
|
||||
#define NT_STATUS_ABIOS_NOT_LID_OWNER NT_STATUS(0xC0000000 | 0x0112)
|
||||
#define NT_STATUS_ABIOS_INVALID_COMMAND NT_STATUS(0xC0000000 | 0x0113)
|
||||
#define NT_STATUS_ABIOS_INVALID_LID NT_STATUS(0xC0000000 | 0x0114)
|
||||
#define NT_STATUS_ABIOS_SELECTOR_NOT_AVAILABLE NT_STATUS(0xC0000000 | 0x0115)
|
||||
#define NT_STATUS_ABIOS_INVALID_SELECTOR NT_STATUS(0xC0000000 | 0x0116)
|
||||
|
||||
#define NT_STATUS_HANDLE_NOT_WAITABLE NT_STATUS(0xC0000000 | 0x0036)
|
||||
#define NT_STATUS_DEVICE_POWER_FAILURE NT_STATUS(0xC0000000 | 0x009e)
|
||||
#define NT_STATUS_VHD_SHARED NT_STATUS(0xC05CFF0A)
|
||||
#define NT_STATUS_SMB_BAD_CLUSTER_DIALECT NT_STATUS(0xC05D0001)
|
||||
#define NT_STATUS_NO_SUCH_JOB NT_STATUS(0xC0000000 | 0xEDE)
|
||||
|
||||
/*
|
||||
--------------
|
||||
/ \
|
||||
/ REST \
|
||||
/ IN \
|
||||
/ PEACE \
|
||||
/ \
|
||||
| NT_STATUS_NOPROBLEMO |
|
||||
| |
|
||||
| |
|
||||
| 4 September |
|
||||
| |
|
||||
| 2001 |
|
||||
*| * * * | *
|
||||
_________)/\\_//(\/(/\)/\//\/\///|_)_______
|
||||
*/
|
||||
|
||||
/* I use NT_STATUS_FOOBAR when I have no idea what error code to use -
|
||||
* this means we need a torture test */
|
||||
#define NT_STATUS_FOOBAR NT_STATUS_UNSUCCESSFUL
|
||||
|
||||
/*****************************************************************************
|
||||
returns an NT error message. not amazingly helpful, but better than a number.
|
||||
*****************************************************************************/
|
||||
const char *nt_errstr(NTSTATUS nt_code);
|
||||
|
||||
/************************************************************************
|
||||
Print friendler version fo NT error code
|
||||
***********************************************************************/
|
||||
const char *get_friendly_nt_error_msg(NTSTATUS nt_code);
|
||||
|
||||
/*****************************************************************************
|
||||
returns an NT_STATUS constant as a string for inclusion in autogen C code
|
||||
*****************************************************************************/
|
||||
const char *get_nt_error_c_code(void *mem_ctx, NTSTATUS nt_code);
|
||||
|
||||
/*****************************************************************************
|
||||
returns the NT_STATUS constant matching the string supplied (as an NTSTATUS)
|
||||
*****************************************************************************/
|
||||
NTSTATUS nt_status_string_to_code(const char *nt_status_str);
|
||||
|
||||
/* we need these here for openchange */
|
||||
#ifndef likely
|
||||
#define likely(x) (x)
|
||||
#endif
|
||||
#ifndef unlikely
|
||||
#define unlikely(x) (x)
|
||||
#endif
|
||||
|
||||
#define NT_STATUS_IS_OK(x) (likely(NT_STATUS_V(x) == 0))
|
||||
#define NT_STATUS_IS_ERR(x) (unlikely((NT_STATUS_V(x) & 0xc0000000) == 0xc0000000))
|
||||
#define NT_STATUS_EQUAL(x,y) (NT_STATUS_V(x) == NT_STATUS_V(y))
|
||||
|
||||
/*
|
||||
* These macros (with the embedded return) are considered poor coding
|
||||
* style per README.Coding
|
||||
*
|
||||
* Please do not use them in new code, and do not rely on them in
|
||||
* projects external to Samba as they will go away at some point.
|
||||
*/
|
||||
|
||||
#define NT_STATUS_HAVE_NO_MEMORY(x) do { \
|
||||
if (unlikely(!(x))) { \
|
||||
return NT_STATUS_NO_MEMORY;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
/* This varient is for when you want to free a local
|
||||
temporary memory context in the error path */
|
||||
#define NT_STATUS_HAVE_NO_MEMORY_AND_FREE(x, ctx) do { \
|
||||
if (!(x)) {\
|
||||
talloc_free(ctx); \
|
||||
return NT_STATUS_NO_MEMORY;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define NT_STATUS_IS_OK_RETURN(x) do { \
|
||||
if (NT_STATUS_IS_OK(x)) {\
|
||||
return x;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define NT_STATUS_NOT_OK_RETURN(x) do { \
|
||||
if (!NT_STATUS_IS_OK(x)) {\
|
||||
return x;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define NT_STATUS_NOT_OK_RETURN_AND_FREE(x, ctx) do { \
|
||||
if (!NT_STATUS_IS_OK(x)) {\
|
||||
talloc_free(ctx); \
|
||||
return x;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define NT_STATUS_IS_ERR_RETURN(x) do { \
|
||||
if (NT_STATUS_IS_ERR(x)) {\
|
||||
return x;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define NT_STATUS_NOT_ERR_RETURN(x) do { \
|
||||
if (!NT_STATUS_IS_ERR(x)) {\
|
||||
return x;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
/* this defines special NTSTATUS codes to represent DOS errors. I
|
||||
have chosen this macro to produce status codes in the invalid
|
||||
NTSTATUS range */
|
||||
#define NT_STATUS_DOS(class, code) NT_STATUS(0xF1000000 | ((class)<<16) | code)
|
||||
#define NT_STATUS_IS_DOS(status) ((NT_STATUS_V(status) & 0xFF000000) == 0xF1000000)
|
||||
#define NT_STATUS_DOS_CLASS(status) ((NT_STATUS_V(status) >> 16) & 0xFF)
|
||||
#define NT_STATUS_DOS_CODE(status) (NT_STATUS_V(status) & 0xFFFF)
|
||||
|
||||
/* define ldap error codes as NTSTATUS codes */
|
||||
#define NT_STATUS_LDAP(code) NT_STATUS(0xF2000000 | code)
|
||||
#define NT_STATUS_IS_LDAP(status) ((NT_STATUS_V(status) & 0xFF000000) == 0xF2000000)
|
||||
#define NT_STATUS_LDAP_CODE(status) (NT_STATUS_V(status) & ~0xFF000000)
|
||||
|
||||
#define NT_STATUS_IS_RPC(status) \
|
||||
(((NT_STATUS_V(status) & 0xFFFF) == 0xC0020000) || \
|
||||
((NT_STATUS_V(status) & 0xFFFF) == 0xC0030000))
|
||||
|
||||
#endif /* _NTSTATUS_H */
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,172 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
SMB parameters and setup, plus a whole lot more.
|
||||
|
||||
Copyright (C) Andrew Tridgell 2001
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _WERROR_H_
|
||||
#define _WERROR_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* the following rather strange looking definitions of NTSTATUS and WERROR
|
||||
and there in order to catch common coding errors where different error types
|
||||
are mixed up. This is especially important as we slowly convert Samba
|
||||
from using bool for internal functions
|
||||
*/
|
||||
|
||||
#if defined(HAVE_IMMEDIATE_STRUCTURES)
|
||||
typedef struct {uint32_t w;} WERROR;
|
||||
#define W_ERROR(x) ((WERROR) { x })
|
||||
#define W_ERROR_V(x) ((x).w)
|
||||
#else
|
||||
typedef uint32_t WERROR;
|
||||
#define W_ERROR(x) (x)
|
||||
#define W_ERROR_V(x) (x)
|
||||
#endif
|
||||
|
||||
#include <core/werror_gen.h>
|
||||
|
||||
#define W_ERROR_IS_OK(x) (W_ERROR_V(x) == 0)
|
||||
#define W_ERROR_EQUAL(x,y) (W_ERROR_V(x) == W_ERROR_V(y))
|
||||
|
||||
#define W_ERROR_HAVE_NO_MEMORY(x) do { \
|
||||
if (!(x)) {\
|
||||
return WERR_NOT_ENOUGH_MEMORY;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define W_ERROR_HAVE_NO_MEMORY_AND_FREE(x, ctx) do { \
|
||||
if (!(x)) {\
|
||||
talloc_free(ctx); \
|
||||
return WERR_NOT_ENOUGH_MEMORY;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define W_ERROR_IS_OK_RETURN(x) do { \
|
||||
if (W_ERROR_IS_OK(x)) {\
|
||||
return x;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define W_ERROR_NOT_OK_RETURN(x) do { \
|
||||
if (!W_ERROR_IS_OK(x)) {\
|
||||
return x;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define W_ERROR_NOT_OK_GOTO_DONE(x) do { \
|
||||
if (!W_ERROR_IS_OK(x)) {\
|
||||
goto done;\
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define W_ERROR_NOT_OK_GOTO(x, y) do {\
|
||||
if (!W_ERROR_IS_OK(x)) {\
|
||||
goto y;\
|
||||
}\
|
||||
} while(0)
|
||||
|
||||
/* these are win32 error codes. There are only a few places where
|
||||
these matter for Samba, primarily in the NT printing code */
|
||||
#define WERR_OK W_ERROR(0x00000000)
|
||||
#define WERR_STATUS_MORE_ENTRIES W_ERROR(0x00000105)
|
||||
|
||||
#define WERR_MULTIPLE_FAULT_VIOLATION W_ERROR(0x00000280)
|
||||
#define WERR_SERVICE_NOTIFICATION W_ERROR(0x000002CC)
|
||||
#define WERR_LOG_HARD_ERROR W_ERROR(0x000002CE)
|
||||
#define WERR_WAIT_1 W_ERROR(0x000002DB)
|
||||
#define WERR_WAIT_2 W_ERROR(0x000002DC)
|
||||
#define WERR_WAIT_3 W_ERROR(0x000002DD)
|
||||
#define WERR_WAIT_63 W_ERROR(0x000002DE)
|
||||
#define WERR_ABANDONED_WAIT_63 W_ERROR(0x000002E0)
|
||||
#define WERR_USER_APC W_ERROR(0x000002E1)
|
||||
#define WERR_KERNEL_APC W_ERROR(0x000002E2)
|
||||
#define WERR_ALERTED W_ERROR(0x000002E3)
|
||||
#define WERR_INVALID_PRIMARY_GROUP W_ERROR(0x0000051C)
|
||||
|
||||
#define WERR_DS_DRA_SECRETS_DENIED W_ERROR(0x000021B6)
|
||||
#define WERR_DS_DRA_RECYCLED_TARGET W_ERROR(0x000021BF)
|
||||
|
||||
#define WERR_DNS_ERROR_KEYMASTER_REQUIRED W_ERROR(0x0000238D)
|
||||
#define WERR_DNS_ERROR_NOT_ALLOWED_ON_SIGNED_ZONE W_ERROR(0x0000238E)
|
||||
#define WERR_DNS_ERROR_INVALID_NSEC3_PARAMETERS W_ERROR(0x0000238F)
|
||||
#define WERR_DNS_ERROR_NOT_ENOUGH_SIGNING_KEY_DESCRIPTORS W_ERROR(0x00002390)
|
||||
#define WERR_DNS_ERROR_UNSUPPORTED_ALGORITHM W_ERROR(0x00002391)
|
||||
#define WERR_DNS_ERROR_INVALID_KEY_SIZE W_ERROR(0x00002392)
|
||||
#define WERR_DNS_ERROR_SIGNING_KEY_NOT_ACCESSIBLE W_ERROR(0x00002393)
|
||||
#define WERR_DNS_ERROR_KSP_DOES_NOT_SUPPORT_PROTECTION W_ERROR(0x00002394)
|
||||
#define WERR_DNS_ERROR_UNEXPECTED_DATA_PROTECTION_ERROR W_ERROR(0x00002395)
|
||||
#define WERR_DNS_ERROR_UNEXPECTED_CNG_ERROR W_ERROR(0x00002396)
|
||||
#define WERR_DNS_ERROR_UNKNOWN_SIGNING_PARAMETER_VERSION W_ERROR(0x00002397)
|
||||
#define WERR_DNS_ERROR_KSP_NOT_ACCESSIBLE W_ERROR(0x00002398)
|
||||
#define WERR_DNS_ERROR_TOO_MANY_SKDS W_ERROR(0x00002399)
|
||||
#define WERR_DNS_ERROR_INVALID_ROLLOVER_PERIOD W_ERROR(0x0000239A)
|
||||
#define WERR_DNS_ERROR_INVALID_INITIAL_ROLLOVER_OFFSET W_ERROR(0x0000239B)
|
||||
#define WERR_DNS_ERROR_ROLLOVER_IN_PROGRESS W_ERROR(0x0000239C)
|
||||
#define WERR_DNS_ERROR_STANDBY_KEY_NOT_PRESENT W_ERROR(0x0000239D)
|
||||
#define WERR_DNS_ERROR_NOT_ALLOWED_ON_ZSK W_ERROR(0x0000239E)
|
||||
#define WERR_DNS_ERROR_NOT_ALLOWED_ON_ACTIVE_SKD W_ERROR(0x0000239F)
|
||||
#define WERR_DNS_ERROR_ROLLOVER_ALREADY_QUEUED W_ERROR(0x000023A0)
|
||||
#define WERR_DNS_ERROR_NOT_ALLOWED_ON_UNSIGNED_ZONE W_ERROR(0x000023A1)
|
||||
#define WERR_DNS_ERROR_BAD_KEYMASTER W_ERROR(0x000023A2)
|
||||
#define WERR_DNS_ERROR_INVALID_SIGNATURE_VALIDITY_PERIOD W_ERROR(0x000023A3)
|
||||
#define WERR_DNS_ERROR_INVALID_NSEC3_ITERATION_COUNT W_ERROR(0x000023A4)
|
||||
#define WERR_DNS_ERROR_DNSSEC_IS_DISABLED W_ERROR(0x000023A5)
|
||||
#define WERR_DNS_ERROR_INVALID_XML W_ERROR(0x000023A6)
|
||||
#define WERR_DNS_ERROR_NO_VALID_TRUST_ANCHORS W_ERROR(0x000023A7)
|
||||
#define WERR_DNS_ERROR_ROLLOVER_NOT_POKEABLE W_ERROR(0x000023A8)
|
||||
#define WERR_DNS_ERROR_NSEC3_NAME_COLLISION W_ERROR(0x000023A9)
|
||||
|
||||
#define WERR_DNS_REQUEST_PENDING W_ERROR(0x00002522)
|
||||
#define WERR_DNS_ERROR_NOT_ALLOWED_UNDER_DNAME W_ERROR(0x00002562)
|
||||
#define WERR_DNS_ERROR_DELEGATION_REQUIRED W_ERROR(0x00002563)
|
||||
#define WERR_DNS_ERROR_INVALID_POLICY_TABLE W_ERROR(0x00002564)
|
||||
#define WERR_DNS_ERROR_NODE_IS_DNMAE WERR_DNS_ERROR_NODE_IS_DNAME
|
||||
#define WERR_DNS_ERROR_NODE_IS_DNAME W_ERROR(0x000025F8) /* Used to be: "WERR_DNS_ERROR_NODE_IS_DNMAE" */
|
||||
#define WERR_DNS_ERROR_DNAME_COLLISION W_ERROR(0x000025F9)
|
||||
#define WERR_DNS_ERROR_ALIAS_LOOP W_ERROR(0x000025FA)
|
||||
|
||||
/* Configuration Manager Errors */
|
||||
/* Basically Win32 errors meanings are specific to the \ntsvcs pipe */
|
||||
#define WERR_CM_INVALID_POINTER W_ERROR(3)
|
||||
#define WERR_CM_BUFFER_SMALL W_ERROR(26)
|
||||
#define WERR_CM_NO_MORE_HW_PROFILES W_ERROR(35)
|
||||
#define WERR_CM_NO_SUCH_VALUE W_ERROR(37)
|
||||
|
||||
/* DFS errors */
|
||||
|
||||
#ifndef NERR_BASE
|
||||
#define NERR_BASE (2100)
|
||||
#endif
|
||||
|
||||
#ifndef MAX_NERR
|
||||
#define MAX_NERR (NERR_BASE+899)
|
||||
#endif
|
||||
|
||||
/* Generic error code aliases */
|
||||
#define WERR_FOOBAR WERR_GEN_FAILURE
|
||||
|
||||
/*****************************************************************************
|
||||
returns a windows error message. not amazingly helpful, but better than a number.
|
||||
*****************************************************************************/
|
||||
const char *win_errstr(WERROR werror);
|
||||
|
||||
const char *get_friendly_werror_msg(WERROR werror);
|
||||
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,354 @@
|
||||
/*
|
||||
samba -- Unix SMB/CIFS implementation.
|
||||
|
||||
Client credentials structure
|
||||
|
||||
Copyright (C) Jelmer Vernooij 2004-2006
|
||||
Copyright (C) Andrew Bartlett <abartlet@samba.org> 2005
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __CREDENTIALS_H__
|
||||
#define __CREDENTIALS_H__
|
||||
|
||||
#include <util/time.h>
|
||||
#include <util/data_blob.h>
|
||||
#include <gen_ndr/misc.h>
|
||||
|
||||
struct cli_credentials;
|
||||
struct ccache_container;
|
||||
struct tevent_context;
|
||||
struct netlogon_creds_CredentialState;
|
||||
struct ldb_context;
|
||||
struct ldb_message;
|
||||
struct loadparm_context;
|
||||
struct ccache_container;
|
||||
struct gssapi_creds_container;
|
||||
struct smb_krb5_context;
|
||||
struct keytab_container;
|
||||
struct db_context;
|
||||
enum smb_signing_setting;
|
||||
enum smb_encryption_setting;
|
||||
|
||||
/* In order of priority */
|
||||
enum credentials_obtained {
|
||||
CRED_UNINITIALISED = 0, /* We don't even have a guess yet */
|
||||
CRED_SMB_CONF, /* Current value should be used, which comes from smb.conf */
|
||||
CRED_CALLBACK, /* Callback should be used to obtain value */
|
||||
CRED_GUESS_ENV, /* Current value should be used, which was guessed */
|
||||
CRED_GUESS_FILE, /* A guess from a file (or file pointed at in env variable) */
|
||||
CRED_CALLBACK_RESULT, /* Value was obtained from a callback */
|
||||
CRED_SPECIFIED /* Was explicitly specified on the command-line */
|
||||
};
|
||||
|
||||
enum credentials_use_kerberos {
|
||||
/** Sometimes trying kerberos just does 'bad things', so don't */
|
||||
CRED_USE_KERBEROS_DISABLED = 0,
|
||||
/** Default, we try kerberos if available */
|
||||
CRED_USE_KERBEROS_DESIRED,
|
||||
/** Sometimes administrators are paranoid, so always do kerberos */
|
||||
CRED_USE_KERBEROS_REQUIRED,
|
||||
};
|
||||
|
||||
enum credentials_client_protection {
|
||||
CRED_CLIENT_PROTECTION_DEFAULT = -1,
|
||||
CRED_CLIENT_PROTECTION_PLAIN = 0,
|
||||
CRED_CLIENT_PROTECTION_SIGN,
|
||||
CRED_CLIENT_PROTECTION_ENCRYPT,
|
||||
};
|
||||
|
||||
enum credentials_krb_forwardable {
|
||||
CRED_AUTO_KRB_FORWARDABLE = 0, /* Default, follow library defaults */
|
||||
CRED_NO_KRB_FORWARDABLE, /* not forwardable */
|
||||
CRED_FORCE_KRB_FORWARDABLE /* forwardable */
|
||||
};
|
||||
|
||||
#define CLI_CRED_NTLM2 0x01
|
||||
#define CLI_CRED_NTLMv2_AUTH 0x02
|
||||
#define CLI_CRED_LANMAN_AUTH 0x04
|
||||
#define CLI_CRED_NTLM_AUTH 0x08
|
||||
#define CLI_CRED_CLEAR_AUTH 0x10 /* TODO: Push cleartext auth with this flag */
|
||||
|
||||
const char *cli_credentials_get_workstation(struct cli_credentials *cred);
|
||||
bool cli_credentials_set_workstation(struct cli_credentials *cred,
|
||||
const char *val,
|
||||
enum credentials_obtained obtained);
|
||||
bool cli_credentials_is_anonymous(struct cli_credentials *cred);
|
||||
struct cli_credentials *cli_credentials_init(TALLOC_CTX *mem_ctx);
|
||||
struct cli_credentials *cli_credentials_init_server(TALLOC_CTX *mem_ctx,
|
||||
struct loadparm_context *lp_ctx);
|
||||
void cli_credentials_set_anonymous(struct cli_credentials *cred);
|
||||
bool cli_credentials_wrong_password(struct cli_credentials *cred);
|
||||
const char *cli_credentials_get_password(struct cli_credentials *cred);
|
||||
const char *cli_credentials_get_password_and_obtained(struct cli_credentials *cred,
|
||||
enum credentials_obtained *obtained);
|
||||
void cli_credentials_get_ntlm_username_domain(struct cli_credentials *cred, TALLOC_CTX *mem_ctx,
|
||||
const char **username,
|
||||
const char **domain);
|
||||
NTSTATUS cli_credentials_get_ntlm_response(struct cli_credentials *cred, TALLOC_CTX *mem_ctx,
|
||||
int *flags,
|
||||
DATA_BLOB challenge,
|
||||
const NTTIME *server_timestamp,
|
||||
DATA_BLOB target_info,
|
||||
DATA_BLOB *_lm_response, DATA_BLOB *_nt_response,
|
||||
DATA_BLOB *_lm_session_key, DATA_BLOB *_session_key);
|
||||
const char *cli_credentials_get_realm(struct cli_credentials *cred);
|
||||
const char *cli_credentials_get_username(struct cli_credentials *cred);
|
||||
const char *cli_credentials_get_username_and_obtained(struct cli_credentials *cred,
|
||||
enum credentials_obtained *obtained);
|
||||
int cli_credentials_get_krb5_context(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct smb_krb5_context **smb_krb5_context);
|
||||
int cli_credentials_get_ccache(struct cli_credentials *cred,
|
||||
struct tevent_context *event_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct ccache_container **ccc,
|
||||
const char **error_string);
|
||||
int cli_credentials_get_named_ccache(struct cli_credentials *cred,
|
||||
struct tevent_context *event_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
char *ccache_name,
|
||||
struct ccache_container **ccc, const char **error_string);
|
||||
bool cli_credentials_failed_kerberos_login(struct cli_credentials *cred,
|
||||
const char *principal,
|
||||
unsigned int *count);
|
||||
int cli_credentials_get_keytab(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct keytab_container **_ktc);
|
||||
const char *cli_credentials_get_domain(struct cli_credentials *cred);
|
||||
struct netlogon_creds_CredentialState *cli_credentials_get_netlogon_creds(struct cli_credentials *cred);
|
||||
void cli_credentials_set_machine_account_pending(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx);
|
||||
bool cli_credentials_set_conf(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx);
|
||||
char *cli_credentials_get_principal(struct cli_credentials *cred, TALLOC_CTX *mem_ctx);
|
||||
int cli_credentials_get_server_gss_creds(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct gssapi_creds_container **_gcc);
|
||||
int cli_credentials_get_client_gss_creds(struct cli_credentials *cred,
|
||||
struct tevent_context *event_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct gssapi_creds_container **_gcc,
|
||||
const char **error_string);
|
||||
void cli_credentials_set_forced_sasl_mech(struct cli_credentials *creds,
|
||||
const char *sasl_mech);
|
||||
bool cli_credentials_set_kerberos_state(struct cli_credentials *creds,
|
||||
enum credentials_use_kerberos kerberos_state,
|
||||
enum credentials_obtained obtained);
|
||||
void cli_credentials_set_krb_forwardable(struct cli_credentials *creds,
|
||||
enum credentials_krb_forwardable krb_forwardable);
|
||||
bool cli_credentials_set_domain(struct cli_credentials *cred,
|
||||
const char *val,
|
||||
enum credentials_obtained obtained);
|
||||
bool cli_credentials_set_domain_callback(struct cli_credentials *cred,
|
||||
const char *(*domain_cb) (struct cli_credentials *));
|
||||
bool cli_credentials_set_username(struct cli_credentials *cred,
|
||||
const char *val, enum credentials_obtained obtained);
|
||||
bool cli_credentials_set_username_callback(struct cli_credentials *cred,
|
||||
const char *(*username_cb) (struct cli_credentials *));
|
||||
bool cli_credentials_set_principal(struct cli_credentials *cred,
|
||||
const char *val,
|
||||
enum credentials_obtained obtained);
|
||||
bool cli_credentials_set_principal_callback(struct cli_credentials *cred,
|
||||
const char *(*principal_cb) (struct cli_credentials *));
|
||||
bool cli_credentials_set_password(struct cli_credentials *cred,
|
||||
const char *val,
|
||||
enum credentials_obtained obtained);
|
||||
struct cli_credentials *cli_credentials_init_anon(TALLOC_CTX *mem_ctx);
|
||||
void cli_credentials_parse_string(struct cli_credentials *credentials, const char *data, enum credentials_obtained obtained);
|
||||
struct samr_Password *cli_credentials_get_nt_hash(struct cli_credentials *cred,
|
||||
TALLOC_CTX *mem_ctx);
|
||||
struct samr_Password *cli_credentials_get_old_nt_hash(struct cli_credentials *cred,
|
||||
TALLOC_CTX *mem_ctx);
|
||||
bool cli_credentials_set_realm(struct cli_credentials *cred,
|
||||
const char *val,
|
||||
enum credentials_obtained obtained);
|
||||
void cli_credentials_set_secure_channel_type(struct cli_credentials *cred,
|
||||
enum netr_SchannelType secure_channel_type);
|
||||
void cli_credentials_set_password_last_changed_time(struct cli_credentials *cred,
|
||||
time_t last_change_time);
|
||||
void cli_credentials_set_netlogon_creds(
|
||||
struct cli_credentials *cred,
|
||||
const struct netlogon_creds_CredentialState *netlogon_creds);
|
||||
NTSTATUS cli_credentials_set_krb5_context(struct cli_credentials *cred,
|
||||
struct smb_krb5_context *smb_krb5_context);
|
||||
NTSTATUS cli_credentials_set_stored_principal(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx,
|
||||
const char *serviceprincipal);
|
||||
NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx);
|
||||
/**
|
||||
* Fill in credentials for the machine trust account, from the
|
||||
* secrets.ldb or passed in handle to secrets.tdb (perhaps in CTDB).
|
||||
*
|
||||
* This version is used in parts of the code that can link in the
|
||||
* CTDB dbwrap backend, by passing down the already open handle.
|
||||
*
|
||||
* @param cred Credentials structure to fill in
|
||||
* @param db_ctx dbwrap context for secrets.tdb
|
||||
* @retval NTSTATUS error detailing any failure
|
||||
*/
|
||||
NTSTATUS cli_credentials_set_machine_account_db_ctx(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct db_context *db_ctx);
|
||||
|
||||
bool cli_credentials_authentication_requested(struct cli_credentials *cred);
|
||||
bool cli_credentials_guess(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx);
|
||||
bool cli_credentials_set_bind_dn(struct cli_credentials *cred,
|
||||
const char *bind_dn);
|
||||
const char *cli_credentials_get_bind_dn(struct cli_credentials *cred);
|
||||
bool cli_credentials_parse_file(struct cli_credentials *cred, const char *file, enum credentials_obtained obtained);
|
||||
char *cli_credentials_get_unparsed_name(struct cli_credentials *credentials, TALLOC_CTX *mem_ctx);
|
||||
bool cli_credentials_set_password_callback(struct cli_credentials *cred,
|
||||
const char *(*password_cb) (struct cli_credentials *));
|
||||
enum netr_SchannelType cli_credentials_get_secure_channel_type(struct cli_credentials *cred);
|
||||
time_t cli_credentials_get_password_last_changed_time(struct cli_credentials *cred);
|
||||
void cli_credentials_set_kvno(struct cli_credentials *cred,
|
||||
int kvno);
|
||||
bool cli_credentials_set_utf16_password(struct cli_credentials *cred,
|
||||
const DATA_BLOB *password_utf16,
|
||||
enum credentials_obtained obtained);
|
||||
bool cli_credentials_set_old_utf16_password(struct cli_credentials *cred,
|
||||
const DATA_BLOB *password_utf16);
|
||||
void cli_credentials_set_password_will_be_nt_hash(struct cli_credentials *cred,
|
||||
bool val);
|
||||
bool cli_credentials_set_nt_hash(struct cli_credentials *cred,
|
||||
const struct samr_Password *nt_hash,
|
||||
enum credentials_obtained obtained);
|
||||
bool cli_credentials_set_old_nt_hash(struct cli_credentials *cred,
|
||||
const struct samr_Password *nt_hash);
|
||||
bool cli_credentials_set_ntlm_response(struct cli_credentials *cred,
|
||||
const DATA_BLOB *lm_response,
|
||||
const DATA_BLOB *lm_session_key,
|
||||
const DATA_BLOB *nt_response,
|
||||
const DATA_BLOB *nt_session_key,
|
||||
enum credentials_obtained obtained);
|
||||
int cli_credentials_set_keytab_name(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx,
|
||||
const char *keytab_name,
|
||||
enum credentials_obtained obtained);
|
||||
bool cli_credentials_set_gensec_features(struct cli_credentials *creds,
|
||||
uint32_t gensec_features,
|
||||
enum credentials_obtained obtained);
|
||||
uint32_t cli_credentials_get_gensec_features(struct cli_credentials *creds);
|
||||
int cli_credentials_set_ccache(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx,
|
||||
const char *name,
|
||||
enum credentials_obtained obtained,
|
||||
const char **error_string);
|
||||
bool cli_credentials_parse_password_file(struct cli_credentials *credentials, const char *file, enum credentials_obtained obtained);
|
||||
bool cli_credentials_parse_password_fd(struct cli_credentials *credentials,
|
||||
int fd, enum credentials_obtained obtained);
|
||||
void cli_credentials_invalidate_ccache(struct cli_credentials *cred,
|
||||
enum credentials_obtained obtained);
|
||||
void cli_credentials_set_salt_principal(struct cli_credentials *cred, const char *principal);
|
||||
void cli_credentials_set_impersonate_principal(struct cli_credentials *cred,
|
||||
const char *principal,
|
||||
const char *self_service);
|
||||
void cli_credentials_set_target_service(struct cli_credentials *cred, const char *principal);
|
||||
const char *cli_credentials_get_salt_principal(struct cli_credentials *cred);
|
||||
const char *cli_credentials_get_impersonate_principal(struct cli_credentials *cred);
|
||||
const char *cli_credentials_get_self_service(struct cli_credentials *cred);
|
||||
const char *cli_credentials_get_target_service(struct cli_credentials *cred);
|
||||
enum credentials_use_kerberos cli_credentials_get_kerberos_state(struct cli_credentials *creds);
|
||||
const char *cli_credentials_get_forced_sasl_mech(struct cli_credentials *cred);
|
||||
enum credentials_krb_forwardable cli_credentials_get_krb_forwardable(struct cli_credentials *creds);
|
||||
NTSTATUS cli_credentials_set_secrets(struct cli_credentials *cred,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct ldb_context *ldb,
|
||||
const char *base,
|
||||
const char *filter,
|
||||
char **error_string);
|
||||
int cli_credentials_get_kvno(struct cli_credentials *cred);
|
||||
|
||||
bool cli_credentials_set_username_callback(struct cli_credentials *cred,
|
||||
const char *(*username_cb) (struct cli_credentials *));
|
||||
|
||||
/**
|
||||
* Obtain the client principal for this credentials context.
|
||||
* @param cred credentials context
|
||||
* @retval The username set on this context.
|
||||
* @note Return value will never be NULL except by programmer error.
|
||||
*/
|
||||
char *cli_credentials_get_principal_and_obtained(struct cli_credentials *cred, TALLOC_CTX *mem_ctx, enum credentials_obtained *obtained);
|
||||
bool cli_credentials_set_principal(struct cli_credentials *cred,
|
||||
const char *val,
|
||||
enum credentials_obtained obtained);
|
||||
bool cli_credentials_set_principal_callback(struct cli_credentials *cred,
|
||||
const char *(*principal_cb) (struct cli_credentials *));
|
||||
|
||||
/**
|
||||
* Obtain the 'old' password for this credentials context (used for join accounts).
|
||||
* @param cred credentials context
|
||||
* @retval If set, the cleartext password, otherwise NULL
|
||||
*/
|
||||
const char *cli_credentials_get_old_password(struct cli_credentials *cred);
|
||||
bool cli_credentials_set_old_password(struct cli_credentials *cred,
|
||||
const char *val,
|
||||
enum credentials_obtained obtained);
|
||||
bool cli_credentials_set_domain_callback(struct cli_credentials *cred,
|
||||
const char *(*domain_cb) (struct cli_credentials *));
|
||||
bool cli_credentials_set_realm_callback(struct cli_credentials *cred,
|
||||
const char *(*realm_cb) (struct cli_credentials *));
|
||||
bool cli_credentials_set_workstation_callback(struct cli_credentials *cred,
|
||||
const char *(*workstation_cb) (struct cli_credentials *));
|
||||
|
||||
void cli_credentials_set_callback_data(struct cli_credentials *cred,
|
||||
void *callback_data);
|
||||
void *_cli_credentials_callback_data(struct cli_credentials *cred);
|
||||
#define cli_credentials_callback_data(_cred, _type) \
|
||||
talloc_get_type_abort(_cli_credentials_callback_data(_cred), _type)
|
||||
#define cli_credentials_callback_data_void(_cred) \
|
||||
_cli_credentials_callback_data(_cred)
|
||||
|
||||
bool cli_credentials_set_smb_signing(struct cli_credentials *cred,
|
||||
enum smb_signing_setting signing_state,
|
||||
enum credentials_obtained obtained);
|
||||
enum smb_signing_setting
|
||||
cli_credentials_get_smb_signing(struct cli_credentials *cred);
|
||||
|
||||
bool cli_credentials_set_smb_ipc_signing(struct cli_credentials *cred,
|
||||
enum smb_signing_setting ipc_signing_state,
|
||||
enum credentials_obtained obtained);
|
||||
enum smb_signing_setting
|
||||
cli_credentials_get_smb_ipc_signing(struct cli_credentials *cred);
|
||||
|
||||
bool cli_credentials_set_smb_encryption(struct cli_credentials *cred,
|
||||
enum smb_encryption_setting encryption_state,
|
||||
enum credentials_obtained obtained);
|
||||
enum smb_encryption_setting
|
||||
cli_credentials_get_smb_encryption(struct cli_credentials *cred);
|
||||
|
||||
bool cli_credentials_set_cmdline_callbacks(struct cli_credentials *cred);
|
||||
|
||||
void cli_credentials_dump(struct cli_credentials *creds);
|
||||
|
||||
/**
|
||||
* Return attached NETLOGON credentials
|
||||
*/
|
||||
struct netlogon_creds_CredentialState *cli_credentials_get_netlogon_creds(struct cli_credentials *cred);
|
||||
|
||||
NTSTATUS netlogon_creds_session_encrypt(
|
||||
struct netlogon_creds_CredentialState *state,
|
||||
DATA_BLOB data);
|
||||
|
||||
int cli_credentials_get_aes256_key(struct cli_credentials *cred,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
const char *password,
|
||||
const char *salt,
|
||||
DATA_BLOB *aes_256);
|
||||
|
||||
#endif /* __CREDENTIALS_H__ */
|
||||
@ -0,0 +1,264 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
DCERPC client side interface structures
|
||||
|
||||
Copyright (C) Tim Potter 2003
|
||||
Copyright (C) Andrew Tridgell 2003-2005
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* This is a public header file that is installed as part of Samba.
|
||||
* If you remove any functions or change their signature, update
|
||||
* the so version number. */
|
||||
|
||||
#ifndef __S4_DCERPC_H__
|
||||
#define __S4_DCERPC_H__
|
||||
|
||||
#include <util/data_blob.h>
|
||||
#include <gen_ndr/dcerpc.h>
|
||||
#include <ndr.h>
|
||||
#include <rpc_common.h>
|
||||
|
||||
struct tevent_context;
|
||||
struct tevent_req;
|
||||
struct dcerpc_binding_handle;
|
||||
struct tstream_context;
|
||||
struct ndr_interface_table;
|
||||
struct resolve_context;
|
||||
|
||||
/*
|
||||
this defines a generic security context for signed/sealed dcerpc pipes.
|
||||
*/
|
||||
struct dcecli_connection;
|
||||
struct gensec_settings;
|
||||
struct cli_credentials;
|
||||
struct dcecli_security {
|
||||
enum dcerpc_AuthType auth_type;
|
||||
enum dcerpc_AuthLevel auth_level;
|
||||
uint32_t auth_context_id;
|
||||
struct {
|
||||
struct dcerpc_auth *out;
|
||||
struct dcerpc_auth *in;
|
||||
TALLOC_CTX *mem;
|
||||
} tmp_auth_info;
|
||||
struct gensec_security *generic_state;
|
||||
|
||||
/* get the session key */
|
||||
NTSTATUS (*session_key)(struct dcecli_connection *, DATA_BLOB *);
|
||||
|
||||
bool verified_bitmask1;
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
this holds the information that is not specific to a particular rpc context_id
|
||||
*/
|
||||
struct rpc_request;
|
||||
struct dcecli_connection {
|
||||
uint32_t call_id;
|
||||
uint32_t srv_max_xmit_frag;
|
||||
uint32_t srv_max_recv_frag;
|
||||
uint32_t flags;
|
||||
struct dcecli_security security_state;
|
||||
struct tevent_context *event_ctx;
|
||||
|
||||
struct tevent_immediate *io_trigger;
|
||||
bool io_trigger_pending;
|
||||
|
||||
/** Directory in which to save ndrdump-parseable files */
|
||||
const char *packet_log_dir;
|
||||
|
||||
bool dead;
|
||||
bool free_skipped;
|
||||
|
||||
struct dcerpc_transport {
|
||||
enum dcerpc_transport_t transport;
|
||||
void *private_data;
|
||||
bool encrypted;
|
||||
|
||||
struct tstream_context *stream;
|
||||
/** to serialize write events */
|
||||
struct tevent_queue *write_queue;
|
||||
/** the current active read request if any */
|
||||
struct tevent_req *read_subreq;
|
||||
/** number of read requests other than the current active */
|
||||
uint32_t pending_reads;
|
||||
} transport;
|
||||
|
||||
const char *server_name;
|
||||
|
||||
/* Requests that have been sent, waiting for a reply */
|
||||
struct rpc_request *pending;
|
||||
|
||||
/* Sync requests waiting to be shipped */
|
||||
struct rpc_request *request_queue;
|
||||
|
||||
/* the next context_id to be assigned */
|
||||
uint32_t next_context_id;
|
||||
|
||||
/* The maximum total payload of reassembled response pdus */
|
||||
size_t max_total_response_size;
|
||||
|
||||
/* the negotiated bind time features */
|
||||
uint16_t bind_time_features;
|
||||
};
|
||||
|
||||
/*
|
||||
this encapsulates a full dcerpc client side pipe
|
||||
*/
|
||||
struct dcerpc_pipe {
|
||||
struct dcerpc_binding_handle *binding_handle;
|
||||
|
||||
uint32_t context_id;
|
||||
|
||||
struct GUID object;
|
||||
struct ndr_syntax_id syntax;
|
||||
struct ndr_syntax_id transfer_syntax;
|
||||
|
||||
struct dcecli_connection *conn;
|
||||
const struct dcerpc_binding *binding;
|
||||
|
||||
/** the last fault code from a DCERPC fault */
|
||||
uint32_t last_fault_code;
|
||||
|
||||
/** timeout for individual rpc requests, in seconds */
|
||||
uint32_t request_timeout;
|
||||
|
||||
/*
|
||||
* Set for the timeout in dcerpc_pipe_connect_b_send(), to
|
||||
* allow the timeout not to destory the stack during a nested
|
||||
* event loop caused by gensec_update()
|
||||
*/
|
||||
bool inhibit_timeout_processing;
|
||||
bool timed_out;
|
||||
|
||||
bool verified_pcontext;
|
||||
};
|
||||
|
||||
/* default timeout for all rpc requests, in seconds */
|
||||
#define DCERPC_REQUEST_TIMEOUT 60
|
||||
|
||||
struct epm_tower;
|
||||
struct epm_floor;
|
||||
|
||||
struct smbcli_tree;
|
||||
struct smb2_tree;
|
||||
struct smbXcli_conn;
|
||||
struct smbXcli_session;
|
||||
struct smbXcli_tcon;
|
||||
struct roh_connection;
|
||||
struct tstream_tls_params;
|
||||
struct socket_address;
|
||||
|
||||
NTSTATUS dcerpc_pipe_connect(TALLOC_CTX *parent_ctx,
|
||||
struct dcerpc_pipe **pp,
|
||||
const char *binding,
|
||||
const struct ndr_interface_table *table,
|
||||
struct cli_credentials *credentials,
|
||||
struct tevent_context *ev,
|
||||
struct loadparm_context *lp_ctx);
|
||||
const char *dcerpc_server_name(struct dcerpc_pipe *p);
|
||||
struct dcerpc_pipe *dcerpc_pipe_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev);
|
||||
NTSTATUS dcerpc_pipe_open_smb(struct dcerpc_pipe *p,
|
||||
struct smbcli_tree *tree,
|
||||
const char *pipe_name);
|
||||
NTSTATUS dcerpc_pipe_open_smb2(struct dcerpc_pipe *p,
|
||||
struct smb2_tree *tree,
|
||||
const char *pipe_name);
|
||||
NTSTATUS dcerpc_bind_auth_none(struct dcerpc_pipe *p,
|
||||
const struct ndr_interface_table *table);
|
||||
NTSTATUS dcerpc_fetch_session_key(struct dcerpc_pipe *p,
|
||||
DATA_BLOB *session_key);
|
||||
bool dcerpc_transport_encrypted(struct dcerpc_pipe *p);
|
||||
struct composite_context;
|
||||
NTSTATUS dcerpc_secondary_connection_recv(struct composite_context *c,
|
||||
struct dcerpc_pipe **p2);
|
||||
|
||||
struct composite_context* dcerpc_pipe_connect_b_send(TALLOC_CTX *parent_ctx,
|
||||
const struct dcerpc_binding *binding,
|
||||
const struct ndr_interface_table *table,
|
||||
struct cli_credentials *credentials,
|
||||
struct tevent_context *ev,
|
||||
struct loadparm_context *lp_ctx);
|
||||
|
||||
NTSTATUS dcerpc_pipe_connect_b_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
|
||||
struct dcerpc_pipe **p);
|
||||
|
||||
NTSTATUS dcerpc_pipe_connect_b(TALLOC_CTX *parent_ctx,
|
||||
struct dcerpc_pipe **pp,
|
||||
const struct dcerpc_binding *binding,
|
||||
const struct ndr_interface_table *table,
|
||||
struct cli_credentials *credentials,
|
||||
struct tevent_context *ev,
|
||||
struct loadparm_context *lp_ctx);
|
||||
|
||||
NTSTATUS dcerpc_pipe_auth(TALLOC_CTX *mem_ctx,
|
||||
struct dcerpc_pipe **p,
|
||||
const struct dcerpc_binding *binding,
|
||||
const struct ndr_interface_table *table,
|
||||
struct cli_credentials *credentials,
|
||||
struct loadparm_context *lp_ctx);
|
||||
NTSTATUS dcerpc_init(void);
|
||||
struct composite_context *dcerpc_secondary_smb_send(struct dcecli_connection *c1,
|
||||
struct dcecli_connection *c2,
|
||||
const char *pipe_name);
|
||||
NTSTATUS dcerpc_secondary_smb_recv(struct composite_context *c);
|
||||
NTSTATUS dcerpc_secondary_context(struct dcerpc_pipe *p,
|
||||
struct dcerpc_pipe **pp2,
|
||||
const struct ndr_interface_table *table);
|
||||
NTSTATUS dcerpc_alter_context(struct dcerpc_pipe *p,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct ndr_syntax_id *syntax,
|
||||
const struct ndr_syntax_id *transfer_syntax);
|
||||
|
||||
NTSTATUS dcerpc_bind_auth(struct dcerpc_pipe *p,
|
||||
const struct ndr_interface_table *table,
|
||||
struct cli_credentials *credentials,
|
||||
struct gensec_settings *gensec_settings,
|
||||
uint8_t auth_type, uint8_t auth_level,
|
||||
const char *service);
|
||||
struct composite_context* dcerpc_pipe_connect_send(TALLOC_CTX *parent_ctx,
|
||||
const char *binding,
|
||||
const struct ndr_interface_table *table,
|
||||
struct cli_credentials *credentials,
|
||||
struct tevent_context *ev, struct loadparm_context *lp_ctx);
|
||||
NTSTATUS dcerpc_pipe_connect_recv(struct composite_context *c,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct dcerpc_pipe **pp);
|
||||
|
||||
NTSTATUS dcerpc_epm_map_binding(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding,
|
||||
const struct ndr_interface_table *table, struct tevent_context *ev,
|
||||
struct loadparm_context *lp_ctx);
|
||||
struct composite_context* dcerpc_secondary_auth_connection_send(struct dcerpc_pipe *p,
|
||||
const struct dcerpc_binding *binding,
|
||||
const struct ndr_interface_table *table,
|
||||
struct cli_credentials *credentials,
|
||||
struct loadparm_context *lp_ctx);
|
||||
NTSTATUS dcerpc_secondary_auth_connection_recv(struct composite_context *c,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct dcerpc_pipe **p);
|
||||
NTSTATUS dcerpc_secondary_auth_connection(struct dcerpc_pipe *p,
|
||||
const struct dcerpc_binding *binding,
|
||||
const struct ndr_interface_table *table,
|
||||
struct cli_credentials *credentials,
|
||||
struct loadparm_context *lp_ctx,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct dcerpc_pipe **p2);
|
||||
|
||||
struct composite_context* dcerpc_secondary_connection_send(struct dcerpc_pipe *p,
|
||||
const struct dcerpc_binding *b);
|
||||
|
||||
#endif /* __S4_DCERPC_H__ */
|
||||
@ -0,0 +1,656 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
server side dcerpc defines
|
||||
|
||||
Copyright (C) Andrew Tridgell 2003-2005
|
||||
Copyright (C) Stefan (metze) Metzmacher 2004-2005
|
||||
Copyright (C) Samuel Cabrero <scabrero@samba.org> 2019
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _LIBRPC_RPC_DCESRV_CORE_H_
|
||||
#define _LIBRPC_RPC_DCESRV_CORE_H_
|
||||
|
||||
#include <rpc_common.h>
|
||||
#include <ndr.h>
|
||||
#include <gen_ndr/security.h>
|
||||
|
||||
/* modules can use the following to determine if the interface has changed
|
||||
* please increment the version number after each interface change
|
||||
* with a comment and maybe update struct dcesrv_critical_sizes.
|
||||
*/
|
||||
/* version 1 - initial version - metze */
|
||||
#define DCERPC_MODULE_VERSION 1
|
||||
|
||||
struct dcesrv_connection;
|
||||
struct dcesrv_call_state;
|
||||
struct dcesrv_auth;
|
||||
struct dcesrv_connection_context;
|
||||
struct dcesrv_iface_state;
|
||||
struct cli_credentials;
|
||||
|
||||
struct dcesrv_interface {
|
||||
const char *name;
|
||||
struct ndr_syntax_id syntax_id;
|
||||
|
||||
/* this function is called when the client binds to this interface */
|
||||
NTSTATUS (*bind)(struct dcesrv_connection_context *, const struct dcesrv_interface *);
|
||||
|
||||
/* this function is called when the client disconnects the endpoint */
|
||||
void (*unbind)(struct dcesrv_connection_context *, const struct dcesrv_interface *);
|
||||
|
||||
/* the ndr_pull function for the chosen interface.
|
||||
*/
|
||||
NTSTATUS (*ndr_pull)(struct dcesrv_call_state *, TALLOC_CTX *, struct ndr_pull *, void **);
|
||||
|
||||
/* the dispatch function for the chosen interface.
|
||||
*/
|
||||
NTSTATUS (*dispatch)(struct dcesrv_call_state *, TALLOC_CTX *, void *);
|
||||
|
||||
/* the reply function for the chosen interface.
|
||||
*/
|
||||
NTSTATUS (*reply)(struct dcesrv_call_state *, TALLOC_CTX *, void *);
|
||||
|
||||
/* the ndr_push function for the chosen interface.
|
||||
*/
|
||||
NTSTATUS (*ndr_push)(struct dcesrv_call_state *, TALLOC_CTX *, struct ndr_push *, const void *);
|
||||
|
||||
/* the local dispatch function for the chosen interface.
|
||||
*/
|
||||
NTSTATUS (*local)(struct dcesrv_call_state *, TALLOC_CTX *, void *);
|
||||
|
||||
/* for any private use by the interface code */
|
||||
const void *private_data;
|
||||
|
||||
uint64_t flags;
|
||||
};
|
||||
|
||||
#define DCESRV_INTERFACE_FLAGS_HANDLES_NOT_USED 0x00000001
|
||||
|
||||
enum dcesrv_call_list {
|
||||
DCESRV_LIST_NONE,
|
||||
DCESRV_LIST_CALL_LIST,
|
||||
DCESRV_LIST_FRAGMENTED_CALL_LIST,
|
||||
DCESRV_LIST_PENDING_CALL_LIST
|
||||
};
|
||||
|
||||
struct data_blob_list_item {
|
||||
struct data_blob_list_item *prev,*next;
|
||||
DATA_BLOB blob;
|
||||
};
|
||||
|
||||
/* the state of an ongoing dcerpc call */
|
||||
struct dcesrv_call_state {
|
||||
struct dcesrv_call_state *next, *prev;
|
||||
struct dcesrv_auth *auth_state;
|
||||
struct dcesrv_connection *conn;
|
||||
struct dcesrv_connection_context *context;
|
||||
struct ncacn_packet pkt;
|
||||
|
||||
/*
|
||||
* Used during async bind/alter_context.
|
||||
*/
|
||||
struct ncacn_packet ack_pkt;
|
||||
|
||||
/*
|
||||
which list this request is in, if any
|
||||
*/
|
||||
enum dcesrv_call_list list;
|
||||
|
||||
/* the backend can mark the call
|
||||
* with DCESRV_CALL_STATE_FLAG_ASYNC
|
||||
* that will cause the frontend to not touch r->out
|
||||
* and skip the reply
|
||||
*
|
||||
* this is only allowed to the backend when DCESRV_CALL_STATE_FLAG_MAY_ASYNC
|
||||
* is already set by the frontend
|
||||
*
|
||||
* the backend then needs to call dcesrv_reply() when it's
|
||||
* ready to send the reply
|
||||
*/
|
||||
#define DCESRV_CALL_STATE_FLAG_ASYNC (1<<0)
|
||||
#define DCESRV_CALL_STATE_FLAG_MAY_ASYNC (1<<1)
|
||||
#define DCESRV_CALL_STATE_FLAG_MULTIPLEXED (1<<3)
|
||||
#define DCESRV_CALL_STATE_FLAG_PROCESS_PENDING_CALL (1<<4)
|
||||
uint32_t state_flags;
|
||||
|
||||
/* the time the request arrived in the server */
|
||||
struct timeval time;
|
||||
|
||||
/* the backend can use this event context for async replies */
|
||||
struct tevent_context *event_ctx;
|
||||
|
||||
/* this is the pointer to the allocated function struct */
|
||||
void *r;
|
||||
|
||||
/*
|
||||
* that's the ndr pull context used in dcesrv_request()
|
||||
* needed by dcesrv_reply() to carry over information
|
||||
* for full pointer support.
|
||||
*/
|
||||
struct ndr_pull *ndr_pull;
|
||||
|
||||
DATA_BLOB input;
|
||||
|
||||
struct data_blob_list_item *replies;
|
||||
|
||||
/* this is used by the boilerplate code to generate DCERPC faults */
|
||||
uint32_t fault_code;
|
||||
|
||||
/* the reason why we terminate the connection after sending a response */
|
||||
const char *terminate_reason;
|
||||
|
||||
/* temporary auth_info fields */
|
||||
struct dcerpc_auth in_auth_info;
|
||||
struct dcerpc_auth _out_auth_info;
|
||||
struct dcerpc_auth *out_auth_info;
|
||||
};
|
||||
|
||||
/*
|
||||
* DCERPC Handles
|
||||
* --------------
|
||||
* The various handles that are used in the RPC servers should be
|
||||
* created and fetch using the dcesrv_handle_* functions.
|
||||
*
|
||||
* Use
|
||||
* dcesrv_handle_create(struct dcesrv_call_state \*, uint8 handle_type)
|
||||
* to obtain a new handle of the specified type. Handle types are
|
||||
* unique within each pipe.
|
||||
*
|
||||
* The handle can later be fetched again using:
|
||||
*
|
||||
* struct dcesrv_handle *dcesrv_handle_lookup(
|
||||
* struct dcesrv_call_state *dce_call,
|
||||
* struct policy_handle *p,
|
||||
* uint8 handle_type)
|
||||
*
|
||||
* and destroyed by:
|
||||
*
|
||||
* TALLOC_FREE(struct dcesrv_handle *).
|
||||
*
|
||||
* User data should be stored in the 'data' member of the dcesrv_handle
|
||||
* struct.
|
||||
*/
|
||||
|
||||
#define DCESRV_HANDLE_ANY 255
|
||||
|
||||
/* a dcerpc handle in internal format */
|
||||
struct dcesrv_handle {
|
||||
struct dcesrv_handle *next, *prev;
|
||||
struct dcesrv_assoc_group *assoc_group;
|
||||
struct policy_handle wire_handle;
|
||||
struct dom_sid sid;
|
||||
enum dcerpc_AuthLevel min_auth_level;
|
||||
const struct dcesrv_interface *iface;
|
||||
void *data;
|
||||
};
|
||||
|
||||
/* hold the authentication state information */
|
||||
struct dcesrv_auth {
|
||||
struct dcesrv_auth *prev, *next;
|
||||
enum dcerpc_AuthType auth_type;
|
||||
enum dcerpc_AuthLevel auth_level;
|
||||
uint32_t auth_context_id;
|
||||
struct gensec_security *gensec_security;
|
||||
struct auth_session_info *session_info;
|
||||
NTSTATUS (*session_key_fn)(struct dcesrv_auth *, DATA_BLOB *session_key);
|
||||
bool auth_started;
|
||||
bool auth_finished;
|
||||
bool auth_audited;
|
||||
bool auth_invalid;
|
||||
};
|
||||
|
||||
struct dcesrv_connection_context {
|
||||
struct dcesrv_connection_context *next, *prev;
|
||||
uint16_t context_id;
|
||||
|
||||
/* the connection this is on */
|
||||
struct dcesrv_connection *conn;
|
||||
|
||||
/* the ndr function table for the chosen interface */
|
||||
const struct dcesrv_interface *iface;
|
||||
|
||||
/*
|
||||
* the minimum required auth level for this interface
|
||||
*/
|
||||
enum dcerpc_AuthLevel min_auth_level;
|
||||
bool allow_connect;
|
||||
|
||||
/* the negotiated transfer syntax */
|
||||
struct ndr_syntax_id transfer_syntax;
|
||||
};
|
||||
|
||||
|
||||
/* the state associated with a dcerpc server connection */
|
||||
struct dcesrv_connection {
|
||||
/* for the broken_connections DLIST */
|
||||
struct dcesrv_connection *prev, *next;
|
||||
|
||||
/* the top level context for this server */
|
||||
struct dcesrv_context *dce_ctx;
|
||||
|
||||
/* the endpoint that was opened */
|
||||
const struct dcesrv_endpoint *endpoint;
|
||||
|
||||
/* a list of established context_ids */
|
||||
struct dcesrv_connection_context *contexts;
|
||||
|
||||
/* the state of the current incoming call fragments */
|
||||
struct dcesrv_call_state *incoming_fragmented_call_list;
|
||||
|
||||
/* the state of the async pending calls */
|
||||
struct dcesrv_call_state *pending_call_list;
|
||||
|
||||
/* the state of the current outgoing calls */
|
||||
struct dcesrv_call_state *call_list;
|
||||
|
||||
/* the maximum size the client wants to receive */
|
||||
uint16_t max_recv_frag;
|
||||
uint16_t max_xmit_frag;
|
||||
|
||||
DATA_BLOB partial_input;
|
||||
|
||||
/* the event_context that will be used for this connection */
|
||||
struct tevent_context *event_ctx;
|
||||
|
||||
/* is this connection pending termination? If so, why? */
|
||||
const char *terminate;
|
||||
|
||||
const char *packet_log_dir;
|
||||
|
||||
/* this is the default state_flags for dcesrv_call_state structs */
|
||||
uint32_t state_flags;
|
||||
|
||||
struct {
|
||||
void *private_data;
|
||||
void (*report_output_data)(struct dcesrv_connection *);
|
||||
void (*terminate_connection)(struct dcesrv_connection *,
|
||||
const char *);
|
||||
} transport;
|
||||
|
||||
struct tstream_context *stream;
|
||||
struct tevent_queue *send_queue;
|
||||
|
||||
const struct tsocket_address *local_address;
|
||||
const struct tsocket_address *remote_address;
|
||||
|
||||
/* the current authentication state */
|
||||
struct dcesrv_auth *default_auth_state;
|
||||
size_t max_auth_states;
|
||||
struct dcesrv_auth *auth_states;
|
||||
bool got_explicit_auth_level_connect;
|
||||
struct dcesrv_auth *default_auth_level_connect;
|
||||
bool client_hdr_signing;
|
||||
bool support_hdr_signing;
|
||||
bool negotiated_hdr_signing;
|
||||
|
||||
/*
|
||||
* remember which pdu types are allowed
|
||||
*/
|
||||
bool allow_bind;
|
||||
bool allow_alter;
|
||||
|
||||
/* the association group the connection belongs to */
|
||||
struct dcesrv_assoc_group *assoc_group;
|
||||
|
||||
/* The maximum total payload of reassembled request pdus */
|
||||
size_t max_total_request_size;
|
||||
|
||||
/*
|
||||
* Our preferred transfer syntax.
|
||||
*/
|
||||
const struct ndr_syntax_id *preferred_transfer;
|
||||
|
||||
/*
|
||||
* This is used to block the connection during
|
||||
* pending authentication.
|
||||
*/
|
||||
struct tevent_req *(*wait_send)(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
void *private_data);
|
||||
NTSTATUS (*wait_recv)(struct tevent_req *req);
|
||||
void *wait_private;
|
||||
};
|
||||
|
||||
|
||||
struct dcesrv_endpoint_server {
|
||||
/* this is the name of the endpoint server */
|
||||
const char *name;
|
||||
|
||||
/* true if the endpoint server has been initialized */
|
||||
bool initialized;
|
||||
|
||||
/* this function should register endpoints and some other setup stuff,
|
||||
* it is called when the dcesrv_context gets initialized.
|
||||
*/
|
||||
NTSTATUS (*init_server)(struct dcesrv_context *, const struct dcesrv_endpoint_server *);
|
||||
|
||||
/* this function should cleanup endpoint server state and unregister
|
||||
* the endpoint server from dcesrv_context */
|
||||
NTSTATUS (*shutdown_server)(struct dcesrv_context *, const struct dcesrv_endpoint_server *);
|
||||
|
||||
/* this function can be used by other endpoint servers to
|
||||
* ask for a dcesrv_interface implementation
|
||||
* - iface must be reference to an already existing struct !
|
||||
*/
|
||||
bool (*interface_by_uuid)(struct dcesrv_interface *iface, const struct GUID *, uint32_t);
|
||||
|
||||
/* this function can be used by other endpoint servers to
|
||||
* ask for a dcesrv_interface implementation
|
||||
* - iface must be reference to an already existing struct !
|
||||
*/
|
||||
bool (*interface_by_name)(struct dcesrv_interface *iface, const char *);
|
||||
};
|
||||
|
||||
|
||||
/* one association groups */
|
||||
struct dcesrv_assoc_group {
|
||||
/* the wire id */
|
||||
uint32_t id;
|
||||
|
||||
/* The transport this is valid on */
|
||||
enum dcerpc_transport_t transport;
|
||||
|
||||
/* list of handles in this association group */
|
||||
struct dcesrv_handle *handles;
|
||||
|
||||
/*
|
||||
* list of iface states per assoc/conn
|
||||
*/
|
||||
struct dcesrv_iface_state *iface_states;
|
||||
|
||||
/* parent context */
|
||||
struct dcesrv_context *dce_ctx;
|
||||
|
||||
/* the negotiated bind time features */
|
||||
uint16_t bind_time_features;
|
||||
};
|
||||
|
||||
struct dcesrv_context_callbacks {
|
||||
struct {
|
||||
void (*successful_authz)(
|
||||
struct dcesrv_call_state *call, void *private_data);
|
||||
void *private_data;
|
||||
} log;
|
||||
struct {
|
||||
NTSTATUS (*gensec_prepare)(
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct dcesrv_call_state *call,
|
||||
struct gensec_security **out,
|
||||
void *private_data);
|
||||
void *private_data;
|
||||
void (*become_root)(void);
|
||||
void (*unbecome_root)(void);
|
||||
} auth;
|
||||
struct {
|
||||
NTSTATUS (*find)(
|
||||
struct dcesrv_call_state *call, void *private_data);
|
||||
void *private_data;
|
||||
} assoc_group;
|
||||
};
|
||||
|
||||
/* server-wide context information for the dcerpc server */
|
||||
struct dcesrv_context {
|
||||
/*
|
||||
* The euid at startup time.
|
||||
*
|
||||
* This is required for DCERPC_AUTH_TYPE_NCALRPC_AS_SYSTEM
|
||||
*/
|
||||
uid_t initial_euid;
|
||||
|
||||
/* the list of endpoints that have registered
|
||||
* by the configured endpoint servers
|
||||
*/
|
||||
struct dcesrv_endpoint {
|
||||
struct dcesrv_endpoint *next, *prev;
|
||||
/* the type and location of the endpoint */
|
||||
struct dcerpc_binding *ep_description;
|
||||
/* the secondary endpoint description for the BIND_ACK */
|
||||
struct dcerpc_binding *ep_2nd_description;
|
||||
/* the security descriptor for smb named pipes */
|
||||
struct security_descriptor *sd;
|
||||
/* the list of interfaces available on this endpoint */
|
||||
struct dcesrv_if_list {
|
||||
struct dcesrv_if_list *next, *prev;
|
||||
struct dcesrv_interface *iface;
|
||||
} *interface_list;
|
||||
|
||||
/*
|
||||
* Should this service be run in a single process (so far only
|
||||
* NETLOGON is not run in a single process)
|
||||
*/
|
||||
bool use_single_process;
|
||||
} *endpoint_list;
|
||||
|
||||
/* loadparm context to use for this connection */
|
||||
struct loadparm_context *lp_ctx;
|
||||
|
||||
struct idr_context *assoc_groups_idr;
|
||||
|
||||
struct dcesrv_connection *broken_connections;
|
||||
|
||||
struct dcesrv_context_callbacks *callbacks;
|
||||
};
|
||||
|
||||
/* this structure is used by modules to determine the size of some critical types */
|
||||
struct dcesrv_critical_sizes {
|
||||
int interface_version;
|
||||
int sizeof_dcesrv_context;
|
||||
int sizeof_dcesrv_endpoint;
|
||||
int sizeof_dcesrv_endpoint_server;
|
||||
int sizeof_dcesrv_interface;
|
||||
int sizeof_dcesrv_if_list;
|
||||
int sizeof_dcesrv_connection;
|
||||
int sizeof_dcesrv_call_state;
|
||||
int sizeof_dcesrv_auth;
|
||||
int sizeof_dcesrv_handle;
|
||||
};
|
||||
|
||||
NTSTATUS dcesrv_interface_register(struct dcesrv_context *dce_ctx,
|
||||
const char *ep_name,
|
||||
const char *ncacn_np_secondary_endpoint,
|
||||
const struct dcesrv_interface *iface,
|
||||
const struct security_descriptor *sd);
|
||||
NTSTATUS dcerpc_register_ep_server(const struct dcesrv_endpoint_server *ep_server);
|
||||
NTSTATUS dcesrv_init_ep_servers(struct dcesrv_context *dce_ctx,
|
||||
const char **ep_servers);
|
||||
NTSTATUS dcesrv_init_registered_ep_servers(struct dcesrv_context *dce_ctx);
|
||||
NTSTATUS dcesrv_shutdown_registered_ep_servers(struct dcesrv_context *dce_ctx);
|
||||
NTSTATUS dcesrv_init_ep_server(struct dcesrv_context *dce_ctx,
|
||||
const char *ep_server_name);
|
||||
NTSTATUS dcesrv_shutdown_ep_server(struct dcesrv_context *dce_ctx,
|
||||
const char *name);
|
||||
const struct dcesrv_endpoint_server *dcesrv_ep_server_byname(const char *name);
|
||||
|
||||
NTSTATUS dcesrv_init_context(TALLOC_CTX *mem_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
struct dcesrv_context_callbacks *cb,
|
||||
struct dcesrv_context **_dce_ctx);
|
||||
NTSTATUS dcesrv_reinit_context(struct dcesrv_context *dce_ctx);
|
||||
|
||||
NTSTATUS dcesrv_reply(struct dcesrv_call_state *call);
|
||||
struct dcesrv_handle *dcesrv_handle_create(struct dcesrv_call_state *call,
|
||||
uint8_t handle_type);
|
||||
|
||||
struct dcesrv_handle *dcesrv_handle_lookup(struct dcesrv_call_state *call,
|
||||
const struct policy_handle *p,
|
||||
uint8_t handle_type);
|
||||
|
||||
const struct tsocket_address *dcesrv_connection_get_local_address(struct dcesrv_connection *conn);
|
||||
const struct tsocket_address *dcesrv_connection_get_remote_address(struct dcesrv_connection *conn);
|
||||
|
||||
/*
|
||||
* Fetch the authentication session key if available.
|
||||
*
|
||||
* This is the key generated by a gensec authentication.
|
||||
*/
|
||||
NTSTATUS dcesrv_auth_session_key(struct dcesrv_call_state *call,
|
||||
DATA_BLOB *session_key);
|
||||
|
||||
/*
|
||||
* Fetch the transport session key if available.
|
||||
* Typically this is the SMB session key
|
||||
* or a fixed key for local transports.
|
||||
*
|
||||
* The key is always truncated to 16 bytes.
|
||||
*/
|
||||
NTSTATUS dcesrv_transport_session_key(struct dcesrv_call_state *call,
|
||||
DATA_BLOB *session_key);
|
||||
|
||||
/* a useful macro for generating a RPC fault in the backend code */
|
||||
#define DCESRV_FAULT(code) do { \
|
||||
dce_call->fault_code = code; \
|
||||
return r->out.result; \
|
||||
} while(0)
|
||||
|
||||
/* a useful macro for generating a RPC fault in the backend code */
|
||||
#define DCESRV_FAULT_VOID(code) do { \
|
||||
dce_call->fault_code = code; \
|
||||
return; \
|
||||
} while(0)
|
||||
|
||||
/* a useful macro for checking the validity of a dcerpc policy handle
|
||||
and giving the right fault code if invalid */
|
||||
#define DCESRV_CHECK_HANDLE(h) do {if (!(h)) DCESRV_FAULT(DCERPC_FAULT_CONTEXT_MISMATCH); } while (0)
|
||||
|
||||
/* this checks for a valid policy handle, and gives a fault if an
|
||||
invalid handle or retval if the handle is of the
|
||||
wrong type */
|
||||
#define DCESRV_PULL_HANDLE_RETVAL(h, inhandle, t, retval) do { \
|
||||
(h) = dcesrv_handle_lookup(dce_call, (inhandle), DCESRV_HANDLE_ANY); \
|
||||
DCESRV_CHECK_HANDLE(h); \
|
||||
if ((t) != DCESRV_HANDLE_ANY && (h)->wire_handle.handle_type != (t)) { \
|
||||
return retval; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* this checks for a valid policy handle and gives a dcerpc fault
|
||||
if its the wrong type of handle */
|
||||
#define DCESRV_PULL_HANDLE_FAULT(h, inhandle, t) do { \
|
||||
(h) = dcesrv_handle_lookup(dce_call, (inhandle), t); \
|
||||
DCESRV_CHECK_HANDLE(h); \
|
||||
} while (0)
|
||||
|
||||
#define DCESRV_PULL_HANDLE(h, inhandle, t) DCESRV_PULL_HANDLE_RETVAL(h, inhandle, t, NT_STATUS_INVALID_HANDLE)
|
||||
#define DCESRV_PULL_HANDLE_WERR(h, inhandle, t) DCESRV_PULL_HANDLE_RETVAL(h, inhandle, t, WERR_INVALID_HANDLE)
|
||||
|
||||
/**
|
||||
* retrieve credentials from a dce_call
|
||||
*/
|
||||
_PUBLIC_ struct cli_credentials *dcesrv_call_credentials(struct dcesrv_call_state *dce_call);
|
||||
|
||||
/**
|
||||
* returns true if this is an authenticated call
|
||||
*/
|
||||
_PUBLIC_ bool dcesrv_call_authenticated(struct dcesrv_call_state *dce_call);
|
||||
|
||||
/**
|
||||
* retrieve account_name for a dce_call
|
||||
*/
|
||||
_PUBLIC_ const char *dcesrv_call_account_name(struct dcesrv_call_state *dce_call);
|
||||
|
||||
/**
|
||||
* retrieve session_info from a dce_call
|
||||
*/
|
||||
_PUBLIC_ struct auth_session_info *dcesrv_call_session_info(struct dcesrv_call_state *dce_call);
|
||||
|
||||
/**
|
||||
* retrieve auth type/level from a dce_call
|
||||
*/
|
||||
_PUBLIC_ void dcesrv_call_auth_info(struct dcesrv_call_state *dce_call,
|
||||
enum dcerpc_AuthType *auth_type,
|
||||
enum dcerpc_AuthLevel *auth_level);
|
||||
|
||||
_PUBLIC_ NTSTATUS dcesrv_interface_bind_require_integrity(struct dcesrv_connection_context *context,
|
||||
const struct dcesrv_interface *iface);
|
||||
_PUBLIC_ NTSTATUS dcesrv_interface_bind_require_privacy(struct dcesrv_connection_context *context,
|
||||
const struct dcesrv_interface *iface);
|
||||
_PUBLIC_ NTSTATUS dcesrv_interface_bind_reject_connect(struct dcesrv_connection_context *context,
|
||||
const struct dcesrv_interface *iface);
|
||||
_PUBLIC_ NTSTATUS dcesrv_interface_bind_allow_connect(struct dcesrv_connection_context *context,
|
||||
const struct dcesrv_interface *iface);
|
||||
|
||||
_PUBLIC_ NTSTATUS _dcesrv_iface_state_store_assoc(
|
||||
struct dcesrv_call_state *call,
|
||||
uint64_t magic,
|
||||
void *ptr,
|
||||
const char *location);
|
||||
#define dcesrv_iface_state_store_assoc(call, magic, ptr) \
|
||||
_dcesrv_iface_state_store_assoc((call), (magic), (ptr), \
|
||||
__location__)
|
||||
_PUBLIC_ void *_dcesrv_iface_state_find_assoc(
|
||||
struct dcesrv_call_state *call,
|
||||
uint64_t magic);
|
||||
#define dcesrv_iface_state_find_assoc(call, magic, _type) \
|
||||
talloc_get_type( \
|
||||
_dcesrv_iface_state_find_assoc((call), (magic)), \
|
||||
_type)
|
||||
|
||||
_PUBLIC_ NTSTATUS _dcesrv_iface_state_store_conn(
|
||||
struct dcesrv_call_state *call,
|
||||
uint64_t magic,
|
||||
void *_pptr,
|
||||
const char *location);
|
||||
#define dcesrv_iface_state_store_conn(call, magic, ptr) \
|
||||
_dcesrv_iface_state_store_conn((call), (magic), (ptr), \
|
||||
__location__)
|
||||
_PUBLIC_ void *_dcesrv_iface_state_find_conn(
|
||||
struct dcesrv_call_state *call,
|
||||
uint64_t magic);
|
||||
#define dcesrv_iface_state_find_conn(call, magic, _type) \
|
||||
talloc_get_type( \
|
||||
_dcesrv_iface_state_find_conn((call), (magic)), \
|
||||
_type)
|
||||
|
||||
_PUBLIC_ void dcesrv_cleanup_broken_connections(struct dcesrv_context *dce_ctx);
|
||||
|
||||
_PUBLIC_ NTSTATUS dcesrv_endpoint_connect(struct dcesrv_context *dce_ctx,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const struct dcesrv_endpoint *ep,
|
||||
struct auth_session_info *session_info,
|
||||
struct tevent_context *event_ctx,
|
||||
uint32_t state_flags,
|
||||
struct dcesrv_connection **_p);
|
||||
_PUBLIC_ NTSTATUS dcesrv_find_endpoint(struct dcesrv_context *dce_ctx,
|
||||
const struct dcerpc_binding *ep_description,
|
||||
struct dcesrv_endpoint **_out);
|
||||
|
||||
_PUBLIC_ void dcesrv_terminate_connection(struct dcesrv_connection *dce_conn,
|
||||
const char *reason);
|
||||
_PUBLIC_ void dcesrv_sock_report_output_data(struct dcesrv_connection *dce_conn);
|
||||
|
||||
_PUBLIC_ NTSTATUS dcesrv_connection_loop_start(struct dcesrv_connection *conn);
|
||||
|
||||
_PUBLIC_ NTSTATUS dcesrv_call_dispatch_local(struct dcesrv_call_state *call);
|
||||
|
||||
_PUBLIC_ const struct dcesrv_interface *find_interface_by_syntax_id(
|
||||
const struct dcesrv_endpoint *endpoint,
|
||||
const struct ndr_syntax_id *interface);
|
||||
|
||||
void _dcesrv_save_ndr_fuzz_seed(DATA_BLOB call_blob,
|
||||
struct dcesrv_call_state *call,
|
||||
int flags);
|
||||
|
||||
#if DEVELOPER
|
||||
#define dcesrv_save_ndr_fuzz_seed(stub, call, flags) \
|
||||
_dcesrv_save_ndr_fuzz_seed(stub, call, flags)
|
||||
#else
|
||||
#define dcesrv_save_ndr_fuzz_seed(stub, call, flags) \
|
||||
/* */
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _LIBRPC_RPC_DCESRV_CORE_H_ */
|
||||
@ -0,0 +1,70 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
code to manipulate domain credentials
|
||||
|
||||
Copyright (C) Andrew Tridgell 2004
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <gen_ndr/netlogon.h>
|
||||
|
||||
/* The 7 here seems to be required to get Win2k not to downgrade us
|
||||
to NT4. Actually, anything other than 1ff would seem to do... */
|
||||
#define NETLOGON_NEG_AUTH2_FLAGS 0x000701ff
|
||||
/*
|
||||
(NETLOGON_NEG_ACCOUNT_LOCKOUT |
|
||||
NETLOGON_NEG_PERSISTENT_SAMREPL |
|
||||
NETLOGON_NEG_ARCFOUR |
|
||||
NETLOGON_NEG_PROMOTION_COUNT |
|
||||
NETLOGON_NEG_CHANGELOG_BDC |
|
||||
NETLOGON_NEG_FULL_SYNC_REPL |
|
||||
NETLOGON_NEG_MULTIPLE_SIDS |
|
||||
NETLOGON_NEG_REDO |
|
||||
NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL |
|
||||
NETLOGON_NEG_DNS_DOMAIN_TRUSTS |
|
||||
NETLOGON_NEG_PASSWORD_SET2 |
|
||||
NETLOGON_NEG_GETDOMAININFO)
|
||||
*/
|
||||
#define NETLOGON_NEG_DOMAIN_TRUST_ACCOUNT 0x2010b000
|
||||
|
||||
/* these are the flags that ADS clients use */
|
||||
/*
|
||||
(NETLOGON_NEG_ACCOUNT_LOCKOUT |
|
||||
NETLOGON_NEG_PERSISTENT_SAMREPL |
|
||||
NETLOGON_NEG_ARCFOUR |
|
||||
NETLOGON_NEG_PROMOTION_COUNT |
|
||||
NETLOGON_NEG_CHANGELOG_BDC |
|
||||
NETLOGON_NEG_FULL_SYNC_REPL |
|
||||
NETLOGON_NEG_MULTIPLE_SIDS |
|
||||
NETLOGON_NEG_REDO |
|
||||
NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL |
|
||||
NETLOGON_NEG_SEND_PASSWORD_INFO_PDC |
|
||||
NETLOGON_NEG_GENERIC_PASSTHROUGH |
|
||||
NETLOGON_NEG_CONCURRENT_RPC |
|
||||
NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL |
|
||||
NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL |
|
||||
NETLOGON_NEG_128BIT |
|
||||
NETLOGON_NEG_TRANSITIVE_TRUSTS |
|
||||
NETLOGON_NEG_DNS_DOMAIN_TRUSTS |
|
||||
NETLOGON_NEG_PASSWORD_SET2 |
|
||||
NETLOGON_NEG_GETDOMAININFO |
|
||||
NETLOGON_NEG_CROSS_FOREST_TRUSTS |
|
||||
NETLOGON_NEG_AUTHENTICATED_RPC_LSASS |
|
||||
NETLOGON_NEG_SCHANNEL)
|
||||
*/
|
||||
|
||||
#define NETLOGON_NEG_AUTH2_ADS_FLAGS (0x200fbffb | NETLOGON_NEG_ARCFOUR | NETLOGON_NEG_128BIT | NETLOGON_NEG_SCHANNEL)
|
||||
|
||||
@ -0,0 +1,145 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#ifndef _PIDL_HEADER_atsvc
|
||||
#define _PIDL_HEADER_atsvc
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <core/ntstatus.h>
|
||||
|
||||
#ifndef _HEADER_atsvc
|
||||
#define _HEADER_atsvc
|
||||
|
||||
/* bitmap atsvc_DaysOfMonth */
|
||||
#define First ( 0x00000001 )
|
||||
#define Second ( 0x00000002 )
|
||||
#define Third ( 0x00000004 )
|
||||
#define Fourth ( 0x00000008 )
|
||||
#define Fifth ( 0x00000010 )
|
||||
#define Sixth ( 0x00000020 )
|
||||
#define Seventh ( 0x00000040 )
|
||||
#define Eight ( 0x00000080 )
|
||||
#define Ninth ( 0x00000100 )
|
||||
#define Tenth ( 0x00000200 )
|
||||
#define Eleventh ( 0x00000400 )
|
||||
#define Twelfth ( 0x00000800 )
|
||||
#define Thitteenth ( 0x00001000 )
|
||||
#define Fourteenth ( 0x00002000 )
|
||||
#define Fifteenth ( 0x00004000 )
|
||||
#define Sixteenth ( 0x00008000 )
|
||||
#define Seventeenth ( 0x00010000 )
|
||||
#define Eighteenth ( 0x00020000 )
|
||||
#define Ninteenth ( 0x00040000 )
|
||||
#define Twentyth ( 0x00080000 )
|
||||
#define Twentyfirst ( 0x00100000 )
|
||||
#define Twentysecond ( 0x00200000 )
|
||||
#define Twentythird ( 0x00400000 )
|
||||
#define Twentyfourth ( 0x00800000 )
|
||||
#define Twentyfifth ( 0x01000000 )
|
||||
#define Twentysixth ( 0x02000000 )
|
||||
#define Twentyseventh ( 0x04000000 )
|
||||
#define Twentyeighth ( 0x08000000 )
|
||||
#define Twentyninth ( 0x10000000 )
|
||||
#define Thirtieth ( 0x20000000 )
|
||||
#define Thirtyfirst ( 0x40000000 )
|
||||
|
||||
/* bitmap atsvc_Flags */
|
||||
#define JOB_RUN_PERIODICALLY ( 0x01 )
|
||||
#define JOB_EXEC_ERROR ( 0x02 )
|
||||
#define JOB_RUNS_TODAY ( 0x04 )
|
||||
#define JOB_ADD_CURRENT_DATE ( 0x08 )
|
||||
#define JOB_NONINTERACTIVE ( 0x10 )
|
||||
|
||||
/* bitmap atsvc_DaysOfWeek */
|
||||
#define DAYSOFWEEK_MONDAY ( 0x01 )
|
||||
#define DAYSOFWEEK_TUESDAY ( 0x02 )
|
||||
#define DAYSOFWEEK_WEDNESDAY ( 0x04 )
|
||||
#define DAYSOFWEEK_THURSDAY ( 0x08 )
|
||||
#define DAYSOFWEEK_FRIDAY ( 0x10 )
|
||||
#define DAYSOFWEEK_SATURDAY ( 0x20 )
|
||||
#define DAYSOFWEEK_SUNDAY ( 0x40 )
|
||||
|
||||
struct atsvc_JobInfo {
|
||||
uint32_t job_time;
|
||||
uint32_t days_of_month;
|
||||
uint8_t days_of_week;
|
||||
uint8_t flags;
|
||||
const char *command;/* [charset(UTF16),unique] */
|
||||
};
|
||||
|
||||
struct atsvc_JobEnumInfo {
|
||||
uint32_t job_id;
|
||||
uint32_t job_time;
|
||||
uint32_t days_of_month;
|
||||
uint8_t days_of_week;
|
||||
uint8_t flags;
|
||||
const char *command;/* [charset(UTF16),unique] */
|
||||
};
|
||||
|
||||
struct atsvc_enum_ctr {
|
||||
uint32_t entries_read;
|
||||
struct atsvc_JobEnumInfo *first_entry;/* [size_is(entries_read),unique] */
|
||||
};
|
||||
|
||||
|
||||
struct atsvc_JobAdd {
|
||||
struct {
|
||||
const char *servername;/* [charset(UTF16),unique] */
|
||||
struct atsvc_JobInfo *job_info;/* [ref] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
uint32_t *job_id;/* [ref] */
|
||||
NTSTATUS result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct atsvc_JobDel {
|
||||
struct {
|
||||
const char *servername;/* [charset(UTF16),unique] */
|
||||
uint32_t min_job_id;
|
||||
uint32_t max_job_id;
|
||||
} in;
|
||||
|
||||
struct {
|
||||
NTSTATUS result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct atsvc_JobEnum {
|
||||
struct {
|
||||
const char *servername;/* [charset(UTF16),unique] */
|
||||
uint32_t preferred_max_len;
|
||||
struct atsvc_enum_ctr *ctr;/* [ref] */
|
||||
uint32_t *resume_handle;/* [unique] */
|
||||
} in;
|
||||
|
||||
struct {
|
||||
uint32_t *total_entries;/* [ref] */
|
||||
struct atsvc_enum_ctr *ctr;/* [ref] */
|
||||
uint32_t *resume_handle;/* [unique] */
|
||||
NTSTATUS result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct atsvc_JobGetInfo {
|
||||
struct {
|
||||
const char *servername;/* [charset(UTF16),unique] */
|
||||
uint32_t job_id;
|
||||
} in;
|
||||
|
||||
struct {
|
||||
struct atsvc_JobInfo **job_info;/* [ref] */
|
||||
NTSTATUS result;
|
||||
} out;
|
||||
|
||||
};
|
||||
|
||||
#endif /* _HEADER_atsvc */
|
||||
#endif /* _PIDL_HEADER_atsvc */
|
||||
@ -0,0 +1,108 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#ifndef _PIDL_HEADER_auth
|
||||
#define _PIDL_HEADER_auth
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <core/ntstatus.h>
|
||||
|
||||
#include <gen_ndr/misc.h>
|
||||
#include <gen_ndr/security.h>
|
||||
#include <gen_ndr/lsa.h>
|
||||
#include <gen_ndr/krb5pac.h>
|
||||
#ifndef _HEADER_auth
|
||||
#define _HEADER_auth
|
||||
|
||||
enum auth_method
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
SEC_AUTH_METHOD_UNAUTHENTICATED=(int)(0),
|
||||
SEC_AUTH_METHOD_NTLM=(int)(1),
|
||||
SEC_AUTH_METHOD_KERBEROS=(int)(2)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_auth_method=0x7FFFFFFF}
|
||||
#define SEC_AUTH_METHOD_UNAUTHENTICATED ( 0 )
|
||||
#define SEC_AUTH_METHOD_NTLM ( 1 )
|
||||
#define SEC_AUTH_METHOD_KERBEROS ( 2 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct auth_user_info {
|
||||
const char *account_name;/* [charset(UTF8),unique] */
|
||||
const char *user_principal_name;/* [charset(UTF8),unique] */
|
||||
uint8_t user_principal_constructed;
|
||||
const char *domain_name;/* [charset(UTF8),unique] */
|
||||
const char *dns_domain_name;/* [charset(UTF8),unique] */
|
||||
const char *full_name;/* [charset(UTF8),unique] */
|
||||
const char *logon_script;/* [charset(UTF8),unique] */
|
||||
const char *profile_path;/* [charset(UTF8),unique] */
|
||||
const char *home_directory;/* [charset(UTF8),unique] */
|
||||
const char *home_drive;/* [charset(UTF8),unique] */
|
||||
const char *logon_server;/* [charset(UTF8),unique] */
|
||||
NTTIME last_logon;
|
||||
NTTIME last_logoff;
|
||||
NTTIME acct_expiry;
|
||||
NTTIME last_password_change;
|
||||
NTTIME allow_password_change;
|
||||
NTTIME force_password_change;
|
||||
uint16_t logon_count;
|
||||
uint16_t bad_password_count;
|
||||
uint32_t acct_flags;
|
||||
uint8_t authenticated;
|
||||
}/* [public] */;
|
||||
|
||||
struct auth_user_info_torture {
|
||||
uint32_t num_dc_sids;
|
||||
struct dom_sid *dc_sids;/* [size_is(num_dc_sids)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct auth_user_info_unix {
|
||||
const char *unix_name;/* [charset(UTF8),unique] */
|
||||
const char *sanitized_username;/* [charset(UTF8),unique] */
|
||||
}/* [public] */;
|
||||
|
||||
enum ticket_type
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
TICKET_TYPE_UNKNOWN=(int)(0),
|
||||
TICKET_TYPE_TGT=(int)(1),
|
||||
TICKET_TYPE_NON_TGT=(int)(2)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_ticket_type=0x7FFFFFFF}
|
||||
#define TICKET_TYPE_UNKNOWN ( 0 )
|
||||
#define TICKET_TYPE_TGT ( 1 )
|
||||
#define TICKET_TYPE_NON_TGT ( 2 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct auth_user_info_dc {
|
||||
uint32_t num_sids;
|
||||
struct dom_sid *sids;/* [size_is(num_sids)] */
|
||||
struct auth_user_info *info;/* [unique] */
|
||||
DATA_BLOB user_session_key;/* [noprint] */
|
||||
DATA_BLOB lm_session_key;/* [noprint] */
|
||||
enum ticket_type ticket_type;
|
||||
}/* [public] */;
|
||||
|
||||
struct auth_session_info {
|
||||
struct security_token *security_token;/* [unique] */
|
||||
struct security_unix_token *unix_token;/* [unique] */
|
||||
struct auth_user_info *info;/* [unique] */
|
||||
struct auth_user_info_unix *unix_info;/* [unique] */
|
||||
struct auth_user_info_torture *torture;/* [ignore,value(NULL)] */
|
||||
DATA_BLOB session_key;/* [noprint] */
|
||||
struct cli_credentials *credentials;/* [ignore,value(NULL)] */
|
||||
struct GUID unique_session_token;
|
||||
enum ticket_type ticket_type;
|
||||
}/* [public] */;
|
||||
|
||||
struct auth_session_info_transport {
|
||||
struct auth_session_info *session_info;/* [unique] */
|
||||
DATA_BLOB exported_gssapi_credentials;/* [noprint] */
|
||||
}/* [public] */;
|
||||
|
||||
#endif /* _HEADER_auth */
|
||||
#endif /* _PIDL_HEADER_auth */
|
||||
@ -0,0 +1,754 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#ifndef _PIDL_HEADER_dcerpc
|
||||
#define _PIDL_HEADER_dcerpc
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <core/ntstatus.h>
|
||||
|
||||
#include <gen_ndr/misc.h>
|
||||
extern const uint8_t DCERPC_SEC_VT_MAGIC[8];
|
||||
#ifndef _HEADER_dcerpc
|
||||
#define _HEADER_dcerpc
|
||||
|
||||
#define DCERPC_REQUEST_LENGTH ( 24 )
|
||||
#define DCERPC_BIND_PROVIDER_REJECT ( DCERPC_BIND_ACK_RESULT_PROVIDER_REJECTION )
|
||||
#define DCERPC_BIND_REASON_ASYNTAX ( DCERPC_BIND_ACK_REASON_ABSTRACT_SYNTAX_NOT_SUPPORTED )
|
||||
#define DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED ( DCERPC_BIND_NAK_REASON_PROTOCOL_VERSION_NOT_SUPPORTED )
|
||||
#define DCERPC_BIND_REASON_INVALID_AUTH_TYPE ( DCERPC_BIND_NAK_REASON_INVALID_AUTH_TYPE )
|
||||
#define DCERPC_RESPONSE_LENGTH ( 24 )
|
||||
#define DCERPC_FAULT_OP_RNG_ERROR ( DCERPC_NCA_S_OP_RNG_ERROR )
|
||||
#define DCERPC_FAULT_NDR ( DCERPC_FAULT_BAD_STUB_DATA )
|
||||
#define DCERPC_FAULT_INVALID_TAG ( DCERPC_NCA_S_FAULT_INVALID_TAG )
|
||||
#define DCERPC_FAULT_CONTEXT_MISMATCH ( DCERPC_NCA_S_FAULT_CONTEXT_MISMATCH )
|
||||
#define DCERPC_FAULT_OTHER ( 0x00000001 )
|
||||
#define DCERPC_FAULT_TODO ( 0x00000042 )
|
||||
#define DCERPC_FAULT_LENGTH ( 32 )
|
||||
#define AS_SYSTEM_MAGIC_PATH_TOKEN ( "/root/ncalrpc_as_system" )
|
||||
#define DCERPC_AUTH_TRAILER_LENGTH ( 8 )
|
||||
#define DCERPC_AUTH_PAD_ALIGNMENT ( 16 )
|
||||
#define DCERPC_PFC_FLAG_PENDING_CANCEL ( DCERPC_PFC_FLAG_PENDING_CANCEL_OR_HDR_SIGNING )
|
||||
#define DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN ( DCERPC_PFC_FLAG_PENDING_CANCEL_OR_HDR_SIGNING )
|
||||
#define DCERPC_PFC_OFFSET ( 3 )
|
||||
#define DCERPC_DREP_OFFSET ( 4 )
|
||||
#define DCERPC_FRAG_LEN_OFFSET ( 8 )
|
||||
#define DCERPC_FRAG_MAX_SIZE ( 5840 )
|
||||
#define DCERPC_AUTH_LEN_OFFSET ( 10 )
|
||||
#define DCERPC_NCACN_PAYLOAD_OFFSET ( 16 )
|
||||
#define DCERPC_NCACN_REQUEST_DEFAULT_MAX_SIZE ( 0x400000 )
|
||||
#define DCERPC_NCACN_RESPONSE_DEFAULT_MAX_SIZE ( 0xf000000 )
|
||||
#define DCERPC_DREP_LE ( 0x10 )
|
||||
#define DCERPC_SEC_VT_MAX_SIZE ( 1024 )
|
||||
struct dcerpc_ctx_list {
|
||||
uint16_t context_id;
|
||||
uint8_t num_transfer_syntaxes;
|
||||
struct ndr_syntax_id abstract_syntax;
|
||||
struct ndr_syntax_id *transfer_syntaxes;
|
||||
};
|
||||
|
||||
struct dcerpc_bind {
|
||||
uint16_t max_xmit_frag;
|
||||
uint16_t max_recv_frag;
|
||||
uint32_t assoc_group_id;
|
||||
uint8_t num_contexts;
|
||||
struct dcerpc_ctx_list *ctx_list;
|
||||
DATA_BLOB auth_info;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_empty {
|
||||
char _empty_;
|
||||
};
|
||||
|
||||
union dcerpc_object {
|
||||
struct GUID object;/* [case(LIBNDR_FLAG_OBJECT_PRESENT)] */
|
||||
struct dcerpc_empty empty;/* [default] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct dcerpc_request {
|
||||
uint32_t alloc_hint;
|
||||
uint16_t context_id;
|
||||
uint16_t opnum;
|
||||
union dcerpc_object object;/* [switch_is(NDR_DCERPC_REQUEST_OBJECT_PRESENT)] */
|
||||
DATA_BLOB stub_and_verifier;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
};
|
||||
|
||||
enum dcerpc_bind_ack_result
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DCERPC_BIND_ACK_RESULT_ACCEPTANCE=(int)(0),
|
||||
DCERPC_BIND_ACK_RESULT_USER_REJECTION=(int)(1),
|
||||
DCERPC_BIND_ACK_RESULT_PROVIDER_REJECTION=(int)(2),
|
||||
DCERPC_BIND_ACK_RESULT_NEGOTIATE_ACK=(int)(3)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_dcerpc_bind_ack_result=0x7FFFFFFF}
|
||||
#define DCERPC_BIND_ACK_RESULT_ACCEPTANCE ( 0 )
|
||||
#define DCERPC_BIND_ACK_RESULT_USER_REJECTION ( 1 )
|
||||
#define DCERPC_BIND_ACK_RESULT_PROVIDER_REJECTION ( 2 )
|
||||
#define DCERPC_BIND_ACK_RESULT_NEGOTIATE_ACK ( 3 )
|
||||
#endif
|
||||
;
|
||||
|
||||
enum dcerpc_bind_ack_reason_values
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DCERPC_BIND_ACK_REASON_NOT_SPECIFIED=(int)(0),
|
||||
DCERPC_BIND_ACK_REASON_ABSTRACT_SYNTAX_NOT_SUPPORTED=(int)(1),
|
||||
DCERPC_BIND_ACK_REASON_TRANSFER_SYNTAXES_NOT_SUPPORTED=(int)(2),
|
||||
DCERPC_BIND_ACK_REASON_LOCAL_LIMIT_EXCEEDED=(int)(3)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_dcerpc_bind_ack_reason_values=0x7FFFFFFF}
|
||||
#define DCERPC_BIND_ACK_REASON_NOT_SPECIFIED ( 0 )
|
||||
#define DCERPC_BIND_ACK_REASON_ABSTRACT_SYNTAX_NOT_SUPPORTED ( 1 )
|
||||
#define DCERPC_BIND_ACK_REASON_TRANSFER_SYNTAXES_NOT_SUPPORTED ( 2 )
|
||||
#define DCERPC_BIND_ACK_REASON_LOCAL_LIMIT_EXCEEDED ( 3 )
|
||||
#endif
|
||||
;
|
||||
|
||||
/* bitmap dcerpc_bind_time_features */
|
||||
#define DCERPC_BIND_TIME_SECURITY_CONTEXT_MULTIPLEXING ( 0x0001 )
|
||||
#define DCERPC_BIND_TIME_KEEP_CONNECTION_ON_ORPHAN ( 0x0002 )
|
||||
|
||||
union dcerpc_bind_ack_reason {
|
||||
uint16_t negotiate;/* [case(DCERPC_BIND_ACK_RESULT_NEGOTIATE_ACK)] */
|
||||
enum dcerpc_bind_ack_reason_values value;/* [default] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct dcerpc_ack_ctx {
|
||||
enum dcerpc_bind_ack_result result;
|
||||
union dcerpc_bind_ack_reason reason;/* [switch_is(result)] */
|
||||
struct ndr_syntax_id syntax;
|
||||
};
|
||||
|
||||
struct dcerpc_bind_ack {
|
||||
uint16_t max_xmit_frag;
|
||||
uint16_t max_recv_frag;
|
||||
uint32_t assoc_group_id;
|
||||
uint16_t secondary_address_size;/* [value(strlen_m_term_null(secondary_address))] */
|
||||
const char *secondary_address;/* [charset(DOS)] */
|
||||
DATA_BLOB _pad1;/* [flag(LIBNDR_FLAG_ALIGN4)] */
|
||||
uint8_t num_results;
|
||||
struct dcerpc_ack_ctx *ctx_list;
|
||||
DATA_BLOB auth_info;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
};
|
||||
|
||||
enum dcerpc_bind_nak_reason
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DCERPC_BIND_NAK_REASON_NOT_SPECIFIED=(int)(0),
|
||||
DCERPC_BIND_NAK_REASON_TEMPORARY_CONGESTION=(int)(1),
|
||||
DCERPC_BIND_NAK_REASON_LOCAL_LIMIT_EXCEEDED=(int)(2),
|
||||
DCERPC_BIND_NAK_REASON_PROTOCOL_VERSION_NOT_SUPPORTED=(int)(4),
|
||||
DCERPC_BIND_NAK_REASON_INVALID_AUTH_TYPE=(int)(8),
|
||||
DCERPC_BIND_NAK_REASON_INVALID_CHECKSUM=(int)(9)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_dcerpc_bind_nak_reason=0x7FFFFFFF}
|
||||
#define DCERPC_BIND_NAK_REASON_NOT_SPECIFIED ( 0 )
|
||||
#define DCERPC_BIND_NAK_REASON_TEMPORARY_CONGESTION ( 1 )
|
||||
#define DCERPC_BIND_NAK_REASON_LOCAL_LIMIT_EXCEEDED ( 2 )
|
||||
#define DCERPC_BIND_NAK_REASON_PROTOCOL_VERSION_NOT_SUPPORTED ( 4 )
|
||||
#define DCERPC_BIND_NAK_REASON_INVALID_AUTH_TYPE ( 8 )
|
||||
#define DCERPC_BIND_NAK_REASON_INVALID_CHECKSUM ( 9 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct dcerpc_bind_nak_version {
|
||||
uint8_t rpc_vers;
|
||||
uint8_t rpc_vers_minor;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_bind_nak {
|
||||
enum dcerpc_bind_nak_reason reject_reason;
|
||||
uint8_t num_versions;
|
||||
struct dcerpc_bind_nak_version *versions;
|
||||
DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [nopull,public] */;
|
||||
|
||||
struct dcerpc_response {
|
||||
uint32_t alloc_hint;
|
||||
uint16_t context_id;
|
||||
uint8_t cancel_count;
|
||||
uint8_t reserved;/* [value(0)] */
|
||||
DATA_BLOB stub_and_verifier;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
};
|
||||
|
||||
enum dcerpc_nca_status
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DCERPC_NCA_S_COMM_FAILURE=(int)(0x1C010001),
|
||||
DCERPC_NCA_S_OP_RNG_ERROR=(int)(0x1C010002),
|
||||
DCERPC_NCA_S_UNKNOWN_IF=(int)(0x1C010003),
|
||||
DCERPC_NCA_S_WRONG_BOOT_TIME=(int)(0x1C010006),
|
||||
DCERPC_NCA_S_YOU_CRASHED=(int)(0x1C010009),
|
||||
DCERPC_NCA_S_PROTO_ERROR=(int)(0x1C01000B),
|
||||
DCERPC_NCA_S_OUT_ARGS_TOO_BIG=(int)(0x1C010013),
|
||||
DCERPC_NCA_S_SERVER_TOO_BUSY=(int)(0x1C010014),
|
||||
DCERPC_NCA_S_FAULT_STRING_TOO_LARGE=(int)(0x1C010015),
|
||||
DCERPC_NCA_S_UNSUPPORTED_TYPE=(int)(0x1C010017),
|
||||
DCERPC_NCA_S_FAULT_INT_DIV_BY_ZERO=(int)(0x1C000001),
|
||||
DCERPC_NCA_S_FAULT_ADDR_ERROR=(int)(0x1C000002),
|
||||
DCERPC_NCA_S_FAULT_FP_DIV_BY_ZERO=(int)(0x1C000003),
|
||||
DCERPC_NCA_S_FAULT_FP_UNDERFLOW=(int)(0x1C000004),
|
||||
DCERPC_NCA_S_FAULT_FP_OVERRFLOW=(int)(0x1C000005),
|
||||
DCERPC_NCA_S_FAULT_INVALID_TAG=(int)(0x1C000006),
|
||||
DCERPC_NCA_S_FAULT_INVALID_BOUND=(int)(0x1C000007),
|
||||
DCERPC_NCA_S_FAULT_RPC_VERSION_MISMATCH=(int)(0x1C000008),
|
||||
DCERPC_NCA_S_FAULT_UNSPEC_REJECT=(int)(0x1C000009),
|
||||
DCERPC_NCA_S_FAULT_BAD_ACTID=(int)(0x1C00000A),
|
||||
DCERPC_NCA_S_FAULT_WHO_ARE_YOU_FAILED=(int)(0x1C00000B),
|
||||
DCERPC_NCA_S_FAULT_MANAGER_NOT_ENTERED=(int)(0x1C00000C),
|
||||
DCERPC_NCA_S_FAULT_CANCEL=(int)(0x1C00000D),
|
||||
DCERPC_NCA_S_FAULT_ILL_INST=(int)(0x1C00000E),
|
||||
DCERPC_NCA_S_FAULT_FP_ERROR=(int)(0x1C00000F),
|
||||
DCERPC_NCA_S_FAULT_INT_OVERFLOW=(int)(0x1C000010),
|
||||
DCERPC_NCA_S_UNUSED_1C000011=(int)(0x1C000011),
|
||||
DCERPC_NCA_S_FAULT_UNSPEC=(int)(0x1C000012),
|
||||
DCERPC_NCA_S_FAULT_REMOTE_COMM_FAILURE=(int)(0x1C000013),
|
||||
DCERPC_NCA_S_FAULT_PIPE_EMPTY=(int)(0x1C000014),
|
||||
DCERPC_NCA_S_FAULT_PIPE_CLOSED=(int)(0x1C000015),
|
||||
DCERPC_NCA_S_FAULT_PIPE_ORDER=(int)(0x1C000016),
|
||||
DCERPC_NCA_S_FAULT_PIPE_DISCIPLINE=(int)(0x1C000017),
|
||||
DCERPC_NCA_S_FAULT_PIPE_COMM_ERROR=(int)(0x1C000018),
|
||||
DCERPC_NCA_S_FAULT_PIPE_MEMORY=(int)(0x1C000019),
|
||||
DCERPC_NCA_S_FAULT_CONTEXT_MISMATCH=(int)(0x1C00001A),
|
||||
DCERPC_NCA_S_FAULT_REMOTE_NO_MEMORY=(int)(0x1C00001B),
|
||||
DCERPC_NCA_S_INVALID_PRES_CONTEXT_ID=(int)(0x1C00001C),
|
||||
DCERPC_NCA_S_UNSUPPORTED_AUTHN_LEVEL=(int)(0x1C00001D),
|
||||
DCERPC_NCA_S_UNUSED_1C00001E=(int)(0x1C00001E),
|
||||
DCERPC_NCA_S_INVALID_CHECKSUM=(int)(0x1C00001F),
|
||||
DCERPC_NCA_S_INVALID_CRC=(int)(0x1C000020),
|
||||
DCERPC_NCA_S_FAULT_USER_DEFINED=(int)(0x1C000021),
|
||||
DCERPC_NCA_S_FAULT_TX_OPEN_FAILED=(int)(0x1C000022),
|
||||
DCERPC_NCA_S_FAULT_CODESET_CONV_ERROR=(int)(0x1C000023),
|
||||
DCERPC_NCA_S_FAULT_OBJECT_NOT_FOUND=(int)(0x1C000024),
|
||||
DCERPC_NCA_S_FAULT_NO_CLIENT_STUB=(int)(0x1C000025),
|
||||
DCERPC_FAULT_ACCESS_DENIED=(int)(0x00000005),
|
||||
DCERPC_FAULT_SERVER_UNAVAILABLE=(int)(0x000006ba),
|
||||
DCERPC_FAULT_NO_CALL_ACTIVE=(int)(0x000006bd),
|
||||
DCERPC_FAULT_CANT_PERFORM=(int)(0x000006d8),
|
||||
DCERPC_FAULT_OUT_OF_RESOURCES=(int)(0x000006d9),
|
||||
DCERPC_FAULT_BAD_STUB_DATA=(int)(0x000006f7),
|
||||
DCERPC_FAULT_SEC_PKG_ERROR=(int)(0x00000721)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_dcerpc_nca_status=0x7FFFFFFF}
|
||||
#define DCERPC_NCA_S_COMM_FAILURE ( 0x1C010001 )
|
||||
#define DCERPC_NCA_S_OP_RNG_ERROR ( 0x1C010002 )
|
||||
#define DCERPC_NCA_S_UNKNOWN_IF ( 0x1C010003 )
|
||||
#define DCERPC_NCA_S_WRONG_BOOT_TIME ( 0x1C010006 )
|
||||
#define DCERPC_NCA_S_YOU_CRASHED ( 0x1C010009 )
|
||||
#define DCERPC_NCA_S_PROTO_ERROR ( 0x1C01000B )
|
||||
#define DCERPC_NCA_S_OUT_ARGS_TOO_BIG ( 0x1C010013 )
|
||||
#define DCERPC_NCA_S_SERVER_TOO_BUSY ( 0x1C010014 )
|
||||
#define DCERPC_NCA_S_FAULT_STRING_TOO_LARGE ( 0x1C010015 )
|
||||
#define DCERPC_NCA_S_UNSUPPORTED_TYPE ( 0x1C010017 )
|
||||
#define DCERPC_NCA_S_FAULT_INT_DIV_BY_ZERO ( 0x1C000001 )
|
||||
#define DCERPC_NCA_S_FAULT_ADDR_ERROR ( 0x1C000002 )
|
||||
#define DCERPC_NCA_S_FAULT_FP_DIV_BY_ZERO ( 0x1C000003 )
|
||||
#define DCERPC_NCA_S_FAULT_FP_UNDERFLOW ( 0x1C000004 )
|
||||
#define DCERPC_NCA_S_FAULT_FP_OVERRFLOW ( 0x1C000005 )
|
||||
#define DCERPC_NCA_S_FAULT_INVALID_TAG ( 0x1C000006 )
|
||||
#define DCERPC_NCA_S_FAULT_INVALID_BOUND ( 0x1C000007 )
|
||||
#define DCERPC_NCA_S_FAULT_RPC_VERSION_MISMATCH ( 0x1C000008 )
|
||||
#define DCERPC_NCA_S_FAULT_UNSPEC_REJECT ( 0x1C000009 )
|
||||
#define DCERPC_NCA_S_FAULT_BAD_ACTID ( 0x1C00000A )
|
||||
#define DCERPC_NCA_S_FAULT_WHO_ARE_YOU_FAILED ( 0x1C00000B )
|
||||
#define DCERPC_NCA_S_FAULT_MANAGER_NOT_ENTERED ( 0x1C00000C )
|
||||
#define DCERPC_NCA_S_FAULT_CANCEL ( 0x1C00000D )
|
||||
#define DCERPC_NCA_S_FAULT_ILL_INST ( 0x1C00000E )
|
||||
#define DCERPC_NCA_S_FAULT_FP_ERROR ( 0x1C00000F )
|
||||
#define DCERPC_NCA_S_FAULT_INT_OVERFLOW ( 0x1C000010 )
|
||||
#define DCERPC_NCA_S_UNUSED_1C000011 ( 0x1C000011 )
|
||||
#define DCERPC_NCA_S_FAULT_UNSPEC ( 0x1C000012 )
|
||||
#define DCERPC_NCA_S_FAULT_REMOTE_COMM_FAILURE ( 0x1C000013 )
|
||||
#define DCERPC_NCA_S_FAULT_PIPE_EMPTY ( 0x1C000014 )
|
||||
#define DCERPC_NCA_S_FAULT_PIPE_CLOSED ( 0x1C000015 )
|
||||
#define DCERPC_NCA_S_FAULT_PIPE_ORDER ( 0x1C000016 )
|
||||
#define DCERPC_NCA_S_FAULT_PIPE_DISCIPLINE ( 0x1C000017 )
|
||||
#define DCERPC_NCA_S_FAULT_PIPE_COMM_ERROR ( 0x1C000018 )
|
||||
#define DCERPC_NCA_S_FAULT_PIPE_MEMORY ( 0x1C000019 )
|
||||
#define DCERPC_NCA_S_FAULT_CONTEXT_MISMATCH ( 0x1C00001A )
|
||||
#define DCERPC_NCA_S_FAULT_REMOTE_NO_MEMORY ( 0x1C00001B )
|
||||
#define DCERPC_NCA_S_INVALID_PRES_CONTEXT_ID ( 0x1C00001C )
|
||||
#define DCERPC_NCA_S_UNSUPPORTED_AUTHN_LEVEL ( 0x1C00001D )
|
||||
#define DCERPC_NCA_S_UNUSED_1C00001E ( 0x1C00001E )
|
||||
#define DCERPC_NCA_S_INVALID_CHECKSUM ( 0x1C00001F )
|
||||
#define DCERPC_NCA_S_INVALID_CRC ( 0x1C000020 )
|
||||
#define DCERPC_NCA_S_FAULT_USER_DEFINED ( 0x1C000021 )
|
||||
#define DCERPC_NCA_S_FAULT_TX_OPEN_FAILED ( 0x1C000022 )
|
||||
#define DCERPC_NCA_S_FAULT_CODESET_CONV_ERROR ( 0x1C000023 )
|
||||
#define DCERPC_NCA_S_FAULT_OBJECT_NOT_FOUND ( 0x1C000024 )
|
||||
#define DCERPC_NCA_S_FAULT_NO_CLIENT_STUB ( 0x1C000025 )
|
||||
#define DCERPC_FAULT_ACCESS_DENIED ( 0x00000005 )
|
||||
#define DCERPC_FAULT_SERVER_UNAVAILABLE ( 0x000006ba )
|
||||
#define DCERPC_FAULT_NO_CALL_ACTIVE ( 0x000006bd )
|
||||
#define DCERPC_FAULT_CANT_PERFORM ( 0x000006d8 )
|
||||
#define DCERPC_FAULT_OUT_OF_RESOURCES ( 0x000006d9 )
|
||||
#define DCERPC_FAULT_BAD_STUB_DATA ( 0x000006f7 )
|
||||
#define DCERPC_FAULT_SEC_PKG_ERROR ( 0x00000721 )
|
||||
#endif
|
||||
;
|
||||
|
||||
/* bitmap dcerpc_fault_flags */
|
||||
#define DCERPC_FAULT_FLAG_EXTENDED_ERROR_INFORMATION ( 0x01 )
|
||||
|
||||
struct dcerpc_fault {
|
||||
uint32_t alloc_hint;
|
||||
uint16_t context_id;
|
||||
uint8_t cancel_count;
|
||||
uint8_t flags;
|
||||
enum dcerpc_nca_status status;
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
DATA_BLOB error_and_verifier;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
};
|
||||
|
||||
enum dcerpc_AuthType
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DCERPC_AUTH_TYPE_NONE=(int)(0),
|
||||
DCERPC_AUTH_TYPE_KRB5_1=(int)(1),
|
||||
DCERPC_AUTH_TYPE_SPNEGO=(int)(9),
|
||||
DCERPC_AUTH_TYPE_NTLMSSP=(int)(10),
|
||||
DCERPC_AUTH_TYPE_KRB5=(int)(16),
|
||||
DCERPC_AUTH_TYPE_DPA=(int)(17),
|
||||
DCERPC_AUTH_TYPE_MSN=(int)(18),
|
||||
DCERPC_AUTH_TYPE_DIGEST=(int)(21),
|
||||
DCERPC_AUTH_TYPE_SCHANNEL=(int)(68),
|
||||
DCERPC_AUTH_TYPE_MSMQ=(int)(100),
|
||||
DCERPC_AUTH_TYPE_NCALRPC_AS_SYSTEM=(int)(200)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_dcerpc_AuthType=0x7FFFFFFF}
|
||||
#define DCERPC_AUTH_TYPE_NONE ( 0 )
|
||||
#define DCERPC_AUTH_TYPE_KRB5_1 ( 1 )
|
||||
#define DCERPC_AUTH_TYPE_SPNEGO ( 9 )
|
||||
#define DCERPC_AUTH_TYPE_NTLMSSP ( 10 )
|
||||
#define DCERPC_AUTH_TYPE_KRB5 ( 16 )
|
||||
#define DCERPC_AUTH_TYPE_DPA ( 17 )
|
||||
#define DCERPC_AUTH_TYPE_MSN ( 18 )
|
||||
#define DCERPC_AUTH_TYPE_DIGEST ( 21 )
|
||||
#define DCERPC_AUTH_TYPE_SCHANNEL ( 68 )
|
||||
#define DCERPC_AUTH_TYPE_MSMQ ( 100 )
|
||||
#define DCERPC_AUTH_TYPE_NCALRPC_AS_SYSTEM ( 200 )
|
||||
#endif
|
||||
;
|
||||
|
||||
enum dcerpc_AuthLevel
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DCERPC_AUTH_LEVEL_NONE=(int)(1),
|
||||
DCERPC_AUTH_LEVEL_CONNECT=(int)(2),
|
||||
DCERPC_AUTH_LEVEL_CALL=(int)(3),
|
||||
DCERPC_AUTH_LEVEL_PACKET=(int)(4),
|
||||
DCERPC_AUTH_LEVEL_INTEGRITY=(int)(5),
|
||||
DCERPC_AUTH_LEVEL_PRIVACY=(int)(6)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_dcerpc_AuthLevel=0x7FFFFFFF}
|
||||
#define DCERPC_AUTH_LEVEL_NONE ( 1 )
|
||||
#define DCERPC_AUTH_LEVEL_CONNECT ( 2 )
|
||||
#define DCERPC_AUTH_LEVEL_CALL ( 3 )
|
||||
#define DCERPC_AUTH_LEVEL_PACKET ( 4 )
|
||||
#define DCERPC_AUTH_LEVEL_INTEGRITY ( 5 )
|
||||
#define DCERPC_AUTH_LEVEL_PRIVACY ( 6 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct dcerpc_auth {
|
||||
enum dcerpc_AuthType auth_type;
|
||||
enum dcerpc_AuthLevel auth_level;
|
||||
uint8_t auth_pad_length;
|
||||
uint8_t auth_reserved;
|
||||
uint32_t auth_context_id;
|
||||
DATA_BLOB credentials;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_auth3 {
|
||||
uint32_t _pad;/* [value(0)] */
|
||||
DATA_BLOB auth_info;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_orphaned {
|
||||
uint32_t _pad;/* [value(0)] */
|
||||
DATA_BLOB auth_info;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_co_cancel {
|
||||
uint32_t _pad;/* [value(0)] */
|
||||
DATA_BLOB auth_info;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_cl_cancel {
|
||||
uint32_t version;
|
||||
uint32_t id;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_cancel_ack {
|
||||
uint32_t version;
|
||||
uint32_t id;
|
||||
uint32_t server_is_accepting;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_fack {
|
||||
uint32_t version;
|
||||
uint8_t _pad1;
|
||||
uint16_t window_size;
|
||||
uint32_t max_tdsu;
|
||||
uint32_t max_frag_size;
|
||||
uint16_t serial_no;
|
||||
uint16_t selack_size;
|
||||
uint32_t *selack;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_ack {
|
||||
char _empty_;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_ping {
|
||||
char _empty_;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_shutdown {
|
||||
char _empty_;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_working {
|
||||
char _empty_;
|
||||
}/* [public] */;
|
||||
|
||||
struct RTSCookie {
|
||||
struct GUID Cookie;
|
||||
}/* [public] */;
|
||||
|
||||
enum AddressType
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
RTS_IPV4=(int)(0),
|
||||
RTS_IPV6=(int)(1)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_AddressType=0x7FFFFFFF}
|
||||
#define RTS_IPV4 ( 0 )
|
||||
#define RTS_IPV6 ( 1 )
|
||||
#endif
|
||||
;
|
||||
|
||||
union ClientAddressType {
|
||||
const char * ClientAddressIPV4;/* [case(RTS_IPV4)] */
|
||||
const char * ClientAddressIPV6;/* [case(RTS_IPV6)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct ClientAddress {
|
||||
enum AddressType AddressType;
|
||||
union ClientAddressType ClientAddress;/* [switch_is(AddressType)] */
|
||||
uint8_t Padding[12];
|
||||
}/* [public] */;
|
||||
|
||||
enum ForwardDestination
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
FDClient=(int)(0),
|
||||
FDInProxy=(int)(1),
|
||||
FDServer=(int)(2),
|
||||
FDOutProxy=(int)(3)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_ForwardDestination=0x7FFFFFFF}
|
||||
#define FDClient ( 0 )
|
||||
#define FDInProxy ( 1 )
|
||||
#define FDServer ( 2 )
|
||||
#define FDOutProxy ( 3 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct FlowControlAcknowledgment {
|
||||
uint32_t BytesReceived;
|
||||
uint32_t AvailableWindow;
|
||||
struct RTSCookie ChannelCookie;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_ReceiveWindowSize {
|
||||
uint32_t ReceiveWindowSize;/* [range(0x2000,0x40000)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_FlowControlAck {
|
||||
struct FlowControlAcknowledgment Ack;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_ConnectionTimeout {
|
||||
uint32_t ConnectionTimeout;/* [range(0x1D4C0,0xDBBA00)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_Cookie {
|
||||
struct RTSCookie Cookie;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_ChannelLifetime {
|
||||
uint32_t ChannelLifetime;/* [range(0x20000,0x80000000)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_ClientKeepalive {
|
||||
uint32_t ClientKeepalive;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_Version {
|
||||
uint32_t Version;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_Empty {
|
||||
char _empty_;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_Padding {
|
||||
uint32_t ConformanceCount;/* [range(0x0,0xFFFF)] */
|
||||
uint8_t *Padding;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_NegativeANCE {
|
||||
char _empty_;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_ANCE {
|
||||
char _empty_;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_ClientAddress {
|
||||
struct ClientAddress ClientAddress;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_AssociationGroupId {
|
||||
struct RTSCookie AssociationGroupId;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_Destination {
|
||||
enum ForwardDestination ForwardDestination;
|
||||
}/* [public] */;
|
||||
|
||||
struct dcerpc_rts_cmd_PingTrafficSentNotify {
|
||||
uint32_t PingTrafficSent;
|
||||
}/* [public] */;
|
||||
|
||||
union dcerpc_rts_cmds {
|
||||
struct dcerpc_rts_cmd_ReceiveWindowSize ReceiveWindowSize;/* [case(0x0)] */
|
||||
struct dcerpc_rts_cmd_FlowControlAck FlowControlAck;/* [case(0x1)] */
|
||||
struct dcerpc_rts_cmd_ConnectionTimeout ConnectionTimeout;/* [case(0x2)] */
|
||||
struct dcerpc_rts_cmd_Cookie Cookie;/* [case(0x3)] */
|
||||
struct dcerpc_rts_cmd_ChannelLifetime ChannelLifetime;/* [case(0x4)] */
|
||||
struct dcerpc_rts_cmd_ClientKeepalive ClientKeepalive;/* [case(0x5)] */
|
||||
struct dcerpc_rts_cmd_Version Version;/* [case(0x6)] */
|
||||
struct dcerpc_rts_cmd_Empty Empty;/* [case(0x7)] */
|
||||
struct dcerpc_rts_cmd_Padding Padding;/* [case(0x8)] */
|
||||
struct dcerpc_rts_cmd_NegativeANCE NegativeANCE;/* [case(0x9)] */
|
||||
struct dcerpc_rts_cmd_ANCE ANCE;/* [case(0xA)] */
|
||||
struct dcerpc_rts_cmd_ClientAddress ClientAddress;/* [case(0xB)] */
|
||||
struct dcerpc_rts_cmd_AssociationGroupId AssociationGroupId;/* [case(0xC)] */
|
||||
struct dcerpc_rts_cmd_Destination Destination;/* [case(0xD)] */
|
||||
struct dcerpc_rts_cmd_PingTrafficSentNotify PingTrafficSentNotify;/* [case(0xE)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct dcerpc_rts_cmd {
|
||||
uint32_t CommandType;
|
||||
union dcerpc_rts_cmds Command;/* [switch_is(CommandType)] */
|
||||
}/* [public] */;
|
||||
|
||||
/* bitmap dcerpc_rts_flags */
|
||||
#define RTS_FLAG_NONE ( 0x0000 )
|
||||
#define RTS_FLAG_PING ( 0x0001 )
|
||||
#define RTS_FLAG_OTHER_CMD ( 0x0002 )
|
||||
#define RTS_FLAG_RECYCLE_CHANNEL ( 0x0004 )
|
||||
#define RTS_FLAG_IN_CHANNEL ( 0x0008 )
|
||||
#define RTS_FLAG_OUT_CHANNEL ( 0x0010 )
|
||||
#define RTS_FLAG_EOF ( 0x0020 )
|
||||
#define RTS_FLAG_ECHO ( 0x0040 )
|
||||
|
||||
struct dcerpc_rts {
|
||||
uint16_t Flags;
|
||||
uint16_t NumberOfCommands;
|
||||
struct dcerpc_rts_cmd *Commands;
|
||||
}/* [public] */;
|
||||
|
||||
enum dcerpc_pkt_type
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DCERPC_PKT_REQUEST=(int)(0),
|
||||
DCERPC_PKT_PING=(int)(1),
|
||||
DCERPC_PKT_RESPONSE=(int)(2),
|
||||
DCERPC_PKT_FAULT=(int)(3),
|
||||
DCERPC_PKT_WORKING=(int)(4),
|
||||
DCERPC_PKT_NOCALL=(int)(5),
|
||||
DCERPC_PKT_REJECT=(int)(6),
|
||||
DCERPC_PKT_ACK=(int)(7),
|
||||
DCERPC_PKT_CL_CANCEL=(int)(8),
|
||||
DCERPC_PKT_FACK=(int)(9),
|
||||
DCERPC_PKT_CANCEL_ACK=(int)(10),
|
||||
DCERPC_PKT_BIND=(int)(11),
|
||||
DCERPC_PKT_BIND_ACK=(int)(12),
|
||||
DCERPC_PKT_BIND_NAK=(int)(13),
|
||||
DCERPC_PKT_ALTER=(int)(14),
|
||||
DCERPC_PKT_ALTER_RESP=(int)(15),
|
||||
DCERPC_PKT_AUTH3=(int)(16),
|
||||
DCERPC_PKT_SHUTDOWN=(int)(17),
|
||||
DCERPC_PKT_CO_CANCEL=(int)(18),
|
||||
DCERPC_PKT_ORPHANED=(int)(19),
|
||||
DCERPC_PKT_RTS=(int)(20)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_dcerpc_pkt_type=0x7FFFFFFF}
|
||||
#define DCERPC_PKT_REQUEST ( 0 )
|
||||
#define DCERPC_PKT_PING ( 1 )
|
||||
#define DCERPC_PKT_RESPONSE ( 2 )
|
||||
#define DCERPC_PKT_FAULT ( 3 )
|
||||
#define DCERPC_PKT_WORKING ( 4 )
|
||||
#define DCERPC_PKT_NOCALL ( 5 )
|
||||
#define DCERPC_PKT_REJECT ( 6 )
|
||||
#define DCERPC_PKT_ACK ( 7 )
|
||||
#define DCERPC_PKT_CL_CANCEL ( 8 )
|
||||
#define DCERPC_PKT_FACK ( 9 )
|
||||
#define DCERPC_PKT_CANCEL_ACK ( 10 )
|
||||
#define DCERPC_PKT_BIND ( 11 )
|
||||
#define DCERPC_PKT_BIND_ACK ( 12 )
|
||||
#define DCERPC_PKT_BIND_NAK ( 13 )
|
||||
#define DCERPC_PKT_ALTER ( 14 )
|
||||
#define DCERPC_PKT_ALTER_RESP ( 15 )
|
||||
#define DCERPC_PKT_AUTH3 ( 16 )
|
||||
#define DCERPC_PKT_SHUTDOWN ( 17 )
|
||||
#define DCERPC_PKT_CO_CANCEL ( 18 )
|
||||
#define DCERPC_PKT_ORPHANED ( 19 )
|
||||
#define DCERPC_PKT_RTS ( 20 )
|
||||
#endif
|
||||
;
|
||||
|
||||
union dcerpc_payload {
|
||||
struct dcerpc_request request;/* [case(DCERPC_PKT_REQUEST)] */
|
||||
struct dcerpc_ping ping;/* [case(DCERPC_PKT_PING)] */
|
||||
struct dcerpc_response response;/* [case(DCERPC_PKT_RESPONSE)] */
|
||||
struct dcerpc_fault fault;/* [case(DCERPC_PKT_FAULT)] */
|
||||
struct dcerpc_working working;/* [case(DCERPC_PKT_WORKING)] */
|
||||
struct dcerpc_fack nocall;/* [case(DCERPC_PKT_NOCALL)] */
|
||||
struct dcerpc_fault reject;/* [case(DCERPC_PKT_REJECT)] */
|
||||
struct dcerpc_ack ack;/* [case(DCERPC_PKT_ACK)] */
|
||||
struct dcerpc_cl_cancel cl_cancel;/* [case(DCERPC_PKT_CL_CANCEL)] */
|
||||
struct dcerpc_fack fack;/* [case(DCERPC_PKT_FACK)] */
|
||||
struct dcerpc_cancel_ack cancel_ack;/* [case(DCERPC_PKT_CANCEL_ACK)] */
|
||||
struct dcerpc_bind bind;/* [case(DCERPC_PKT_BIND)] */
|
||||
struct dcerpc_bind_ack bind_ack;/* [case(DCERPC_PKT_BIND_ACK)] */
|
||||
struct dcerpc_bind_nak bind_nak;/* [case(DCERPC_PKT_BIND_NAK)] */
|
||||
struct dcerpc_bind alter;/* [case(DCERPC_PKT_ALTER)] */
|
||||
struct dcerpc_bind_ack alter_resp;/* [case(DCERPC_PKT_ALTER_RESP)] */
|
||||
struct dcerpc_shutdown shutdown;/* [case(DCERPC_PKT_SHUTDOWN)] */
|
||||
struct dcerpc_co_cancel co_cancel;/* [case(DCERPC_PKT_CO_CANCEL)] */
|
||||
struct dcerpc_orphaned orphaned;/* [case(DCERPC_PKT_ORPHANED)] */
|
||||
struct dcerpc_auth3 auth3;/* [case(DCERPC_PKT_AUTH3)] */
|
||||
struct dcerpc_rts rts;/* [case(DCERPC_PKT_RTS)] */
|
||||
}/* [nodiscriminant,public] */;
|
||||
|
||||
/* bitmap dcerpc_pfc_flags */
|
||||
#define DCERPC_PFC_FLAG_FIRST ( 0x01 )
|
||||
#define DCERPC_PFC_FLAG_LAST ( 0x02 )
|
||||
#define DCERPC_PFC_FLAG_PENDING_CANCEL_OR_HDR_SIGNING ( 0x04 )
|
||||
#define DCERPC_PFC_FLAG_CONC_MPX ( 0x10 )
|
||||
#define DCERPC_PFC_FLAG_DID_NOT_EXECUTE ( 0x20 )
|
||||
#define DCERPC_PFC_FLAG_MAYBE ( 0x40 )
|
||||
#define DCERPC_PFC_FLAG_OBJECT_UUID ( 0x80 )
|
||||
|
||||
struct ncacn_packet {
|
||||
uint8_t rpc_vers;
|
||||
uint8_t rpc_vers_minor;
|
||||
enum dcerpc_pkt_type ptype;
|
||||
uint8_t pfc_flags;
|
||||
uint8_t drep[4];
|
||||
uint16_t frag_length;
|
||||
uint16_t auth_length;
|
||||
uint32_t call_id;
|
||||
union dcerpc_payload u;/* [switch_is(ptype)] */
|
||||
}/* [noprint,nopull,nopush,public] */;
|
||||
|
||||
struct ncadg_packet {
|
||||
uint8_t rpc_vers;
|
||||
uint8_t ptype;
|
||||
uint8_t pfc_flags;
|
||||
uint8_t ncadg_flags;
|
||||
uint8_t drep[3];
|
||||
uint8_t serial_high;
|
||||
struct GUID object;
|
||||
struct GUID iface;
|
||||
struct GUID activity;
|
||||
uint32_t server_boot;
|
||||
uint32_t iface_version;
|
||||
uint32_t seq_num;
|
||||
uint16_t opnum;
|
||||
uint16_t ihint;
|
||||
uint16_t ahint;
|
||||
uint16_t len;
|
||||
uint16_t fragnum;
|
||||
uint8_t auth_proto;
|
||||
uint8_t serial_low;
|
||||
union dcerpc_payload u;/* [switch_is(ptype)] */
|
||||
}/* [public] */;
|
||||
|
||||
/* bitmap dcerpc_sec_vt_command */
|
||||
#define DCERPC_SEC_VT_COMMAND_ENUM ( 0x3FFF )
|
||||
#define DCERPC_SEC_VT_COMMAND_END ( 0x4000 )
|
||||
#define DCERPC_SEC_VT_MUST_PROCESS ( 0x8000 )
|
||||
|
||||
enum dcerpc_sec_vt_command_enum
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
DCERPC_SEC_VT_COMMAND_BITMASK1=(int)(0x0001),
|
||||
DCERPC_SEC_VT_COMMAND_PCONTEXT=(int)(0x0002),
|
||||
DCERPC_SEC_VT_COMMAND_HEADER2=(int)(0x0003)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_dcerpc_sec_vt_command_enum=0x7FFFFFFF}
|
||||
#define DCERPC_SEC_VT_COMMAND_BITMASK1 ( 0x0001 )
|
||||
#define DCERPC_SEC_VT_COMMAND_PCONTEXT ( 0x0002 )
|
||||
#define DCERPC_SEC_VT_COMMAND_HEADER2 ( 0x0003 )
|
||||
#endif
|
||||
;
|
||||
|
||||
/* bitmap dcerpc_sec_vt_bitmask1 */
|
||||
#define DCERPC_SEC_VT_CLIENT_SUPPORTS_HEADER_SIGNING ( 0x00000001 )
|
||||
|
||||
struct dcerpc_sec_vt_pcontext {
|
||||
struct ndr_syntax_id abstract_syntax;
|
||||
struct ndr_syntax_id transfer_syntax;
|
||||
};
|
||||
|
||||
struct dcerpc_sec_vt_header2 {
|
||||
enum dcerpc_pkt_type ptype;
|
||||
uint8_t reserved1;/* [value(0)] */
|
||||
uint16_t reserved2;/* [value(0)] */
|
||||
uint8_t drep[4];
|
||||
uint32_t call_id;
|
||||
uint16_t context_id;
|
||||
uint16_t opnum;
|
||||
};
|
||||
|
||||
union dcerpc_sec_vt_union {
|
||||
uint32_t bitmask1;/* [case(DCERPC_SEC_VT_COMMAND_BITMASK1)] */
|
||||
struct dcerpc_sec_vt_pcontext pcontext;/* [case(DCERPC_SEC_VT_COMMAND_PCONTEXT)] */
|
||||
struct dcerpc_sec_vt_header2 header2;/* [case(DCERPC_SEC_VT_COMMAND_HEADER2)] */
|
||||
DATA_BLOB _unknown;/* [default,flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [nodiscriminant,switch_type(dcerpc_sec_vt_command_enum)] */;
|
||||
|
||||
struct dcerpc_sec_vt {
|
||||
uint16_t command;
|
||||
union dcerpc_sec_vt_union u;/* [flag(LIBNDR_FLAG_SUBCONTEXT_NO_UNREAD_BYTES),subcontext(2),switch_is(command&DCERPC_SEC_VT_COMMAND_ENUM)] */
|
||||
};
|
||||
|
||||
struct dcerpc_sec_vt_count {
|
||||
uint16_t count;
|
||||
}/* [nopull,nopush,public] */;
|
||||
|
||||
struct dcerpc_sec_verification_trailer {
|
||||
DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
|
||||
uint8_t magic[8];/* [value(DCERPC_SEC_VT_MAGIC)] */
|
||||
struct dcerpc_sec_vt_count count;
|
||||
struct dcerpc_sec_vt *commands;
|
||||
}/* [flag(LIBNDR_PRINT_ARRAY_HEX),public] */;
|
||||
|
||||
#endif /* _HEADER_dcerpc */
|
||||
#endif /* _PIDL_HEADER_dcerpc */
|
||||
@ -0,0 +1,587 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#ifndef _PIDL_HEADER_drsblobs
|
||||
#define _PIDL_HEADER_drsblobs
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <core/ntstatus.h>
|
||||
|
||||
#include <gen_ndr/drsuapi.h>
|
||||
#include <gen_ndr/misc.h>
|
||||
#include <gen_ndr/samr.h>
|
||||
#include <gen_ndr/lsa.h>
|
||||
#include <gen_ndr/security.h>
|
||||
#ifndef _HEADER_drsblobs
|
||||
#define _HEADER_drsblobs
|
||||
|
||||
#define SUPPLEMENTAL_CREDENTIALS_PREFIX ( " " )
|
||||
#define ENCRYPTED_SECRET_MAGIC_VALUE ( 0xCA5CADED )
|
||||
struct replPropertyMetaData1 {
|
||||
enum drsuapi_DsAttributeId attid;
|
||||
uint32_t version;
|
||||
NTTIME originating_change_time;
|
||||
struct GUID originating_invocation_id;
|
||||
uint64_t originating_usn;
|
||||
uint64_t local_usn;
|
||||
}/* [public] */;
|
||||
|
||||
struct replPropertyMetaDataCtr1 {
|
||||
uint32_t count;
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
struct replPropertyMetaData1 *array;
|
||||
};
|
||||
|
||||
union replPropertyMetaDataCtr {
|
||||
struct replPropertyMetaDataCtr1 ctr1;/* [case] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct replPropertyMetaDataBlob {
|
||||
uint32_t version;
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
union replPropertyMetaDataCtr ctr;/* [switch_is(version)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct replUpToDateVectorCtr1 {
|
||||
uint32_t count;
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
struct drsuapi_DsReplicaCursor *cursors;
|
||||
};
|
||||
|
||||
struct replUpToDateVectorCtr2 {
|
||||
uint32_t count;
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
struct drsuapi_DsReplicaCursor2 *cursors;
|
||||
};
|
||||
|
||||
union replUpToDateVectorCtr {
|
||||
struct replUpToDateVectorCtr1 ctr1;/* [case] */
|
||||
struct replUpToDateVectorCtr2 ctr2;/* [case(2)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct replUpToDateVectorBlob {
|
||||
uint32_t version;
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
union replUpToDateVectorCtr ctr;/* [switch_is(version)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct repsFromTo1OtherInfo {
|
||||
uint32_t __dns_name_size;/* [value(strlen(dns_name)+1)] */
|
||||
const char *dns_name;/* [charset(DOS)] */
|
||||
}/* [gensize,public] */;
|
||||
|
||||
struct repsFromTo1 {
|
||||
uint32_t blobsize;/* [value(ndr_size_repsFromTo1(this,ndr->flags)+8)] */
|
||||
uint32_t consecutive_sync_failures;
|
||||
NTTIME last_success;
|
||||
NTTIME last_attempt;
|
||||
WERROR result_last_attempt;
|
||||
struct repsFromTo1OtherInfo *other_info;/* [relative] */
|
||||
uint32_t other_info_length;/* [value(ndr_size_repsFromTo1OtherInfo(other_info,ndr->flags))] */
|
||||
uint32_t replica_flags;
|
||||
uint8_t schedule[84];
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
struct drsuapi_DsReplicaHighWaterMark highwatermark;
|
||||
struct GUID source_dsa_obj_guid;
|
||||
struct GUID source_dsa_invocation_id;
|
||||
struct GUID transport_guid;
|
||||
}/* [flag(LIBNDR_PRINT_ARRAY_HEX),gensize,public] */;
|
||||
|
||||
struct repsFromTo2OtherInfo {
|
||||
uint32_t __ndr_size;/* [value(ndr_size_repsFromTo2OtherInfo(this,ndr->flags))] */
|
||||
const char * dns_name1;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2),relative] */
|
||||
uint32_t unknown1;
|
||||
const char * dns_name2;/* [flag(LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2),relative] */
|
||||
uint64_t unknown2;
|
||||
}/* [gensize,public,relative_base] */;
|
||||
|
||||
struct repsFromTo2 {
|
||||
uint32_t blobsize;/* [value(ndr_size_repsFromTo2(this,ndr->flags)+8)] */
|
||||
uint32_t consecutive_sync_failures;
|
||||
NTTIME last_success;
|
||||
NTTIME last_attempt;
|
||||
WERROR result_last_attempt;
|
||||
struct repsFromTo2OtherInfo *other_info;/* [relative] */
|
||||
uint32_t other_info_length;/* [value(ndr_size_repsFromTo2OtherInfo(other_info,ndr->flags))] */
|
||||
uint32_t replica_flags;
|
||||
uint8_t schedule[84];
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
struct drsuapi_DsReplicaHighWaterMark highwatermark;
|
||||
struct GUID source_dsa_obj_guid;
|
||||
struct GUID source_dsa_invocation_id;
|
||||
struct GUID transport_guid;
|
||||
uint64_t unknown1;
|
||||
}/* [flag(LIBNDR_PRINT_ARRAY_HEX),gensize,public] */;
|
||||
|
||||
union repsFromTo {
|
||||
struct repsFromTo1 ctr1;/* [case] */
|
||||
struct repsFromTo2 ctr2;/* [case(2)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct repsFromToBlob {
|
||||
uint32_t version;
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
union repsFromTo ctr;/* [switch_is(version)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct scheduleHeader {
|
||||
uint32_t type;/* [value(0)] */
|
||||
uint32_t offset;
|
||||
}/* [public] */;
|
||||
|
||||
struct scheduleSlots {
|
||||
uint8_t slots[168];
|
||||
}/* [public] */;
|
||||
|
||||
struct schedule {
|
||||
uint32_t size;
|
||||
uint32_t bandwidth;/* [value(0)] */
|
||||
uint32_t numberOfSchedules;
|
||||
struct scheduleHeader *headerArray;
|
||||
struct scheduleSlots *dataArray;
|
||||
}/* [public] */;
|
||||
|
||||
struct partialAttributeSetCtr1 {
|
||||
uint32_t count;
|
||||
enum drsuapi_DsAttributeId *array;
|
||||
};
|
||||
|
||||
union partialAttributeSetCtr {
|
||||
struct partialAttributeSetCtr1 ctr1;/* [case] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct partialAttributeSetBlob {
|
||||
uint32_t version;
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
union partialAttributeSetCtr ctr;/* [switch_is(version)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct schemaInfoBlob {
|
||||
uint8_t marker;/* [value(0xFF)] */
|
||||
uint32_t revision;/* [flag(LIBNDR_FLAG_BIGENDIAN)] */
|
||||
struct GUID invocation_id;
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN),public] */;
|
||||
|
||||
struct drsuapi_MSPrefixMap_Entry {
|
||||
uint16_t entryID;
|
||||
uint16_t length;
|
||||
uint8_t *binary_oid;
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN),noprint] */;
|
||||
|
||||
struct drsuapi_MSPrefixMap_Ctr {
|
||||
uint32_t num_entries;
|
||||
uint32_t __ndr_size;/* [value(ndr_size_drsuapi_MSPrefixMap_Ctr(r,ndr->flags))] */
|
||||
struct drsuapi_MSPrefixMap_Entry *entries;
|
||||
}/* [gensize,public] */;
|
||||
|
||||
enum prefixMapVersion
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
PREFIX_MAP_VERSION_DSDB=(int)(0x44534442)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_prefixMapVersion=0x7FFFFFFF}
|
||||
#define PREFIX_MAP_VERSION_DSDB ( 0x44534442 )
|
||||
#endif
|
||||
;
|
||||
|
||||
union prefixMapCtr {
|
||||
struct drsuapi_DsReplicaOIDMapping_Ctr dsdb;/* [case(PREFIX_MAP_VERSION_DSDB)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct prefixMapBlob {
|
||||
enum prefixMapVersion version;
|
||||
uint32_t reserved;/* [value(0)] */
|
||||
union prefixMapCtr ctr;/* [switch_is(version)] */
|
||||
}/* [public] */;
|
||||
|
||||
union ldapControlDirSyncExtra {
|
||||
struct replUpToDateVectorBlob uptodateness_vector;/* [default] */
|
||||
}/* [gensize,nodiscriminant] */;
|
||||
|
||||
struct ldapControlDirSyncBlob {
|
||||
uint32_t u1;/* [value(3)] */
|
||||
NTTIME time;
|
||||
uint32_t u2;
|
||||
uint32_t u3;
|
||||
uint32_t extra_length;/* [value(ndr_size_ldapControlDirSyncExtra(&extra,extra.uptodateness_vector.version,0))] */
|
||||
struct drsuapi_DsReplicaHighWaterMark highwatermark;
|
||||
struct GUID guid1;
|
||||
union ldapControlDirSyncExtra extra;/* [switch_is(extra_length)] */
|
||||
};
|
||||
|
||||
struct ldapControlDirSyncCookie {
|
||||
const char *msds;/* [charset(DOS),value("MSDS")] */
|
||||
struct ldapControlDirSyncBlob blob;/* [subcontext(0)] */
|
||||
}/* [public,relative_base] */;
|
||||
|
||||
struct supplementalCredentialsPackage {
|
||||
uint16_t name_len;/* [value(2*strlen_m(name))] */
|
||||
uint16_t data_len;/* [value(strlen(data))] */
|
||||
uint16_t reserved;
|
||||
const char *name;/* [charset(UTF16)] */
|
||||
const char *data;/* [charset(DOS)] */
|
||||
}/* [public] */;
|
||||
|
||||
enum supplementalCredentialsSignature
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
SUPPLEMENTAL_CREDENTIALS_SIGNATURE=(int)(0x0050)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_supplementalCredentialsSignature=0x7FFFFFFF}
|
||||
#define SUPPLEMENTAL_CREDENTIALS_SIGNATURE ( 0x0050 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct supplementalCredentialsSubBlob {
|
||||
const char *prefix;/* [charset(UTF16),value(SUPPLEMENTAL_CREDENTIALS_PREFIX)] */
|
||||
enum supplementalCredentialsSignature signature;/* [value(SUPPLEMENTAL_CREDENTIALS_SIGNATURE)] */
|
||||
uint16_t num_packages;
|
||||
struct supplementalCredentialsPackage *packages;
|
||||
}/* [gensize,nopull,nopush] */;
|
||||
|
||||
struct supplementalCredentialsBlob {
|
||||
uint32_t unknown1;/* [value(0)] */
|
||||
uint32_t __ndr_size;/* [value(ndr_size_supplementalCredentialsSubBlob(&sub,ndr->flags))] */
|
||||
uint32_t unknown2;/* [value(0)] */
|
||||
struct supplementalCredentialsSubBlob sub;/* [subcontext(0),subcontext_size(__ndr_size)] */
|
||||
uint8_t unknown3;/* [value(0)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct package_PackagesBlob {
|
||||
const char ** names;/* [flag(LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct package_PrimaryKerberosString {
|
||||
uint16_t length;/* [value(2*strlen_m(string))] */
|
||||
uint16_t size;/* [value(2*strlen_m(string))] */
|
||||
const char * string;/* [flag(LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING),relative,subcontext(0),subcontext_size(size)] */
|
||||
};
|
||||
|
||||
struct package_PrimaryKerberosKey3 {
|
||||
uint16_t reserved1;/* [value(0)] */
|
||||
uint16_t reserved2;/* [value(0)] */
|
||||
uint32_t reserved3;/* [value(0)] */
|
||||
uint32_t keytype;
|
||||
uint32_t value_len;/* [value((value?value->length:0))] */
|
||||
DATA_BLOB *value;/* [flag(LIBNDR_FLAG_REMAINING),relative,subcontext(0),subcontext_size(value_len)] */
|
||||
};
|
||||
|
||||
struct package_PrimaryKerberosCtr3 {
|
||||
uint16_t num_keys;
|
||||
uint16_t num_old_keys;
|
||||
struct package_PrimaryKerberosString salt;
|
||||
struct package_PrimaryKerberosKey3 *keys;
|
||||
struct package_PrimaryKerberosKey3 *old_keys;
|
||||
uint32_t padding1;/* [value(0)] */
|
||||
uint32_t padding2;/* [value(0)] */
|
||||
uint32_t padding3;/* [value(0)] */
|
||||
uint32_t padding4;/* [value(0)] */
|
||||
uint32_t padding5;/* [value(0)] */
|
||||
};
|
||||
|
||||
struct package_PrimaryKerberosKey4 {
|
||||
uint16_t reserved1;/* [value(0)] */
|
||||
uint16_t reserved2;/* [value(0)] */
|
||||
uint32_t reserved3;/* [value(0)] */
|
||||
uint32_t iteration_count;
|
||||
uint32_t keytype;
|
||||
uint32_t value_len;/* [value((value?value->length:0))] */
|
||||
DATA_BLOB *value;/* [flag(LIBNDR_FLAG_REMAINING),relative,subcontext(0),subcontext_size(value_len)] */
|
||||
};
|
||||
|
||||
struct package_PrimaryKerberosCtr4 {
|
||||
uint16_t num_keys;
|
||||
uint16_t num_service_keys;/* [value(0)] */
|
||||
uint16_t num_old_keys;
|
||||
uint16_t num_older_keys;
|
||||
struct package_PrimaryKerberosString salt;
|
||||
uint32_t default_iteration_count;
|
||||
struct package_PrimaryKerberosKey4 *keys;
|
||||
struct package_PrimaryKerberosKey4 *service_keys;
|
||||
struct package_PrimaryKerberosKey4 *old_keys;
|
||||
struct package_PrimaryKerberosKey4 *older_keys;
|
||||
};
|
||||
|
||||
union package_PrimaryKerberosCtr {
|
||||
struct package_PrimaryKerberosCtr3 ctr3;/* [case(3)] */
|
||||
struct package_PrimaryKerberosCtr4 ctr4;/* [case(4)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct package_PrimaryKerberosBlob {
|
||||
uint16_t version;
|
||||
uint16_t flags;/* [value(0)] */
|
||||
union package_PrimaryKerberosCtr ctr;/* [switch_is(version)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct package_PrimaryCLEARTEXTBlob {
|
||||
DATA_BLOB cleartext;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct package_PrimaryWDigestHash {
|
||||
uint8_t hash[16];
|
||||
}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;
|
||||
|
||||
struct package_PrimaryWDigestBlob {
|
||||
uint16_t unknown1;/* [value(0x31)] */
|
||||
uint8_t unknown2;/* [value(0x01)] */
|
||||
uint8_t num_hashes;
|
||||
uint32_t unknown3;/* [value(0)] */
|
||||
uint64_t uuknown4;/* [value(0)] */
|
||||
struct package_PrimaryWDigestHash *hashes;
|
||||
}/* [public] */;
|
||||
|
||||
struct package_PrimarySambaGPGBlob {
|
||||
DATA_BLOB gpg_blob;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct package_PrimaryUserPasswordValue {
|
||||
uint16_t scheme_len;/* [value(2*strlen_m(scheme))] */
|
||||
const char *scheme;/* [charset(UTF16)] */
|
||||
uint32_t value_len;/* [value((value?value->length:0))] */
|
||||
DATA_BLOB *value;/* [flag(LIBNDR_FLAG_REMAINING),relative,subcontext(0),subcontext_size(value_len)] */
|
||||
};
|
||||
|
||||
struct package_PrimaryUserPasswordBlob {
|
||||
struct samr_Password current_nt_hash;
|
||||
uint16_t num_hashes;
|
||||
struct package_PrimaryUserPasswordValue *hashes;
|
||||
}/* [public] */;
|
||||
|
||||
struct AuthInfoNone {
|
||||
uint32_t size;/* [value(0)] */
|
||||
};
|
||||
|
||||
struct AuthInfoNT4Owf {
|
||||
uint32_t size;/* [value(16)] */
|
||||
struct samr_Password password;
|
||||
};
|
||||
|
||||
struct AuthInfoClear {
|
||||
uint32_t size;
|
||||
uint8_t *password;
|
||||
};
|
||||
|
||||
struct AuthInfoVersion {
|
||||
uint32_t size;/* [value(4)] */
|
||||
uint32_t version;
|
||||
};
|
||||
|
||||
union AuthInfo {
|
||||
struct AuthInfoNone none;/* [case(TRUST_AUTH_TYPE_NONE)] */
|
||||
struct AuthInfoNT4Owf nt4owf;/* [case(TRUST_AUTH_TYPE_NT4OWF)] */
|
||||
struct AuthInfoClear clear;/* [case(TRUST_AUTH_TYPE_CLEAR)] */
|
||||
struct AuthInfoVersion version;/* [case(TRUST_AUTH_TYPE_VERSION)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct AuthenticationInformation {
|
||||
NTTIME LastUpdateTime;
|
||||
enum lsa_TrustAuthType AuthType;
|
||||
union AuthInfo AuthInfo;/* [switch_is(AuthType)] */
|
||||
DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct AuthenticationInformationArray {
|
||||
uint32_t count;
|
||||
struct AuthenticationInformation *array;
|
||||
}/* [gensize,nopull,nopush,public] */;
|
||||
|
||||
struct trustAuthInOutBlob {
|
||||
uint32_t count;
|
||||
uint32_t current_offset;/* [value((count>0)?12:0)] */
|
||||
uint32_t previous_offset;/* [value((count>0)?12+ndr_size_AuthenticationInformationArray(¤t,ndr->flags):0)] */
|
||||
struct AuthenticationInformationArray current;/* [subcontext(0),subcontext_size((previous_offset)-(current_offset))] */
|
||||
struct AuthenticationInformationArray previous;/* [flag(LIBNDR_FLAG_REMAINING),subcontext(0)] */
|
||||
}/* [gensize,nopush,public] */;
|
||||
|
||||
struct trustDomainPasswords {
|
||||
uint8_t confounder[512];
|
||||
struct trustAuthInOutBlob outgoing;/* [subcontext(0),subcontext_size(outgoing_size)] */
|
||||
struct trustAuthInOutBlob incoming;/* [subcontext(0),subcontext_size(incoming_size)] */
|
||||
uint32_t outgoing_size;/* [value(ndr_size_trustAuthInOutBlob(&outgoing,ndr->flags))] */
|
||||
uint32_t incoming_size;/* [value(ndr_size_trustAuthInOutBlob(&incoming,ndr->flags))] */
|
||||
}/* [nopull,public] */;
|
||||
|
||||
struct DsCompressedChunk {
|
||||
uint32_t marker;
|
||||
DATA_BLOB data;
|
||||
}/* [public] */;
|
||||
|
||||
struct ExtendedErrorAString {
|
||||
uint16_t __size;
|
||||
const char *string;/* [charset(DOS),size_is(__size),unique] */
|
||||
};
|
||||
|
||||
struct ExtendedErrorUString {
|
||||
uint16_t __size;
|
||||
const char *string;/* [charset(UTF16),size_is(__size),unique] */
|
||||
};
|
||||
|
||||
struct ExtendedErrorBlob {
|
||||
uint16_t length;
|
||||
uint8_t *data;/* [size_is(length),unique] */
|
||||
};
|
||||
|
||||
enum ExtendedErrorComputerNamePresent
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
EXTENDED_ERROR_COMPUTER_NAME_PRESENT=(int)(1),
|
||||
EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT=(int)(2)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_ExtendedErrorComputerNamePresent=0x7FFFFFFF}
|
||||
#define EXTENDED_ERROR_COMPUTER_NAME_PRESENT ( 1 )
|
||||
#define EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT ( 2 )
|
||||
#endif
|
||||
;
|
||||
|
||||
union ExtendedErrorComputerNameU {
|
||||
struct ExtendedErrorUString name;/* [case(EXTENDED_ERROR_COMPUTER_NAME_PRESENT)] */
|
||||
}/* [switch_type(ExtendedErrorComputerNamePresent)] */;
|
||||
|
||||
struct ExtendedErrorComputerName {
|
||||
enum ExtendedErrorComputerNamePresent present;
|
||||
union ExtendedErrorComputerNameU n;/* [switch_is(present)] */
|
||||
};
|
||||
|
||||
enum ExtendedErrorParamType
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING=(int)(1),
|
||||
EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING=(int)(2),
|
||||
EXTENDED_ERROR_PARAM_TYPE_UINT32=(int)(3),
|
||||
EXTENDED_ERROR_PARAM_TYPE_UINT16=(int)(4),
|
||||
EXTENDED_ERROR_PARAM_TYPE_UINT64=(int)(5),
|
||||
EXTENDED_ERROR_PARAM_TYPE_NONE=(int)(6),
|
||||
EXTENDED_ERROR_PARAM_TYPE_BLOB=(int)(7)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_ExtendedErrorParamType=0x7FFFFFFF}
|
||||
#define EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING ( 1 )
|
||||
#define EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING ( 2 )
|
||||
#define EXTENDED_ERROR_PARAM_TYPE_UINT32 ( 3 )
|
||||
#define EXTENDED_ERROR_PARAM_TYPE_UINT16 ( 4 )
|
||||
#define EXTENDED_ERROR_PARAM_TYPE_UINT64 ( 5 )
|
||||
#define EXTENDED_ERROR_PARAM_TYPE_NONE ( 6 )
|
||||
#define EXTENDED_ERROR_PARAM_TYPE_BLOB ( 7 )
|
||||
#endif
|
||||
;
|
||||
|
||||
union ExtendedErrorParamU {
|
||||
struct ExtendedErrorAString a_string;/* [case(EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING)] */
|
||||
struct ExtendedErrorUString u_string;/* [case(EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING)] */
|
||||
uint32_t uint32;/* [case(EXTENDED_ERROR_PARAM_TYPE_UINT32)] */
|
||||
uint16_t uint16;/* [case(EXTENDED_ERROR_PARAM_TYPE_UINT16)] */
|
||||
uint64_t uint64;/* [case(EXTENDED_ERROR_PARAM_TYPE_UINT64)] */
|
||||
struct ExtendedErrorBlob blob;/* [case(EXTENDED_ERROR_PARAM_TYPE_BLOB)] */
|
||||
}/* [switch_type(ExtendedErrorParamType)] */;
|
||||
|
||||
struct ExtendedErrorParam {
|
||||
enum ExtendedErrorParamType type;
|
||||
union ExtendedErrorParamU p;/* [switch_is(type)] */
|
||||
};
|
||||
|
||||
struct ExtendedErrorInfo {
|
||||
struct ExtendedErrorInfo *next;/* [max_recursion(20000),unique] */
|
||||
struct ExtendedErrorComputerName computer_name;
|
||||
uint64_t pid;
|
||||
NTTIME time;
|
||||
uint32_t generating_component;
|
||||
WERROR status;
|
||||
uint16_t detection_location;
|
||||
uint16_t flags;
|
||||
uint16_t num_params;
|
||||
struct ExtendedErrorParam *params;/* [size_is(num_params)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct ExtendedErrorInfoPtr {
|
||||
struct ExtendedErrorInfo *info;/* [unique] */
|
||||
};
|
||||
|
||||
struct ForestTrustString {
|
||||
uint32_t size;/* [value(strlen_m(string))] */
|
||||
const char *string;/* [charset(UTF8)] */
|
||||
};
|
||||
|
||||
struct ForestTrustDataDomainInfo {
|
||||
uint32_t sid_size;/* [value(ndr_size_dom_sid0(&sid,ndr->flags))] */
|
||||
struct dom_sid sid;/* [subcontext(0),subcontext_size(sid_size)] */
|
||||
struct ForestTrustString dns_name;
|
||||
struct ForestTrustString netbios_name;
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN)] */;
|
||||
|
||||
struct ForestTrustDataBinaryData {
|
||||
uint32_t size;
|
||||
uint8_t *data;
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN)] */;
|
||||
|
||||
union ForestTrustData {
|
||||
struct ForestTrustString name;/* [case(FOREST_TRUST_TOP_LEVEL_NAME)] */
|
||||
struct ForestTrustDataDomainInfo info;/* [case(FOREST_TRUST_DOMAIN_INFO)] */
|
||||
struct ForestTrustDataBinaryData data;/* [default] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
enum ForestTrustInfoRecordType
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
FOREST_TRUST_TOP_LEVEL_NAME=(int)(LSA_FOREST_TRUST_TOP_LEVEL_NAME),
|
||||
FOREST_TRUST_TOP_LEVEL_NAME_EX=(int)(LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX),
|
||||
FOREST_TRUST_DOMAIN_INFO=(int)(LSA_FOREST_TRUST_DOMAIN_INFO)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_ForestTrustInfoRecordType=0x7FFFFFFF}
|
||||
#define FOREST_TRUST_TOP_LEVEL_NAME ( LSA_FOREST_TRUST_TOP_LEVEL_NAME )
|
||||
#define FOREST_TRUST_TOP_LEVEL_NAME_EX ( LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX )
|
||||
#define FOREST_TRUST_DOMAIN_INFO ( LSA_FOREST_TRUST_DOMAIN_INFO )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct ForestTrustInfoRecord {
|
||||
uint32_t flags;
|
||||
NTTIME timestamp;
|
||||
enum ForestTrustInfoRecordType type;
|
||||
union ForestTrustData data;/* [switch_is(type)] */
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN),gensize,public] */;
|
||||
|
||||
struct ForestTrustInfoRecordArmor {
|
||||
uint32_t record_size;/* [value(ndr_size_ForestTrustInfoRecord(&record,ndr->flags))] */
|
||||
struct ForestTrustInfoRecord record;
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN)] */;
|
||||
|
||||
struct ForestTrustInfo {
|
||||
uint32_t version;
|
||||
uint32_t count;
|
||||
struct ForestTrustInfoRecordArmor *records;
|
||||
}/* [flag(LIBNDR_FLAG_NOALIGN),public] */;
|
||||
|
||||
enum EncryptedSecretAlgorithm
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
ENC_SECRET_AES_128_AEAD=(int)(1)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_EncryptedSecretAlgorithm=0x7FFFFFFF}
|
||||
#define ENC_SECRET_AES_128_AEAD ( 1 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct PlaintextSecret {
|
||||
DATA_BLOB cleartext;
|
||||
}/* [public] */;
|
||||
|
||||
struct EncryptedSecretHeader {
|
||||
uint32_t magic;
|
||||
uint32_t version;
|
||||
uint32_t algorithm;
|
||||
uint32_t flags;
|
||||
}/* [public] */;
|
||||
|
||||
struct EncryptedSecret {
|
||||
DATA_BLOB iv;
|
||||
struct EncryptedSecretHeader header;
|
||||
DATA_BLOB encrypted;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
#endif /* _HEADER_drsblobs */
|
||||
#endif /* _PIDL_HEADER_drsblobs */
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,222 @@
|
||||
/* header auto-generated by pidl */
|
||||
|
||||
#ifndef _PIDL_HEADER_krb5pac
|
||||
#define _PIDL_HEADER_krb5pac
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <core/ntstatus.h>
|
||||
|
||||
#include <gen_ndr/security.h>
|
||||
#include <gen_ndr/lsa.h>
|
||||
#include <gen_ndr/netlogon.h>
|
||||
#include <gen_ndr/samr.h>
|
||||
#ifndef _HEADER_krb5pac
|
||||
#define _HEADER_krb5pac
|
||||
|
||||
#define NETLOGON_GENERIC_KRB5_PAC_VALIDATE ( 3 )
|
||||
struct PAC_LOGON_NAME {
|
||||
NTTIME logon_time;
|
||||
uint16_t size;/* [value(2*strlen_m(account_name))] */
|
||||
const char *account_name;/* [charset(UTF16)] */
|
||||
};
|
||||
|
||||
struct PAC_SIGNATURE_DATA {
|
||||
uint32_t type;
|
||||
DATA_BLOB signature;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [flag(LIBNDR_PRINT_ARRAY_HEX),public] */;
|
||||
|
||||
struct PAC_DOMAIN_GROUP_MEMBERSHIP {
|
||||
struct dom_sid2 *domain_sid;/* [unique] */
|
||||
struct samr_RidWithAttributeArray groups;
|
||||
};
|
||||
|
||||
struct PAC_LOGON_INFO {
|
||||
struct netr_SamInfo3 info3;
|
||||
struct PAC_DOMAIN_GROUP_MEMBERSHIP resource_groups;
|
||||
};
|
||||
|
||||
/* bitmap PAC_CREDENTIAL_NTLM_FLAGS */
|
||||
#define PAC_CREDENTIAL_NTLM_HAS_LM_HASH ( 0x00000001 )
|
||||
#define PAC_CREDENTIAL_NTLM_HAS_NT_HASH ( 0x00000002 )
|
||||
|
||||
struct PAC_CREDENTIAL_NTLM_SECPKG {
|
||||
uint32_t version;/* [value(0)] */
|
||||
uint32_t flags;
|
||||
struct samr_Password lm_password;/* [noprint] */
|
||||
struct samr_Password nt_password;/* [noprint] */
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_CREDENTIAL_SUPPLEMENTAL_SECPKG {
|
||||
struct lsa_String package_name;
|
||||
uint32_t credential_size;
|
||||
uint8_t *credential;/* [noprint,size_is(credential_size),unique] */
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_CREDENTIAL_DATA {
|
||||
uint32_t credential_count;
|
||||
struct PAC_CREDENTIAL_SUPPLEMENTAL_SECPKG *credentials;/* [size_is(credential_count)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_CREDENTIAL_DATA_CTR {
|
||||
struct PAC_CREDENTIAL_DATA *data;/* [unique] */
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_CREDENTIAL_DATA_NDR {
|
||||
struct PAC_CREDENTIAL_DATA_CTR ctr;/* [subcontext(0xFFFFFC01)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_CREDENTIAL_INFO {
|
||||
uint32_t version;/* [value(0)] */
|
||||
uint32_t encryption_type;
|
||||
DATA_BLOB encrypted_data;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_CONSTRAINED_DELEGATION {
|
||||
struct lsa_String proxy_target;
|
||||
uint32_t num_transited_services;
|
||||
struct lsa_String *transited_services;/* [size_is(num_transited_services),unique] */
|
||||
};
|
||||
|
||||
/* bitmap PAC_UPN_DNS_FLAGS */
|
||||
#define PAC_UPN_DNS_FLAG_CONSTRUCTED ( 0x00000001 )
|
||||
#define PAC_UPN_DNS_FLAG_HAS_SAM_NAME_AND_SID ( 0x00000002 )
|
||||
|
||||
struct PAC_UPN_DNS_INFO_SAM_NAME_AND_SID {
|
||||
uint16_t samaccountname_size;/* [value(2*strlen_m(samaccountname))] */
|
||||
const char * samaccountname;/* [flag(LIBNDR_FLAG_ALIGN8|LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING),relative_short,subcontext(0),subcontext_size(samaccountname_size)] */
|
||||
uint16_t objectsid_size;/* [value(ndr_size_dom_sid(objectsid,ndr->flags))] */
|
||||
struct dom_sid *objectsid;/* [relative_short,subcontext(0),subcontext_size(objectsid_size)] */
|
||||
};
|
||||
|
||||
union PAC_UPN_DNS_INFO_EX {
|
||||
struct PAC_UPN_DNS_INFO_SAM_NAME_AND_SID sam_name_and_sid;/* [case(PAC_UPN_DNS_FLAG_HAS_SAM_NAME_AND_SID)] */
|
||||
}/* [nodiscriminant] */;
|
||||
|
||||
struct PAC_UPN_DNS_INFO {
|
||||
uint16_t upn_name_size;/* [value(2*strlen_m(upn_name))] */
|
||||
const char * upn_name;/* [flag(LIBNDR_FLAG_ALIGN8|LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING),relative_short,subcontext(0),subcontext_size(upn_name_size)] */
|
||||
uint16_t dns_domain_name_size;/* [value(2*strlen_m(dns_domain_name))] */
|
||||
const char * dns_domain_name;/* [flag(LIBNDR_FLAG_ALIGN8|LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING),relative_short,subcontext(0),subcontext_size(dns_domain_name_size)] */
|
||||
uint32_t flags;
|
||||
union PAC_UPN_DNS_INFO_EX ex;/* [switch_is(flags&PAC_UPN_DNS_FLAG_HAS_SAM_NAME_AND_SID)] */
|
||||
};
|
||||
|
||||
/* bitmap PAC_ATTRIBUTE_INFO_FLAGS */
|
||||
#define PAC_ATTRIBUTE_FLAG_PAC_WAS_REQUESTED ( 0x00000001 )
|
||||
#define PAC_ATTRIBUTE_FLAG_PAC_WAS_GIVEN_IMPLICITLY ( 0x00000002 )
|
||||
|
||||
struct PAC_ATTRIBUTES_INFO {
|
||||
uint32_t flags_length;
|
||||
uint32_t flags;
|
||||
};
|
||||
|
||||
struct PAC_REQUESTER_SID {
|
||||
struct dom_sid sid;
|
||||
};
|
||||
|
||||
struct PAC_LOGON_INFO_CTR {
|
||||
struct PAC_LOGON_INFO *info;/* [unique] */
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_CONSTRAINED_DELEGATION_CTR {
|
||||
struct PAC_CONSTRAINED_DELEGATION *info;/* [unique] */
|
||||
}/* [public] */;
|
||||
|
||||
enum PAC_TYPE
|
||||
#ifndef USE_UINT_ENUMS
|
||||
{
|
||||
PAC_TYPE_LOGON_INFO=(int)(1),
|
||||
PAC_TYPE_CREDENTIAL_INFO=(int)(2),
|
||||
PAC_TYPE_SRV_CHECKSUM=(int)(6),
|
||||
PAC_TYPE_KDC_CHECKSUM=(int)(7),
|
||||
PAC_TYPE_LOGON_NAME=(int)(10),
|
||||
PAC_TYPE_CONSTRAINED_DELEGATION=(int)(11),
|
||||
PAC_TYPE_UPN_DNS_INFO=(int)(12),
|
||||
PAC_TYPE_CLIENT_CLAIMS_INFO=(int)(13),
|
||||
PAC_TYPE_DEVICE_INFO=(int)(14),
|
||||
PAC_TYPE_DEVICE_CLAIMS_INFO=(int)(15),
|
||||
PAC_TYPE_TICKET_CHECKSUM=(int)(16),
|
||||
PAC_TYPE_ATTRIBUTES_INFO=(int)(17),
|
||||
PAC_TYPE_REQUESTER_SID=(int)(18),
|
||||
PAC_TYPE_FULL_CHECKSUM=(int)(19)
|
||||
}
|
||||
#else
|
||||
{ __do_not_use_enum_PAC_TYPE=0x7FFFFFFF}
|
||||
#define PAC_TYPE_LOGON_INFO ( 1 )
|
||||
#define PAC_TYPE_CREDENTIAL_INFO ( 2 )
|
||||
#define PAC_TYPE_SRV_CHECKSUM ( 6 )
|
||||
#define PAC_TYPE_KDC_CHECKSUM ( 7 )
|
||||
#define PAC_TYPE_LOGON_NAME ( 10 )
|
||||
#define PAC_TYPE_CONSTRAINED_DELEGATION ( 11 )
|
||||
#define PAC_TYPE_UPN_DNS_INFO ( 12 )
|
||||
#define PAC_TYPE_CLIENT_CLAIMS_INFO ( 13 )
|
||||
#define PAC_TYPE_DEVICE_INFO ( 14 )
|
||||
#define PAC_TYPE_DEVICE_CLAIMS_INFO ( 15 )
|
||||
#define PAC_TYPE_TICKET_CHECKSUM ( 16 )
|
||||
#define PAC_TYPE_ATTRIBUTES_INFO ( 17 )
|
||||
#define PAC_TYPE_REQUESTER_SID ( 18 )
|
||||
#define PAC_TYPE_FULL_CHECKSUM ( 19 )
|
||||
#endif
|
||||
;
|
||||
|
||||
struct DATA_BLOB_REM {
|
||||
DATA_BLOB remaining;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
};
|
||||
|
||||
union PAC_INFO {
|
||||
struct PAC_LOGON_INFO_CTR logon_info;/* [case(PAC_TYPE_LOGON_INFO),subcontext(0xFFFFFC01)] */
|
||||
struct PAC_CREDENTIAL_INFO credential_info;/* [case(PAC_TYPE_CREDENTIAL_INFO)] */
|
||||
struct PAC_SIGNATURE_DATA srv_cksum;/* [case(PAC_TYPE_SRV_CHECKSUM)] */
|
||||
struct PAC_SIGNATURE_DATA kdc_cksum;/* [case(PAC_TYPE_KDC_CHECKSUM)] */
|
||||
struct PAC_LOGON_NAME logon_name;/* [case(PAC_TYPE_LOGON_NAME)] */
|
||||
struct PAC_CONSTRAINED_DELEGATION_CTR constrained_delegation;/* [case(PAC_TYPE_CONSTRAINED_DELEGATION),subcontext(0xFFFFFC01)] */
|
||||
struct PAC_UPN_DNS_INFO upn_dns_info;/* [case(PAC_TYPE_UPN_DNS_INFO)] */
|
||||
struct PAC_SIGNATURE_DATA ticket_checksum;/* [case(PAC_TYPE_TICKET_CHECKSUM)] */
|
||||
struct PAC_ATTRIBUTES_INFO attributes_info;/* [case(PAC_TYPE_ATTRIBUTES_INFO)] */
|
||||
struct PAC_REQUESTER_SID requester_sid;/* [case(PAC_TYPE_REQUESTER_SID)] */
|
||||
struct PAC_SIGNATURE_DATA full_checksum;/* [case(PAC_TYPE_FULL_CHECKSUM)] */
|
||||
struct DATA_BLOB_REM unknown;/* [default,subcontext(0)] */
|
||||
}/* [gensize,nodiscriminant,public] */;
|
||||
|
||||
struct PAC_BUFFER {
|
||||
enum PAC_TYPE type;
|
||||
uint32_t _ndr_size;/* [value(_ndr_size_PAC_INFO(info,type,LIBNDR_FLAG_ALIGN8))] */
|
||||
union PAC_INFO *info;/* [flag(LIBNDR_FLAG_ALIGN8),relative,subcontext(0),subcontext_size(NDR_ROUND(_ndr_size,8)),switch_is(type)] */
|
||||
uint32_t _pad;/* [value(0)] */
|
||||
}/* [nopull,nopush,public] */;
|
||||
|
||||
struct PAC_DATA {
|
||||
uint32_t num_buffers;
|
||||
uint32_t version;
|
||||
struct PAC_BUFFER *buffers;
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_BUFFER_RAW {
|
||||
enum PAC_TYPE type;
|
||||
uint32_t ndr_size;
|
||||
struct DATA_BLOB_REM *info;/* [flag(LIBNDR_FLAG_ALIGN8),relative,subcontext(0),subcontext_size(NDR_ROUND(ndr_size,8))] */
|
||||
uint32_t _pad;/* [value(0)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_DATA_RAW {
|
||||
uint32_t num_buffers;
|
||||
uint32_t version;
|
||||
struct PAC_BUFFER_RAW *buffers;
|
||||
}/* [public] */;
|
||||
|
||||
struct PAC_Validate {
|
||||
uint32_t MessageType;/* [value(NETLOGON_GENERIC_KRB5_PAC_VALIDATE)] */
|
||||
uint32_t ChecksumLength;
|
||||
int32_t SignatureType;
|
||||
uint32_t SignatureLength;
|
||||
DATA_BLOB ChecksumAndSignature;/* [flag(LIBNDR_FLAG_REMAINING)] */
|
||||
}/* [public] */;
|
||||
|
||||
struct netsamlogoncache_entry {
|
||||
time_t timestamp;
|
||||
struct netr_SamInfo3 info3;
|
||||
}/* [public] */;
|
||||
|
||||
#endif /* _HEADER_krb5pac */
|
||||
#endif /* _PIDL_HEADER_krb5pac */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user