ReactOS  0.4.15-dev-1386-g5cb9f87
ntdsapi.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DS_NAME_RESULT_ITEMA
 
struct  DS_NAME_RESULT_ITEMW
 
struct  DS_NAME_RESULTA
 
struct  DS_NAME_RESULTW
 

Macros

#define DsClientMakeSpnForTargetServer   WINELIB_NAME_AW(DsClientMakeSpnForTargetServer)
 
#define DsMakeSpn   WINELIB_NAME_AW(DsMakeSpn)
 
#define DsCrackNames   WINELIB_NAME_AW(DsCrackNames)
 
#define DsServerRegisterSpn   WINELIB_NAME_AW(DsServerRegisterSpn)
 

Typedefs

typedef struct DS_NAME_RESULT_ITEMAPDS_NAME_RESULT_ITEMA
 
typedef struct DS_NAME_RESULT_ITEMWPDS_NAME_RESULT_ITEMW
 
typedef struct DS_NAME_RESULTAPDS_NAME_RESULTA
 
typedef struct DS_NAME_RESULTWPDS_NAME_RESULTW
 

Enumerations

enum  DS_NAME_FLAGS {
  DS_NAME_NO_FLAGS = 0x0, DS_NAME_FLAG_SYNTACTICAL_ONLY = 0x1, DS_NAME_FLAG_EVAL_AT_DC = 0x2, DS_NAME_FLAG_GCVERIFY = 0x4,
  DS_NAME_FLAG_TRUST_REFERRAL = 0x8
}
 
enum  DS_NAME_FORMAT {
  DS_UNKNOWN_NAME = 0, DS_FQDN_1779_NAME = 1, DS_NT4_ACCOUNT_NAME = 2, DS_DISPLAY_NAME = 3,
  DS_UNIQUE_ID_NAME = 6, DS_CANONICAL_NAME = 7, DS_USER_PRINCIPAL_NAME = 8, DS_CANONICAL_NAME_EX = 9,
  DS_SERVICE_PRINCIPAL_NAME = 10, DS_SID_OR_SID_HISTORY_NAME = 11, DS_DNS_DOMAIN_NAME = 12
}
 
enum  DS_SPN_NAME_TYPE {
  DS_SPN_DNS_HOST = 0, DS_SPN_DN_HOST = 1, DS_SPN_NB_HOST = 2, DS_SPN_DOMAIN = 3,
  DS_SPN_NB_DOMAIN = 4, DS_SPN_SERVICE = 5
}
 
enum  DS_SPN_WRITE_OP { DS_SPN_ADD_SPN_OP = 0, DS_SPN_REPLACE_SPN_OP = 1, DS_SPN_DELETE_SPN_OP = 2 }
 

Functions

DWORD WINAPI DsClientMakeSpnForTargetServerA (LPCSTR, LPCSTR, DWORD *, LPSTR)
 
DWORD WINAPI DsClientMakeSpnForTargetServerW (LPCWSTR, LPCWSTR, DWORD *, LPWSTR)
 
DWORD WINAPI DsMakeSpnA (LPCSTR, LPCSTR, LPCSTR, USHORT, LPCSTR, DWORD *, LPSTR)
 
DWORD WINAPI DsMakeSpnW (LPCWSTR, LPCWSTR, LPCWSTR, USHORT, LPCWSTR, DWORD *, LPWSTR)
 
DWORD WINAPI DsCrackNamesA (HANDLE handle, DS_NAME_FLAGS flags, DS_NAME_FORMAT offered, DS_NAME_FORMAT desired, DWORD num, const CHAR **names, PDS_NAME_RESULTA *result)
 
DWORD WINAPI DsCrackNamesW (HANDLE handle, DS_NAME_FLAGS flags, DS_NAME_FORMAT offered, DS_NAME_FORMAT desired, DWORD num, const WCHAR **names, PDS_NAME_RESULTW *result)
 
DWORD WINAPI DsServerRegisterSpnA (DS_SPN_WRITE_OP operation, LPCSTR ServiceClass, LPCSTR UserObjectDN)
 
DWORD WINAPI DsServerRegisterSpnW (DS_SPN_WRITE_OP operation, LPCWSTR ServiceClass, LPCWSTR UserObjectDN)
 

Macro Definition Documentation

◆ DsClientMakeSpnForTargetServer

#define DsClientMakeSpnForTargetServer   WINELIB_NAME_AW(DsClientMakeSpnForTargetServer)

Definition at line 30 of file ntdsapi.h.

◆ DsCrackNames

#define DsCrackNames   WINELIB_NAME_AW(DsCrackNames)

Definition at line 111 of file ntdsapi.h.

◆ DsMakeSpn

#define DsMakeSpn   WINELIB_NAME_AW(DsMakeSpn)

Definition at line 34 of file ntdsapi.h.

◆ DsServerRegisterSpn

#define DsServerRegisterSpn   WINELIB_NAME_AW(DsServerRegisterSpn)

Definition at line 114 of file ntdsapi.h.

Typedef Documentation

◆ PDS_NAME_RESULT_ITEMA

◆ PDS_NAME_RESULT_ITEMW

◆ PDS_NAME_RESULTA

◆ PDS_NAME_RESULTW

Enumeration Type Documentation

◆ DS_NAME_FLAGS

Enumerator
DS_NAME_NO_FLAGS 
DS_NAME_FLAG_SYNTACTICAL_ONLY 
DS_NAME_FLAG_EVAL_AT_DC 
DS_NAME_FLAG_GCVERIFY 
DS_NAME_FLAG_TRUST_REFERRAL 

Definition at line 36 of file ntdsapi.h.

◆ DS_NAME_FORMAT

Enumerator
DS_UNKNOWN_NAME 
DS_FQDN_1779_NAME 
DS_NT4_ACCOUNT_NAME 
DS_DISPLAY_NAME 
DS_UNIQUE_ID_NAME 
DS_CANONICAL_NAME 
DS_USER_PRINCIPAL_NAME 
DS_CANONICAL_NAME_EX 
DS_SERVICE_PRINCIPAL_NAME 
DS_SID_OR_SID_HISTORY_NAME 
DS_DNS_DOMAIN_NAME 

Definition at line 45 of file ntdsapi.h.

◆ DS_SPN_NAME_TYPE

Enumerator
DS_SPN_DNS_HOST 
DS_SPN_DN_HOST 
DS_SPN_NB_HOST 
DS_SPN_DOMAIN 
DS_SPN_NB_DOMAIN 
DS_SPN_SERVICE 

Definition at line 60 of file ntdsapi.h.

◆ DS_SPN_WRITE_OP

Enumerator
DS_SPN_ADD_SPN_OP 
DS_SPN_REPLACE_SPN_OP 
DS_SPN_DELETE_SPN_OP 

Definition at line 70 of file ntdsapi.h.

Function Documentation

◆ DsClientMakeSpnForTargetServerA()

DWORD WINAPI DsClientMakeSpnForTargetServerA ( LPCSTR  ,
LPCSTR  ,
DWORD ,
LPSTR   
)

◆ DsClientMakeSpnForTargetServerW()

DWORD WINAPI DsClientMakeSpnForTargetServerW ( LPCWSTR  ,
LPCWSTR  ,
DWORD ,
LPWSTR   
)

Definition at line 209 of file ntdsapi.c.

210 {
211  DWORD len;
212  WCHAR *p;
213 
214  TRACE("(%s,%s,%p,%p)\n", debugstr_w(class), debugstr_w(name), buflen, buf);
215 
216  if (!class || !name || !buflen) return ERROR_INVALID_PARAMETER;
217 
218  len = lstrlenW(class) + 1 + lstrlenW(name) + 1;
219  if (*buflen < len)
220  {
221  *buflen = len;
222  return ERROR_BUFFER_OVERFLOW;
223  }
224  *buflen = len;
225 
226  memcpy(buf, class, lstrlenW(class) * sizeof(WCHAR));
227  p = buf + lstrlenW(class);
228  *p++ = '/';
229  memcpy(p, name, lstrlenW(name) * sizeof(WCHAR));
230  buf[len - 1] = 0;
231 
232  return ERROR_SUCCESS;
233 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define ERROR_SUCCESS
Definition: deptool.c:10
#define ERROR_BUFFER_OVERFLOW
Definition: winerror.h:185
#define lstrlenW
Definition: compat.h:609
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
Definition: name.c:38
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by test_DsClientMakeSpnForTargetServer().

◆ DsCrackNamesA()

DWORD WINAPI DsCrackNamesA ( HANDLE  handle,
DS_NAME_FLAGS  flags,
DS_NAME_FORMAT  offered,
DS_NAME_FORMAT  desired,
DWORD  num,
const CHAR **  names,
PDS_NAME_RESULTA result 
)

Definition at line 238 of file ntdsapi.c.

240 {
241  FIXME("(%p %u %u %u %u %p %p stub\n", handle, flags, offered, desired, num, names, result);
243 }
GLuint64EXT * result
Definition: glext.h:11304
int desired
Definition: jpeglib.h:1119
GLuint GLuint * names
Definition: glext.h:11545
#define FIXME(fmt,...)
Definition: debug.h:111
GLuint GLuint num
Definition: glext.h:9618
GLbitfield flags
Definition: glext.h:7161
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102

◆ DsCrackNamesW()

DWORD WINAPI DsCrackNamesW ( HANDLE  handle,
DS_NAME_FLAGS  flags,
DS_NAME_FORMAT  offered,
DS_NAME_FORMAT  desired,
DWORD  num,
const WCHAR **  names,
PDS_NAME_RESULTW result 
)

Definition at line 248 of file ntdsapi.c.

250 {
251  FIXME("(%p %u %u %u %u %p %p stub\n", handle, flags, offered, desired, num, names, result);
253 }
GLuint64EXT * result
Definition: glext.h:11304
int desired
Definition: jpeglib.h:1119
GLuint GLuint * names
Definition: glext.h:11545
#define FIXME(fmt,...)
Definition: debug.h:111
GLuint GLuint num
Definition: glext.h:9618
GLbitfield flags
Definition: glext.h:7161
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102

◆ DsMakeSpnA()

DWORD WINAPI DsMakeSpnA ( LPCSTR  ,
LPCSTR  ,
LPCSTR  ,
USHORT  ,
LPCSTR  ,
DWORD ,
LPSTR   
)

Definition at line 160 of file ntdsapi.c.

163 {
164  FIXME("(%s,%s,%s,%d,%s,%p,%p): stub!\n", debugstr_a(svc_class),
165  debugstr_a(svc_name), debugstr_a(inst_name), inst_port,
166  debugstr_a(ref), spn_length, spn);
167 
169 }
Definition: send.c:48
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_a
Definition: kernel32.h:31
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102

◆ DsMakeSpnW()

DWORD WINAPI DsMakeSpnW ( LPCWSTR  ,
LPCWSTR  ,
LPCWSTR  ,
USHORT  ,
LPCWSTR  ,
DWORD ,
LPWSTR   
)

Definition at line 70 of file ntdsapi.c.

73 {
74  DWORD new_spn_length;
75  INT len;
76  LPWSTR p;
77 
78  TRACE("(%s,%s,%s,%d,%s,%p,%p)\n", debugstr_w(svc_class),
79  debugstr_w(svc_name), debugstr_w(inst_name), inst_port,
80  debugstr_w(ref), spn_length, spn);
81 
82  if (!svc_class || !svc_name)
84 
85  new_spn_length = lstrlenW(svc_class) + 1 /* for '/' */ + 1 /* for terminating '\0' */;
86  if (inst_name)
87  new_spn_length += lstrlenW(inst_name);
88  else
89  new_spn_length += lstrlenW(svc_name);
90  if (inst_port)
91  {
92  USHORT n = inst_port;
93  new_spn_length += 1 /* for ':' */;
94  do
95  {
96  n /= 10;
97  new_spn_length++;
98  } while (n != 0);
99  }
100  if (inst_name)
101  new_spn_length += 1 /* for '/' */ + lstrlenW(svc_name);
102 
103  if (*spn_length < new_spn_length)
104  {
105  *spn_length = new_spn_length;
106  return ERROR_BUFFER_OVERFLOW;
107  }
108  *spn_length = new_spn_length;
109 
110  p = spn;
111  len = lstrlenW(svc_class);
112  memcpy(p, svc_class, len * sizeof(WCHAR));
113  p += len;
114  *p = '/';
115  p++;
116  if (inst_name)
117  {
118  len = lstrlenW(inst_name);
119  memcpy(p, inst_name, len * sizeof(WCHAR));
120  p += len;
121  *p = '\0';
122  }
123  else
124  {
125  len = lstrlenW(svc_name);
126  memcpy(p, svc_name, len * sizeof(WCHAR));
127  p += len;
128  *p = '\0';
129  }
130 
131  if (inst_port)
132  {
133  static const WCHAR percentU[] = {'%','u',0};
134  *p = ':';
135  p++;
136  wsprintfW(p, percentU, inst_port);
137  p += lstrlenW(p);
138  }
139 
140  if (inst_name)
141  {
142  *p = '/';
143  p++;
144  len = lstrlenW(svc_name);
145  memcpy(p, svc_name, len * sizeof(WCHAR));
146  p += len;
147  *p = '\0';
148  }
149 
150  TRACE("spn = %s\n", debugstr_w(spn));
151 
152  return ERROR_SUCCESS;
153 }
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define ERROR_SUCCESS
Definition: deptool.c:10
#define ERROR_BUFFER_OVERFLOW
Definition: winerror.h:185
GLdouble n
Definition: glext.h:7729
#define lstrlenW
Definition: compat.h:609
int32_t INT
Definition: typedefs.h:58
Definition: send.c:48
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
unsigned short USHORT
Definition: pedump.c:61
GLfloat GLfloat p
Definition: glext.h:8902
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by test_DsMakeSpn().

◆ DsServerRegisterSpnA()

DWORD WINAPI DsServerRegisterSpnA ( DS_SPN_WRITE_OP  operation,
LPCSTR  ServiceClass,
LPCSTR  UserObjectDN 
)

Definition at line 189 of file ntdsapi.c.

190 {
191  FIXME("(%d,%s,%s): stub!\n", operation,
192  debugstr_a(ServiceClass), debugstr_a(UserObjectDN));
194 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_a
Definition: kernel32.h:31
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102

◆ DsServerRegisterSpnW()

DWORD WINAPI DsServerRegisterSpnW ( DS_SPN_WRITE_OP  operation,
LPCWSTR  ServiceClass,
LPCWSTR  UserObjectDN 
)

Definition at line 199 of file ntdsapi.c.

200 {
201  FIXME("(%d,%s,%s): stub!\n", operation,
202  debugstr_w(ServiceClass), debugstr_w(UserObjectDN));
204 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102