mirror of
https://github.com/samba-team/samba.git
synced 2025-12-11 08:23:49 +03:00
Merge branch 'v4-0-trivial' into v4-0-python
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -193,3 +193,5 @@ source/lib/util/apidocs
|
||||
source/lib/util/util_ldb.h
|
||||
source/libcli/ldap/ldap_ndr.h
|
||||
source/libcli/resolve/lp_proto.h
|
||||
source/apidocs
|
||||
*.swp
|
||||
|
||||
7
PFIF.txt
Normal file
7
PFIF.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
This code was developed in participation with the Protocol Freedom
|
||||
Information Foundation.
|
||||
|
||||
Please see
|
||||
http://protocolfreedom.org/ and
|
||||
http://samba.org/samba/PFIF/
|
||||
for more details.
|
||||
@@ -132,7 +132,7 @@ NTSTATUS auth_convert_server_info_saminfo3(TALLOC_CTX *mem_ctx,
|
||||
continue;
|
||||
}
|
||||
sam3->sids[sam3->sidcount].sid = talloc_reference(sam3->sids,server_info->domain_groups[i]);
|
||||
sam3->sids[sam3->sidcount].attribute =
|
||||
sam3->sids[sam3->sidcount].attributes =
|
||||
SE_GROUP_MANDATORY | SE_GROUP_ENABLED_BY_DEFAULT | SE_GROUP_ENABLED;
|
||||
sam3->sidcount += 1;
|
||||
}
|
||||
|
||||
@@ -14,5 +14,5 @@ PRIVATE_DEPENDENCIES = \
|
||||
SECRETS
|
||||
|
||||
[PYTHON::swig_credentials]
|
||||
PUBLIC_DEPENDENCIES = CREDENTIALS
|
||||
PUBLIC_DEPENDENCIES = CREDENTIALS LIBCMDLINE_CREDENTIALS
|
||||
SWIG_FILE = credentials.i
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "includes.h"
|
||||
#include "auth/credentials/credentials.h"
|
||||
#include "param/param.h"
|
||||
#include "lib/cmdline/credentials.h"
|
||||
typedef struct cli_credentials cli_credentials;
|
||||
%}
|
||||
|
||||
@@ -51,7 +52,7 @@ typedef struct cli_credentials cli_credentials;
|
||||
typedef struct cli_credentials {
|
||||
%extend {
|
||||
cli_credentials(void) {
|
||||
return cli_credentials_init(NULL);
|
||||
return cli_credentials_init_anon(NULL);
|
||||
}
|
||||
/* username */
|
||||
const char *get_username(void);
|
||||
@@ -93,6 +94,8 @@ typedef struct cli_credentials {
|
||||
bool authentication_requested(void);
|
||||
|
||||
bool wrong_password(void);
|
||||
|
||||
bool set_cmdline_callbacks();
|
||||
}
|
||||
} cli_credentials;
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ Credentials.is_anonymous = new_instancemethod(_credentials.Credentials_is_anonym
|
||||
Credentials.get_nt_hash = new_instancemethod(_credentials.Credentials_get_nt_hash,None,Credentials)
|
||||
Credentials.authentication_requested = new_instancemethod(_credentials.Credentials_authentication_requested,None,Credentials)
|
||||
Credentials.wrong_password = new_instancemethod(_credentials.Credentials_wrong_password,None,Credentials)
|
||||
Credentials.set_cmdline_callbacks = new_instancemethod(_credentials.Credentials_set_cmdline_callbacks,None,Credentials)
|
||||
Credentials_swigregister = _credentials.Credentials_swigregister
|
||||
Credentials_swigregister(Credentials)
|
||||
|
||||
|
||||
@@ -2521,13 +2521,14 @@ static swig_module_info swig_module = {swig_types, 16, 0, 0, 0, 0};
|
||||
#include "includes.h"
|
||||
#include "auth/credentials/credentials.h"
|
||||
#include "param/param.h"
|
||||
#include "lib/cmdline/credentials.h"
|
||||
typedef struct cli_credentials cli_credentials;
|
||||
|
||||
|
||||
#include "librpc/gen_ndr/samr.h" /* for struct samr_Password */
|
||||
|
||||
SWIGINTERN cli_credentials *new_cli_credentials(){
|
||||
return cli_credentials_init(NULL);
|
||||
return cli_credentials_init_anon(NULL);
|
||||
}
|
||||
|
||||
SWIGINTERN swig_type_info*
|
||||
@@ -3486,6 +3487,34 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_Credentials_set_cmdline_callbacks(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj = 0;
|
||||
cli_credentials *arg1 = (cli_credentials *) 0 ;
|
||||
bool result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
char * kwnames[] = {
|
||||
(char *) "self", NULL
|
||||
};
|
||||
|
||||
arg1 = NULL;
|
||||
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:Credentials_set_cmdline_callbacks",kwnames,&obj0)) SWIG_fail;
|
||||
if (obj0) {
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_set_cmdline_callbacks" "', argument " "1"" of type '" "cli_credentials *""'");
|
||||
}
|
||||
arg1 = (cli_credentials *)(argp1);
|
||||
}
|
||||
result = (bool)cli_credentials_set_cmdline_callbacks(arg1);
|
||||
resultobj = SWIG_From_bool((bool)(result));
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_delete_Credentials(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj = 0;
|
||||
cli_credentials *arg1 = (cli_credentials *) 0 ;
|
||||
@@ -3545,6 +3574,7 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"Credentials_get_nt_hash", (PyCFunction) _wrap_Credentials_get_nt_hash, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"Credentials_authentication_requested", (PyCFunction) _wrap_Credentials_authentication_requested, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"Credentials_wrong_password", (PyCFunction) _wrap_Credentials_wrong_password, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"Credentials_set_cmdline_callbacks", (PyCFunction) _wrap_Credentials_set_cmdline_callbacks, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"delete_Credentials", (PyCFunction) _wrap_delete_Credentials, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"Credentials_swigregister", Credentials_swigregister, METH_VARARGS, NULL},
|
||||
{ (char *)"Credentials_swiginit", Credentials_swiginit, METH_VARARGS, NULL},
|
||||
|
||||
@@ -83,6 +83,9 @@ class CredentialsTests(unittest.TestCase):
|
||||
# Just check the method is there and doesn't raise an exception
|
||||
self.creds.guess()
|
||||
|
||||
def test_set_cmdline_callbacks(self):
|
||||
self.creds.set_cmdline_callbacks()
|
||||
|
||||
def test_authentication_requested(self):
|
||||
self.creds.set_username("")
|
||||
self.assertFalse(self.creds.authentication_requested())
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#################################
|
||||
# Start SUBSYSTEM gensec
|
||||
[LIBRARY::gensec]
|
||||
PC_FILE = gensec.pc
|
||||
VERSION = 0.0.1
|
||||
SO_VERSION = 0
|
||||
DESCRIPTION = Generic Security Library
|
||||
PUBLIC_HEADERS = gensec.h spnego.h
|
||||
PUBLIC_PROTO_HEADER = gensec_proto.h
|
||||
OBJ_FILES = gensec.o socket.o
|
||||
|
||||
11
source/auth/gensec/gensec.pc.in
Normal file
11
source/auth/gensec/gensec.pc.in
Normal file
@@ -0,0 +1,11 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
modulesdir=${prefix}/modules/gensec
|
||||
|
||||
Name: gensec
|
||||
Description: Generic Security Library
|
||||
Version: 0.0.1
|
||||
Libs: -L${libdir} -lgensec
|
||||
Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1
|
||||
@@ -46,3 +46,11 @@ AC_ARG_ENABLE(automatic-dependencies,
|
||||
[ automatic_dependencies=no ])
|
||||
AC_MSG_RESULT($automatic_dependencies)
|
||||
AC_SUBST(automatic_dependencies)
|
||||
|
||||
FIRST_PREREQ="\$*.c"
|
||||
AC_SUBST(FIRST_PREREQ)
|
||||
|
||||
if test x$GNU_MAKE = xyes; then
|
||||
FIRST_PREREQ="\$<"
|
||||
fi
|
||||
|
||||
|
||||
@@ -34,21 +34,20 @@ ENABLE = YES
|
||||
"
|
||||
])
|
||||
|
||||
dnl SMB_LIBRARY(name,description,obj_files,required_subsystems,version,so_version,cflags,ldflags,pcname)
|
||||
dnl SMB_LIBRARY(name,obj_files,required_subsystems,version,so_version,cflags,ldflags,pcname)
|
||||
AC_DEFUN([SMB_LIBRARY],
|
||||
[
|
||||
SMB_INFO_LIBRARIES="$SMB_INFO_LIBRARIES
|
||||
###################################
|
||||
# Start Library $1
|
||||
@<:@LIBRARY::$1@:>@
|
||||
DESCRIPTION = $2
|
||||
OBJ_FILES = $3
|
||||
PRIVATE_DEPENDENCIES = $4
|
||||
VERSION = $5
|
||||
SO_VERSION = $6
|
||||
CFLAGS = $7
|
||||
LDFLAGS = $8
|
||||
PC_NAME = $9
|
||||
OBJ_FILES = $2
|
||||
PRIVATE_DEPENDENCIES = $3
|
||||
VERSION = $4
|
||||
SO_VERSION = $5
|
||||
CFLAGS = $6
|
||||
LDFLAGS = $7
|
||||
PC_NAME = $8
|
||||
ENABLE = YES
|
||||
# End Library $1
|
||||
###################################
|
||||
@@ -77,7 +76,6 @@ AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG],
|
||||
if $PKG_CONFIG --exists '$2' ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
|
||||
$1_CFLAGS="`$PKG_CONFIG --cflags '$2'`"
|
||||
OLD_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $$1_CFLAGS"
|
||||
@@ -89,7 +87,6 @@ AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG],
|
||||
AC_MSG_WARN([cannot run when cross-compiling]))
|
||||
CFLAGS="$OLD_CFLAGS"
|
||||
|
||||
|
||||
SMB_EXT_LIB($1,
|
||||
[`$PKG_CONFIG --libs-only-l '$2'`],
|
||||
[`$PKG_CONFIG --cflags-only-other '$2'`],
|
||||
|
||||
@@ -91,6 +91,7 @@ my $section_types = {
|
||||
"LIBRARY_REALNAME" => "string",
|
||||
|
||||
"PC_NAME" => "string",
|
||||
"PC_FILE" => "string",
|
||||
|
||||
"INIT_FUNCTION_TYPE" => "string",
|
||||
"INIT_FUNCTION_SENTINEL" => "string",
|
||||
@@ -98,8 +99,6 @@ my $section_types = {
|
||||
|
||||
"OBJ_FILES" => "list",
|
||||
|
||||
"DESCRIPTION" => "string",
|
||||
|
||||
"PRIVATE_DEPENDENCIES" => "list",
|
||||
"PUBLIC_DEPENDENCIES" => "list",
|
||||
|
||||
@@ -252,6 +251,8 @@ sub run_config_mk($$$$)
|
||||
next;
|
||||
}
|
||||
|
||||
$line =~ s/^mkinclude /include /;
|
||||
|
||||
# empty line
|
||||
if ($line =~ /^[ \t]*$/) {
|
||||
$section = "GLOBAL";
|
||||
|
||||
@@ -54,64 +54,4 @@ sub _set_config($$)
|
||||
$self->{automatic_deps} = ($self->{config}->{automatic_dependencies} eq "yes");
|
||||
}
|
||||
|
||||
sub PkgConfig($$$$$$$$$$$$)
|
||||
{
|
||||
my ($self,$path,$name,$libs,$privlibs,$cflags,$version,$desc,$hasmodules,$pubdep,$privdep,$dirs) = @_;
|
||||
|
||||
print __FILE__.": creating $path\n";
|
||||
|
||||
if ($self->{config}->{libreplace_cv_immediate_structures} eq "yes") {
|
||||
$cflags .= " -DHAVE_IMMEDIATE_STRUCTURES=1";
|
||||
}
|
||||
|
||||
mkpath(dirname($path),0,0755);
|
||||
open(OUT, ">$path") or die("Can't open $path: $!");
|
||||
|
||||
foreach (@$dirs) {
|
||||
print OUT "$_\n";
|
||||
}
|
||||
if ($hasmodules) {
|
||||
print OUT "modulesdir=$self->{config}->{modulesdir}/$name\n" ;
|
||||
}
|
||||
|
||||
print OUT "\n";
|
||||
|
||||
print OUT "Name: $name\n";
|
||||
if (defined($desc)) {
|
||||
print OUT "Description: $desc\n";
|
||||
}
|
||||
print OUT "Requires: $pubdep\n" if defined($pubdep);
|
||||
print OUT "Requires.private: $privdep\n" if defined($privdep);
|
||||
print OUT "Version: $version\n";
|
||||
print OUT "Libs: $libs\n";
|
||||
print OUT "Libs.private: $privlibs\n" if (defined($privlibs));
|
||||
print OUT "Cflags: -I\${includedir} $cflags\n";
|
||||
|
||||
close(OUT);
|
||||
}
|
||||
|
||||
sub Import($$)
|
||||
{
|
||||
my ($self,$items) = @_;
|
||||
|
||||
foreach (keys %$items) {
|
||||
if (defined($self->{items})) {
|
||||
print "Warning: Importing $_ twice!\n";
|
||||
}
|
||||
$self->{items}->{$_} = $items->{$_};
|
||||
}
|
||||
}
|
||||
|
||||
sub GetInfo($$)
|
||||
{
|
||||
my ($self,$name) = @_;
|
||||
|
||||
unless (defined($self->{info}->{$name}))
|
||||
{
|
||||
$self->{info}->{$name} = $self->{items}->Build($self);
|
||||
}
|
||||
|
||||
return $self->{info}->{$name};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -60,8 +60,9 @@ foreach my $key (values %$OUTPUT) {
|
||||
next unless defined $key->{OUTPUT_TYPE};
|
||||
|
||||
$mkenv->StaticLibrary($key) if grep(/STATIC_LIBRARY/, @{$key->{OUTPUT_TYPE}});
|
||||
$mkenv->PkgConfig($key, $OUTPUT) if $key->{TYPE} eq "LIBRARY"
|
||||
and defined($key->{VERSION});
|
||||
if (defined($key->{PC_FILE})) {
|
||||
push(@{$mkenv->{pc_files}}, "$key->{BASEDIR}/$key->{PC_FILE}");
|
||||
}
|
||||
$mkenv->SharedLibrary($key) if ($key->{TYPE} eq "LIBRARY") and
|
||||
grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}});
|
||||
if ($key->{TYPE} eq "LIBRARY" and
|
||||
|
||||
@@ -111,53 +111,9 @@ __EOD__
|
||||
sub _prepare_suffix_rules($)
|
||||
{
|
||||
my ($self) = @_;
|
||||
my $first_prereq = '$*.c';
|
||||
|
||||
if ($self->{config}->{GNU_MAKE} eq 'yes') {
|
||||
$first_prereq = '$<';
|
||||
}
|
||||
|
||||
$self->output(<< "__EOD__"
|
||||
FIRST_PREREQ = $first_prereq
|
||||
|
||||
# Dependencies command
|
||||
DEPENDS = \$(CC) -M -MG -MP -MT \$(<:.c=.o) -MT \$@ \\
|
||||
\$(CFLAGS) `\$(PERL) \$(srcdir)/script/cflags.pl \$@` \\
|
||||
\$(CPPFLAGS) \$(FIRST_PREREQ) -o \$@
|
||||
# Dependencies for host objects
|
||||
HDEPENDS = \$(CC) -M -MG -MP -MT \$(<:.c=.ho) -MT \$@ \\
|
||||
\$(HOSTCC_FLAGS) `\$(PERL) \$(srcdir)/script/cflags.pl \$@` \\
|
||||
\$(CPPFLAGS) \$(FIRST_PREREQ) -o \$@
|
||||
# Dependencies for precompiled headers
|
||||
PCHDEPENDS = \$(CC) -M -MG -MT include/includes.h.gch -MT \$@ \\
|
||||
\$(CFLAGS) \$(CPPFLAGS) \$(FIRST_PREREQ) -o \$@
|
||||
|
||||
# \$< is broken in older BSD versions:
|
||||
# when \$@ is foo/bar.o, \$< could be torture/foo/bar.c
|
||||
# if it also exists. So better use \$* which is foo/bar
|
||||
# and append .c manually to get foo/bar.c
|
||||
#
|
||||
# If we have GNU Make, it is safe to use \$<, which also lets
|
||||
# building with \$srcdir != \$builddir work.
|
||||
|
||||
# Run a static analysis checker
|
||||
CHECK = \$(CC_CHECKER) \$(CFLAGS) `\$(PERL) \$(srcdir)/script/cflags.pl \$@` \\
|
||||
\$(PICFLAG) \$(CPPLAGS) -c \$(FIRST_PREREQ) -o \$@
|
||||
|
||||
# Run the configured compiler
|
||||
COMPILE = \$(CC) \$(CFLAGS) \$(PICFLAG) \\
|
||||
`\$(PERL) \$(srcdir)/script/cflags.pl \$@` \\
|
||||
\$(CPPFLAGS) \\
|
||||
-c \$(FIRST_PREREQ) -o \$@
|
||||
|
||||
# Run the compiler for the build host
|
||||
HCOMPILE = \$(HOSTCC) \$(HOSTCC_FLAGS) `\$(PERL) \$(srcdir)/script/cflags.pl \$@` \\
|
||||
\$(CPPFLAGS) -c \$(FIRST_PREREQ) -o \$@
|
||||
|
||||
# Precompile headers
|
||||
PCHCOMPILE = @\$(CC) -Ilib/replace \\
|
||||
\$(CFLAGS) `\$(PERL) \$(srcdir)/script/cflags.pl \$@` \\
|
||||
\$(PICFLAG) \$(CPPFLAGS) -c \$(FIRST_PREREQ) -o \$@
|
||||
FIRST_PREREQ = $self->{config}->{FIRST_PREREQ}
|
||||
|
||||
__EOD__
|
||||
);
|
||||
@@ -500,7 +456,6 @@ sub Binary($$)
|
||||
push (@{$self->{torture_progs}}, "$installdir/$ctx->{BINARY}");
|
||||
}
|
||||
|
||||
|
||||
push (@{$self->{binaries}}, "$localdir/$ctx->{BINARY}");
|
||||
|
||||
$self->_prepare_list($ctx, "OBJ_LIST");
|
||||
@@ -552,115 +507,6 @@ sub Manpage($$)
|
||||
push (@{$self->{manpages}}, $path);
|
||||
}
|
||||
|
||||
sub PkgConfig($$$)
|
||||
{
|
||||
my ($self,$ctx,$other) = @_;
|
||||
|
||||
my $link_name = $ctx->{NAME};
|
||||
|
||||
$link_name =~ s/^LIB//g;
|
||||
$link_name = lc($link_name);
|
||||
|
||||
return if (not defined($ctx->{DESCRIPTION}));
|
||||
|
||||
my $path = output::add_dir_str($ctx->{BASEDIR}, "$link_name.pc");
|
||||
|
||||
push (@{$self->{pc_files}}, $path);
|
||||
|
||||
my $pubs;
|
||||
my $privs;
|
||||
my $privlibs;
|
||||
my $publibs = "";
|
||||
|
||||
if (defined($ctx->{PUBLIC_DEPENDENCIES})) {
|
||||
foreach (@{$ctx->{PUBLIC_DEPENDENCIES}}) {
|
||||
next if ($other->{$_}->{ENABLE} eq "NO");
|
||||
if (defined($other->{$_}->{PC_NAME})) {
|
||||
$pubs .= "$other->{$_}->{PC_NAME} ";
|
||||
} elsif ($other->{$_}->{TYPE} eq "EXT_LIB") {
|
||||
my $e = $other->{$_};
|
||||
my $ldflags = join(" ", @{$e->{LDFLAGS}});
|
||||
$ldflags .= " " unless $ldflags eq "";
|
||||
my $libs = join(" ", @{$e->{LIBS}});
|
||||
$libs .= " " unless $libs eq "";
|
||||
|
||||
$publibs .= $ldflags.$libs;
|
||||
} else {
|
||||
s/^LIB//g;
|
||||
$_ = lc($_);
|
||||
|
||||
$privlibs .= "-l$_ ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (defined($ctx->{PRIVATE_DEPENDENCIES})) {
|
||||
foreach (@{$ctx->{PRIVATE_DEPENDENCIES}}) {
|
||||
next if ($other->{$_}->{ENABLE} eq "NO");
|
||||
if ($other->{$_}->{TYPE} eq "EXT_LIB") {
|
||||
my $e = $other->{$_};
|
||||
|
||||
my $ldflags = join(" ", @{$e->{LDFLAGS}});
|
||||
$ldflags .= " " unless $ldflags eq "";
|
||||
my $libs = join(" ", @{$e->{LIBS}});
|
||||
$libs .= " " unless $libs eq "";
|
||||
|
||||
$privlibs .= $ldflags.$libs;
|
||||
} elsif ($other->{$_}->{TYPE} eq "LIBRARY") {
|
||||
s/^LIB//g;
|
||||
$_ = lc($_);
|
||||
|
||||
$privs .= "$_ ";
|
||||
} else {
|
||||
s/^LIB//g;
|
||||
$_ = lc($_);
|
||||
|
||||
$privlibs .= "-l$_ ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
smb_build::env::PkgConfig($self,
|
||||
$path,
|
||||
$link_name,
|
||||
"-L\${libdir} -l$link_name $publibs",
|
||||
$privlibs,
|
||||
"",
|
||||
"$ctx->{VERSION}",
|
||||
$ctx->{DESCRIPTION},
|
||||
defined($ctx->{INIT_FUNCTIONS}),
|
||||
$pubs,
|
||||
"",
|
||||
[
|
||||
"prefix=$self->{config}->{prefix}",
|
||||
"exec_prefix=$self->{config}->{exec_prefix}",
|
||||
"libdir=$self->{config}->{libdir}",
|
||||
"includedir=$self->{config}->{includedir}"
|
||||
]
|
||||
);
|
||||
my $abs_srcdir = abs_path($self->{config}->{srcdir});
|
||||
smb_build::env::PkgConfig($self,
|
||||
"bin/pkgconfig/$link_name-uninstalled.pc",
|
||||
$link_name,
|
||||
"-Lbin/shared -Lbin/static -l$link_name",
|
||||
$privlibs,
|
||||
join(' ',
|
||||
"-I$abs_srcdir",
|
||||
"-I$abs_srcdir/include",
|
||||
"-I$abs_srcdir/lib",
|
||||
"-I$abs_srcdir/lib/replace"),
|
||||
"$ctx->{VERSION}",
|
||||
$ctx->{DESCRIPTION},
|
||||
defined($ctx->{INIT_FUNCTIONS}),
|
||||
$pubs,
|
||||
$privs,
|
||||
[
|
||||
"prefix=bin/",
|
||||
"includedir=$ctx->{BASEDIR}"
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
sub ProtoHeader($$)
|
||||
{
|
||||
my ($self,$ctx) = @_;
|
||||
|
||||
@@ -204,19 +204,10 @@ static void cldapd_task_init(struct task_server *task)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
initialise the cldapd server
|
||||
*/
|
||||
static NTSTATUS cldapd_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops)
|
||||
{
|
||||
return task_server_startup(event_ctx, lp_ctx, model_ops, cldapd_task_init);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
register ourselves as a available server
|
||||
*/
|
||||
NTSTATUS server_service_cldapd_init(void)
|
||||
{
|
||||
return register_server_service("cldap", cldapd_init);
|
||||
return register_server_service("cldap", cldapd_task_init);
|
||||
}
|
||||
|
||||
@@ -47,12 +47,12 @@ static void cluster_init(void)
|
||||
}
|
||||
|
||||
/*
|
||||
server a server_id for the local node
|
||||
create a server_id for the local node
|
||||
*/
|
||||
struct server_id cluster_id(uint32_t id)
|
||||
struct server_id cluster_id(uint64_t id, uint32_t id2)
|
||||
{
|
||||
cluster_init();
|
||||
return ops->cluster_id(ops, id);
|
||||
return ops->cluster_id(ops, id, id2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
/*
|
||||
test for same cluster id
|
||||
*/
|
||||
#define cluster_id_equal(id1, id2) ((id1)->id == (id2)->id && (id1)->node == (id2)->node)
|
||||
#define cluster_id_equal(id_1, id_2) ((id_1)->id == (id_2)->id \
|
||||
&& (id_1)->id2 == (id_2)->id2 \
|
||||
&& (id_1)->node == (id_2)->node)
|
||||
|
||||
/*
|
||||
test for same cluster node
|
||||
@@ -36,7 +38,7 @@ struct messaging_context;
|
||||
typedef void (*cluster_message_fn_t)(struct messaging_context *, DATA_BLOB);
|
||||
|
||||
/* prototypes */
|
||||
struct server_id cluster_id(uint32_t id);
|
||||
struct server_id cluster_id(uint64_t id, uint32_t id2);
|
||||
const char *cluster_id_string(TALLOC_CTX *mem_ctx, struct server_id id);
|
||||
struct tdb_wrap *cluster_tdb_tmp_open(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, const char *dbname, int flags);
|
||||
void *cluster_backend_handle(void);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#define _CLUSTER_PRIVATE_H_
|
||||
|
||||
struct cluster_ops {
|
||||
struct server_id (*cluster_id)(struct cluster_ops *ops, uint32_t id);
|
||||
struct server_id (*cluster_id)(struct cluster_ops *ops, uint64_t id, uint32_t id2);
|
||||
const char *(*cluster_id_string)(struct cluster_ops *ops,
|
||||
TALLOC_CTX *, struct server_id );
|
||||
struct tdb_wrap *(*cluster_tdb_tmp_open)(struct cluster_ops *,
|
||||
|
||||
@@ -52,13 +52,14 @@ struct cluster_state {
|
||||
/*
|
||||
return a server_id for a ctdb node
|
||||
*/
|
||||
static struct server_id ctdb_id(struct cluster_ops *ops, uint32_t id)
|
||||
static struct server_id ctdb_id(struct cluster_ops *ops, uint64_t id, uint32_t id2)
|
||||
{
|
||||
struct cluster_state *state = (struct cluster_state *)ops->private;
|
||||
struct ctdb_context *ctdb = state->ctdb;
|
||||
struct server_id server_id;
|
||||
server_id.node = ctdb_get_vnn(ctdb);
|
||||
server_id.id = id;
|
||||
server_id.id2 = id2;
|
||||
return server_id;
|
||||
}
|
||||
|
||||
@@ -69,7 +70,7 @@ static struct server_id ctdb_id(struct cluster_ops *ops, uint32_t id)
|
||||
static const char *ctdb_id_string(struct cluster_ops *ops,
|
||||
TALLOC_CTX *mem_ctx, struct server_id id)
|
||||
{
|
||||
return talloc_asprintf(mem_ctx, "%u.%u", id.node, id.id);
|
||||
return talloc_asprintf(mem_ctx, "%u.%llu.%u", id.node, (unsigned long long)id.id, id.id2);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -31,11 +31,12 @@
|
||||
/*
|
||||
server a server_id for the local node
|
||||
*/
|
||||
static struct server_id local_id(struct cluster_ops *ops, uint32_t id)
|
||||
static struct server_id local_id(struct cluster_ops *ops, uint64_t id, uint32_t id2)
|
||||
{
|
||||
struct server_id server_id;
|
||||
ZERO_STRUCT(server_id);
|
||||
server_id.id = id;
|
||||
server_id.id2 = id2;
|
||||
return server_id;
|
||||
}
|
||||
|
||||
@@ -46,7 +47,7 @@ static struct server_id local_id(struct cluster_ops *ops, uint32_t id)
|
||||
static const char *local_id_string(struct cluster_ops *ops,
|
||||
TALLOC_CTX *mem_ctx, struct server_id id)
|
||||
{
|
||||
return talloc_asprintf(mem_ctx, "%u.%u", id.node, id.id);
|
||||
return talloc_asprintf(mem_ctx, "%u.%llu.%u", id.node, (unsigned long long)id.id, id.id2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -27,11 +27,20 @@ m4_include(lib/charset/config.m4)
|
||||
m4_include(lib/socket/config.m4)
|
||||
m4_include(nsswitch/nsstest.m4)
|
||||
|
||||
AC_CONFIG_FILES(lib/registry/registry.pc)
|
||||
AC_CONFIG_FILES(librpc/dcerpc.pc)
|
||||
AC_CONFIG_FILES(librpc/ndr.pc)
|
||||
AC_CONFIG_FILES(torture/torture.pc)
|
||||
AC_CONFIG_FILES(auth/gensec/gensec.pc)
|
||||
AC_CONFIG_FILES(param/samba-config.pc)
|
||||
AC_CONFIG_FILES(librpc/dcerpc_samr.pc)
|
||||
|
||||
SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.1.0,
|
||||
[],
|
||||
[
|
||||
m4_include(lib/talloc/libtalloc.m4)
|
||||
SMB_INCLUDE_MK(lib/talloc/config.mk)
|
||||
AC_CONFIG_FILES(lib/talloc/talloc.pc)
|
||||
]
|
||||
)
|
||||
|
||||
@@ -40,6 +49,7 @@ SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= 1.1.0,
|
||||
[
|
||||
m4_include(lib/tdb/libtdb.m4)
|
||||
SMB_INCLUDE_MK(lib/tdb/config.mk)
|
||||
AC_CONFIG_FILES(lib/tdb/tdb.pc)
|
||||
]
|
||||
)
|
||||
|
||||
@@ -73,6 +83,7 @@ SMB_EXT_LIB_FROM_PKGCONFIG(LIBLDB, ldb >= 0.9.1,
|
||||
m4_include(lib/ldb/sqlite3.m4)
|
||||
m4_include(lib/ldb/libldb.m4)
|
||||
SMB_INCLUDE_MK(lib/ldb/config.mk)
|
||||
AC_CONFIG_FILES(lib/ldb/ldb.pc)
|
||||
]
|
||||
)
|
||||
SMB_INCLUDE_MK(lib/ldb/python.mk)
|
||||
|
||||
@@ -124,7 +124,7 @@ static NTSTATUS sidmap_primary_domain_sid(struct sidmap_context *sidmap,
|
||||
map a sid to a unix uid
|
||||
*/
|
||||
_PUBLIC_ NTSTATUS sidmap_sid_to_unixuid(struct sidmap_context *sidmap,
|
||||
struct dom_sid *sid, uid_t *uid)
|
||||
const struct dom_sid *sid, uid_t *uid)
|
||||
{
|
||||
const char *attrs[] = { "sAMAccountName", "uidNumber",
|
||||
"sAMAccountType", "unixName", NULL };
|
||||
@@ -138,7 +138,9 @@ _PUBLIC_ NTSTATUS sidmap_sid_to_unixuid(struct sidmap_context *sidmap,
|
||||
tmp_ctx = talloc_new(sidmap);
|
||||
|
||||
ret = gendb_search(sidmap->samctx, tmp_ctx, NULL, &res, attrs,
|
||||
"objectSid=%s", ldap_encode_ndr_dom_sid(tmp_ctx, sid));
|
||||
"objectSid=%s",
|
||||
ldap_encode_ndr_dom_sid(tmp_ctx, sid));
|
||||
|
||||
if (ret != 1) {
|
||||
goto allocated_sid;
|
||||
}
|
||||
@@ -261,7 +263,7 @@ _PUBLIC_ bool sidmap_sid_is_group(struct sidmap_context *sidmap, struct dom_sid
|
||||
map a sid to a unix gid
|
||||
*/
|
||||
_PUBLIC_ NTSTATUS sidmap_sid_to_unixgid(struct sidmap_context *sidmap,
|
||||
struct dom_sid *sid, gid_t *gid)
|
||||
const struct dom_sid *sid, gid_t *gid)
|
||||
{
|
||||
const char *attrs[] = { "sAMAccountName", "gidNumber",
|
||||
"unixName", "sAMAccountType", NULL };
|
||||
@@ -355,7 +357,7 @@ allocated_sid:
|
||||
*/
|
||||
_PUBLIC_ NTSTATUS sidmap_uid_to_sid(struct sidmap_context *sidmap,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
uid_t uid, struct dom_sid **sid)
|
||||
const uid_t uid, struct dom_sid **sid)
|
||||
{
|
||||
const char *attrs[] = { "sAMAccountName", "objectSid", "sAMAccountType", NULL };
|
||||
int ret, i;
|
||||
@@ -453,7 +455,7 @@ allocate_sid:
|
||||
*/
|
||||
_PUBLIC_ NTSTATUS sidmap_gid_to_sid(struct sidmap_context *sidmap,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
gid_t gid, struct dom_sid **sid)
|
||||
const gid_t gid, struct dom_sid **sid)
|
||||
{
|
||||
const char *attrs[] = { "sAMAccountName", "objectSid", "sAMAccountType", NULL };
|
||||
int ret, i;
|
||||
|
||||
@@ -180,18 +180,10 @@ static void dreplsrv_task_init(struct task_server *task)
|
||||
irpc_add_name(task->msg_ctx, "dreplsrv");
|
||||
}
|
||||
|
||||
/*
|
||||
initialise the dsdb replicator service
|
||||
*/
|
||||
static NTSTATUS dreplsrv_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops)
|
||||
{
|
||||
return task_server_startup(event_ctx, lp_ctx, model_ops, dreplsrv_task_init);
|
||||
}
|
||||
|
||||
/*
|
||||
register ourselves as a available server
|
||||
*/
|
||||
NTSTATUS server_service_drepl_init(void)
|
||||
{
|
||||
return register_server_service("drepl", dreplsrv_init);
|
||||
return register_server_service("drepl", dreplsrv_task_init);
|
||||
}
|
||||
|
||||
@@ -400,8 +400,8 @@ WERROR dsdb_extended_replicated_objects_commit(struct ldb_context *ldb,
|
||||
|
||||
ret = ldb_extended(ldb, DSDB_EXTENDED_REPLICATED_OBJECTS_OID, out, &ext_res);
|
||||
if (ret != LDB_SUCCESS) {
|
||||
DEBUG(0,("Failed to apply records: %d: %s\n",
|
||||
ret, ldb_strerror(ret)));
|
||||
DEBUG(0,("Failed to apply records: %s: %s\n",
|
||||
ldb_errstring(ldb), ldb_strerror(ret)));
|
||||
talloc_free(out);
|
||||
return WERR_FOOBAR;
|
||||
}
|
||||
|
||||
@@ -256,6 +256,7 @@ static int extended_search(struct ldb_module *module, struct ldb_request *req)
|
||||
|
||||
ac = talloc(req, struct extended_context);
|
||||
if (ac == NULL) {
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
@@ -273,6 +274,7 @@ static int extended_search(struct ldb_module *module, struct ldb_request *req)
|
||||
|
||||
down_req = talloc_zero(req, struct ldb_request);
|
||||
if (down_req == NULL) {
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
@@ -291,8 +293,10 @@ static int extended_search(struct ldb_module *module, struct ldb_request *req)
|
||||
}
|
||||
if (ac->remove_guid || ac->remove_sid) {
|
||||
new_attrs = copy_attrs(down_req, req->op.search.attrs);
|
||||
if (new_attrs == NULL)
|
||||
if (new_attrs == NULL) {
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
if (ac->remove_guid) {
|
||||
if (!add_attrs(down_req, &new_attrs, "objectGUID"))
|
||||
@@ -339,6 +343,7 @@ static int extended_init(struct ldb_module *module)
|
||||
|
||||
req = talloc(module, struct ldb_request);
|
||||
if (req == NULL) {
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ static int instancetype_add(struct ldb_module *module, struct ldb_request *req)
|
||||
|
||||
down_req = talloc(req, struct ldb_request);
|
||||
if (down_req == NULL) {
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
@@ -81,6 +82,7 @@ static int instancetype_add(struct ldb_module *module, struct ldb_request *req)
|
||||
down_req->op.add.message = msg = ldb_msg_copy_shallow(down_req, req->op.add.message);
|
||||
if (msg == NULL) {
|
||||
talloc_free(down_req);
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
|
||||
@@ -316,6 +316,7 @@ static int kludge_acl_search(struct ldb_module *module, struct ldb_request *req)
|
||||
|
||||
ac = talloc(req, struct kludge_acl_context);
|
||||
if (ac == NULL) {
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
@@ -329,6 +330,7 @@ static int kludge_acl_search(struct ldb_module *module, struct ldb_request *req)
|
||||
|
||||
down_req = talloc_zero(req, struct ldb_request);
|
||||
if (down_req == NULL) {
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
@@ -417,6 +419,7 @@ static int kludge_acl_init(struct ldb_module *module)
|
||||
|
||||
data = talloc(module, struct kludge_private_data);
|
||||
if (data == NULL) {
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
@@ -424,6 +427,7 @@ static int kludge_acl_init(struct ldb_module *module)
|
||||
module->private_data = data;
|
||||
|
||||
if (!mem_ctx) {
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
@@ -453,6 +457,7 @@ static int kludge_acl_init(struct ldb_module *module)
|
||||
data->password_attrs = talloc_array(data, const char *, password_attributes->num_values + 1);
|
||||
if (!data->password_attrs) {
|
||||
talloc_free(mem_ctx);
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
for (i=0; i < password_attributes->num_values; i++) {
|
||||
|
||||
@@ -153,8 +153,10 @@ static int rr_search(struct ldb_module *module, struct ldb_request *req)
|
||||
if (strncasecmp(p, ";range=", strlen(";range=")) != 0) {
|
||||
continue;
|
||||
}
|
||||
if (sscanf(p, ";range=%u-*", &start) == 1) {
|
||||
} else if (sscanf(p, ";range=%u-%u", &start, &end) != 2) {
|
||||
if (sscanf(p, ";range=%u-%u", &start, &end) == 2) {
|
||||
} else if (sscanf(p, ";range=%u-*", &start) == 1) {
|
||||
end = (unsigned int)-1;
|
||||
} else {
|
||||
ldb_asprintf_errstring(module->ldb, "range request error: range requst malformed");
|
||||
return LDB_ERR_UNWILLING_TO_PERFORM;
|
||||
}
|
||||
|
||||
@@ -240,12 +240,9 @@ static int replmd_prepare_originating(struct ldb_module *module, struct ldb_requ
|
||||
struct ldb_dn *dn, const char *fn_name,
|
||||
int (*fn)(struct ldb_module *,
|
||||
struct ldb_request *,
|
||||
const struct dsdb_schema *,
|
||||
const struct dsdb_control_current_partition *))
|
||||
const struct dsdb_schema *))
|
||||
{
|
||||
const struct dsdb_schema *schema;
|
||||
const struct ldb_control *partition_ctrl;
|
||||
const struct dsdb_control_current_partition *partition;
|
||||
|
||||
/* do not manipulate our control entries */
|
||||
if (ldb_dn_is_special(dn)) {
|
||||
@@ -260,46 +257,16 @@ static int replmd_prepare_originating(struct ldb_module *module, struct ldb_requ
|
||||
return LDB_ERR_CONSTRAINT_VIOLATION;
|
||||
}
|
||||
|
||||
partition_ctrl = ldb_request_get_control(req, DSDB_CONTROL_CURRENT_PARTITION_OID);
|
||||
if (!partition_ctrl) {
|
||||
ldb_debug_set(module->ldb, LDB_DEBUG_FATAL,
|
||||
"%s: no current partition control found",
|
||||
fn_name);
|
||||
return LDB_ERR_CONSTRAINT_VIOLATION;
|
||||
}
|
||||
|
||||
partition = talloc_get_type(partition_ctrl->data,
|
||||
struct dsdb_control_current_partition);
|
||||
if (!partition) {
|
||||
ldb_debug_set(module->ldb, LDB_DEBUG_FATAL,
|
||||
"%s: current partition control contains invalid data",
|
||||
fn_name);
|
||||
return LDB_ERR_CONSTRAINT_VIOLATION;
|
||||
}
|
||||
|
||||
if (partition->version != DSDB_CONTROL_CURRENT_PARTITION_VERSION) {
|
||||
ldb_debug_set(module->ldb, LDB_DEBUG_FATAL,
|
||||
"%s: current partition control contains invalid version [%u != %u]\n",
|
||||
fn_name, partition->version, DSDB_CONTROL_CURRENT_PARTITION_VERSION);
|
||||
return LDB_ERR_CONSTRAINT_VIOLATION;
|
||||
}
|
||||
|
||||
return fn(module, req, schema, partition);
|
||||
return fn(module, req, schema);
|
||||
}
|
||||
|
||||
static int replmd_add_originating(struct ldb_module *module,
|
||||
struct ldb_request *req,
|
||||
const struct dsdb_schema *schema,
|
||||
const struct dsdb_control_current_partition *partition)
|
||||
const struct dsdb_schema *schema)
|
||||
{
|
||||
enum ndr_err_code ndr_err;
|
||||
struct ldb_request *down_req;
|
||||
struct ldb_message *msg;
|
||||
uint32_t instance_type;
|
||||
struct ldb_dn *new_dn;
|
||||
const char *rdn_name;
|
||||
const char *rdn_name_upper;
|
||||
const struct ldb_val *rdn_value = NULL;
|
||||
const struct dsdb_attribute *rdn_attr = NULL;
|
||||
struct GUID guid;
|
||||
struct ldb_val guid_value;
|
||||
@@ -321,12 +288,6 @@ static int replmd_add_originating(struct ldb_module *module,
|
||||
return LDB_ERR_UNWILLING_TO_PERFORM;
|
||||
}
|
||||
|
||||
if (ldb_msg_find_element(req->op.add.message, "instanceType")) {
|
||||
ldb_debug_set(module->ldb, LDB_DEBUG_ERROR,
|
||||
"replmd_add_originating: it's not allowed to add an object with instanceType\n");
|
||||
return LDB_ERR_UNWILLING_TO_PERFORM;
|
||||
}
|
||||
|
||||
/* Get a sequence number from the backend */
|
||||
ret = ldb_sequence_number(module->ldb, LDB_SEQ_NEXT, &seq_num);
|
||||
if (ret != LDB_SUCCESS) {
|
||||
@@ -368,102 +329,24 @@ static int replmd_add_originating(struct ldb_module *module,
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
/*
|
||||
* get details of the rdn name
|
||||
*/
|
||||
rdn_name = ldb_dn_get_rdn_name(msg->dn);
|
||||
if (!rdn_name) {
|
||||
talloc_free(down_req);
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
rdn_attr = dsdb_attribute_by_lDAPDisplayName(schema, rdn_name);
|
||||
if (!rdn_attr) {
|
||||
talloc_free(down_req);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
rdn_value = ldb_dn_get_rdn_val(msg->dn);
|
||||
if (!rdn_value) {
|
||||
talloc_free(down_req);
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
/*
|
||||
* remove autogenerated attributes
|
||||
*/
|
||||
ldb_msg_remove_attr(msg, rdn_name);
|
||||
ldb_msg_remove_attr(msg, "name");
|
||||
ldb_msg_remove_attr(msg, "whenCreated");
|
||||
ldb_msg_remove_attr(msg, "whenChanged");
|
||||
ldb_msg_remove_attr(msg, "uSNCreated");
|
||||
ldb_msg_remove_attr(msg, "uSNChanged");
|
||||
ldb_msg_remove_attr(msg, "replPropertyMetaData");
|
||||
|
||||
/*
|
||||
* TODO: construct a new DN out of:
|
||||
* - the parent DN
|
||||
* - the upper case of rdn_attr->LDAPDisplayName
|
||||
* - rdn_value
|
||||
*/
|
||||
new_dn = ldb_dn_copy(msg, msg->dn);
|
||||
if (!new_dn) {
|
||||
talloc_free(down_req);
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
rdn_name_upper = strupper_talloc(msg, rdn_attr->lDAPDisplayName);
|
||||
if (!rdn_name_upper) {
|
||||
talloc_free(down_req);
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
ret = ldb_dn_set_component(new_dn, 0, rdn_name_upper, *rdn_value);
|
||||
if (ret != LDB_SUCCESS) {
|
||||
talloc_free(down_req);
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
msg->dn = new_dn;
|
||||
|
||||
/*
|
||||
* TODO: calculate correct instance type
|
||||
*/
|
||||
instance_type = INSTANCE_TYPE_WRITE;
|
||||
if (ldb_dn_compare(partition->dn, msg->dn) == 0) {
|
||||
instance_type |= INSTANCE_TYPE_IS_NC_HEAD;
|
||||
if (ldb_dn_compare(msg->dn, samdb_base_dn(module->ldb)) != 0) {
|
||||
instance_type |= INSTANCE_TYPE_NC_ABOVE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* readd replicated attributes
|
||||
*/
|
||||
ret = ldb_msg_add_value(msg, rdn_attr->lDAPDisplayName, rdn_value, NULL);
|
||||
if (ret != LDB_SUCCESS) {
|
||||
talloc_free(down_req);
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
ret = ldb_msg_add_value(msg, "name", rdn_value, NULL);
|
||||
if (ret != LDB_SUCCESS) {
|
||||
talloc_free(down_req);
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
ret = ldb_msg_add_string(msg, "whenCreated", time_str);
|
||||
if (ret != LDB_SUCCESS) {
|
||||
talloc_free(down_req);
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
ret = ldb_msg_add_fmt(msg, "instanceType", "%u", instance_type);
|
||||
if (ret != LDB_SUCCESS) {
|
||||
talloc_free(down_req);
|
||||
ldb_oom(module->ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
/* build the replication meta_data */
|
||||
ZERO_STRUCT(nmd);
|
||||
@@ -508,6 +391,10 @@ static int replmd_add_originating(struct ldb_module *module,
|
||||
m->originating_usn = seq_num;
|
||||
m->local_usn = seq_num;
|
||||
ni++;
|
||||
|
||||
if (ldb_attr_cmp(e->name, ldb_dn_get_rdn_name(msg->dn))) {
|
||||
rdn_attr = sa;
|
||||
}
|
||||
}
|
||||
|
||||
/* fix meta data count */
|
||||
@@ -598,8 +485,7 @@ static int replmd_add(struct ldb_module *module, struct ldb_request *req)
|
||||
|
||||
static int replmd_modify_originating(struct ldb_module *module,
|
||||
struct ldb_request *req,
|
||||
const struct dsdb_schema *schema,
|
||||
const struct dsdb_control_current_partition *partition)
|
||||
const struct dsdb_schema *schema)
|
||||
{
|
||||
struct ldb_request *down_req;
|
||||
struct ldb_message *msg;
|
||||
@@ -623,6 +509,18 @@ static int replmd_modify_originating(struct ldb_module *module,
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
/* TODO:
|
||||
* - get the whole old object
|
||||
* - if the old object doesn't exist report an error
|
||||
* - give an error when a readonly attribute should
|
||||
* be modified
|
||||
* - merge the changed into the old object
|
||||
* if the caller set values to the same value
|
||||
* ignore the attribute, return success when no
|
||||
* attribute was changed
|
||||
* - calculate the new replPropertyMetaData attribute
|
||||
*/
|
||||
|
||||
if (add_time_element(msg, "whenChanged", t) != 0) {
|
||||
talloc_free(down_req);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
@@ -637,6 +535,11 @@ static int replmd_modify_originating(struct ldb_module *module,
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO:
|
||||
* - sort the attributes by attid with replmd_ldb_message_sort()
|
||||
* - replace the old object with the newly constructed one
|
||||
*/
|
||||
|
||||
ldb_set_timeout_from_prev_req(module->ldb, req, down_req);
|
||||
|
||||
/* go on with the call chain */
|
||||
@@ -806,10 +709,16 @@ static int replmd_replicated_apply_add(struct replmd_replicated_request *ar)
|
||||
return ldb_next_request(ar->module, ar->sub.change_req);
|
||||
#else
|
||||
ret = ldb_next_request(ar->module, ar->sub.change_req);
|
||||
if (ret != LDB_SUCCESS) return replmd_replicated_request_error(ar, ret);
|
||||
if (ret != LDB_SUCCESS) {
|
||||
ldb_asprintf_errstring(ar->module->ldb, "Failed to add replicated object %s: %s", ldb_dn_get_linearized(ar->sub.change_req->op.add.message->dn),
|
||||
ldb_errstring(ar->module->ldb));
|
||||
return replmd_replicated_request_error(ar, ret);
|
||||
}
|
||||
|
||||
ar->sub.change_ret = ldb_wait(ar->sub.search_req->handle, LDB_WAIT_ALL);
|
||||
ar->sub.change_ret = ldb_wait(ar->sub.change_req->handle, LDB_WAIT_ALL);
|
||||
if (ar->sub.change_ret != LDB_SUCCESS) {
|
||||
ldb_asprintf_errstring(ar->module->ldb, "Failed while waiting on add replicated object %s: %s", ldb_dn_get_linearized(ar->sub.change_req->op.add.message->dn),
|
||||
ldb_errstring(ar->module->ldb));
|
||||
return replmd_replicated_request_error(ar, ar->sub.change_ret);
|
||||
}
|
||||
|
||||
@@ -1053,7 +962,7 @@ static int replmd_replicated_apply_merge(struct replmd_replicated_request *ar)
|
||||
ret = ldb_next_request(ar->module, ar->sub.change_req);
|
||||
if (ret != LDB_SUCCESS) return replmd_replicated_request_error(ar, ret);
|
||||
|
||||
ar->sub.change_ret = ldb_wait(ar->sub.search_req->handle, LDB_WAIT_ALL);
|
||||
ar->sub.change_ret = ldb_wait(ar->sub.change_req->handle, LDB_WAIT_ALL);
|
||||
if (ar->sub.change_ret != LDB_SUCCESS) {
|
||||
return replmd_replicated_request_error(ar, ar->sub.change_ret);
|
||||
}
|
||||
@@ -1137,7 +1046,7 @@ static int replmd_replicated_apply_search(struct replmd_replicated_request *ar)
|
||||
if (ret != LDB_SUCCESS) return replmd_replicated_request_error(ar, ret);
|
||||
|
||||
ar->sub.search_ret = ldb_wait(ar->sub.search_req->handle, LDB_WAIT_ALL);
|
||||
if (ar->sub.search_ret != LDB_SUCCESS) {
|
||||
if (ar->sub.search_ret != LDB_SUCCESS && ar->sub.search_ret != LDB_ERR_NO_SUCH_OBJECT) {
|
||||
return replmd_replicated_request_error(ar, ar->sub.search_ret);
|
||||
}
|
||||
if (ar->sub.search_msg) {
|
||||
|
||||
@@ -72,7 +72,7 @@ static int samldb_set_next_rid(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
|
||||
|
||||
if (new_id == 0) {
|
||||
/* out of IDs ! */
|
||||
ldb_debug(ldb, LDB_DEBUG_FATAL, "Are we out of valid IDs ?\n");
|
||||
ldb_set_errstring(ldb, "Are we out of valid IDs ?\n");
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
@@ -81,6 +81,7 @@ static int samldb_set_next_rid(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
|
||||
ZERO_STRUCT(msg);
|
||||
msg.dn = ldb_dn_copy(mem_ctx, dn);
|
||||
if (!msg.dn) {
|
||||
ldb_oom(ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
msg.num_elements = 2;
|
||||
@@ -91,6 +92,7 @@ static int samldb_set_next_rid(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
|
||||
els[0].flags = LDB_FLAG_MOD_DELETE;
|
||||
els[0].name = talloc_strdup(mem_ctx, "nextRid");
|
||||
if (!els[0].name) {
|
||||
ldb_oom(ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
@@ -101,12 +103,14 @@ static int samldb_set_next_rid(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
|
||||
|
||||
vals[0].data = (uint8_t *)talloc_asprintf(mem_ctx, "%u", old_id);
|
||||
if (!vals[0].data) {
|
||||
ldb_oom(ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
vals[0].length = strlen((char *)vals[0].data);
|
||||
|
||||
vals[1].data = (uint8_t *)talloc_asprintf(mem_ctx, "%u", new_id);
|
||||
if (!vals[1].data) {
|
||||
ldb_oom(ldb);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
vals[1].length = strlen((char *)vals[1].data);
|
||||
|
||||
@@ -59,6 +59,7 @@ static int schema_fsmo_init(struct ldb_module *module)
|
||||
|
||||
schema_dn = samdb_schema_dn(module->ldb);
|
||||
if (!schema_dn) {
|
||||
ldb_reset_err_string(module->ldb);
|
||||
ldb_debug(module->ldb, LDB_DEBUG_WARNING,
|
||||
"schema_fsmo_init: no schema dn present: (skip schema loading)\n");
|
||||
return ldb_next_init(module);
|
||||
@@ -91,6 +92,7 @@ static int schema_fsmo_init(struct ldb_module *module)
|
||||
NULL, schema_attrs,
|
||||
&schema_res);
|
||||
if (ret == LDB_ERR_NO_SUCH_OBJECT) {
|
||||
ldb_reset_err_string(module->ldb);
|
||||
ldb_debug(module->ldb, LDB_DEBUG_WARNING,
|
||||
"schema_fsmo_init: no schema head present: (skip schema loading)\n");
|
||||
talloc_free(mem_ctx);
|
||||
|
||||
@@ -115,6 +115,8 @@ int samdb_copy_template(struct ldb_context *ldb,
|
||||
NULL, 0, NULL);
|
||||
talloc_free(templates_ldb_path);
|
||||
if (!templates_ldb) {
|
||||
*errstring = talloc_asprintf(msg, "samdb_copy_template: ERROR: Failed to connect to templates db at: %s",
|
||||
templates_ldb_path);
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
|
||||
@@ -939,7 +939,7 @@ static WERROR dsdb_syntax_DN_BINARY_drsuapi_to_ldb(const struct dsdb_schema *sch
|
||||
}
|
||||
|
||||
ndr_err = ndr_pull_struct_blob_all(in->value_ctr.values[i].blob,
|
||||
out->values, NULL, &id3b,
|
||||
out->values, lp_iconv_convenience(global_loadparm), &id3b,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
NTSTATUS status = ndr_map_error2ntstatus(ndr_err);
|
||||
@@ -997,7 +997,7 @@ static WERROR dsdb_syntax_DN_BINARY_ldb_to_drsuapi(const struct dsdb_schema *sch
|
||||
id3b.dn = (const char *)in->values[i].data;
|
||||
id3b.binary = data_blob(NULL, 0);
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blobs[i], blobs, NULL, &id3b,
|
||||
ndr_err = ndr_push_struct_blob(&blobs[i], blobs, lp_iconv_convenience(global_loadparm), &id3b,
|
||||
(ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
NTSTATUS status = ndr_map_error2ntstatus(ndr_err);
|
||||
|
||||
@@ -660,18 +660,8 @@ static void kdc_task_init(struct task_server *task)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
called on startup of the KDC service
|
||||
*/
|
||||
static NTSTATUS kdc_init(struct event_context *event_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
const struct model_ops *model_ops)
|
||||
{
|
||||
return task_server_startup(event_ctx, lp_ctx, model_ops, kdc_task_init);
|
||||
}
|
||||
|
||||
/* called at smbd startup - register ourselves as a server service */
|
||||
NTSTATUS server_service_kdc_init(void)
|
||||
{
|
||||
return register_server_service("kdc", kdc_init);
|
||||
return register_server_service("kdc", kdc_task_init);
|
||||
}
|
||||
|
||||
@@ -576,20 +576,8 @@ failed:
|
||||
task_server_terminate(task, "Failed to startup ldap server task");
|
||||
}
|
||||
|
||||
/*
|
||||
called on startup of the web server service It's job is to start
|
||||
listening on all configured sockets
|
||||
*/
|
||||
static NTSTATUS ldapsrv_init(struct event_context *event_context,
|
||||
struct loadparm_context *lp_ctx,
|
||||
const struct model_ops *model_ops)
|
||||
{
|
||||
return task_server_startup(event_context, lp_ctx, model_ops,
|
||||
ldapsrv_task_init);
|
||||
}
|
||||
|
||||
|
||||
NTSTATUS server_service_ldap_init(void)
|
||||
{
|
||||
return register_server_service("ldap", ldapsrv_init);
|
||||
return register_server_service("ldap", ldapsrv_task_init);
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ valgrindtest: all
|
||||
|
||||
installcheck: install test
|
||||
|
||||
install:: all installdirs installheaders installlibs installbin installdoc \
|
||||
install:: all installdirs installheaders installlibs installbin installdocs \
|
||||
@PYTHON_INSTALL_TARGET@
|
||||
|
||||
installdirs:
|
||||
|
||||
@@ -130,7 +130,7 @@ VERSION = 0.0.1
|
||||
SO_VERSION = 0
|
||||
OUTPUT_TYPE = SHARED_LIBRARY
|
||||
CFLAGS = -Ilib/ldb/include
|
||||
DESCRIPTION = LDAP-like embedded database library
|
||||
PC_FILE = ldb.pc
|
||||
INIT_FUNCTION_TYPE = int (*) (void)
|
||||
OBJ_FILES = \
|
||||
common/ldb.o \
|
||||
|
||||
@@ -11,7 +11,7 @@ AC_DEFUN([SMB_MODULE_DEFAULT], [echo -n ""])
|
||||
AC_DEFUN([SMB_LIBRARY_ENABLE], [echo -n ""])
|
||||
AC_DEFUN([SMB_EXT_LIB], [echo -n ""])
|
||||
AC_DEFUN([SMB_ENABLE], [echo -n ""])
|
||||
AC_INIT(ldb, 0.9.1)
|
||||
AC_INIT(ldb, 0.9.2)
|
||||
AC_CONFIG_SRCDIR([common/ldb.c])
|
||||
|
||||
AC_LIBREPLACE_ALL_CHECKS
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Copyright (C) 2005,2006 Tim Potter <tpot@samba.org>
|
||||
Copyright (C) 2006 Simo Sorce <idra@samba.org>
|
||||
Copyright (C) 2007 Jelmer Vernooij <jelmer@samba.org>
|
||||
Copyright (C) 2007-2008 Jelmer Vernooij <jelmer@samba.org>
|
||||
|
||||
** NOTE! The following LGPL license applies to the ldb
|
||||
** library. This does NOT imply that all of Samba is released
|
||||
@@ -102,8 +102,44 @@ typedef int ldb_error;
|
||||
$1->data = PyString_AsString($input);
|
||||
}
|
||||
|
||||
%inline %{
|
||||
PyObject *ldb_val_to_py_object(struct ldb_context *ldb_ctx,
|
||||
struct ldb_message_element *el,
|
||||
struct ldb_val *val)
|
||||
{
|
||||
const struct ldb_schema_attribute *a;
|
||||
struct ldb_val new_val;
|
||||
TALLOC_CTX *mem_ctx = talloc_new(NULL);
|
||||
PyObject *ret;
|
||||
|
||||
new_val = *val;
|
||||
|
||||
if (ldb_ctx != NULL) {
|
||||
a = ldb_schema_attribute_by_name(ldb_ctx, el->name);
|
||||
|
||||
if (a != NULL) {
|
||||
if (a->syntax->ldif_write_fn(ldb_ctx, mem_ctx, val, &new_val) != 0) {
|
||||
talloc_free(mem_ctx);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ret = PyString_FromStringAndSize((const char *)new_val.data, new_val.length);
|
||||
|
||||
talloc_free(mem_ctx);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
%}
|
||||
|
||||
%typemap(out,noblock=1) struct ldb_val * {
|
||||
$result = PyString_FromStringAndSize((const char *)$1->data, $1->length)
|
||||
}
|
||||
|
||||
%typemap(out,noblock=1) struct ldb_val {
|
||||
$result = PyString_FromStringAndSize((const char *)$1.data, $1.length);
|
||||
$result = PyString_FromStringAndSize((const char *)$1.data, $1.length)
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -259,7 +295,8 @@ ldb_msg_element *ldb_msg_element_from_pyobject(TALLOC_CTX *mem_ctx,
|
||||
return me;
|
||||
}
|
||||
|
||||
PyObject *ldb_msg_element_to_set(ldb_msg_element *me)
|
||||
PyObject *ldb_msg_element_to_set(struct ldb_context *ldb_ctx,
|
||||
ldb_msg_element *me)
|
||||
{
|
||||
int i;
|
||||
PyObject *result;
|
||||
@@ -269,8 +306,7 @@ PyObject *ldb_msg_element_to_set(ldb_msg_element *me)
|
||||
|
||||
for (i = 0; i < me->num_values; i++) {
|
||||
PyList_SetItem(result, i,
|
||||
PyString_FromStringAndSize((const char *)me->values[i].data,
|
||||
me->values[i].length));
|
||||
ldb_val_to_py_object(ldb_ctx, me, &me->values[i]));
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -287,12 +323,12 @@ typedef struct ldb_message_element {
|
||||
#ifdef SWIGPYTHON
|
||||
PyObject *__iter__(void)
|
||||
{
|
||||
return PyObject_GetIter(ldb_msg_element_to_set($self));
|
||||
return PyObject_GetIter(ldb_msg_element_to_set(NULL, $self));
|
||||
}
|
||||
|
||||
PyObject *__set__(void)
|
||||
{
|
||||
return ldb_msg_element_to_set($self);
|
||||
return ldb_msg_element_to_set(NULL, $self);
|
||||
}
|
||||
|
||||
ldb_msg_element(PyObject *set_obj, int flags=0, const char *name = NULL)
|
||||
@@ -311,9 +347,7 @@ typedef struct ldb_message_element {
|
||||
if (i < 0 || i >= $self->num_values)
|
||||
return Py_None;
|
||||
|
||||
return PyString_FromStringAndSize(
|
||||
(const char *)$self->values[i].data,
|
||||
$self->values[i].length);
|
||||
return ldb_val_to_py_object(NULL, $self, &$self->values[i]);
|
||||
}
|
||||
|
||||
~ldb_msg_element() { talloc_free($self); }
|
||||
@@ -622,6 +656,35 @@ typedef struct ldb_context {
|
||||
ldb_dn *get_root_basedn();
|
||||
ldb_dn *get_schema_basedn();
|
||||
ldb_dn *get_default_basedn();
|
||||
PyObject *schema_format_value(const char *element_name, PyObject *val)
|
||||
{
|
||||
const struct ldb_schema_attribute *a;
|
||||
struct ldb_val old_val;
|
||||
struct ldb_val new_val;
|
||||
TALLOC_CTX *mem_ctx = talloc_new(NULL);
|
||||
PyObject *ret;
|
||||
|
||||
old_val.data = PyString_AsString(val);
|
||||
old_val.length = PyString_Size(val);
|
||||
|
||||
a = ldb_schema_attribute_by_name($self, element_name);
|
||||
|
||||
if (a == NULL) {
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
if (a->syntax->ldif_write_fn($self, mem_ctx, &old_val, &new_val) != 0) {
|
||||
talloc_free(mem_ctx);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
ret = PyString_FromStringAndSize((const char *)new_val.data, new_val.length);
|
||||
|
||||
talloc_free(mem_ctx);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
const char *errstring();
|
||||
void set_create_perms(unsigned int perms);
|
||||
void set_modules_dir(const char *path);
|
||||
@@ -633,6 +696,9 @@ typedef struct ldb_context {
|
||||
ldb_error transaction_start();
|
||||
ldb_error transaction_commit();
|
||||
ldb_error transaction_cancel();
|
||||
void schema_attribute_remove(const char *name);
|
||||
ldb_error schema_attribute_add(const char *attribute, unsigned flags, const char *syntax);
|
||||
ldb_error setup_wellknown_attributes(void);
|
||||
|
||||
#ifdef SWIGPYTHON
|
||||
%typemap(in,numinputs=0,noblock=1) struct ldb_result **result_as_bool (struct ldb_result *tmp) { $1 = &tmp; }
|
||||
|
||||
@@ -65,6 +65,7 @@ CHANGETYPE_NONE = _ldb.CHANGETYPE_NONE
|
||||
CHANGETYPE_ADD = _ldb.CHANGETYPE_ADD
|
||||
CHANGETYPE_DELETE = _ldb.CHANGETYPE_DELETE
|
||||
CHANGETYPE_MODIFY = _ldb.CHANGETYPE_MODIFY
|
||||
ldb_val_to_py_object = _ldb.ldb_val_to_py_object
|
||||
class Dn(object):
|
||||
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
|
||||
__repr__ = _swig_repr
|
||||
@@ -218,6 +219,7 @@ Ldb.get_config_basedn = new_instancemethod(_ldb.Ldb_get_config_basedn,None,Ldb)
|
||||
Ldb.get_root_basedn = new_instancemethod(_ldb.Ldb_get_root_basedn,None,Ldb)
|
||||
Ldb.get_schema_basedn = new_instancemethod(_ldb.Ldb_get_schema_basedn,None,Ldb)
|
||||
Ldb.get_default_basedn = new_instancemethod(_ldb.Ldb_get_default_basedn,None,Ldb)
|
||||
Ldb.schema_format_value = new_instancemethod(_ldb.Ldb_schema_format_value,None,Ldb)
|
||||
Ldb.errstring = new_instancemethod(_ldb.Ldb_errstring,None,Ldb)
|
||||
Ldb.set_create_perms = new_instancemethod(_ldb.Ldb_set_create_perms,None,Ldb)
|
||||
Ldb.set_modules_dir = new_instancemethod(_ldb.Ldb_set_modules_dir,None,Ldb)
|
||||
@@ -227,6 +229,9 @@ Ldb.get_opaque = new_instancemethod(_ldb.Ldb_get_opaque,None,Ldb)
|
||||
Ldb.transaction_start = new_instancemethod(_ldb.Ldb_transaction_start,None,Ldb)
|
||||
Ldb.transaction_commit = new_instancemethod(_ldb.Ldb_transaction_commit,None,Ldb)
|
||||
Ldb.transaction_cancel = new_instancemethod(_ldb.Ldb_transaction_cancel,None,Ldb)
|
||||
Ldb.schema_attribute_remove = new_instancemethod(_ldb.Ldb_schema_attribute_remove,None,Ldb)
|
||||
Ldb.schema_attribute_add = new_instancemethod(_ldb.Ldb_schema_attribute_add,None,Ldb)
|
||||
Ldb.setup_wellknown_attributes = new_instancemethod(_ldb.Ldb_setup_wellknown_attributes,None,Ldb)
|
||||
Ldb.__contains__ = new_instancemethod(_ldb.Ldb___contains__,None,Ldb)
|
||||
Ldb.parse_ldif = new_instancemethod(_ldb.Ldb_parse_ldif,None,Ldb)
|
||||
Ldb_swigregister = _ldb.Ldb_swigregister
|
||||
|
||||
@@ -2470,20 +2470,21 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags)
|
||||
#define SWIGTYPE_p_ldb_message_element swig_types[8]
|
||||
#define SWIGTYPE_p_ldb_module_ops swig_types[9]
|
||||
#define SWIGTYPE_p_ldb_result swig_types[10]
|
||||
#define SWIGTYPE_p_long_long swig_types[11]
|
||||
#define SWIGTYPE_p_p_char swig_types[12]
|
||||
#define SWIGTYPE_p_p_ldb_control swig_types[13]
|
||||
#define SWIGTYPE_p_p_ldb_result swig_types[14]
|
||||
#define SWIGTYPE_p_short swig_types[15]
|
||||
#define SWIGTYPE_p_signed_char swig_types[16]
|
||||
#define SWIGTYPE_p_unsigned_char swig_types[17]
|
||||
#define SWIGTYPE_p_unsigned_int swig_types[18]
|
||||
#define SWIGTYPE_p_unsigned_long swig_types[19]
|
||||
#define SWIGTYPE_p_unsigned_long_long swig_types[20]
|
||||
#define SWIGTYPE_p_unsigned_short swig_types[21]
|
||||
#define SWIGTYPE_p_void swig_types[22]
|
||||
static swig_type_info *swig_types[24];
|
||||
static swig_module_info swig_module = {swig_types, 23, 0, 0, 0, 0};
|
||||
#define SWIGTYPE_p_ldb_val swig_types[11]
|
||||
#define SWIGTYPE_p_long_long swig_types[12]
|
||||
#define SWIGTYPE_p_p_char swig_types[13]
|
||||
#define SWIGTYPE_p_p_ldb_control swig_types[14]
|
||||
#define SWIGTYPE_p_p_ldb_result swig_types[15]
|
||||
#define SWIGTYPE_p_short swig_types[16]
|
||||
#define SWIGTYPE_p_signed_char swig_types[17]
|
||||
#define SWIGTYPE_p_unsigned_char swig_types[18]
|
||||
#define SWIGTYPE_p_unsigned_int swig_types[19]
|
||||
#define SWIGTYPE_p_unsigned_long swig_types[20]
|
||||
#define SWIGTYPE_p_unsigned_long_long swig_types[21]
|
||||
#define SWIGTYPE_p_unsigned_short swig_types[22]
|
||||
#define SWIGTYPE_p_void swig_types[23]
|
||||
static swig_type_info *swig_types[25];
|
||||
static swig_module_info swig_module = {swig_types, 24, 0, 0, 0, 0};
|
||||
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
||||
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
||||
|
||||
@@ -2550,6 +2551,37 @@ SWIG_From_int (int value)
|
||||
}
|
||||
|
||||
|
||||
PyObject *ldb_val_to_py_object(struct ldb_context *ldb_ctx,
|
||||
struct ldb_message_element *el,
|
||||
struct ldb_val *val)
|
||||
{
|
||||
const struct ldb_schema_attribute *a;
|
||||
struct ldb_val new_val;
|
||||
TALLOC_CTX *mem_ctx = talloc_new(NULL);
|
||||
PyObject *ret;
|
||||
|
||||
new_val = *val;
|
||||
|
||||
if (ldb_ctx != NULL) {
|
||||
a = ldb_schema_attribute_by_name(ldb_ctx, el->name);
|
||||
|
||||
if (a != NULL) {
|
||||
if (a->syntax->ldif_write_fn(ldb_ctx, mem_ctx, val, &new_val) != 0) {
|
||||
talloc_free(mem_ctx);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ret = PyString_FromStringAndSize((const char *)new_val.data, new_val.length);
|
||||
|
||||
talloc_free(mem_ctx);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
SWIGINTERN swig_type_info*
|
||||
SWIG_pchar_descriptor(void)
|
||||
{
|
||||
@@ -2719,7 +2751,8 @@ ldb_msg_element *ldb_msg_element_from_pyobject(TALLOC_CTX *mem_ctx,
|
||||
return me;
|
||||
}
|
||||
|
||||
PyObject *ldb_msg_element_to_set(ldb_msg_element *me)
|
||||
PyObject *ldb_msg_element_to_set(struct ldb_context *ldb_ctx,
|
||||
ldb_msg_element *me)
|
||||
{
|
||||
int i;
|
||||
PyObject *result;
|
||||
@@ -2729,8 +2762,7 @@ PyObject *ldb_msg_element_to_set(ldb_msg_element *me)
|
||||
|
||||
for (i = 0; i < me->num_values; i++) {
|
||||
PyList_SetItem(result, i,
|
||||
PyString_FromStringAndSize((const char *)me->values[i].data,
|
||||
me->values[i].length));
|
||||
ldb_val_to_py_object(ldb_ctx, me, &me->values[i]));
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -2738,10 +2770,10 @@ PyObject *ldb_msg_element_to_set(ldb_msg_element *me)
|
||||
|
||||
|
||||
SWIGINTERN PyObject *ldb_msg_element___iter__(ldb_msg_element *self){
|
||||
return PyObject_GetIter(ldb_msg_element_to_set(self));
|
||||
return PyObject_GetIter(ldb_msg_element_to_set(NULL, self));
|
||||
}
|
||||
SWIGINTERN PyObject *ldb_msg_element___set__(ldb_msg_element *self){
|
||||
return ldb_msg_element_to_set(self);
|
||||
return ldb_msg_element_to_set(NULL, self);
|
||||
}
|
||||
|
||||
#include <limits.h>
|
||||
@@ -2898,9 +2930,7 @@ SWIGINTERN PyObject *ldb_msg_element_get(ldb_msg_element *self,int i){
|
||||
if (i < 0 || i >= self->num_values)
|
||||
return Py_None;
|
||||
|
||||
return PyString_FromStringAndSize(
|
||||
(const char *)self->values[i].data,
|
||||
self->values[i].length);
|
||||
return ldb_val_to_py_object(NULL, self, &self->values[i]);
|
||||
}
|
||||
SWIGINTERN void delete_ldb_msg_element(ldb_msg_element *self){ talloc_free(self); }
|
||||
|
||||
@@ -3129,6 +3159,33 @@ SWIGINTERN ldb_error ldb_add__SWIG_1(ldb *self,PyObject *py_msg){
|
||||
fail:
|
||||
return 80;
|
||||
}
|
||||
SWIGINTERN PyObject *ldb_schema_format_value(ldb *self,char const *element_name,PyObject *val){
|
||||
const struct ldb_schema_attribute *a;
|
||||
struct ldb_val old_val;
|
||||
struct ldb_val new_val;
|
||||
TALLOC_CTX *mem_ctx = talloc_new(NULL);
|
||||
PyObject *ret;
|
||||
|
||||
old_val.data = PyString_AsString(val);
|
||||
old_val.length = PyString_Size(val);
|
||||
|
||||
a = ldb_schema_attribute_by_name(self, element_name);
|
||||
|
||||
if (a == NULL) {
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
if (a->syntax->ldif_write_fn(self, mem_ctx, &old_val, &new_val) != 0) {
|
||||
talloc_free(mem_ctx);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
ret = PyString_FromStringAndSize((const char *)new_val.data, new_val.length);
|
||||
|
||||
talloc_free(mem_ctx);
|
||||
|
||||
return ret;
|
||||
}
|
||||
SWIGINTERN ldb_error ldb___contains__(ldb *self,ldb_dn *dn,struct ldb_result **result_as_bool){
|
||||
return ldb_search(self, dn, LDB_SCOPE_BASE, NULL, NULL,
|
||||
result_as_bool);
|
||||
@@ -3153,6 +3210,52 @@ static char *timestring(time_t t)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
SWIGINTERN PyObject *_wrap_ldb_val_to_py_object(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj = 0;
|
||||
struct ldb_context *arg1 = (struct ldb_context *) 0 ;
|
||||
struct ldb_message_element *arg2 = (struct ldb_message_element *) 0 ;
|
||||
struct ldb_val *arg3 = (struct ldb_val *) 0 ;
|
||||
PyObject *result = 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
void *argp2 = 0 ;
|
||||
int res2 = 0 ;
|
||||
void *argp3 = 0 ;
|
||||
int res3 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
char * kwnames[] = {
|
||||
(char *) "ldb_ctx",(char *) "el",(char *) "val", NULL
|
||||
};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ldb_val_to_py_object",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ldb_val_to_py_object" "', argument " "1"" of type '" "struct ldb_context *""'");
|
||||
}
|
||||
arg1 = (struct ldb_context *)(argp1);
|
||||
res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ldb_message_element, 0 | 0 );
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ldb_val_to_py_object" "', argument " "2"" of type '" "struct ldb_message_element *""'");
|
||||
}
|
||||
arg2 = (struct ldb_message_element *)(argp2);
|
||||
res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_ldb_val, 0 | 0 );
|
||||
if (!SWIG_IsOK(res3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ldb_val_to_py_object" "', argument " "3"" of type '" "struct ldb_val *""'");
|
||||
}
|
||||
arg3 = (struct ldb_val *)(argp3);
|
||||
if (arg1 == NULL)
|
||||
SWIG_exception(SWIG_ValueError,
|
||||
"ldb context must be non-NULL");
|
||||
result = (PyObject *)ldb_val_to_py_object(arg1,arg2,arg3);
|
||||
resultobj = result;
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_new_Dn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj = 0;
|
||||
ldb *arg1 = (ldb *) 0 ;
|
||||
@@ -4875,6 +4978,49 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_Ldb_schema_format_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj = 0;
|
||||
ldb *arg1 = (ldb *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
PyObject *arg3 = (PyObject *) 0 ;
|
||||
PyObject *result = 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
char * kwnames[] = {
|
||||
(char *) "self",(char *) "element_name",(char *) "val", NULL
|
||||
};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Ldb_schema_format_value",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Ldb_schema_format_value" "', argument " "1"" of type '" "ldb *""'");
|
||||
}
|
||||
arg1 = (ldb *)(argp1);
|
||||
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Ldb_schema_format_value" "', argument " "2"" of type '" "char const *""'");
|
||||
}
|
||||
arg2 = (char *)(buf2);
|
||||
arg3 = obj2;
|
||||
if (arg1 == NULL)
|
||||
SWIG_exception(SWIG_ValueError,
|
||||
"ldb context must be non-NULL");
|
||||
result = (PyObject *)ldb_schema_format_value(arg1,(char const *)arg2,arg3);
|
||||
resultobj = result;
|
||||
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
|
||||
return resultobj;
|
||||
fail:
|
||||
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_Ldb_errstring(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
ldb *arg1 = (ldb *) 0 ;
|
||||
@@ -5197,6 +5343,140 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_Ldb_schema_attribute_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj = 0;
|
||||
ldb *arg1 = (ldb *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
char * kwnames[] = {
|
||||
(char *) "self",(char *) "name", NULL
|
||||
};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Ldb_schema_attribute_remove",kwnames,&obj0,&obj1)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Ldb_schema_attribute_remove" "', argument " "1"" of type '" "ldb *""'");
|
||||
}
|
||||
arg1 = (ldb *)(argp1);
|
||||
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Ldb_schema_attribute_remove" "', argument " "2"" of type '" "char const *""'");
|
||||
}
|
||||
arg2 = (char *)(buf2);
|
||||
if (arg1 == NULL)
|
||||
SWIG_exception(SWIG_ValueError,
|
||||
"ldb context must be non-NULL");
|
||||
ldb_schema_attribute_remove(arg1,(char const *)arg2);
|
||||
resultobj = SWIG_Py_Void();
|
||||
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
|
||||
return resultobj;
|
||||
fail:
|
||||
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_Ldb_schema_attribute_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj = 0;
|
||||
ldb *arg1 = (ldb *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
char *arg4 = (char *) 0 ;
|
||||
ldb_error result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
char *buf2 = 0 ;
|
||||
int alloc2 = 0 ;
|
||||
unsigned int val3 ;
|
||||
int ecode3 = 0 ;
|
||||
int res4 ;
|
||||
char *buf4 = 0 ;
|
||||
int alloc4 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
PyObject * obj3 = 0 ;
|
||||
char * kwnames[] = {
|
||||
(char *) "self",(char *) "attribute",(char *) "flags",(char *) "syntax", NULL
|
||||
};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Ldb_schema_attribute_add",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Ldb_schema_attribute_add" "', argument " "1"" of type '" "ldb *""'");
|
||||
}
|
||||
arg1 = (ldb *)(argp1);
|
||||
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Ldb_schema_attribute_add" "', argument " "2"" of type '" "char const *""'");
|
||||
}
|
||||
arg2 = (char *)(buf2);
|
||||
ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
|
||||
if (!SWIG_IsOK(ecode3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Ldb_schema_attribute_add" "', argument " "3"" of type '" "unsigned int""'");
|
||||
}
|
||||
arg3 = (unsigned int)(val3);
|
||||
res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
|
||||
if (!SWIG_IsOK(res4)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Ldb_schema_attribute_add" "', argument " "4"" of type '" "char const *""'");
|
||||
}
|
||||
arg4 = (char *)(buf4);
|
||||
if (arg1 == NULL)
|
||||
SWIG_exception(SWIG_ValueError,
|
||||
"ldb context must be non-NULL");
|
||||
result = ldb_schema_attribute_add(arg1,(char const *)arg2,arg3,(char const *)arg4);
|
||||
if (result != 0) {
|
||||
PyErr_SetObject(PyExc_LdbError, Py_BuildValue((char *)"(i,s)", result, ldb_strerror(result)));
|
||||
SWIG_fail;
|
||||
}
|
||||
resultobj = Py_None;
|
||||
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
|
||||
if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
|
||||
return resultobj;
|
||||
fail:
|
||||
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
|
||||
if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_Ldb_setup_wellknown_attributes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
ldb *arg1 = (ldb *) 0 ;
|
||||
ldb_error result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
PyObject *swig_obj[1] ;
|
||||
|
||||
if (!args) SWIG_fail;
|
||||
swig_obj[0] = args;
|
||||
res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ldb_context, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Ldb_setup_wellknown_attributes" "', argument " "1"" of type '" "ldb *""'");
|
||||
}
|
||||
arg1 = (ldb *)(argp1);
|
||||
if (arg1 == NULL)
|
||||
SWIG_exception(SWIG_ValueError,
|
||||
"ldb context must be non-NULL");
|
||||
result = ldb_setup_wellknown_attributes(arg1);
|
||||
if (result != 0) {
|
||||
PyErr_SetObject(PyExc_LdbError, Py_BuildValue((char *)"(i,s)", result, ldb_strerror(result)));
|
||||
SWIG_fail;
|
||||
}
|
||||
resultobj = Py_None;
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_Ldb___contains__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj = 0;
|
||||
ldb *arg1 = (ldb *) 0 ;
|
||||
@@ -5400,6 +5680,7 @@ fail:
|
||||
|
||||
|
||||
static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"ldb_val_to_py_object", (PyCFunction) _wrap_ldb_val_to_py_object, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"new_Dn", (PyCFunction) _wrap_new_Dn, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"delete_Dn", (PyCFunction)_wrap_delete_Dn, METH_O, NULL},
|
||||
{ (char *)"Dn_validate", (PyCFunction)_wrap_Dn_validate, METH_O, NULL},
|
||||
@@ -5454,6 +5735,7 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"Ldb_get_root_basedn", (PyCFunction)_wrap_Ldb_get_root_basedn, METH_O, NULL},
|
||||
{ (char *)"Ldb_get_schema_basedn", (PyCFunction)_wrap_Ldb_get_schema_basedn, METH_O, NULL},
|
||||
{ (char *)"Ldb_get_default_basedn", (PyCFunction)_wrap_Ldb_get_default_basedn, METH_O, NULL},
|
||||
{ (char *)"Ldb_schema_format_value", (PyCFunction) _wrap_Ldb_schema_format_value, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"Ldb_errstring", (PyCFunction)_wrap_Ldb_errstring, METH_O, NULL},
|
||||
{ (char *)"Ldb_set_create_perms", (PyCFunction) _wrap_Ldb_set_create_perms, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"Ldb_set_modules_dir", (PyCFunction) _wrap_Ldb_set_modules_dir, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
@@ -5463,6 +5745,9 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"Ldb_transaction_start", (PyCFunction)_wrap_Ldb_transaction_start, METH_O, NULL},
|
||||
{ (char *)"Ldb_transaction_commit", (PyCFunction)_wrap_Ldb_transaction_commit, METH_O, NULL},
|
||||
{ (char *)"Ldb_transaction_cancel", (PyCFunction)_wrap_Ldb_transaction_cancel, METH_O, NULL},
|
||||
{ (char *)"Ldb_schema_attribute_remove", (PyCFunction) _wrap_Ldb_schema_attribute_remove, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"Ldb_schema_attribute_add", (PyCFunction) _wrap_Ldb_schema_attribute_add, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"Ldb_setup_wellknown_attributes", (PyCFunction)_wrap_Ldb_setup_wellknown_attributes, METH_O, NULL},
|
||||
{ (char *)"Ldb___contains__", (PyCFunction) _wrap_Ldb___contains__, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"Ldb_parse_ldif", (PyCFunction) _wrap_Ldb_parse_ldif, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"Ldb_swigregister", Ldb_swigregister, METH_VARARGS, NULL},
|
||||
@@ -5488,6 +5773,7 @@ static swig_type_info _swigt__p_ldb_message = {"_p_ldb_message", "ldb_msg *|stru
|
||||
static swig_type_info _swigt__p_ldb_message_element = {"_p_ldb_message_element", "struct ldb_message_element *|ldb_msg_element *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_ldb_module_ops = {"_p_ldb_module_ops", "struct ldb_module_ops *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_ldb_result = {"_p_ldb_result", "struct ldb_result *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_ldb_val = {"_p_ldb_val", "struct ldb_val *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_long_long = {"_p_long_long", "int_least64_t *|int_fast64_t *|int64_t *|long long *|intmax_t *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_p_ldb_control = {"_p_p_ldb_control", "struct ldb_control **", 0, 0, (void*)0, 0};
|
||||
@@ -5513,6 +5799,7 @@ static swig_type_info *swig_type_initial[] = {
|
||||
&_swigt__p_ldb_message_element,
|
||||
&_swigt__p_ldb_module_ops,
|
||||
&_swigt__p_ldb_result,
|
||||
&_swigt__p_ldb_val,
|
||||
&_swigt__p_long_long,
|
||||
&_swigt__p_p_char,
|
||||
&_swigt__p_p_ldb_control,
|
||||
@@ -5538,6 +5825,7 @@ static swig_cast_info _swigc__p_ldb_message[] = { {&_swigt__p_ldb_message, 0, 0
|
||||
static swig_cast_info _swigc__p_ldb_message_element[] = { {&_swigt__p_ldb_message_element, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_ldb_module_ops[] = { {&_swigt__p_ldb_module_ops, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_ldb_result[] = { {&_swigt__p_ldb_result, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_ldb_val[] = { {&_swigt__p_ldb_val, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_p_ldb_control[] = { {&_swigt__p_p_ldb_control, 0, 0, 0},{0, 0, 0, 0}};
|
||||
@@ -5563,6 +5851,7 @@ static swig_cast_info *swig_cast_initial[] = {
|
||||
_swigc__p_ldb_message_element,
|
||||
_swigc__p_ldb_module_ops,
|
||||
_swigc__p_ldb_result,
|
||||
_swigc__p_ldb_val,
|
||||
_swigc__p_long_long,
|
||||
_swigc__p_p_char,
|
||||
_swigc__p_p_ldb_control,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -121,8 +121,8 @@ static NTSTATUS irpc_uptime(struct irpc_message *msg,
|
||||
*/
|
||||
static char *messaging_path(struct messaging_context *msg, struct server_id server_id)
|
||||
{
|
||||
return talloc_asprintf(msg, "%s/msg.%u.%u", msg->base_path,
|
||||
(unsigned)server_id.node, (unsigned)server_id.id);
|
||||
return talloc_asprintf(msg, "%s/msg.%s", msg->base_path,
|
||||
cluster_id_string(msg, server_id));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -263,8 +263,10 @@ static void messaging_send_handler(struct messaging_context *msg)
|
||||
}
|
||||
rec->retries = 0;
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(1,("messaging: Lost message from %u to %u of type %u - %s\n",
|
||||
rec->header->from.id, rec->header->to.id, rec->header->msg_type,
|
||||
DEBUG(1,("messaging: Lost message from %s to %s of type %u - %s\n",
|
||||
cluster_id_string(debug_ctx(), rec->header->from),
|
||||
cluster_id_string(debug_ctx(), rec->header->to),
|
||||
rec->header->msg_type,
|
||||
nt_errstr(status)));
|
||||
}
|
||||
DLIST_REMOVE(msg->pending, rec);
|
||||
@@ -1051,7 +1053,7 @@ struct server_id *irpc_servers_byname(struct messaging_context *msg_ctx,
|
||||
for (i=0;i<count;i++) {
|
||||
ret[i] = ((struct server_id *)rec.dptr)[i];
|
||||
}
|
||||
ret[i] = cluster_id(0);
|
||||
ret[i] = cluster_id(0, 0);
|
||||
free(rec.dptr);
|
||||
tdb_unlock_bystring(t->tdb, name);
|
||||
talloc_free(t);
|
||||
|
||||
@@ -93,7 +93,7 @@ static bool test_addone(struct torture_context *test, const void *_data,
|
||||
r.in.in_data = value;
|
||||
|
||||
test_debug = true;
|
||||
status = IRPC_CALL(data->msg_ctx1, cluster_id(MSG_ID2),
|
||||
status = IRPC_CALL(data->msg_ctx1, cluster_id(0, MSG_ID2),
|
||||
rpcecho, ECHO_ADDONE, &r, test);
|
||||
test_debug = false;
|
||||
torture_assert_ntstatus_ok(test, status, "AddOne failed");
|
||||
@@ -122,7 +122,7 @@ static bool test_echodata(struct torture_context *tctx,
|
||||
r.in.in_data = (unsigned char *)talloc_strdup(mem_ctx, "0123456789");
|
||||
r.in.len = strlen((char *)r.in.in_data);
|
||||
|
||||
status = IRPC_CALL(data->msg_ctx1, cluster_id(MSG_ID2),
|
||||
status = IRPC_CALL(data->msg_ctx1, cluster_id(0, MSG_ID2),
|
||||
rpcecho, ECHO_ECHODATA, &r,
|
||||
mem_ctx);
|
||||
torture_assert_ntstatus_ok(tctx, status, "EchoData failed");
|
||||
@@ -180,7 +180,7 @@ static bool test_speed(struct torture_context *tctx,
|
||||
while (timeval_elapsed(&tv) < timelimit) {
|
||||
struct irpc_request *irpc;
|
||||
|
||||
irpc = IRPC_CALL_SEND(data->msg_ctx1, cluster_id(MSG_ID2),
|
||||
irpc = IRPC_CALL_SEND(data->msg_ctx1, cluster_id(0, MSG_ID2),
|
||||
rpcecho, ECHO_ADDONE,
|
||||
&r, mem_ctx);
|
||||
torture_assert(tctx, irpc != NULL, "AddOne send failed");
|
||||
@@ -221,7 +221,7 @@ static bool irpc_setup(struct torture_context *tctx, void **_data)
|
||||
torture_assert(tctx, data->msg_ctx1 =
|
||||
messaging_init(tctx,
|
||||
lp_messaging_path(tctx, tctx->lp_ctx),
|
||||
cluster_id(MSG_ID1),
|
||||
cluster_id(0, MSG_ID1),
|
||||
lp_iconv_convenience(tctx->lp_ctx),
|
||||
data->ev),
|
||||
"Failed to init first messaging context");
|
||||
@@ -229,7 +229,7 @@ static bool irpc_setup(struct torture_context *tctx, void **_data)
|
||||
torture_assert(tctx, data->msg_ctx2 =
|
||||
messaging_init(tctx,
|
||||
lp_messaging_path(tctx, tctx->lp_ctx),
|
||||
cluster_id(MSG_ID2),
|
||||
cluster_id(0, MSG_ID2),
|
||||
lp_iconv_convenience(tctx->lp_ctx),
|
||||
data->ev),
|
||||
"Failed to init second messaging context");
|
||||
|
||||
@@ -73,7 +73,7 @@ static bool test_ping_speed(struct torture_context *tctx)
|
||||
|
||||
msg_server_ctx = messaging_init(tctx,
|
||||
lp_messaging_path(tctx, tctx->lp_ctx),
|
||||
cluster_id(1),
|
||||
cluster_id(0, 1),
|
||||
lp_iconv_convenience(tctx->lp_ctx),
|
||||
ev);
|
||||
|
||||
@@ -84,7 +84,7 @@ static bool test_ping_speed(struct torture_context *tctx)
|
||||
|
||||
msg_client_ctx = messaging_init(tctx,
|
||||
lp_messaging_path(tctx, tctx->lp_ctx),
|
||||
cluster_id(2),
|
||||
cluster_id(0, 2),
|
||||
lp_iconv_convenience(tctx->lp_ctx),
|
||||
ev);
|
||||
|
||||
@@ -103,8 +103,8 @@ static bool test_ping_speed(struct torture_context *tctx)
|
||||
data.data = discard_const_p(uint8_t, "testing");
|
||||
data.length = strlen((const char *)data.data);
|
||||
|
||||
status1 = messaging_send(msg_client_ctx, cluster_id(1), msg_ping, &data);
|
||||
status2 = messaging_send(msg_client_ctx, cluster_id(1), msg_ping, NULL);
|
||||
status1 = messaging_send(msg_client_ctx, cluster_id(0, 1), msg_ping, &data);
|
||||
status2 = messaging_send(msg_client_ctx, cluster_id(0, 1), msg_ping, NULL);
|
||||
|
||||
torture_assert_ntstatus_ok(tctx, status1, "msg1 failed");
|
||||
ping_count++;
|
||||
@@ -124,7 +124,7 @@ static bool test_ping_speed(struct torture_context *tctx)
|
||||
}
|
||||
|
||||
torture_comment(tctx, "sending exit\n");
|
||||
messaging_send(msg_client_ctx, cluster_id(1), msg_exit, NULL);
|
||||
messaging_send(msg_client_ctx, cluster_id(0, 1), msg_exit, NULL);
|
||||
|
||||
torture_assert_int_equal(tctx, ping_count, pong_count, "ping test failed");
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ clean::
|
||||
# Start SUBSYSTEM registry
|
||||
[LIBRARY::registry]
|
||||
VERSION = 0.0.1
|
||||
PC_FILE = registry.pc
|
||||
SO_VERSION = 0
|
||||
DESCRIPTION = Windows-style registry library
|
||||
OBJ_FILES = \
|
||||
interface.o \
|
||||
util.o \
|
||||
|
||||
@@ -400,7 +400,7 @@ static WERROR ldb_add_key(TALLOC_CTX *mem_ctx, const struct hive_key *parent,
|
||||
struct security_descriptor *sd,
|
||||
struct hive_key **newkey)
|
||||
{
|
||||
struct ldb_key_data *parentkd = (const struct ldb_key_data *)parent;
|
||||
struct ldb_key_data *parentkd = discard_const_p(struct ldb_key_data, parent);
|
||||
struct ldb_message *msg;
|
||||
struct ldb_key_data *newkd;
|
||||
int ret;
|
||||
|
||||
12
source/lib/registry/registry.pc.in
Normal file
12
source/lib/registry/registry.pc.in
Normal file
@@ -0,0 +1,12 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: registry
|
||||
Description: Windows-style registry library
|
||||
Requires: ldb
|
||||
Requires.private:
|
||||
Version: 0.0.1
|
||||
Libs: -L${libdir} -lregistry
|
||||
Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1
|
||||
@@ -2,7 +2,7 @@
|
||||
VERSION = 1.0.0
|
||||
SO_VERSION = 1
|
||||
OBJ_FILES = talloc.o
|
||||
PC_FILE = talloc.pc
|
||||
MANPAGE = talloc.3
|
||||
CFLAGS = -Ilib/talloc
|
||||
PUBLIC_HEADERS = talloc.h
|
||||
DESCRIPTION = A hierarchical pool based memory system with destructors
|
||||
|
||||
@@ -686,21 +686,67 @@ void tdb_enable_seqnum(struct tdb_context *tdb)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
add a region of the file to the freelist. Length is the size of the region in bytes,
|
||||
which includes the free list header that needs to be added
|
||||
*/
|
||||
static int tdb_free_region(struct tdb_context *tdb, tdb_off_t offset, ssize_t length)
|
||||
{
|
||||
struct list_struct rec;
|
||||
if (length <= sizeof(rec)) {
|
||||
/* the region is not worth adding */
|
||||
return 0;
|
||||
}
|
||||
if (length + offset > tdb->map_size) {
|
||||
TDB_LOG((tdb, TDB_DEBUG_FATAL,"tdb_free_region: adding region beyond end of file\n"));
|
||||
return -1;
|
||||
}
|
||||
memset(&rec,'\0',sizeof(rec));
|
||||
rec.rec_len = length - sizeof(rec);
|
||||
if (tdb_free(tdb, offset, &rec) == -1) {
|
||||
TDB_LOG((tdb, TDB_DEBUG_FATAL,"tdb_free_region: failed to add free record\n"));
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
wipe the entire database, deleting all records. This can be done
|
||||
very fast by using a global lock. The entire data portion of the
|
||||
file becomes a single entry in the freelist.
|
||||
|
||||
This code carefully steps around the recovery area, leaving it alone
|
||||
*/
|
||||
int tdb_wipe_all(struct tdb_context *tdb)
|
||||
{
|
||||
int i;
|
||||
tdb_off_t offset = 0;
|
||||
ssize_t data_len;
|
||||
tdb_off_t recovery_head;
|
||||
tdb_len_t recovery_size = 0;
|
||||
|
||||
if (tdb_lockall(tdb) != 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* see if the tdb has a recovery area, and remember its size
|
||||
if so. We don't want to lose this as otherwise each
|
||||
tdb_wipe_all() in a transaction will increase the size of
|
||||
the tdb by the size of the recovery area */
|
||||
if (tdb_ofs_read(tdb, TDB_RECOVERY_HEAD, &recovery_head) == -1) {
|
||||
TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_wipe_all: failed to read recovery head\n"));
|
||||
goto failed;
|
||||
}
|
||||
|
||||
if (recovery_head != 0) {
|
||||
struct list_struct rec;
|
||||
if (tdb->methods->tdb_read(tdb, recovery_head, &rec, sizeof(rec), DOCONV()) == -1) {
|
||||
TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_wipe_all: failed to read recovery record\n"));
|
||||
return -1;
|
||||
}
|
||||
recovery_size = rec.rec_len + sizeof(rec);
|
||||
}
|
||||
|
||||
/* wipe the hashes */
|
||||
for (i=0;i<tdb->header.hash_size;i++) {
|
||||
if (tdb_ofs_write(tdb, TDB_HASH_TOP(i), &offset) == -1) {
|
||||
@@ -715,19 +761,30 @@ int tdb_wipe_all(struct tdb_context *tdb)
|
||||
goto failed;
|
||||
}
|
||||
|
||||
if (tdb_ofs_write(tdb, TDB_RECOVERY_HEAD, &offset) == -1) {
|
||||
TDB_LOG((tdb, TDB_DEBUG_FATAL,"tdb_wipe_all: failed to write recovery head\n"));
|
||||
/* add all the rest of the file to the freelist, possibly leaving a gap
|
||||
for the recovery area */
|
||||
if (recovery_size == 0) {
|
||||
/* the simple case - the whole file can be used as a freelist */
|
||||
data_len = (tdb->map_size - TDB_DATA_START(tdb->header.hash_size));
|
||||
if (tdb_free_region(tdb, TDB_DATA_START(tdb->header.hash_size), data_len) != 0) {
|
||||
goto failed;
|
||||
}
|
||||
} else {
|
||||
/* we need to add two freelist entries - one on either
|
||||
side of the recovery area
|
||||
|
||||
/* add all the rest of the file to the freelist */
|
||||
data_len = (tdb->map_size - TDB_DATA_START(tdb->header.hash_size)) - sizeof(struct list_struct);
|
||||
if (data_len > 0) {
|
||||
struct list_struct rec;
|
||||
memset(&rec,'\0',sizeof(rec));
|
||||
rec.rec_len = data_len;
|
||||
if (tdb_free(tdb, TDB_DATA_START(tdb->header.hash_size), &rec) == -1) {
|
||||
TDB_LOG((tdb, TDB_DEBUG_FATAL,"tdb_wipe_all: failed to add free record\n"));
|
||||
Note that we cannot shift the recovery area during
|
||||
this operation. Only the transaction.c code may
|
||||
move the recovery area or we risk subtle data
|
||||
corruption
|
||||
*/
|
||||
data_len = (recovery_head - TDB_DATA_START(tdb->header.hash_size));
|
||||
if (tdb_free_region(tdb, TDB_DATA_START(tdb->header.hash_size), data_len) != 0) {
|
||||
goto failed;
|
||||
}
|
||||
/* and the 2nd free list entry after the recovery area - if any */
|
||||
data_len = tdb->map_size - (recovery_head+recovery_size);
|
||||
if (tdb_free_region(tdb, recovery_head+recovery_size, data_len) != 0) {
|
||||
goto failed;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,6 +321,9 @@ static int transaction_write_existing(struct tdb_context *tdb, tdb_off_t off,
|
||||
|
||||
if (blk == tdb->transaction->num_blocks-1 &&
|
||||
off + len > tdb->transaction->last_block_size) {
|
||||
if (off >= tdb->transaction->last_block_size) {
|
||||
return 0;
|
||||
}
|
||||
len = tdb->transaction->last_block_size - off;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[LIBRARY::LIBTDB]
|
||||
VERSION = 0.0.1
|
||||
SO_VERSION = 0
|
||||
DESCRIPTION = Trivial Database Library
|
||||
PC_FILE = tdb.pc
|
||||
OBJ_FILES = \
|
||||
common/tdb.o common/dump.o common/io.o common/lock.o \
|
||||
common/open.o common/traverse.o common/freelist.o \
|
||||
|
||||
@@ -8,3 +8,4 @@ Description: A trivial database
|
||||
Version: @PACKAGE_VERSION@
|
||||
Libs: -L${libdir} -ltdb
|
||||
Cflags: -I${includedir}
|
||||
URL: http://tdb.samba.org/
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
[SUBSYSTEM::LIBSAMBA-UTIL]
|
||||
#VERSION = 0.0.1
|
||||
#SO_VERSION = 0
|
||||
#DESCRIPTION = Generic utility functions
|
||||
PUBLIC_HEADERS = util.h \
|
||||
attr.h \
|
||||
byteorder.h \
|
||||
|
||||
@@ -41,13 +41,17 @@ struct debug_ops {
|
||||
|
||||
extern int DEBUGLEVEL;
|
||||
|
||||
#define debug_ctx() (_debug_ctx?_debug_ctx:(_debug_ctx=talloc_new(NULL)))
|
||||
|
||||
#define DEBUGLVL(level) ((level) <= DEBUGLEVEL)
|
||||
#define _DEBUG(level, body, header) do { \
|
||||
if (DEBUGLVL(level)) { \
|
||||
void* _debug_ctx=NULL; \
|
||||
if (header) { \
|
||||
do_debug_header(level, __location__, __FUNCTION__); \
|
||||
} \
|
||||
do_debug body; \
|
||||
talloc_free(_debug_ctx); \
|
||||
} \
|
||||
} while (0)
|
||||
/**
|
||||
|
||||
@@ -612,3 +612,11 @@ _PUBLIC_ int get_time_zone(time_t t)
|
||||
return 0;
|
||||
return tm_diff(&tm_utc,tm);
|
||||
}
|
||||
|
||||
/**
|
||||
check if 2 NTTIMEs are equal.
|
||||
*/
|
||||
bool nt_time_equal(NTTIME *t1, NTTIME *t2)
|
||||
{
|
||||
return *t1 == *t2;
|
||||
}
|
||||
|
||||
@@ -224,6 +224,9 @@ _PUBLIC_ void nttime_to_timeval(struct timeval *tv, NTTIME t);
|
||||
*/
|
||||
_PUBLIC_ int get_time_zone(time_t t);
|
||||
|
||||
|
||||
/**
|
||||
check if 2 NTTIMEs are equal.
|
||||
*/
|
||||
bool nt_time_equal(NTTIME *t1, NTTIME *t2);
|
||||
|
||||
#endif /* _SAMBA_TIME_H_ */
|
||||
|
||||
@@ -39,7 +39,6 @@ OBJ_FILES = nbt/nbtname.o
|
||||
[SUBSYSTEM::LIBCLI_NBT]
|
||||
#VERSION = 0.0.1
|
||||
#SO_VERSION = 0
|
||||
#DESCRIPTION = NetBios over TCP/IP client library
|
||||
PRIVATE_PROTO_HEADER = nbt/nbt_proto.h
|
||||
OBJ_FILES = \
|
||||
nbt/nbtsocket.o \
|
||||
|
||||
@@ -1514,10 +1514,10 @@ static void becomeDC_drsuapi_connect_send(struct libnet_BecomeDC_state *s,
|
||||
|
||||
if (!drsuapi->binding) {
|
||||
if (lp_parm_bool(s->libnet->lp_ctx, NULL, "become_dc", "print", false)) {
|
||||
binding_str = talloc_asprintf(s, "ncacn_ip_tcp:%s[krb5,print,seal]", s->source_dsa.dns_name);
|
||||
binding_str = talloc_asprintf(s, "ncacn_ip_tcp:%s[print,seal]", s->source_dsa.dns_name);
|
||||
if (composite_nomem(binding_str, c)) return;
|
||||
} else {
|
||||
binding_str = talloc_asprintf(s, "ncacn_ip_tcp:%s[krb5,seal]", s->source_dsa.dns_name);
|
||||
binding_str = talloc_asprintf(s, "ncacn_ip_tcp:%s[seal]", s->source_dsa.dns_name);
|
||||
if (composite_nomem(binding_str, c)) return;
|
||||
}
|
||||
c->status = dcerpc_parse_binding(s, binding_str, &drsuapi->binding);
|
||||
@@ -1687,6 +1687,7 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
|
||||
struct drsuapi_DsReplicaObjectIdentifier *identifier;
|
||||
uint32_t num_attrs, i = 0;
|
||||
struct drsuapi_DsReplicaAttribute *attrs;
|
||||
struct smb_iconv_convenience *iconv_convenience = lp_iconv_convenience(s->libnet->lp_ctx);
|
||||
enum ndr_err_code ndr_err;
|
||||
bool w2k3;
|
||||
|
||||
@@ -1785,7 +1786,7 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
|
||||
NULL);
|
||||
if (composite_nomem(v, c)) return;
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&vd[0], vd, NULL, v,(ndr_push_flags_fn_t)ndr_push_security_descriptor);
|
||||
ndr_err = ndr_push_struct_blob(&vd[0], vd, iconv_convenience, v,(ndr_push_flags_fn_t)ndr_push_security_descriptor);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
c->status = ndr_map_error2ntstatus(ndr_err);
|
||||
if (!composite_is_ok(c)) return;
|
||||
@@ -1844,7 +1845,7 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
|
||||
s->forest.schema_dn_str);
|
||||
if (composite_nomem(v[0].dn, c)) return;
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&vd[0], vd, NULL, &v[0],
|
||||
ndr_err = ndr_push_struct_blob(&vd[0], vd, iconv_convenience, &v[0],
|
||||
(ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
c->status = ndr_map_error2ntstatus(ndr_err);
|
||||
@@ -1874,7 +1875,7 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
|
||||
|
||||
v = &s->dest_dsa.invocation_id;
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&vd[0], vd, NULL, v, (ndr_push_flags_fn_t)ndr_push_GUID);
|
||||
ndr_err = ndr_push_struct_blob(&vd[0], vd, iconv_convenience, v, (ndr_push_flags_fn_t)ndr_push_GUID);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
c->status = ndr_map_error2ntstatus(ndr_err);
|
||||
if (!composite_is_ok(c)) return;
|
||||
@@ -1913,21 +1914,21 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
|
||||
v[2].sid = s->zero_sid;
|
||||
v[2].dn = s->forest.schema_dn_str;
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&vd[0], vd, NULL, &v[0],
|
||||
ndr_err = ndr_push_struct_blob(&vd[0], vd, iconv_convenience, &v[0],
|
||||
(ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
c->status = ndr_map_error2ntstatus(ndr_err);
|
||||
if (!composite_is_ok(c)) return;
|
||||
}
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&vd[1], vd, NULL, &v[1],
|
||||
ndr_err = ndr_push_struct_blob(&vd[1], vd, iconv_convenience, &v[1],
|
||||
(ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
c->status = ndr_map_error2ntstatus(ndr_err);
|
||||
if (!composite_is_ok(c)) return;
|
||||
}
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&vd[2], vd, NULL, &v[2],
|
||||
ndr_err = ndr_push_struct_blob(&vd[2], vd, iconv_convenience, &v[2],
|
||||
(ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
c->status = ndr_map_error2ntstatus(ndr_err);
|
||||
@@ -1969,21 +1970,21 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
|
||||
v[2].sid = s->zero_sid;
|
||||
v[2].dn = s->forest.schema_dn_str;
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&vd[0], vd, NULL, &v[0],
|
||||
ndr_err = ndr_push_struct_blob(&vd[0], vd, iconv_convenience, &v[0],
|
||||
(ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
c->status = ndr_map_error2ntstatus(ndr_err);
|
||||
if (!composite_is_ok(c)) return;
|
||||
}
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&vd[1], vd, NULL, &v[1],
|
||||
ndr_err = ndr_push_struct_blob(&vd[1], vd, iconv_convenience, &v[1],
|
||||
(ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
c->status = ndr_map_error2ntstatus(ndr_err);
|
||||
if (!composite_is_ok(c)) return;
|
||||
}
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&vd[2], vd, NULL, &v[2],
|
||||
ndr_err = ndr_push_struct_blob(&vd[2], vd, iconv_convenience, &v[2],
|
||||
(ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
c->status = ndr_map_error2ntstatus(ndr_err);
|
||||
@@ -2017,7 +2018,7 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
|
||||
v[0].sid = s->zero_sid;
|
||||
v[0].dn = s->forest.schema_dn_str;
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&vd[0], vd, NULL, &v[0],
|
||||
ndr_err = ndr_push_struct_blob(&vd[0], vd, iconv_convenience, &v[0],
|
||||
(ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
c->status = ndr_map_error2ntstatus(ndr_err);
|
||||
@@ -2049,7 +2050,7 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
|
||||
v[0].sid = s->zero_sid;
|
||||
v[0].dn = s->domain.dn_str;
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&vd[0], vd, NULL, &v[0],
|
||||
ndr_err = ndr_push_struct_blob(&vd[0], vd, iconv_convenience, &v[0],
|
||||
(ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
c->status = ndr_map_error2ntstatus(ndr_err);
|
||||
@@ -2131,7 +2132,7 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
|
||||
v[0].sid = s->zero_sid;
|
||||
v[0].dn = s->dest_dsa.computer_dn_str;
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&vd[0], vd, NULL, &v[0],
|
||||
ndr_err = ndr_push_struct_blob(&vd[0], vd, iconv_convenience, &v[0],
|
||||
(ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
c->status = ndr_map_error2ntstatus(ndr_err);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[LIBRARY::LIBNDR]
|
||||
VERSION = 0.0.1
|
||||
SO_VERSION = 0
|
||||
DESCRIPTION = Network Data Representation Core Library
|
||||
PC_FILE = ndr.pc
|
||||
PUBLIC_HEADERS = ndr/libndr.h
|
||||
PUBLIC_PROTO_HEADER = ndr/libndr_proto.h
|
||||
OBJ_FILES = \
|
||||
@@ -345,10 +345,10 @@ PUBLIC_DEPENDENCIES = dcerpc NDR_UNIXINFO
|
||||
|
||||
[LIBRARY::dcerpc_samr]
|
||||
OBJ_FILES = gen_ndr/ndr_samr_c.o
|
||||
PC_FILE = dcerpc_samr.pc
|
||||
PUBLIC_DEPENDENCIES = dcerpc NDR_SAMR
|
||||
VERSION = 0.0.1
|
||||
SO_VERSION = 0
|
||||
DESCRIPTION = DCE/RPC client library - SAMR
|
||||
|
||||
[SUBSYSTEM::RPC_NDR_SPOOLSS]
|
||||
OBJ_FILES = gen_ndr/ndr_spoolss_c.o
|
||||
@@ -458,7 +458,7 @@ PUBLIC_HEADERS = gen_ndr/dcerpc.h gen_ndr/ndr_dcerpc.h
|
||||
[LIBRARY::dcerpc]
|
||||
VERSION = 0.0.1
|
||||
SO_VERSION = 0
|
||||
DESCRIPTION = DCE/RPC client library
|
||||
PC_FILE = dcerpc.pc
|
||||
PUBLIC_HEADERS = rpc/dcerpc.h \
|
||||
gen_ndr/mgmt.h gen_ndr/ndr_mgmt.h gen_ndr/ndr_mgmt_c.h \
|
||||
gen_ndr/epmapper.h gen_ndr/ndr_epmapper.h gen_ndr/ndr_epmapper_c.h
|
||||
|
||||
11
source/librpc/dcerpc.pc.in
Normal file
11
source/librpc/dcerpc.pc.in
Normal file
@@ -0,0 +1,11 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: dcerpc
|
||||
Description: DCE/RPC client library
|
||||
Requires: ndr
|
||||
Version: 0.0.1
|
||||
Libs: -L${libdir} -ldcerpc
|
||||
Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1
|
||||
11
source/librpc/dcerpc_samr.pc.in
Normal file
11
source/librpc/dcerpc_samr.pc.in
Normal file
@@ -0,0 +1,11 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: dcerpc_samr
|
||||
Description: DCE/RPC client library - SAMR
|
||||
Requires.private: dcerpc ndr
|
||||
Version: 0.0.1
|
||||
Libs: -L${libdir} -ldcerpc_samr
|
||||
Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1
|
||||
@@ -51,7 +51,8 @@ interface misc
|
||||
|
||||
/* id used to identify a endpoint, possibly in a cluster */
|
||||
typedef [public] struct {
|
||||
uint32 id;
|
||||
hyper id;
|
||||
uint32 id2;
|
||||
uint32 node;
|
||||
} server_id;
|
||||
}
|
||||
|
||||
@@ -12,13 +12,13 @@ import "lsa.idl", "samr.idl", "security.idl", "nbt.idl";
|
||||
uuid("12345678-1234-abcd-ef00-01234567cffb"),
|
||||
version(1.0),
|
||||
endpoint("ncacn_np:[\\pipe\\netlogon]","ncacn_ip_tcp:","ncalrpc:"),
|
||||
pointer_default(unique),
|
||||
pointer_default_top(unique)
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
interface netlogon
|
||||
{
|
||||
typedef bitmap samr_AcctFlags samr_AcctFlags;
|
||||
typedef bitmap samr_GroupAttrs samr_GroupAttrs;
|
||||
|
||||
/*****************/
|
||||
/* Function 0x00 */
|
||||
@@ -43,10 +43,10 @@ interface netlogon
|
||||
} netr_UasInfo;
|
||||
|
||||
WERROR netr_LogonUasLogon(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 account_name[],
|
||||
[in] [string,charset(UTF16)] uint16 workstation[],
|
||||
[out] netr_UasInfo *info
|
||||
[out,unique] netr_UasInfo *info
|
||||
);
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ interface netlogon
|
||||
} netr_UasLogoffInfo;
|
||||
|
||||
WERROR netr_LogonUasLogoff(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 account_name[],
|
||||
[in] [string,charset(UTF16)] uint16 workstation[],
|
||||
[out] netr_UasLogoffInfo info
|
||||
@@ -86,13 +86,18 @@ interface netlogon
|
||||
[size_is(size/2),length_is(length/2)] uint16 *bindata;
|
||||
} netr_AcctLockStr;
|
||||
|
||||
const int MSV1_0_CLEARTEXT_PASSWORD_ALLOWED = 0x002;
|
||||
const int MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT = 0x020;
|
||||
const int MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT = 0x800;
|
||||
typedef [public,bitmap32bit] bitmap {
|
||||
MSV1_0_CLEARTEXT_PASSWORD_ALLOWED = 0x00000002,
|
||||
MSV1_0_UPDATE_LOGON_STATISTICS = 0x00000004,
|
||||
MSV1_0_RETURN_USER_PARAMETERS = 0x00000008,
|
||||
MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT = 0x00000020,
|
||||
MSV1_0_RETURN_PROFILE_PATH = 0x00000200,
|
||||
MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT = 0x00000800
|
||||
} netr_LogonParameterControl;
|
||||
|
||||
typedef struct {
|
||||
lsa_String domain_name;
|
||||
uint32 parameter_control; /* see MSV1_0_* */
|
||||
netr_LogonParameterControl parameter_control; /* see MSV1_0_* */
|
||||
uint32 logon_id_low;
|
||||
uint32 logon_id_high;
|
||||
lsa_String account_name;
|
||||
@@ -126,11 +131,6 @@ interface netlogon
|
||||
[case(6)] netr_NetworkInfo *network;
|
||||
} netr_LogonLevel;
|
||||
|
||||
typedef [public] struct {
|
||||
uint32 rid;
|
||||
uint32 attributes;
|
||||
} netr_GroupMembership;
|
||||
|
||||
typedef [public,flag(NDR_PAHEX)] struct {
|
||||
uint8 key[16];
|
||||
} netr_UserSessionKey;
|
||||
@@ -187,7 +187,7 @@ interface netlogon
|
||||
|
||||
typedef struct {
|
||||
dom_sid2 *sid;
|
||||
uint32 attribute;
|
||||
samr_GroupAttrs attributes;
|
||||
} netr_SidAttr;
|
||||
|
||||
typedef [public] struct {
|
||||
@@ -239,10 +239,10 @@ interface netlogon
|
||||
} netr_Authenticator;
|
||||
|
||||
NTSTATUS netr_LogonSamLogon(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 *computer_name,
|
||||
[in] netr_Authenticator *credential,
|
||||
[in][out] netr_Authenticator *return_authenticator,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
||||
[in,unique] netr_Authenticator *credential,
|
||||
[in,out,unique] netr_Authenticator *return_authenticator,
|
||||
[in] uint16 logon_level,
|
||||
[in] [switch_is(logon_level)] netr_LogonLevel logon,
|
||||
[in] uint16 validation_level,
|
||||
@@ -255,10 +255,10 @@ interface netlogon
|
||||
/* Function 0x03 */
|
||||
|
||||
NTSTATUS netr_LogonSamLogoff(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 *computer_name,
|
||||
[in] netr_Authenticator *credential,
|
||||
[in][out] netr_Authenticator *return_authenticator,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
||||
[in,unique] netr_Authenticator *credential,
|
||||
[in,out,unique] netr_Authenticator *return_authenticator,
|
||||
[in] uint16 logon_level,
|
||||
[in] [switch_is(logon_level)] netr_LogonLevel logon
|
||||
);
|
||||
@@ -269,7 +269,7 @@ interface netlogon
|
||||
/* Function 0x04 */
|
||||
|
||||
[public] NTSTATUS netr_ServerReqChallenge(
|
||||
[in,string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique,string,charset(UTF16)] uint16 *server_name,
|
||||
[in,string,charset(UTF16)] uint16 computer_name[],
|
||||
[in,out,ref] netr_Credential *credentials
|
||||
);
|
||||
@@ -281,7 +281,7 @@ interface netlogon
|
||||
typedef enum netr_SchannelType netr_SchannelType;
|
||||
|
||||
NTSTATUS netr_ServerAuthenticate(
|
||||
[in,string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique,string,charset(UTF16)] uint16 *server_name,
|
||||
[in,string,charset(UTF16)] uint16 account_name[],
|
||||
[in] netr_SchannelType secure_channel_type,
|
||||
[in,string,charset(UTF16)] uint16 computer_name[],
|
||||
@@ -293,7 +293,7 @@ interface netlogon
|
||||
/* Function 0x06 */
|
||||
|
||||
NTSTATUS netr_ServerPasswordSet(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 account_name[],
|
||||
[in] netr_SchannelType secure_channel_type,
|
||||
[in] [string,charset(UTF16)] uint16 computer_name[],
|
||||
@@ -684,7 +684,7 @@ interface netlogon
|
||||
[in] netr_SamDatabaseID database_id,
|
||||
[in,out] udlong sequence_num,
|
||||
[in] uint32 preferredmaximumlength,
|
||||
[out] netr_DELTA_ENUM_ARRAY *delta_enum_array
|
||||
[out,unique] netr_DELTA_ENUM_ARRAY *delta_enum_array
|
||||
);
|
||||
|
||||
|
||||
@@ -699,7 +699,7 @@ interface netlogon
|
||||
[in] netr_SamDatabaseID database_id,
|
||||
[in,out] uint32 sync_context,
|
||||
[in] uint32 preferredmaximumlength,
|
||||
[out] netr_DELTA_ENUM_ARRAY *delta_enum_array
|
||||
[out,unique] netr_DELTA_ENUM_ARRAY *delta_enum_array
|
||||
);
|
||||
|
||||
|
||||
@@ -719,7 +719,7 @@ interface netlogon
|
||||
} netr_AccountBuffer;
|
||||
|
||||
NTSTATUS netr_AccountDeltas(
|
||||
[in] [string,charset(UTF16)] uint16 *logon_server,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *logon_server,
|
||||
[in] [string,charset(UTF16)] uint16 computername[],
|
||||
[in] netr_Authenticator credential,
|
||||
[in,out] netr_Authenticator return_authenticator,
|
||||
@@ -738,7 +738,7 @@ interface netlogon
|
||||
/* Function 0x0A */
|
||||
|
||||
NTSTATUS netr_AccountSync(
|
||||
[in] [string,charset(UTF16)] uint16 *logon_server,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *logon_server,
|
||||
[in] [string,charset(UTF16)] uint16 computername[],
|
||||
[in] netr_Authenticator credential,
|
||||
[in,out] netr_Authenticator return_authenticator,
|
||||
@@ -758,8 +758,8 @@ interface netlogon
|
||||
|
||||
WERROR netr_GetDcName(
|
||||
[in] [string,charset(UTF16)] uint16 logon_server[],
|
||||
[in] [string,charset(UTF16)] uint16 *domainname,
|
||||
[out] [string,charset(UTF16)] uint16 *dcname
|
||||
[in,unique] [string,charset(UTF16)] uint16 *domainname,
|
||||
[out,unique] [string,charset(UTF16)] uint16 *dcname
|
||||
);
|
||||
|
||||
/*****************/
|
||||
@@ -802,7 +802,7 @@ interface netlogon
|
||||
} netr_LogonControlCode;
|
||||
|
||||
WERROR netr_LogonControl(
|
||||
[in] [string,charset(UTF16)] uint16 *logon_server,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *logon_server,
|
||||
[in] netr_LogonControlCode function_code,
|
||||
[in] uint32 level,
|
||||
[out,switch_is(level)] netr_CONTROL_QUERY_INFORMATION info
|
||||
@@ -813,9 +813,9 @@ interface netlogon
|
||||
/* Function 0x0D */
|
||||
|
||||
WERROR netr_GetAnyDCName(
|
||||
[in] [string,charset(UTF16)] uint16 *logon_server,
|
||||
[in] [string,charset(UTF16)] uint16 *domainname,
|
||||
[out] [string,charset(UTF16)] uint16 *dcname
|
||||
[in,unique] [string,charset(UTF16)] uint16 *logon_server,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *domainname,
|
||||
[out,unique] [string,charset(UTF16)] uint16 *dcname
|
||||
);
|
||||
|
||||
|
||||
@@ -830,7 +830,7 @@ interface netlogon
|
||||
} netr_CONTROL_DATA_INFORMATION;
|
||||
|
||||
WERROR netr_LogonControl2(
|
||||
[in] [string,charset(UTF16)] uint16 *logon_server,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *logon_server,
|
||||
[in] uint32 function_code,
|
||||
[in] uint32 level,
|
||||
[in][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION data,
|
||||
@@ -849,7 +849,7 @@ interface netlogon
|
||||
/* Function 0x0F */
|
||||
|
||||
NTSTATUS netr_ServerAuthenticate2(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 account_name[],
|
||||
[in] netr_SchannelType secure_channel_type,
|
||||
[in] [string,charset(UTF16)] uint16 computer_name[],
|
||||
@@ -870,7 +870,7 @@ interface netlogon
|
||||
[in] uint16 restart_state,
|
||||
[in,out] uint32 sync_context,
|
||||
[in] uint32 preferredmaximumlength,
|
||||
[out] netr_DELTA_ENUM_ARRAY *delta_enum_array
|
||||
[out,unique] netr_DELTA_ENUM_ARRAY *delta_enum_array
|
||||
);
|
||||
|
||||
|
||||
@@ -884,9 +884,9 @@ interface netlogon
|
||||
[in] [string,charset(UTF16)] uint16 computername[],
|
||||
[in] netr_Authenticator credential,
|
||||
[in,out] netr_Authenticator return_authenticator,
|
||||
[in][size_is(change_log_entry_size)] uint8 *change_log_entry,
|
||||
[in,unique][size_is(change_log_entry_size)] uint8 *change_log_entry,
|
||||
[in] uint32 change_log_entry_size,
|
||||
[out] netr_DELTA_ENUM_ARRAY *delta_enum_array
|
||||
[out,unique] netr_DELTA_ENUM_ARRAY *delta_enum_array
|
||||
);
|
||||
|
||||
|
||||
@@ -894,7 +894,7 @@ interface netlogon
|
||||
/* Function 0x12 */
|
||||
|
||||
WERROR netr_LogonControl2Ex(
|
||||
[in] [string,charset(UTF16)] uint16 *logon_server,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *logon_server,
|
||||
[in] uint32 function_code,
|
||||
[in] uint32 level,
|
||||
[in][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION data,
|
||||
@@ -909,7 +909,7 @@ interface netlogon
|
||||
} netr_Blob;
|
||||
|
||||
WERROR netr_NetrEnumerateTrustedDomains(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[out,ref] netr_Blob *trusted_domains_blob
|
||||
);
|
||||
|
||||
@@ -973,12 +973,12 @@ interface netlogon
|
||||
} netr_DsRGetDCNameInfo;
|
||||
|
||||
WERROR netr_DsRGetDCName(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 *domain_name,
|
||||
[in] GUID *domain_guid,
|
||||
[in] GUID *site_guid,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *domain_name,
|
||||
[in,unique] GUID *domain_guid,
|
||||
[in,unique] GUID *site_guid,
|
||||
[in] netr_DsRGetDCName_flags flags,
|
||||
[out] netr_DsRGetDCNameInfo *info
|
||||
[out,unique] netr_DsRGetDCNameInfo *info
|
||||
);
|
||||
|
||||
/*****************/
|
||||
@@ -991,7 +991,11 @@ interface netlogon
|
||||
|
||||
/****************/
|
||||
/* Function 0x17 */
|
||||
WERROR netr_NETRLOGONGETTRUSTRID();
|
||||
WERROR netr_LogonGetTrustRid(
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *domain_name,
|
||||
[out,ref] uint32 *rid
|
||||
);
|
||||
|
||||
/****************/
|
||||
/* Function 0x18 */
|
||||
@@ -1004,7 +1008,7 @@ interface netlogon
|
||||
/****************/
|
||||
/* Function 0x1a */
|
||||
[public] NTSTATUS netr_ServerAuthenticate3(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 account_name[],
|
||||
[in] netr_SchannelType secure_channel_type,
|
||||
[in] [string,charset(UTF16)] uint16 computer_name[],
|
||||
@@ -1017,19 +1021,19 @@ interface netlogon
|
||||
/* Function 0x1b */
|
||||
|
||||
WERROR netr_DsRGetDCNameEx(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 *domain_name,
|
||||
[in] GUID *domain_guid,
|
||||
[in] [string,charset(UTF16)] uint16 *site_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *domain_name,
|
||||
[in,unique] GUID *domain_guid,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *site_name,
|
||||
[in] netr_DsRGetDCName_flags flags,
|
||||
[out] netr_DsRGetDCNameInfo *info
|
||||
[out,unique] netr_DsRGetDCNameInfo *info
|
||||
);
|
||||
|
||||
/****************/
|
||||
/* Function 0x1c */
|
||||
WERROR netr_DsRGetSiteName(
|
||||
[in] [string,charset(UTF16)] uint16 *computer_name,
|
||||
[out] [string,charset(UTF16)] uint16 *site
|
||||
[in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
||||
[out,unique] [string,charset(UTF16)] uint16 *site
|
||||
);
|
||||
|
||||
/****************/
|
||||
@@ -1085,7 +1089,7 @@ interface netlogon
|
||||
|
||||
NTSTATUS netr_LogonGetDomainInfo(
|
||||
[in] [string,charset(UTF16)] uint16 server_name[],
|
||||
[in] [string,charset(UTF16)] uint16 *computer_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
||||
[in,ref] netr_Authenticator *credential,
|
||||
[in,out,ref] netr_Authenticator *return_authenticator,
|
||||
[in] uint32 level,
|
||||
@@ -1101,7 +1105,7 @@ interface netlogon
|
||||
/*****************/
|
||||
/* Function 0x1e */
|
||||
NTSTATUS netr_ServerPasswordSet2(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 account_name[],
|
||||
[in] netr_SchannelType secure_channel_type,
|
||||
[in] [string,charset(UTF16)] uint16 computer_name[],
|
||||
@@ -1113,7 +1117,7 @@ interface netlogon
|
||||
/****************/
|
||||
/* Function 0x1f */
|
||||
WERROR netr_ServerPasswordGet(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 account_name[],
|
||||
[in] netr_SchannelType secure_channel_type,
|
||||
[in] [string,charset(UTF16)] uint16 computer_name[],
|
||||
@@ -1139,7 +1143,7 @@ interface netlogon
|
||||
} netr_DsRAddress;
|
||||
|
||||
WERROR netr_DsRAddressToSitenamesW(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [range(0,32000)] uint32 count,
|
||||
[in] [size_is(count)] [ref] netr_DsRAddress *addresses,
|
||||
[out] [ref] netr_DsRAddressToSitenamesWCtr **ctr
|
||||
@@ -1148,14 +1152,14 @@ interface netlogon
|
||||
/****************/
|
||||
/* Function 0x22 */
|
||||
WERROR netr_DsRGetDCNameEx2(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 *client_account,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *client_account,
|
||||
[in] samr_AcctFlags mask,
|
||||
[in] [string,charset(UTF16)] uint16 *domain_name,
|
||||
[in] GUID *domain_guid,
|
||||
[in] [string,charset(UTF16)] uint16 *site_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *domain_name,
|
||||
[in,unique] GUID *domain_guid,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *site_name,
|
||||
[in] netr_DsRGetDCName_flags flags,
|
||||
[out] netr_DsRGetDCNameInfo *info
|
||||
[out,unique] netr_DsRGetDCNameInfo *info
|
||||
);
|
||||
|
||||
/****************/
|
||||
@@ -1207,7 +1211,7 @@ interface netlogon
|
||||
} netr_DomainTrustList;
|
||||
|
||||
WERROR netr_NetrEnumerateTrustedDomainsEx(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[out,ref] netr_DomainTrustList *dom_trust_list
|
||||
);
|
||||
|
||||
@@ -1220,7 +1224,7 @@ interface netlogon
|
||||
} netr_DsRAddressToSitenamesExWCtr;
|
||||
|
||||
WERROR netr_DsRAddressToSitenamesExW(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [range(0,32000)] uint32 count,
|
||||
[in] [size_is(count)] [ref] netr_DsRAddress *addresses,
|
||||
[out] [ref] netr_DsRAddressToSitenamesExWCtr **ctr
|
||||
@@ -1235,15 +1239,15 @@ interface netlogon
|
||||
} DcSitesCtr;
|
||||
|
||||
WERROR netr_DsrGetDcSiteCoverageW(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[out] DcSitesCtr *ctr
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[out,unique] DcSitesCtr *ctr
|
||||
);
|
||||
|
||||
/****************/
|
||||
/* Function 0x27 */
|
||||
NTSTATUS netr_LogonSamLogonEx(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 *computer_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
||||
[in] uint16 logon_level,
|
||||
[in] [switch_is(logon_level)] netr_LogonLevel logon,
|
||||
[in] uint16 validation_level,
|
||||
@@ -1256,21 +1260,27 @@ interface netlogon
|
||||
/* Function 0x28 */
|
||||
|
||||
WERROR netr_DsrEnumerateDomainTrusts(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] netr_TrustFlags trust_flags,
|
||||
[out] uint32 count,
|
||||
[out,size_is(count)] netr_DomainTrust *trusts
|
||||
[out,unique,size_is(count)] netr_DomainTrust *trusts
|
||||
);
|
||||
|
||||
|
||||
/****************/
|
||||
/* Function 0x29 */
|
||||
WERROR netr_DSRDEREGISTERDNSHOSTRECORDS();
|
||||
WERROR netr_DsrDeregisterDNSHostRecords(
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *domain,
|
||||
[in,unique] GUID *domain_guid,
|
||||
[in,unique] GUID *dsa_guid,
|
||||
[in,ref] [string,charset(UTF16)] uint16 *dns_host
|
||||
);
|
||||
|
||||
/****************/
|
||||
/* Function 0x2a */
|
||||
NTSTATUS netr_ServerTrustPasswordsGet(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 account_name[],
|
||||
[in] netr_SchannelType secure_channel_type,
|
||||
[in] [string,charset(UTF16)] uint16 computer_name[],
|
||||
@@ -1286,8 +1296,8 @@ interface netlogon
|
||||
const int DS_GFTI_UPDATE_TDO = 0x1;
|
||||
|
||||
WERROR netr_DsRGetForestTrustInformation(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 *trusted_domain_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *trusted_domain_name,
|
||||
[in] uint32 flags,
|
||||
[out,ref] lsa_ForestTrustInformation **forest_trust_info
|
||||
);
|
||||
@@ -1295,7 +1305,7 @@ interface netlogon
|
||||
/****************/
|
||||
/* Function 0x2c */
|
||||
WERROR netr_GetForestTrustInformation(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,ref] [string,charset(UTF16)] uint16 *trusted_domain_name,
|
||||
[in,ref] netr_Authenticator *credential,
|
||||
[out,ref] netr_Authenticator *return_authenticator,
|
||||
@@ -1308,10 +1318,10 @@ interface netlogon
|
||||
|
||||
/* this is the ADS varient. I don't yet know what the "flags" are for */
|
||||
NTSTATUS netr_LogonSamLogonWithFlags(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 *computer_name,
|
||||
[in] netr_Authenticator *credential,
|
||||
[in][out] netr_Authenticator *return_authenticator,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
||||
[in,unique] netr_Authenticator *credential,
|
||||
[in,out,unique] netr_Authenticator *return_authenticator,
|
||||
[in] uint16 logon_level,
|
||||
[in] [switch_is(logon_level)] netr_LogonLevel logon,
|
||||
[in] uint16 validation_level,
|
||||
|
||||
@@ -12,8 +12,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
[ uuid("12345778-1234-abcd-ef00-0123456789ac"),
|
||||
version(1.0),
|
||||
endpoint("ncacn_np:[\\pipe\\samr]","ncacn_ip_tcp:", "ncalrpc:"),
|
||||
pointer_default(unique),
|
||||
pointer_default_top(unique)
|
||||
pointer_default(unique)
|
||||
] interface samr
|
||||
{
|
||||
typedef bitmap security_secinfo security_secinfo;
|
||||
@@ -51,54 +50,54 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
} samr_ConnectAccessMask;
|
||||
|
||||
typedef [bitmap32bit] bitmap {
|
||||
USER_ACCESS_GET_NAME_ETC = 0x00000001,
|
||||
USER_ACCESS_GET_LOCALE = 0x00000002,
|
||||
USER_ACCESS_SET_LOC_COM = 0x00000004,
|
||||
USER_ACCESS_GET_LOGONINFO = 0x00000008,
|
||||
USER_ACCESS_GET_ATTRIBUTES = 0x00000010,
|
||||
USER_ACCESS_SET_ATTRIBUTES = 0x00000020,
|
||||
USER_ACCESS_CHANGE_PASSWORD = 0x00000040,
|
||||
USER_ACCESS_SET_PASSWORD = 0x00000080,
|
||||
USER_ACCESS_GET_GROUPS = 0x00000100,
|
||||
USER_ACCESS_GET_GROUP_MEMBERSHIP = 0x00000200,
|
||||
USER_ACCESS_CHANGE_GROUP_MEMBERSHIP = 0x00000400
|
||||
SAMR_USER_ACCESS_GET_NAME_ETC = 0x00000001,
|
||||
SAMR_USER_ACCESS_GET_LOCALE = 0x00000002,
|
||||
SAMR_USER_ACCESS_SET_LOC_COM = 0x00000004,
|
||||
SAMR_USER_ACCESS_GET_LOGONINFO = 0x00000008,
|
||||
SAMR_USER_ACCESS_GET_ATTRIBUTES = 0x00000010,
|
||||
SAMR_USER_ACCESS_SET_ATTRIBUTES = 0x00000020,
|
||||
SAMR_USER_ACCESS_CHANGE_PASSWORD = 0x00000040,
|
||||
SAMR_USER_ACCESS_SET_PASSWORD = 0x00000080,
|
||||
SAMR_USER_ACCESS_GET_GROUPS = 0x00000100,
|
||||
SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP = 0x00000200,
|
||||
SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP = 0x00000400
|
||||
} samr_UserAccessMask;
|
||||
|
||||
typedef [bitmap32bit] bitmap {
|
||||
DOMAIN_ACCESS_LOOKUP_INFO_1 = 0x00000001,
|
||||
DOMAIN_ACCESS_SET_INFO_1 = 0x00000002,
|
||||
DOMAIN_ACCESS_LOOKUP_INFO_2 = 0x00000004,
|
||||
DOMAIN_ACCESS_SET_INFO_2 = 0x00000008,
|
||||
DOMAIN_ACCESS_CREATE_USER = 0x00000010,
|
||||
DOMAIN_ACCESS_CREATE_GROUP = 0x00000020,
|
||||
DOMAIN_ACCESS_CREATE_ALIAS = 0x00000040,
|
||||
DOMAIN_ACCESS_LOOKUP_ALIAS = 0x00000080,
|
||||
DOMAIN_ACCESS_ENUM_ACCOUNTS = 0x00000100,
|
||||
DOMAIN_ACCESS_OPEN_ACCOUNT = 0x00000200,
|
||||
DOMAIN_ACCESS_SET_INFO_3 = 0x00000400
|
||||
SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1 = 0x00000001,
|
||||
SAMR_DOMAIN_ACCESS_SET_INFO_1 = 0x00000002,
|
||||
SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2 = 0x00000004,
|
||||
SAMR_DOMAIN_ACCESS_SET_INFO_2 = 0x00000008,
|
||||
SAMR_DOMAIN_ACCESS_CREATE_USER = 0x00000010,
|
||||
SAMR_DOMAIN_ACCESS_CREATE_GROUP = 0x00000020,
|
||||
SAMR_DOMAIN_ACCESS_CREATE_ALIAS = 0x00000040,
|
||||
SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS = 0x00000080,
|
||||
SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS = 0x00000100,
|
||||
SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT = 0x00000200,
|
||||
SAMR_DOMAIN_ACCESS_SET_INFO_3 = 0x00000400
|
||||
} samr_DomainAccessMask;
|
||||
|
||||
typedef [bitmap32bit] bitmap {
|
||||
GROUP_ACCESS_LOOKUP_INFO = 0x00000001,
|
||||
GROUP_ACCESS_SET_INFO = 0x00000002,
|
||||
GROUP_ACCESS_ADD_MEMBER = 0x00000004,
|
||||
GROUP_ACCESS_REMOVE_MEMBER = 0x00000008,
|
||||
GROUP_ACCESS_GET_MEMBERS = 0x00000010
|
||||
SAMR_GROUP_ACCESS_LOOKUP_INFO = 0x00000001,
|
||||
SAMR_GROUP_ACCESS_SET_INFO = 0x00000002,
|
||||
SAMR_GROUP_ACCESS_ADD_MEMBER = 0x00000004,
|
||||
SAMR_GROUP_ACCESS_REMOVE_MEMBER = 0x00000008,
|
||||
SAMR_GROUP_ACCESS_GET_MEMBERS = 0x00000010
|
||||
} samr_GroupAccessMask;
|
||||
|
||||
typedef [bitmap32bit] bitmap {
|
||||
ALIAS_ACCESS_ADD_MEMBER = 0x00000001,
|
||||
ALIAS_ACCESS_REMOVE_MEMBER = 0x00000002,
|
||||
ALIAS_ACCESS_GET_MEMBERS = 0x00000004,
|
||||
ALIAS_ACCESS_LOOKUP_INFO = 0x00000008,
|
||||
ALIAS_ACCESS_SET_INFO = 0x00000010
|
||||
SAMR_ALIAS_ACCESS_ADD_MEMBER = 0x00000001,
|
||||
SAMR_ALIAS_ACCESS_REMOVE_MEMBER = 0x00000002,
|
||||
SAMR_ALIAS_ACCESS_GET_MEMBERS = 0x00000004,
|
||||
SAMR_ALIAS_ACCESS_LOOKUP_INFO = 0x00000008,
|
||||
SAMR_ALIAS_ACCESS_SET_INFO = 0x00000010
|
||||
} samr_AliasAccessMask;
|
||||
|
||||
/******************/
|
||||
/* Function: 0x00 */
|
||||
NTSTATUS samr_Connect (
|
||||
/* notice the lack of [string] */
|
||||
[in] uint16 *system_name,
|
||||
[in,unique] uint16 *system_name,
|
||||
[in] samr_ConnectAccessMask access_mask,
|
||||
[out,ref] policy_handle *connect_handle
|
||||
);
|
||||
@@ -125,7 +124,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
NTSTATUS samr_QuerySecurity (
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] security_secinfo sec_info,
|
||||
[out] sec_desc_buf *sdbuf
|
||||
[out,unique] sec_desc_buf *sdbuf
|
||||
);
|
||||
|
||||
/******************/
|
||||
@@ -143,7 +142,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
NTSTATUS samr_LookupDomain (
|
||||
[in,ref] policy_handle *connect_handle,
|
||||
[in,ref] lsa_String *domain_name,
|
||||
[out] dom_sid2 *sid
|
||||
[out,unique] dom_sid2 *sid
|
||||
);
|
||||
|
||||
|
||||
@@ -164,7 +163,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
[in,ref] policy_handle *connect_handle,
|
||||
[in,out,ref] uint32 *resume_handle,
|
||||
[in] uint32 buf_size,
|
||||
[out] samr_SamArray *sam,
|
||||
[out,unique] samr_SamArray *sam,
|
||||
[out] uint32 num_entries
|
||||
);
|
||||
|
||||
@@ -288,7 +287,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
NTSTATUS samr_QueryDomainInfo(
|
||||
[in,ref] policy_handle *domain_handle,
|
||||
[in] uint16 level,
|
||||
[out,switch_is(level)] samr_DomainInfo *info
|
||||
[out,switch_is(level),unique] samr_DomainInfo *info
|
||||
);
|
||||
|
||||
/************************/
|
||||
@@ -321,7 +320,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
[in,ref] policy_handle *domain_handle,
|
||||
[in,out,ref] uint32 *resume_handle,
|
||||
[in] uint32 max_size,
|
||||
[out] samr_SamArray *sam,
|
||||
[out,unique] samr_SamArray *sam,
|
||||
[out] uint32 num_entries
|
||||
);
|
||||
|
||||
@@ -349,7 +348,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
[in,out,ref] uint32 *resume_handle,
|
||||
[in] samr_AcctFlags acct_flags,
|
||||
[in] uint32 max_size,
|
||||
[out] samr_SamArray *sam,
|
||||
[out,unique] samr_SamArray *sam,
|
||||
[out] uint32 num_entries
|
||||
);
|
||||
|
||||
@@ -369,7 +368,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
[in,ref] policy_handle *domain_handle,
|
||||
[in,out,ref] uint32 *resume_handle,
|
||||
[in] samr_AcctFlags acct_flags,
|
||||
[out] samr_SamArray *sam,
|
||||
[out,unique] samr_SamArray *sam,
|
||||
[out] uint32 num_entries
|
||||
);
|
||||
|
||||
@@ -466,7 +465,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
NTSTATUS samr_QueryGroupInfo(
|
||||
[in,ref] policy_handle *group_handle,
|
||||
[in] samr_GroupInfoEnum level,
|
||||
[out,switch_is(level)] samr_GroupInfo *info
|
||||
[out,switch_is(level),unique] samr_GroupInfo *info
|
||||
);
|
||||
|
||||
/************************/
|
||||
@@ -509,7 +508,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
|
||||
NTSTATUS samr_QueryGroupMember(
|
||||
[in,ref] policy_handle *group_handle,
|
||||
[out] samr_RidTypeArray *rids
|
||||
[out,unique] samr_RidTypeArray *rids
|
||||
);
|
||||
|
||||
|
||||
@@ -563,7 +562,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
NTSTATUS samr_QueryAliasInfo(
|
||||
[in,ref] policy_handle *alias_handle,
|
||||
[in] samr_AliasInfoEnum level,
|
||||
[out,switch_is(level)] samr_AliasInfo *info
|
||||
[out,switch_is(level),unique] samr_AliasInfo *info
|
||||
);
|
||||
|
||||
/************************/
|
||||
@@ -862,7 +861,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
[public] NTSTATUS samr_QueryUserInfo(
|
||||
[in,ref] policy_handle *user_handle,
|
||||
[in] uint16 level,
|
||||
[out,switch_is(level)] samr_UserInfo *info
|
||||
[out,unique,switch_is(level)] samr_UserInfo *info
|
||||
);
|
||||
|
||||
|
||||
@@ -887,15 +886,15 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
NTSTATUS samr_ChangePasswordUser(
|
||||
[in,ref] policy_handle *user_handle,
|
||||
[in] boolean8 lm_present,
|
||||
[in] samr_Password *old_lm_crypted,
|
||||
[in] samr_Password *new_lm_crypted,
|
||||
[in,unique] samr_Password *old_lm_crypted,
|
||||
[in,unique] samr_Password *new_lm_crypted,
|
||||
[in] boolean8 nt_present,
|
||||
[in] samr_Password *old_nt_crypted,
|
||||
[in] samr_Password *new_nt_crypted,
|
||||
[in,unique] samr_Password *old_nt_crypted,
|
||||
[in,unique] samr_Password *new_nt_crypted,
|
||||
[in] boolean8 cross1_present,
|
||||
[in] samr_Password *nt_cross,
|
||||
[in,unique] samr_Password *nt_cross,
|
||||
[in] boolean8 cross2_present,
|
||||
[in] samr_Password *lm_cross
|
||||
[in,unique] samr_Password *lm_cross
|
||||
);
|
||||
|
||||
/************************/
|
||||
@@ -913,7 +912,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
|
||||
NTSTATUS samr_GetGroupsForUser(
|
||||
[in,ref] policy_handle *user_handle,
|
||||
[out] samr_RidWithAttributeArray *rids
|
||||
[out,unique] samr_RidWithAttributeArray *rids
|
||||
);
|
||||
|
||||
/************************/
|
||||
@@ -1061,7 +1060,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
NTSTATUS samr_QueryDomainInfo2(
|
||||
[in,ref] policy_handle *domain_handle,
|
||||
[in] uint16 level,
|
||||
[out,switch_is(level)] samr_DomainInfo *info
|
||||
[out,unique,switch_is(level)] samr_DomainInfo *info
|
||||
);
|
||||
|
||||
/************************/
|
||||
@@ -1073,7 +1072,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
NTSTATUS samr_QueryUserInfo2(
|
||||
[in,ref] policy_handle *user_handle,
|
||||
[in] uint16 level,
|
||||
[out,switch_is(level)] samr_UserInfo *info
|
||||
[out,unique,switch_is(level)] samr_UserInfo *info
|
||||
);
|
||||
|
||||
/************************/
|
||||
@@ -1155,35 +1154,35 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
/* Function 0x36 */
|
||||
|
||||
NTSTATUS samr_OemChangePasswordUser2(
|
||||
[in] lsa_AsciiString *server,
|
||||
[in,unique] lsa_AsciiString *server,
|
||||
[in,ref] lsa_AsciiString *account,
|
||||
[in] samr_CryptPassword *password,
|
||||
[in] samr_Password *hash
|
||||
[in,unique] samr_CryptPassword *password,
|
||||
[in,unique] samr_Password *hash
|
||||
);
|
||||
|
||||
/************************/
|
||||
/* Function 0x37 */
|
||||
NTSTATUS samr_ChangePasswordUser2(
|
||||
[in] lsa_String *server,
|
||||
[in,unique] lsa_String *server,
|
||||
[in,ref] lsa_String *account,
|
||||
[in] samr_CryptPassword *nt_password,
|
||||
[in] samr_Password *nt_verifier,
|
||||
[in,unique] samr_CryptPassword *nt_password,
|
||||
[in,unique] samr_Password *nt_verifier,
|
||||
[in] boolean8 lm_change,
|
||||
[in] samr_CryptPassword *lm_password,
|
||||
[in] samr_Password *lm_verifier
|
||||
[in,unique] samr_CryptPassword *lm_password,
|
||||
[in,unique] samr_Password *lm_verifier
|
||||
);
|
||||
|
||||
/************************/
|
||||
/* Function 0x38 */
|
||||
NTSTATUS samr_GetDomPwInfo(
|
||||
[in] lsa_String *domain_name,
|
||||
[in,unique] lsa_String *domain_name,
|
||||
[out] samr_PwInfo info
|
||||
);
|
||||
|
||||
/************************/
|
||||
/* Function 0x39 */
|
||||
NTSTATUS samr_Connect2(
|
||||
[in,string,charset(UTF16)] uint16 *system_name,
|
||||
[in,unique,string,charset(UTF16)] uint16 *system_name,
|
||||
[in] samr_ConnectAccessMask access_mask,
|
||||
[out,ref] policy_handle *connect_handle
|
||||
);
|
||||
@@ -1221,7 +1220,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
/************************/
|
||||
/* Function 0x3d */
|
||||
NTSTATUS samr_Connect3(
|
||||
[in,string,charset(UTF16)] uint16 *system_name,
|
||||
[in,unique,string,charset(UTF16)] uint16 *system_name,
|
||||
/* this unknown value seems to be completely ignored by w2k3 */
|
||||
[in] uint32 unknown,
|
||||
[in] samr_ConnectAccessMask access_mask,
|
||||
@@ -1231,7 +1230,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
/************************/
|
||||
/* Function 0x3e */
|
||||
NTSTATUS samr_Connect4(
|
||||
[in,string,charset(UTF16)] uint16 *system_name,
|
||||
[in,unique,string,charset(UTF16)] uint16 *system_name,
|
||||
[in] uint32 unknown,
|
||||
[in] samr_ConnectAccessMask access_mask,
|
||||
[out,ref] policy_handle *connect_handle
|
||||
@@ -1249,16 +1248,16 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
} samr_ChangeReject;
|
||||
|
||||
NTSTATUS samr_ChangePasswordUser3(
|
||||
[in] lsa_String *server,
|
||||
[in,unique] lsa_String *server,
|
||||
[in,ref] lsa_String *account,
|
||||
[in] samr_CryptPassword *nt_password,
|
||||
[in] samr_Password *nt_verifier,
|
||||
[in,unique] samr_CryptPassword *nt_password,
|
||||
[in,unique] samr_Password *nt_verifier,
|
||||
[in] boolean8 lm_change,
|
||||
[in] samr_CryptPassword *lm_password,
|
||||
[in] samr_Password *lm_verifier,
|
||||
[in] samr_CryptPassword *password3,
|
||||
[out] samr_DomInfo1 *dominfo,
|
||||
[out] samr_ChangeReject *reject
|
||||
[in,unique] samr_CryptPassword *lm_password,
|
||||
[in,unique] samr_Password *lm_verifier,
|
||||
[in,unique] samr_CryptPassword *password3,
|
||||
[out,unique] samr_DomInfo1 *dominfo,
|
||||
[out,unique] samr_ChangeReject *reject
|
||||
);
|
||||
|
||||
/************************/
|
||||
@@ -1274,7 +1273,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
} samr_ConnectInfo;
|
||||
|
||||
[public] NTSTATUS samr_Connect5(
|
||||
[in,string,charset(UTF16)] uint16 *system_name,
|
||||
[in,unique,string,charset(UTF16)] uint16 *system_name,
|
||||
[in] samr_ConnectAccessMask access_mask,
|
||||
[in,out] uint32 level,
|
||||
[in,out,switch_is(level),ref] samr_ConnectInfo *info,
|
||||
@@ -1286,7 +1285,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
NTSTATUS samr_RidToSid(
|
||||
[in,ref] policy_handle *domain_handle,
|
||||
[in] uint32 rid,
|
||||
[out] dom_sid2 *sid
|
||||
[out,unique] dom_sid2 *sid
|
||||
);
|
||||
|
||||
|
||||
@@ -1300,9 +1299,9 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
*/
|
||||
|
||||
NTSTATUS samr_SetDsrmPassword(
|
||||
[in] lsa_String *name,
|
||||
[in,unique] lsa_String *name,
|
||||
[in] uint32 unknown,
|
||||
[in] samr_Password *hash
|
||||
[in,unique] samr_Password *hash
|
||||
);
|
||||
|
||||
|
||||
@@ -1401,6 +1400,6 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
NTSTATUS samr_ValidatePassword(
|
||||
[in] samr_ValidatePasswordLevel level,
|
||||
[in,switch_is(level)] samr_ValidatePasswordReq req,
|
||||
[out,switch_is(level)] samr_ValidatePasswordRep *rep
|
||||
[out,unique,switch_is(level)] samr_ValidatePasswordRep *rep
|
||||
);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import "security.idl", "winreg.idl";
|
||||
version(1.0),
|
||||
endpoint("ncacn_np:[\\pipe\\spoolss]"),
|
||||
pointer_default(unique),
|
||||
pointer_default_top(unique),
|
||||
helpstring("Spooler SubSystem"),
|
||||
helper("librpc/ndr/ndr_spoolss_buf.h")
|
||||
] interface spoolss
|
||||
@@ -254,11 +253,11 @@ import "security.idl", "winreg.idl";
|
||||
/* we are using this as internal parsing code */
|
||||
[public,noopnum,noprint] WERROR _spoolss_EnumPrinters(
|
||||
[in] spoolss_EnumPrinterFlags flags,
|
||||
[in] [string,charset(UTF16)] uint16 *server,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server,
|
||||
[in] uint32 level,
|
||||
[in] DATA_BLOB *buffer,
|
||||
[in,unique] DATA_BLOB *buffer,
|
||||
[in] uint32 offered,
|
||||
[out] DATA_BLOB *info,
|
||||
[out,unique] DATA_BLOB *info,
|
||||
[out] uint32 needed,
|
||||
[out] uint32 count
|
||||
);
|
||||
@@ -269,14 +268,14 @@ import "security.idl", "winreg.idl";
|
||||
);
|
||||
[nopull,nopush] WERROR spoolss_EnumPrinters(
|
||||
[in] spoolss_EnumPrinterFlags flags,
|
||||
[in] [string,charset(UTF16)] uint16 *server,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server,
|
||||
[in] uint32 level,
|
||||
[in] DATA_BLOB *buffer,
|
||||
[in,unique] DATA_BLOB *buffer,
|
||||
[in] uint32 offered,
|
||||
/* what we have here is a subcontext containing an array of no discriminant unions
|
||||
* and the array has no size in front
|
||||
*/
|
||||
[out,switch_is(level),size_is(count)] spoolss_PrinterInfo *info,
|
||||
[out,unique,switch_is(level),size_is(count)] spoolss_PrinterInfo *info,
|
||||
[out] uint32 needed,
|
||||
[out] uint32 count
|
||||
);
|
||||
@@ -289,8 +288,8 @@ import "security.idl", "winreg.idl";
|
||||
} spoolss_DevmodeContainer;
|
||||
|
||||
[public] WERROR spoolss_OpenPrinter(
|
||||
[in] [string,charset(UTF16)] uint16 *printername,
|
||||
[in] [string,charset(UTF16)] uint16 *datatype,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *printername,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *datatype,
|
||||
[in] spoolss_DevmodeContainer devmode_ctr,
|
||||
[in] uint32 access_mask,
|
||||
[out,ref] policy_handle *handle
|
||||
@@ -339,7 +338,7 @@ import "security.idl", "winreg.idl";
|
||||
WERROR spoolss_SetJob(
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] uint32 job_id,
|
||||
[in] spoolss_JobInfoContainer *ctr,
|
||||
[in,unique] spoolss_JobInfoContainer *ctr,
|
||||
[in] spoolss_JobControl command
|
||||
);
|
||||
|
||||
@@ -349,9 +348,9 @@ import "security.idl", "winreg.idl";
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] uint32 job_id,
|
||||
[in] uint32 level,
|
||||
[in] DATA_BLOB *buffer,
|
||||
[in,unique] DATA_BLOB *buffer,
|
||||
[in] uint32 offered,
|
||||
[out,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_JobInfo *info,
|
||||
[out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_JobInfo *info,
|
||||
[out] uint32 needed
|
||||
);
|
||||
|
||||
@@ -362,9 +361,9 @@ import "security.idl", "winreg.idl";
|
||||
[in] uint32 firstjob,
|
||||
[in] uint32 numjobs,
|
||||
[in] uint32 level,
|
||||
[in] DATA_BLOB *buffer,
|
||||
[in,unique] DATA_BLOB *buffer,
|
||||
[in] uint32 offered,
|
||||
[out] DATA_BLOB *info,
|
||||
[out,unique] DATA_BLOB *info,
|
||||
[out] uint32 needed,
|
||||
[out] uint32 count
|
||||
);
|
||||
@@ -378,9 +377,9 @@ import "security.idl", "winreg.idl";
|
||||
[in] uint32 firstjob,
|
||||
[in] uint32 numjobs,
|
||||
[in] uint32 level,
|
||||
[in] DATA_BLOB *buffer,
|
||||
[in,unique] DATA_BLOB *buffer,
|
||||
[in] uint32 offered,
|
||||
[out,switch_is(level),size_is(count)] spoolss_JobInfo *info,
|
||||
[out,unique,switch_is(level),size_is(count)] spoolss_JobInfo *info,
|
||||
[out] uint32 needed,
|
||||
[out] uint32 count
|
||||
);
|
||||
@@ -435,9 +434,9 @@ import "security.idl", "winreg.idl";
|
||||
[public] WERROR spoolss_GetPrinter(
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] uint32 level,
|
||||
[in] DATA_BLOB *buffer,
|
||||
[in,unique] DATA_BLOB *buffer,
|
||||
[in] uint32 offered,
|
||||
[out,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_PrinterInfo *info,
|
||||
[out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_PrinterInfo *info,
|
||||
[out] uint32 needed
|
||||
);
|
||||
|
||||
@@ -538,12 +537,12 @@ import "security.idl", "winreg.idl";
|
||||
/******************/
|
||||
/* Function: 0x0a */
|
||||
[public,noopnum,noprint] WERROR _spoolss_EnumPrinterDrivers(
|
||||
[in] [string,charset(UTF16)] uint16 *server,
|
||||
[in] [string,charset(UTF16)] uint16 *environment,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *environment,
|
||||
[in] uint32 level,
|
||||
[in] DATA_BLOB *buffer,
|
||||
[in,unique] DATA_BLOB *buffer,
|
||||
[in] uint32 offered,
|
||||
[out] DATA_BLOB *info,
|
||||
[out,unique] DATA_BLOB *info,
|
||||
[out] uint32 needed,
|
||||
[out] uint32 count
|
||||
);
|
||||
@@ -553,12 +552,12 @@ import "security.idl", "winreg.idl";
|
||||
[out,switch_is(level)] spoolss_DriverInfo info[count]
|
||||
);
|
||||
[nopull,nopush] WERROR spoolss_EnumPrinterDrivers(
|
||||
[in] [string,charset(UTF16)] uint16 *server,
|
||||
[in] [string,charset(UTF16)] uint16 *environment,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *environment,
|
||||
[in] uint32 level,
|
||||
[in] DATA_BLOB *buffer,
|
||||
[in,unique] DATA_BLOB *buffer,
|
||||
[in] uint32 offered,
|
||||
[out,switch_is(level),size_is(count)] spoolss_DriverInfo *info,
|
||||
[out,unique,switch_is(level),size_is(count)] spoolss_DriverInfo *info,
|
||||
[out] uint32 needed,
|
||||
[out] uint32 count
|
||||
);
|
||||
@@ -583,12 +582,12 @@ import "security.idl", "winreg.idl";
|
||||
} spoolss_DriverDirectoryInfo;
|
||||
|
||||
[public] WERROR spoolss_GetPrinterDriverDirectory(
|
||||
[in] [string,charset(UTF16)] uint16 *server,
|
||||
[in] [string,charset(UTF16)] uint16 *environment,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *environment,
|
||||
[in] uint32 level,
|
||||
[in] DATA_BLOB *buffer,
|
||||
[in,unique] DATA_BLOB *buffer,
|
||||
[in] uint32 offered,
|
||||
[out,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_DriverDirectoryInfo *info,
|
||||
[out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_DriverDirectoryInfo *info,
|
||||
[out] uint32 needed
|
||||
);
|
||||
|
||||
@@ -596,7 +595,7 @@ import "security.idl", "winreg.idl";
|
||||
/* Function: 0x0d */
|
||||
WERROR spoolss_DeletePrinterDriver(
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] [string,charset(UTF16)] uint16 *server,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server,
|
||||
[in] [string,charset(UTF16)] uint16 architecture[],
|
||||
[in] [string,charset(UTF16)] uint16 driver[]
|
||||
);
|
||||
@@ -618,12 +617,12 @@ import "security.idl", "winreg.idl";
|
||||
} spoolss_PrintProcessorInfo;
|
||||
|
||||
[public,noopnum,noprint] WERROR _spoolss_EnumPrintProcessors(
|
||||
[in] [string,charset(UTF16)] uint16 *servername,
|
||||
[in] [string,charset(UTF16)] uint16 *environment,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *servername,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *environment,
|
||||
[in] uint32 level,
|
||||
[in] DATA_BLOB *buffer,
|
||||
[in,unique] DATA_BLOB *buffer,
|
||||
[in] uint32 offered,
|
||||
[out] DATA_BLOB *info,
|
||||
[out,unique] DATA_BLOB *info,
|
||||
[out] uint32 needed,
|
||||
[out] uint32 count
|
||||
);
|
||||
@@ -633,12 +632,12 @@ import "security.idl", "winreg.idl";
|
||||
[out,switch_is(level)] spoolss_PrintProcessorInfo info[count]
|
||||
);
|
||||
[nopull,nopush] WERROR spoolss_EnumPrintProcessors(
|
||||
[in] [string,charset(UTF16)] uint16 *servername,
|
||||
[in] [string,charset(UTF16)] uint16 *environment,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *servername,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *environment,
|
||||
[in] uint32 level,
|
||||
[in] DATA_BLOB *buffer,
|
||||
[in,unique] DATA_BLOB *buffer,
|
||||
[in] uint32 offered,
|
||||
[out,switch_is(level),size_is(count)] spoolss_PrintProcessorInfo *info,
|
||||
[out,unique,switch_is(level),size_is(count)] spoolss_PrintProcessorInfo *info,
|
||||
[out] uint32 needed,
|
||||
[out] uint32 count
|
||||
);
|
||||
@@ -878,9 +877,9 @@ import "security.idl", "winreg.idl";
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] [string,charset(UTF16)] uint16 form_name[],
|
||||
[in] uint32 level,
|
||||
[in] DATA_BLOB *buffer,
|
||||
[in,unique] DATA_BLOB *buffer,
|
||||
[in] uint32 offered,
|
||||
[out,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_FormInfo *info,
|
||||
[out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_FormInfo *info,
|
||||
[out] uint32 needed
|
||||
);
|
||||
|
||||
@@ -898,9 +897,9 @@ import "security.idl", "winreg.idl";
|
||||
[public,noopnum,noprint] WERROR _spoolss_EnumForms(
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] uint32 level,
|
||||
[in] DATA_BLOB *buffer,
|
||||
[in,unique] DATA_BLOB *buffer,
|
||||
[in] uint32 offered,
|
||||
[out] DATA_BLOB *info,
|
||||
[out,unique] DATA_BLOB *info,
|
||||
[out] uint32 needed,
|
||||
[out] uint32 count
|
||||
);
|
||||
@@ -912,9 +911,9 @@ import "security.idl", "winreg.idl";
|
||||
[nopull,nopush] WERROR spoolss_EnumForms(
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] uint32 level,
|
||||
[in] DATA_BLOB *buffer,
|
||||
[in,unique] DATA_BLOB *buffer,
|
||||
[in] uint32 offered,
|
||||
[out,switch_is(level),size_is(count)] spoolss_FormInfo *info,
|
||||
[out,unique,switch_is(level),size_is(count)] spoolss_FormInfo *info,
|
||||
[out] uint32 needed,
|
||||
[out] uint32 count
|
||||
);
|
||||
@@ -948,11 +947,11 @@ import "security.idl", "winreg.idl";
|
||||
/******************/
|
||||
/* Function: 0x23 */
|
||||
[public,noopnum,noprint] WERROR _spoolss_EnumPorts(
|
||||
[in] [string,charset(UTF16)] uint16 *servername,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *servername,
|
||||
[in] uint32 level,
|
||||
[in] DATA_BLOB *buffer,
|
||||
[in,unique] DATA_BLOB *buffer,
|
||||
[in] uint32 offered,
|
||||
[out] DATA_BLOB *info,
|
||||
[out,unique] DATA_BLOB *info,
|
||||
[out] uint32 needed,
|
||||
[out] uint32 count
|
||||
);
|
||||
@@ -962,11 +961,11 @@ import "security.idl", "winreg.idl";
|
||||
[out,switch_is(level)] spoolss_PortInfo info[count]
|
||||
);
|
||||
[nopull,nopush] WERROR spoolss_EnumPorts(
|
||||
[in] [string,charset(UTF16)] uint16 *servername,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *servername,
|
||||
[in] uint32 level,
|
||||
[in] DATA_BLOB *buffer,
|
||||
[in,unique] DATA_BLOB *buffer,
|
||||
[in] uint32 offered,
|
||||
[out,switch_is(level),size_is(count)] spoolss_PortInfo *info,
|
||||
[out,unique,switch_is(level),size_is(count)] spoolss_PortInfo *info,
|
||||
[out] uint32 needed,
|
||||
[out] uint32 count
|
||||
);
|
||||
@@ -990,11 +989,11 @@ import "security.idl", "winreg.idl";
|
||||
} spoolss_MonitorInfo;
|
||||
|
||||
[public,noopnum,noprint] WERROR _spoolss_EnumMonitors(
|
||||
[in] [string,charset(UTF16)] uint16 *servername,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *servername,
|
||||
[in] uint32 level,
|
||||
[in] DATA_BLOB *buffer,
|
||||
[in,unique] DATA_BLOB *buffer,
|
||||
[in] uint32 offered,
|
||||
[out] DATA_BLOB *info,
|
||||
[out,unique] DATA_BLOB *info,
|
||||
[out] uint32 needed,
|
||||
[out] uint32 count
|
||||
);
|
||||
@@ -1004,11 +1003,11 @@ import "security.idl", "winreg.idl";
|
||||
[out,switch_is(level)] spoolss_MonitorInfo info[count]
|
||||
);
|
||||
[nopull,nopush] WERROR spoolss_EnumMonitors(
|
||||
[in] [string,charset(UTF16)] uint16 *servername,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *servername,
|
||||
[in] uint32 level,
|
||||
[in] DATA_BLOB *buffer,
|
||||
[in,unique] DATA_BLOB *buffer,
|
||||
[in] uint32 offered,
|
||||
[out,switch_is(level),size_is(count)] spoolss_MonitorInfo *info,
|
||||
[out,unique,switch_is(level),size_is(count)] spoolss_MonitorInfo *info,
|
||||
[out] uint32 needed,
|
||||
[out] uint32 count
|
||||
);
|
||||
@@ -1016,7 +1015,7 @@ import "security.idl", "winreg.idl";
|
||||
/******************/
|
||||
/* Function: 0x25 */
|
||||
WERROR spoolss_AddPort(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] uint32 unknown,
|
||||
[in] [string,charset(UTF16)] uint16 monitor_name[]
|
||||
);
|
||||
@@ -1102,13 +1101,13 @@ import "security.idl", "winreg.idl";
|
||||
/* Function: 0x35 */
|
||||
WERROR spoolss_GetPrinterDriver2(
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] [string,charset(UTF16)] uint16 *architecture,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *architecture,
|
||||
[in] uint32 level,
|
||||
[in] DATA_BLOB *buffer,
|
||||
[in,unique] DATA_BLOB *buffer,
|
||||
[in] uint32 offered,
|
||||
[in] uint32 client_major_version,
|
||||
[in] uint32 client_minor_version,
|
||||
[out] DATA_BLOB *info,
|
||||
[out,unique] DATA_BLOB *info,
|
||||
[out] uint32 needed,
|
||||
[out] uint32 server_major_version,
|
||||
[out] uint32 server_minor_version
|
||||
@@ -1233,9 +1232,9 @@ import "security.idl", "winreg.idl";
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] uint32 flags,
|
||||
[in] uint32 options,
|
||||
[in] [string,charset(UTF16)] uint16 *str,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *str,
|
||||
[in] uint32 printer_local,
|
||||
[in] spoolss_NotifyOptionsContainer *t1
|
||||
[in,unique] spoolss_NotifyOptionsContainer *t1
|
||||
);
|
||||
|
||||
/******************/
|
||||
@@ -1377,8 +1376,8 @@ import "security.idl", "winreg.idl";
|
||||
/******************/
|
||||
/* Function: 0x45 */
|
||||
[public] WERROR spoolss_OpenPrinterEx(
|
||||
[in] [string,charset(UTF16)] uint16 *printername,
|
||||
[in] [string,charset(UTF16)] uint16 *datatype,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *printername,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *datatype,
|
||||
[in] spoolss_DevmodeContainer devmode_ctr,
|
||||
[in] uint32 access_mask,
|
||||
[in] uint32 level,
|
||||
@@ -1389,11 +1388,11 @@ import "security.idl", "winreg.idl";
|
||||
/******************/
|
||||
/* Function: 0x46 */
|
||||
WERROR spoolss_AddPrinterEx(
|
||||
[in] [string,charset(UTF16)] uint16 *server,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server,
|
||||
[in] uint32 level,
|
||||
[in,switch_is(level)] spoolss_PrinterInfo *info,
|
||||
[in,unique,switch_is(level)] spoolss_PrinterInfo *info,
|
||||
[in] spoolss_DevmodeContainer devmode_ctr,
|
||||
[in] security_descriptor *secdesc,
|
||||
[in,unique] security_descriptor *secdesc,
|
||||
[in] uint32 ulevel,
|
||||
[in,switch_is(ulevel)] spoolss_UserLevel userlevel
|
||||
);
|
||||
|
||||
@@ -9,7 +9,6 @@ import "security.idl", "svcctl.idl";
|
||||
version(3.0),
|
||||
endpoint("ncacn_np:[\\pipe\\srvsvc]", "ncacn_ip_tcp:", "ncalrpc:"),
|
||||
pointer_default(unique),
|
||||
pointer_default_top(unique),
|
||||
helpstring("Server Service")
|
||||
] interface srvsvc
|
||||
{
|
||||
@@ -55,18 +54,18 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x00 */
|
||||
WERROR srvsvc_NetCharDevEnum(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,out] uint32 level,
|
||||
[in,out,switch_is(level)] srvsvc_NetCharDevCtr ctr,
|
||||
[in] uint32 max_buffer,
|
||||
[out] uint32 totalentries,
|
||||
[in,out] uint32 *resume_handle
|
||||
[in,out,unique] uint32 *resume_handle
|
||||
);
|
||||
|
||||
/******************/
|
||||
/* Function: 0x01 */
|
||||
WERROR srvsvc_NetCharDevGetInfo(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 device_name[],
|
||||
[in] uint32 level,
|
||||
[out,switch_is(level)] srvsvc_NetCharDevInfo info
|
||||
@@ -75,7 +74,7 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x02 */
|
||||
WERROR srvsvc_NetCharDevControl(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 device_name[],
|
||||
[in] uint32 opcode
|
||||
);
|
||||
@@ -120,19 +119,19 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x03 */
|
||||
WERROR srvsvc_NetCharDevQEnum(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 *user,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *user,
|
||||
[in,out] uint32 level,
|
||||
[in,out,switch_is(level)] srvsvc_NetCharDevQCtr ctr,
|
||||
[in] uint32 max_buffer,
|
||||
[out] uint32 totalentries,
|
||||
[in,out] uint32 *resume_handle
|
||||
[in,out,unique] uint32 *resume_handle
|
||||
);
|
||||
|
||||
/******************/
|
||||
/* Function: 0x04 */
|
||||
WERROR srvsvc_NetCharDevQGetInfo(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 queue_name[],
|
||||
[in] [string,charset(UTF16)] uint16 user[],
|
||||
[in] uint32 level,
|
||||
@@ -142,24 +141,24 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x05 */
|
||||
WERROR srvsvc_NetCharDevQSetInfo(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 queue_name[],
|
||||
[in] uint32 level,
|
||||
[in,switch_is(level)] srvsvc_NetCharDevQInfo info,
|
||||
[in,out] uint32 *parm_error
|
||||
[in,out,unique] uint32 *parm_error
|
||||
);
|
||||
|
||||
/******************/
|
||||
/* Function: 0x06 */
|
||||
WERROR srvsvc_NetCharDevQPurge(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 queue_name[]
|
||||
);
|
||||
|
||||
/******************/
|
||||
/* Function: 0x07 */
|
||||
WERROR srvsvc_NetCharDevQPurgeSelf(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 queue_name[],
|
||||
[in] [string,charset(UTF16)] uint16 computer_name[]
|
||||
);
|
||||
@@ -200,13 +199,13 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x08 */
|
||||
WERROR srvsvc_NetConnEnum(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 *path,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *path,
|
||||
[in,out] uint32 level,
|
||||
[in,out,switch_is(level)] srvsvc_NetConnCtr ctr,
|
||||
[in] uint32 max_buffer,
|
||||
[out] uint32 totalentries,
|
||||
[in,out] uint32 *resume_handle
|
||||
[in,out,unique] uint32 *resume_handle
|
||||
);
|
||||
|
||||
/**************************/
|
||||
@@ -249,20 +248,20 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x09 */
|
||||
WERROR srvsvc_NetFileEnum(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 *path,
|
||||
[in] [string,charset(UTF16)] uint16 *user,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *path,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *user,
|
||||
[in,out] uint32 level,
|
||||
[in,out,switch_is(level)] srvsvc_NetFileCtr ctr,
|
||||
[in] uint32 max_buffer,
|
||||
[out] uint32 totalentries,
|
||||
[in,out] uint32 *resume_handle
|
||||
[in,out,unique] uint32 *resume_handle
|
||||
);
|
||||
|
||||
/******************/
|
||||
/* Function: 0x0a */
|
||||
WERROR srvsvc_NetFileGetInfo(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] uint32 fid,
|
||||
[in] uint32 level,
|
||||
[out,switch_is(level)] srvsvc_NetFileInfo info
|
||||
@@ -271,7 +270,7 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x0b */
|
||||
WERROR srvsvc_NetFileClose(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] uint32 fid
|
||||
);
|
||||
|
||||
@@ -356,22 +355,22 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x0c */
|
||||
WERROR srvsvc_NetSessEnum(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 *client,
|
||||
[in] [string,charset(UTF16)] uint16 *user,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *client,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *user,
|
||||
[in,out] uint32 level,
|
||||
[in,out,switch_is(level)] srvsvc_NetSessCtr ctr,
|
||||
[in] uint32 max_buffer,
|
||||
[out] uint32 totalentries,
|
||||
[in,out] uint32 *resume_handle
|
||||
[in,out,unique] uint32 *resume_handle
|
||||
);
|
||||
|
||||
/******************/
|
||||
/* Function: 0x0d */
|
||||
WERROR srvsvc_NetSessDel(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 *client,
|
||||
[in] [string,charset(UTF16)] uint16 *user
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *client,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *user
|
||||
);
|
||||
|
||||
/**************************/
|
||||
@@ -545,27 +544,27 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x0e */
|
||||
WERROR srvsvc_NetShareAdd(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] uint32 level,
|
||||
[in,switch_is(level)] srvsvc_NetShareInfo info,
|
||||
[in,out] uint32 *parm_error
|
||||
[in,out,unique] uint32 *parm_error
|
||||
);
|
||||
|
||||
/******************/
|
||||
/* Function: 0x0f */
|
||||
WERROR srvsvc_NetShareEnumAll (
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,out] uint32 level,
|
||||
[in,out,switch_is(level)] srvsvc_NetShareCtr ctr,
|
||||
[in] uint32 max_buffer,
|
||||
[out] uint32 totalentries,
|
||||
[in,out] uint32 *resume_handle
|
||||
[in,out,unique] uint32 *resume_handle
|
||||
);
|
||||
|
||||
/******************/
|
||||
/* Function: 0x10 */
|
||||
WERROR srvsvc_NetShareGetInfo(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 share_name[],
|
||||
[in] uint32 level,
|
||||
[out,switch_is(level)] srvsvc_NetShareInfo info
|
||||
@@ -574,17 +573,17 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x11 */
|
||||
WERROR srvsvc_NetShareSetInfo(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 share_name[],
|
||||
[in] uint32 level,
|
||||
[in,switch_is(level)] srvsvc_NetShareInfo info,
|
||||
[in,out] uint32 *parm_error
|
||||
[in,out,unique] uint32 *parm_error
|
||||
);
|
||||
|
||||
/******************/
|
||||
/* Function: 0x12 */
|
||||
WERROR srvsvc_NetShareDel(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 share_name[],
|
||||
[in] uint32 reserved
|
||||
);
|
||||
@@ -592,7 +591,7 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x13 */
|
||||
WERROR srvsvc_NetShareDelSticky(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 share_name[],
|
||||
[in] uint32 reserved
|
||||
);
|
||||
@@ -600,7 +599,7 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x14 */
|
||||
WERROR srvsvc_NetShareCheck(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 device_name[],
|
||||
[out] srvsvc_ShareType type
|
||||
);
|
||||
@@ -1110,7 +1109,7 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x15 */
|
||||
WERROR srvsvc_NetSrvGetInfo(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] uint32 level,
|
||||
[out,switch_is(level)] srvsvc_NetSrvInfo info
|
||||
);
|
||||
@@ -1118,10 +1117,10 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x16 */
|
||||
WERROR srvsvc_NetSrvSetInfo(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] uint32 level,
|
||||
[in,switch_is(level)] srvsvc_NetSrvInfo info,
|
||||
[in,out] uint32 *parm_error
|
||||
[in,out,unique] uint32 *parm_error
|
||||
);
|
||||
|
||||
/**************************/
|
||||
@@ -1139,12 +1138,12 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x17 */
|
||||
WERROR srvsvc_NetDiskEnum(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] uint32 level,
|
||||
[in,out] srvsvc_NetDiskInfo info,
|
||||
[in] uint32 maxlen,
|
||||
[out] uint32 totalentries,
|
||||
[in,out] uint32 *resume_handle
|
||||
[in,out,unique] uint32 *resume_handle
|
||||
);
|
||||
|
||||
/**************************/
|
||||
@@ -1173,8 +1172,8 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x18 */
|
||||
WERROR srvsvc_NetServerStatisticsGet(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 *service,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *service,
|
||||
[in] uint32 level,
|
||||
[in] uint32 options,
|
||||
[out] srvsvc_Statistics stat
|
||||
@@ -1194,7 +1193,7 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x19 */
|
||||
WERROR srvsvc_NetTransportAdd(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] uint32 level,
|
||||
[in,switch_is(level)] srvsvc_NetTransportInfo info
|
||||
);
|
||||
@@ -1261,18 +1260,18 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x1a */
|
||||
WERROR srvsvc_NetTransportEnum(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,out] uint32 level,
|
||||
[in,out,switch_is(level)] srvsvc_NetTransportCtr transports,
|
||||
[in] uint32 max_buffer,
|
||||
[out] uint32 totalentries,
|
||||
[in,out] uint32 *resume_handle
|
||||
[in,out,unique] uint32 *resume_handle
|
||||
);
|
||||
|
||||
/******************/
|
||||
/* Function: 0x1b */
|
||||
WERROR srvsvc_NetTransportDel(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] uint32 level,
|
||||
[in,switch_is(level)] srvsvc_NetTransportInfo info
|
||||
);
|
||||
@@ -1298,8 +1297,8 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x1c */
|
||||
WERROR srvsvc_NetRemoteTOD(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[out] srvsvc_NetRemoteTODInfo *info
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[out,unique] srvsvc_NetRemoteTODInfo *info
|
||||
);
|
||||
|
||||
/**************************/
|
||||
@@ -1308,8 +1307,8 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x1d */
|
||||
WERROR srvsvc_NetSetServiceBits(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 *transport,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *transport,
|
||||
[in] uint32 servicebits,
|
||||
[in] uint32 updateimmediately
|
||||
);
|
||||
@@ -1320,7 +1319,7 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x1e */
|
||||
WERROR srvsvc_NetPathType(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 path[],
|
||||
[in] uint32 pathflags,
|
||||
[out] uint32 pathtype
|
||||
@@ -1329,7 +1328,7 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x1f */
|
||||
WERROR srvsvc_NetPathCanonicalize(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 path[],
|
||||
[out] [size_is(maxbuf)] uint8 can_path[],
|
||||
[in] uint32 maxbuf,
|
||||
@@ -1341,7 +1340,7 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x20 */
|
||||
WERROR srvsvc_NetPathCompare(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 path1[],
|
||||
[in] [string,charset(UTF16)] uint16 path2[],
|
||||
[in] uint32 pathtype,
|
||||
@@ -1354,7 +1353,7 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x21 */
|
||||
WERROR srvsvc_NetNameValidate(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 name[],
|
||||
[in] uint32 name_type,
|
||||
[in] uint32 flags
|
||||
@@ -1368,7 +1367,7 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x23 */
|
||||
WERROR srvsvc_NetPRNameCompare(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 name1[],
|
||||
[in] [string,charset(UTF16)] uint16 name2[],
|
||||
[in] uint32 name_type,
|
||||
@@ -1383,44 +1382,44 @@ import "security.idl", "svcctl.idl";
|
||||
/* Note, there must be some way to return entries read vs
|
||||
total entries ... */
|
||||
WERROR srvsvc_NetShareEnum(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,out] uint32 level,
|
||||
[in,out,switch_is(level)] srvsvc_NetShareCtr ctr,
|
||||
[in] uint32 max_buffer,
|
||||
[out] uint32 totalentries,
|
||||
[in,out] uint32 *resume_handle
|
||||
[in,out,unique] uint32 *resume_handle
|
||||
);
|
||||
|
||||
/******************/
|
||||
/* Function: 0x25 */
|
||||
WERROR srvsvc_NetShareDelStart(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 share[],
|
||||
[in] uint32 reserved,
|
||||
[out] policy_handle *hnd
|
||||
[out,unique] policy_handle *hnd
|
||||
);
|
||||
|
||||
/******************/
|
||||
/* Function: 0x26 */
|
||||
WERROR srvsvc_NetShareDelCommit(
|
||||
[in, out] policy_handle *hnd
|
||||
[in, out,unique] policy_handle *hnd
|
||||
);
|
||||
|
||||
/******************/
|
||||
/* Function: 0x27 */
|
||||
WERROR srvsvc_NetGetFileSecurity(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 *share,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *share,
|
||||
[in] [string,charset(UTF16)] uint16 file[],
|
||||
[in] security_secinfo securityinformation,
|
||||
[out] sec_desc_buf *sd_buf
|
||||
[out,unique] sec_desc_buf *sd_buf
|
||||
);
|
||||
|
||||
/******************/
|
||||
/* Function: 0x28 */
|
||||
WERROR srvsvc_NetSetFileSecurity(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 *share,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *share,
|
||||
[in] [string,charset(UTF16)] uint16 file[],
|
||||
[in] security_secinfo securityinformation,
|
||||
[in] sec_desc_buf sd_buf
|
||||
@@ -1438,7 +1437,7 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x29 */
|
||||
WERROR srvsvc_NetServerTransportAddEx(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] uint32 level,
|
||||
[in,switch_is(level)] srvsvc_NetTransportInfo info
|
||||
);
|
||||
@@ -1446,9 +1445,9 @@ import "security.idl", "svcctl.idl";
|
||||
/******************/
|
||||
/* Function: 0x2a */
|
||||
WERROR srvsvc_NetServerSetServiceBitsEx(
|
||||
[in] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 *emulated_server_unc,
|
||||
[in] [string,charset(UTF16)] uint16 *transport,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *emulated_server_unc,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *transport,
|
||||
[in] uint32 servicebitsofinterest,
|
||||
[in] uint32 servicebits,
|
||||
[in] uint32 updateimmediately
|
||||
|
||||
@@ -8,7 +8,6 @@ import "misc.idl";
|
||||
[ uuid("367abb81-9844-35f1-ad32-98f038001003"),
|
||||
version(2.0),
|
||||
pointer_default(unique),
|
||||
pointer_default_top(unique),
|
||||
endpoint("ncacn_np:[\\pipe\\svcctl]", "ncalrpc:"),
|
||||
helpstring("Service Control")
|
||||
] interface svcctl
|
||||
@@ -163,13 +162,13 @@ import "misc.idl";
|
||||
[in] uint32 type,
|
||||
[in] uint32 start,
|
||||
[in] uint32 error,
|
||||
[in] [string,charset(UTF16)] uint16 *binary_path,
|
||||
[in] [string,charset(UTF16)] uint16 *load_order_group,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *binary_path,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *load_order_group,
|
||||
[out,ref] uint32 *tag_id,
|
||||
[in] [string,charset(UTF16)] uint16 *dependencies,
|
||||
[in] [string,charset(UTF16)] uint16 *service_start_name,
|
||||
[in] [string,charset(UTF16)] uint16 *password,
|
||||
[in] [string,charset(UTF16)] uint16 *display_name
|
||||
[in,unique] [string,charset(UTF16)] uint16 *dependencies,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *service_start_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *password,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *display_name
|
||||
);
|
||||
|
||||
/*****************/
|
||||
@@ -177,18 +176,18 @@ import "misc.idl";
|
||||
WERROR svcctl_CreateServiceW(
|
||||
[in,ref] policy_handle *scmanager_handle,
|
||||
[in] [string,charset(UTF16)] uint16 ServiceName[],
|
||||
[in] [string,charset(UTF16)] uint16 *DisplayName,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *DisplayName,
|
||||
[in] uint32 desired_access,
|
||||
[in] uint32 type,
|
||||
[in] uint32 start_type,
|
||||
[in] uint32 error_control,
|
||||
[in] [string,charset(UTF16)] uint16 binary_path[],
|
||||
[in] [string,charset(UTF16)] uint16 *LoadOrderGroupKey,
|
||||
[in,out] uint32 *TagId,
|
||||
[in,size_is(dependencies_size)] uint8 *dependencies,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *LoadOrderGroupKey,
|
||||
[in,out,unique] uint32 *TagId,
|
||||
[in,unique,size_is(dependencies_size)] uint8 *dependencies,
|
||||
[in] uint32 dependencies_size,
|
||||
[in] [string,charset(UTF16)] uint16 *service_start_name,
|
||||
[in,size_is(password_size)] uint8 *password,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *service_start_name,
|
||||
[in,unique,size_is(password_size)] uint8 *password,
|
||||
[in] uint32 password_size,
|
||||
[out,ref] policy_handle *handle
|
||||
);
|
||||
@@ -198,7 +197,7 @@ import "misc.idl";
|
||||
WERROR svcctl_EnumDependentServicesW(
|
||||
[in,ref] policy_handle *service,
|
||||
[in] uint32 state,
|
||||
[out] ENUM_SERVICE_STATUS *service_status,
|
||||
[out,unique] ENUM_SERVICE_STATUS *service_status,
|
||||
[in] uint32 buf_size,
|
||||
[out,ref] uint32 *bytes_needed,
|
||||
[out,ref] uint32 *services_returned
|
||||
@@ -214,14 +213,14 @@ import "misc.idl";
|
||||
[out,size_is(buf_size)] uint8 service[*],
|
||||
[out,ref] uint32 *bytes_needed,
|
||||
[out,ref] uint32 *services_returned,
|
||||
[in,out] uint32 *resume_handle
|
||||
[in,out,unique] uint32 *resume_handle
|
||||
);
|
||||
|
||||
/*****************/
|
||||
/* Function 0x0f */
|
||||
WERROR svcctl_OpenSCManagerW(
|
||||
[in] [string,charset(UTF16)] uint16 *MachineName,
|
||||
[in] [string,charset(UTF16)] uint16 *DatabaseName,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *MachineName,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *DatabaseName,
|
||||
[in] uint32 access_mask,
|
||||
[out,ref] policy_handle *handle
|
||||
);
|
||||
@@ -258,25 +257,25 @@ import "misc.idl";
|
||||
WERROR svcctl_StartServiceW(
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] uint32 NumArgs,
|
||||
[in/*FIXME:,length_is(NumArgs)*/] [string,charset(UTF16)] uint16 *Arguments
|
||||
[in,unique/*FIXME:,length_is(NumArgs)*/] [string,charset(UTF16)] uint16 *Arguments
|
||||
);
|
||||
|
||||
/*****************/
|
||||
/* Function 0x14 */
|
||||
WERROR svcctl_GetServiceDisplayNameW(
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] [string,charset(UTF16)] uint16 *service_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *service_name,
|
||||
[out,ref] [string,charset(UTF16)] uint16 **display_name,
|
||||
[in,out] uint32 *display_name_length
|
||||
[in,out,unique] uint32 *display_name_length
|
||||
);
|
||||
|
||||
/*****************/
|
||||
/* Function 0x15 */
|
||||
WERROR svcctl_GetServiceKeyNameW(
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] [string,charset(UTF16)] uint16 *service_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *service_name,
|
||||
[out,ref] [string,charset(UTF16)] uint16 **key_name,
|
||||
[in,out] uint32 *display_name_length
|
||||
[in,out,unique] uint32 *display_name_length
|
||||
);
|
||||
|
||||
/*****************/
|
||||
@@ -295,31 +294,31 @@ import "misc.idl";
|
||||
[in] uint32 type,
|
||||
[in] uint32 start,
|
||||
[in] uint32 error,
|
||||
[in] [string,charset(UTF16)] uint16 *binary_path,
|
||||
[in] [string,charset(UTF16)] uint16 *load_order_group,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *binary_path,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *load_order_group,
|
||||
[out,ref] uint32 *tag_id,
|
||||
[in] [string,charset(UTF16)] uint16 *dependencies,
|
||||
[in] [string,charset(UTF16)] uint16 *service_start_name,
|
||||
[in] [string,charset(UTF16)] uint16 *password,
|
||||
[in] [string,charset(UTF16)] uint16 *display_name
|
||||
[in,unique] [string,charset(UTF16)] uint16 *dependencies,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *service_start_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *password,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *display_name
|
||||
);
|
||||
|
||||
/*****************/
|
||||
/* Function 0x18 */
|
||||
WERROR svcctl_CreateServiceA(
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] [string,charset(UTF16)] uint16 *ServiceName,
|
||||
[in] [string,charset(UTF16)] uint16 *DisplayName,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *ServiceName,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *DisplayName,
|
||||
[in] uint32 desired_access,
|
||||
[in] uint32 type,
|
||||
[in] uint32 start_type,
|
||||
[in] uint32 error_control,
|
||||
[in] [string,charset(UTF16)] uint16 *binary_path,
|
||||
[in] [string,charset(UTF16)] uint16 *LoadOrderGroupKey,
|
||||
[out] uint32 *TagId,
|
||||
[in] [string,charset(UTF16)] uint16 *dependencies,
|
||||
[in] [string,charset(UTF16)] uint16 *service_start_name,
|
||||
[in] [string,charset(UTF16)] uint16 *password
|
||||
[in,unique] [string,charset(UTF16)] uint16 *binary_path,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *LoadOrderGroupKey,
|
||||
[out,unique] uint32 *TagId,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *dependencies,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *service_start_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *password
|
||||
);
|
||||
|
||||
/*****************/
|
||||
@@ -327,7 +326,7 @@ import "misc.idl";
|
||||
WERROR svcctl_EnumDependentServicesA(
|
||||
[in,ref] policy_handle *service,
|
||||
[in] uint32 state,
|
||||
[out] ENUM_SERVICE_STATUS *service_status,
|
||||
[out,unique] ENUM_SERVICE_STATUS *service_status,
|
||||
[in] uint32 buf_size,
|
||||
[out,ref] uint32 *bytes_needed,
|
||||
[out,ref] uint32 *services_returned
|
||||
@@ -343,14 +342,14 @@ import "misc.idl";
|
||||
[out,size_is(buf_size)] uint8 service[*],
|
||||
[out,ref] uint32 *bytes_needed,
|
||||
[out,ref] uint32 *services_returned,
|
||||
[in,out] uint32 *resume_handle
|
||||
[in,out,unique] uint32 *resume_handle
|
||||
);
|
||||
|
||||
/*****************/
|
||||
/* Function 0x1b */
|
||||
WERROR svcctl_OpenSCManagerA(
|
||||
[in] [string,charset(UTF16)] uint16 *MachineName,
|
||||
[in] [string,charset(UTF16)] uint16 *DatabaseName,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *MachineName,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *DatabaseName,
|
||||
[in] uint32 access_mask,
|
||||
[out,ref] policy_handle *handle
|
||||
);
|
||||
@@ -359,7 +358,7 @@ import "misc.idl";
|
||||
/* Function 0x1c */
|
||||
WERROR svcctl_OpenServiceA(
|
||||
[in,ref] policy_handle *scmanager_handle,
|
||||
[in] [string,charset(UTF16)] uint16 *ServiceName,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *ServiceName,
|
||||
[in] uint32 access_mask
|
||||
);
|
||||
|
||||
@@ -386,25 +385,25 @@ import "misc.idl";
|
||||
WERROR svcctl_StartServiceA(
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] uint32 NumArgs,
|
||||
[in/*FIXME:,length_is(NumArgs)*/] [string,charset(UTF16)] uint16 *Arguments
|
||||
[in,unique/*FIXME:,length_is(NumArgs)*/] [string,charset(UTF16)] uint16 *Arguments
|
||||
);
|
||||
|
||||
/*****************/
|
||||
/* Function 0x20 */
|
||||
WERROR svcctl_GetServiceDisplayNameA(
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] [string,charset(UTF16)] uint16 *service_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *service_name,
|
||||
[out,ref] [string,charset(UTF16)] uint16 **display_name,
|
||||
[in,out] uint32 *display_name_length
|
||||
[in,out,unique] uint32 *display_name_length
|
||||
);
|
||||
|
||||
/*****************/
|
||||
/* Function 0x21 */
|
||||
WERROR svcctl_GetServiceKeyNameA(
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] [string,charset(UTF16)] uint16 *service_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *service_name,
|
||||
[out,ref] [string,charset(UTF16)] uint16 **key_name,
|
||||
[in,out] uint32 *display_name_length
|
||||
[in,out,unique] uint32 *display_name_length
|
||||
);
|
||||
|
||||
/*****************/
|
||||
@@ -422,7 +421,7 @@ import "misc.idl";
|
||||
WERROR svcctl_ChangeServiceConfig2A(
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] uint32 info_level,
|
||||
[in] uint8 *info
|
||||
[in,unique] uint8 *info
|
||||
);
|
||||
|
||||
/*****************/
|
||||
@@ -430,7 +429,7 @@ import "misc.idl";
|
||||
WERROR svcctl_ChangeServiceConfig2W(
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] uint32 info_level,
|
||||
[in] uint8 *info
|
||||
[in,unique] uint8 *info
|
||||
);
|
||||
|
||||
/*****************/
|
||||
@@ -474,7 +473,7 @@ import "misc.idl";
|
||||
[in] uint32 buf_size,
|
||||
[out,ref] uint32 *bytes_needed,
|
||||
[out,ref] uint32 *service_returned,
|
||||
[in,out] uint32 *resume_handle,
|
||||
[in,out,unique] uint32 *resume_handle,
|
||||
[out,ref] [string,charset(UTF16)] uint16 **group_name
|
||||
);
|
||||
|
||||
@@ -489,7 +488,7 @@ import "misc.idl";
|
||||
[in] uint32 buf_size,
|
||||
[out,ref] uint32 *bytes_needed,
|
||||
[out,ref] uint32 *service_returned,
|
||||
[in,out] uint32 *resume_handle,
|
||||
[in,out,unique] uint32 *resume_handle,
|
||||
[out,ref] [string,charset(UTF16)] uint16 **group_name
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
|
||||
version(1.0),
|
||||
endpoint("ncacn_np:[\\pipe\\winreg]","ncacn_ip_tcp:","ncalrpc:"),
|
||||
pointer_default(unique),
|
||||
pointer_default_top(unique),
|
||||
helpstring("Remote Registry Service")
|
||||
] interface winreg
|
||||
{
|
||||
@@ -50,7 +49,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
|
||||
/******************/
|
||||
/* Function: 0x00 */
|
||||
WERROR winreg_OpenHKCR(
|
||||
[in] uint16 *system_name,
|
||||
[in,unique] uint16 *system_name,
|
||||
[in] winreg_AccessMask access_mask,
|
||||
[out,ref] policy_handle *handle
|
||||
);
|
||||
@@ -58,7 +57,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
|
||||
/******************/
|
||||
/* Function: 0x01 */
|
||||
WERROR winreg_OpenHKCU(
|
||||
[in] uint16 *system_name,
|
||||
[in,unique] uint16 *system_name,
|
||||
[in] winreg_AccessMask access_mask,
|
||||
[out,ref] policy_handle *handle
|
||||
);
|
||||
@@ -66,7 +65,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
|
||||
/******************/
|
||||
/* Function: 0x02 */
|
||||
[public] WERROR winreg_OpenHKLM(
|
||||
[in] uint16 *system_name,
|
||||
[in,unique] uint16 *system_name,
|
||||
[in] winreg_AccessMask access_mask,
|
||||
[out,ref] policy_handle *handle
|
||||
);
|
||||
@@ -74,7 +73,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
|
||||
/******************/
|
||||
/* Function: 0x03 */
|
||||
WERROR winreg_OpenHKPD(
|
||||
[in] uint16 *system_name,
|
||||
[in,unique] uint16 *system_name,
|
||||
[in] winreg_AccessMask access_mask,
|
||||
[out,ref] policy_handle *handle
|
||||
);
|
||||
@@ -82,7 +81,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
|
||||
/******************/
|
||||
/* Function: 0x04 */
|
||||
WERROR winreg_OpenHKU(
|
||||
[in] uint16 *system_name,
|
||||
[in,unique] uint16 *system_name,
|
||||
[in] winreg_AccessMask access_mask,
|
||||
[out,ref] policy_handle *handle
|
||||
);
|
||||
@@ -189,8 +188,8 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
|
||||
/* Function: 0x0d */
|
||||
WERROR winreg_LoadKey(
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] winreg_String *keyname,
|
||||
[in] winreg_String *filename
|
||||
[in,unique] winreg_String *keyname,
|
||||
[in,unique] winreg_String *filename
|
||||
);
|
||||
|
||||
/******************/
|
||||
@@ -242,10 +241,10 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
|
||||
[public] WERROR winreg_QueryValue(
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] winreg_String value_name,
|
||||
[in,out] winreg_Type *type,
|
||||
[in,out,size_is(*size),length_is(*length)] uint8 *data,
|
||||
[in,out] uint32 *size,
|
||||
[in,out] uint32 *length
|
||||
[in,out,unique] winreg_Type *type,
|
||||
[in,out,unique,size_is(*size),length_is(*length)] uint8 *data,
|
||||
[in,out,unique] uint32 *size,
|
||||
[in,out,unique] uint32 *length
|
||||
);
|
||||
|
||||
/******************/
|
||||
@@ -302,8 +301,8 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
|
||||
/******************/
|
||||
/* Function: 0x18 */
|
||||
WERROR winreg_InitiateSystemShutdown(
|
||||
[in] uint16 *hostname,
|
||||
[in] initshutdown_String *message,
|
||||
[in,unique] uint16 *hostname,
|
||||
[in,unique] initshutdown_String *message,
|
||||
[in] uint32 timeout,
|
||||
[in] uint8 force_apps,
|
||||
[in] uint8 reboot
|
||||
@@ -312,7 +311,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
|
||||
/******************/
|
||||
/* Function: 0x19 */
|
||||
WERROR winreg_AbortSystemShutdown(
|
||||
[in] uint16 *server
|
||||
[in,unique] uint16 *server
|
||||
);
|
||||
|
||||
/******************/
|
||||
@@ -325,7 +324,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
|
||||
/******************/
|
||||
/* Function: 0x1b */
|
||||
WERROR winreg_OpenHKCC(
|
||||
[in] uint16 *system_name,
|
||||
[in,unique] uint16 *system_name,
|
||||
[in] winreg_AccessMask access_mask,
|
||||
[out,ref] policy_handle *handle
|
||||
);
|
||||
@@ -333,7 +332,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
|
||||
/******************/
|
||||
/* Function: 0x1c */
|
||||
WERROR winreg_OpenHKDD(
|
||||
[in] uint16 *system_name,
|
||||
[in,unique] uint16 *system_name,
|
||||
[in] winreg_AccessMask access_mask,
|
||||
[out,ref] policy_handle *handle
|
||||
);
|
||||
@@ -351,15 +350,15 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
|
||||
[in,ref] policy_handle *key_handle,
|
||||
[in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values,
|
||||
[in] uint32 num_values,
|
||||
[in,out,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
|
||||
[in,out,unique,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
|
||||
[in,out,ref] uint32 *buffer_size
|
||||
);
|
||||
|
||||
/******************/
|
||||
/* Function: 0x1e */
|
||||
WERROR winreg_InitiateSystemShutdownEx(
|
||||
[in] uint16 *hostname,
|
||||
[in] initshutdown_String *message,
|
||||
[in,unique] uint16 *hostname,
|
||||
[in,unique] initshutdown_String *message,
|
||||
[in] uint32 timeout,
|
||||
[in] uint8 force_apps,
|
||||
[in] uint8 reboot,
|
||||
@@ -374,7 +373,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
|
||||
/******************/
|
||||
/* Function: 0x20 */
|
||||
WERROR winreg_OpenHKPT(
|
||||
[in] uint16 *system_name,
|
||||
[in,unique] uint16 *system_name,
|
||||
[in] winreg_AccessMask access_mask,
|
||||
[out,ref] policy_handle *handle
|
||||
);
|
||||
@@ -382,7 +381,7 @@ import "lsa.idl", "initshutdown.idl", "security.idl";
|
||||
/******************/
|
||||
/* Function: 0x21 */
|
||||
WERROR winreg_OpenHKPN(
|
||||
[in] uint16 *system_name,
|
||||
[in,unique] uint16 *system_name,
|
||||
[in] winreg_AccessMask access_mask,
|
||||
[out,ref] policy_handle *handle
|
||||
);
|
||||
|
||||
@@ -9,7 +9,6 @@ import "srvsvc.idl", "lsa.idl";
|
||||
[ uuid("6bffd098-a112-3610-9833-46c3f87e345a"),
|
||||
version(1.0),
|
||||
pointer_default(unique),
|
||||
pointer_default_top(unique),
|
||||
helpstring("Workstation Service"),
|
||||
endpoint("ncacn_np:[\\pipe\\wkssvc]","ncacn_ip_tcp:","ncalrpc:")
|
||||
] interface wkssvc
|
||||
@@ -259,7 +258,7 @@ import "srvsvc.idl", "lsa.idl";
|
||||
} wkssvc_NetWkstaInfo;
|
||||
|
||||
WERROR wkssvc_NetWkstaGetInfo(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] uint32 level,
|
||||
[out,switch_is(level),ref] wkssvc_NetWkstaInfo *info
|
||||
);
|
||||
@@ -268,7 +267,7 @@ import "srvsvc.idl", "lsa.idl";
|
||||
/******************/
|
||||
/* Function: 0x01 */
|
||||
WERROR wkssvc_NetWkstaSetInfo(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] uint32 level,
|
||||
[in,switch_is(level),ref] wkssvc_NetWkstaInfo *info,
|
||||
[in,out,ref] uint32 *parm_error
|
||||
@@ -309,11 +308,11 @@ import "srvsvc.idl", "lsa.idl";
|
||||
} wkssvc_NetWkstaEnumUsersInfo;
|
||||
|
||||
WERROR wkssvc_NetWkstaEnumUsers(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,out,ref] wkssvc_NetWkstaEnumUsersInfo *info,
|
||||
[in] uint32 prefmaxlen,
|
||||
[out,ref] uint32 *entries_read,
|
||||
[in,out] uint32 *resume_handle
|
||||
[in,out,unique] uint32 *resume_handle
|
||||
);
|
||||
|
||||
/*****************************/
|
||||
@@ -329,7 +328,7 @@ import "srvsvc.idl", "lsa.idl";
|
||||
} wkssvc_NetrWkstaUserInfo;
|
||||
|
||||
WERROR wkssvc_NetrWkstaUserGetInfo(
|
||||
[in] [string,charset(UTF16)] uint16 *unknown,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *unknown,
|
||||
[in] uint32 level,
|
||||
[out,ref] [switch_is(level)] wkssvc_NetrWkstaUserInfo *info
|
||||
);
|
||||
@@ -337,10 +336,10 @@ import "srvsvc.idl", "lsa.idl";
|
||||
/*****************************/
|
||||
/* Function 0x04 */
|
||||
WERROR wkssvc_NetrWkstaUserSetInfo(
|
||||
[in] [string,charset(UTF16)] uint16 *unknown,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *unknown,
|
||||
[in] uint32 level,
|
||||
[in,ref] [switch_is(level)] wkssvc_NetrWkstaUserInfo *info,
|
||||
[in,out] uint32 *parm_err
|
||||
[in,out,unique] uint32 *parm_err
|
||||
);
|
||||
|
||||
/*****************************/
|
||||
@@ -369,29 +368,29 @@ import "srvsvc.idl", "lsa.idl";
|
||||
} wkssvc_NetWkstaTransportInfo;
|
||||
|
||||
WERROR wkssvc_NetWkstaTransportEnum (
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,out,ref] wkssvc_NetWkstaTransportInfo *info,
|
||||
[in] uint32 max_buffer,
|
||||
[out,ref] uint32 *total_entries,
|
||||
[in,out] uint32 *resume_handle
|
||||
[in,out,unique] uint32 *resume_handle
|
||||
);
|
||||
|
||||
/*****************************/
|
||||
/* Function 0x06 */
|
||||
/* only supported on NT */
|
||||
WERROR wkssvc_NetrWkstaTransportAdd(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] uint32 level, /* must be 0 */
|
||||
[in,ref] wkssvc_NetWkstaTransportInfo0 *info0,
|
||||
[in,out] uint32 *parm_err
|
||||
[in,out,unique] uint32 *parm_err
|
||||
);
|
||||
|
||||
/*****************************/
|
||||
/* Function 0x07 */
|
||||
/* only supported on NT */
|
||||
WERROR wkssvc_NetrWkstaTransportDel(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 *transport_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *transport_name,
|
||||
[in] uint32 unknown3
|
||||
);
|
||||
|
||||
@@ -437,16 +436,16 @@ import "srvsvc.idl", "lsa.idl";
|
||||
} wkssvc_NetrUseGetInfoCtr;
|
||||
|
||||
WERROR wkssvc_NetrUseAdd(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] uint32 level,
|
||||
[in,ref] [switch_is(level)] wkssvc_NetrUseGetInfoCtr *ctr,
|
||||
[in,out] uint32 *parm_err
|
||||
[in,out,unique] uint32 *parm_err
|
||||
);
|
||||
|
||||
/*****************************/
|
||||
/* Function 0x09 */
|
||||
WERROR wkssvc_NetrUseGetInfo(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,ref] [string,charset(UTF16)] uint16 *use_name,
|
||||
[in] uint32 level,
|
||||
[out,ref] [switch_is(level)] wkssvc_NetrUseGetInfoCtr *ctr
|
||||
@@ -455,7 +454,7 @@ import "srvsvc.idl", "lsa.idl";
|
||||
/*****************************/
|
||||
/* Function 0x0a */
|
||||
WERROR wkssvc_NetrUseDel(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,ref] [string,charset(UTF16)] uint16 *use_name,
|
||||
[in] uint32 force_cond
|
||||
);
|
||||
@@ -489,19 +488,19 @@ import "srvsvc.idl", "lsa.idl";
|
||||
} wkssvc_NetrUseEnumInfo;
|
||||
|
||||
WERROR wkssvc_NetrUseEnum(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,out,ref] wkssvc_NetrUseEnumInfo *info,
|
||||
[in] uint32 prefmaxlen,
|
||||
[out,ref] uint32 *entries_read,
|
||||
[in,out] uint32 *resume_handle
|
||||
[in,out,unique] uint32 *resume_handle
|
||||
);
|
||||
|
||||
/*****************************/
|
||||
/* Function 0x0c */
|
||||
WERROR wkssvc_NetrMessageBufferSend(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,ref] [string,charset(UTF16)] uint16 *message_name,
|
||||
[in] [string,charset(UTF16)] uint16 *message_sender_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *message_sender_name,
|
||||
[in,ref] [size_is(message_size)] uint8 *message_buffer,
|
||||
[in] uint32 message_size
|
||||
);
|
||||
@@ -552,8 +551,8 @@ import "srvsvc.idl", "lsa.idl";
|
||||
} wkssvc_NetrWorkstationStatistics;
|
||||
|
||||
WERROR wkssvc_NetrWorkstationStatisticsGet(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 *unknown2,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *unknown2,
|
||||
[in] uint32 unknown3,
|
||||
[in] uint32 unknown4,
|
||||
[out,ref] wkssvc_NetrWorkstationStatistics **info
|
||||
@@ -574,20 +573,20 @@ import "srvsvc.idl", "lsa.idl";
|
||||
/*****************************/
|
||||
/* Function 0x10 */
|
||||
WERROR wkssvc_NetrJoinDomain(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,ref] [string,charset(UTF16)] uint16 *domain_name,
|
||||
[in] [string,charset(UTF16)] uint16 *account_ou,
|
||||
[in] [string,charset(UTF16)] uint16 *Account,
|
||||
[in] [string,charset(UTF16)] uint16 *password,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *account_ou,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *Account,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *password,
|
||||
[in] wkssvc_joinflags join_flags
|
||||
);
|
||||
|
||||
/*****************************/
|
||||
/* Function 0x11 */
|
||||
WERROR wkssvc_NetrUnjoinDomain(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 *Account,
|
||||
[in] [string,charset(UTF16)] uint16 *password,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *Account,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *password,
|
||||
[in] wkssvc_joinflags unjoin_flags
|
||||
);
|
||||
|
||||
@@ -599,10 +598,10 @@ import "srvsvc.idl", "lsa.idl";
|
||||
} wkssvc_renameflags;
|
||||
|
||||
WERROR wkssvc_NetrRenameMachineInDomain(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 *NewMachineName,
|
||||
[in] [string,charset(UTF16)] uint16 *Account,
|
||||
[in] [string,charset(UTF16)] uint16 *password,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *NewMachineName,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *Account,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *password,
|
||||
[in] wkssvc_renameflags RenameOptions
|
||||
);
|
||||
|
||||
@@ -618,10 +617,10 @@ import "srvsvc.idl", "lsa.idl";
|
||||
} wkssvc_NetValidateNameType;
|
||||
|
||||
WERROR wkssvc_NetrValidateName(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,ref] [string,charset(UTF16)] uint16 *name,
|
||||
[in] [string,charset(UTF16)] uint16 *Account,
|
||||
[in] [string,charset(UTF16)] uint16 *Password,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *Account,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *Password,
|
||||
[in] wkssvc_NetValidateNameType name_type
|
||||
);
|
||||
|
||||
@@ -635,7 +634,7 @@ import "srvsvc.idl", "lsa.idl";
|
||||
} wkssvc_NetJoinStatus;
|
||||
|
||||
WERROR wkssvc_NetrGetJoinInformation(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,out,ref] [string,charset(UTF16)] uint16 **name_buffer,
|
||||
[out,ref] wkssvc_NetJoinStatus *name_type
|
||||
);
|
||||
@@ -643,12 +642,16 @@ import "srvsvc.idl", "lsa.idl";
|
||||
/*****************************/
|
||||
/* Function 0x15 */
|
||||
WERROR wkssvc_NetrGetJoinableOus(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,ref] [string,charset(UTF16)] uint16 *domain_name,
|
||||
[in] [string,charset(UTF16)] uint16 *Account,
|
||||
[in] [string,charset(UTF16)] uint16 *unknown,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *Account,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *unknown,
|
||||
[in,out,ref] uint32 *num_ous,
|
||||
[out,ref] [size_is(*num_ous)] [string,charset(UTF16)] uint16 ***ous
|
||||
/*
|
||||
* this is a [ref] pointer to a [unique] pointer to an
|
||||
* array of [unique] pointers to a string array
|
||||
*/
|
||||
[out,ref] [size_is(,*num_ous)] [string,charset(UTF16)] uint16 ***ous
|
||||
);
|
||||
|
||||
typedef [flag(NDR_PAHEX)] struct {
|
||||
@@ -687,81 +690,85 @@ import "srvsvc.idl", "lsa.idl";
|
||||
/*****************************/
|
||||
/* Function 0x16 */
|
||||
WERROR wkssvc_NetrJoinDomain2 (
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,ref] [string,charset(UTF16)] uint16 *domain_name,
|
||||
[in] [string,charset(UTF16)] uint16 *account_ou,
|
||||
[in] [string,charset(UTF16)] uint16 *admin_account,
|
||||
[in] wkssvc_PasswordBuffer *encrypted_password,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *account_ou,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *admin_account,
|
||||
[in,unique] wkssvc_PasswordBuffer *encrypted_password,
|
||||
[in] wkssvc_joinflags join_flags
|
||||
);
|
||||
|
||||
/*****************************/
|
||||
/* Function 0x17 */
|
||||
WERROR wkssvc_NetrUnjoinDomain2 (
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 *account,
|
||||
[in] wkssvc_PasswordBuffer *encrypted_password,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *account,
|
||||
[in,unique] wkssvc_PasswordBuffer *encrypted_password,
|
||||
[in] wkssvc_joinflags unjoin_flags
|
||||
);
|
||||
|
||||
/*****************************/
|
||||
/* Function 0x18 */
|
||||
WERROR wkssvc_NetrRenameMachineInDomain2(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 *NewMachineName,
|
||||
[in] [string,charset(UTF16)] uint16 *Account,
|
||||
[in] wkssvc_PasswordBuffer *EncryptedPassword,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *NewMachineName,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *Account,
|
||||
[in,unique] wkssvc_PasswordBuffer *EncryptedPassword,
|
||||
[in] wkssvc_renameflags RenameOptions
|
||||
);
|
||||
|
||||
/*****************************/
|
||||
/* Function 0x19 */
|
||||
WERROR wkssvc_NetrValidateName2(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,ref] [string,charset(UTF16)] uint16 *name,
|
||||
[in] [string,charset(UTF16)] uint16 *Account,
|
||||
[in] wkssvc_PasswordBuffer *EncryptedPassword,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *Account,
|
||||
[in,unique] wkssvc_PasswordBuffer *EncryptedPassword,
|
||||
[in] wkssvc_NetValidateNameType name_type
|
||||
);
|
||||
|
||||
/*****************************/
|
||||
/* Function 0x1a */
|
||||
WERROR wkssvc_NetrGetJoinableOus2(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,ref] [string,charset(UTF16)] uint16 *domain_name,
|
||||
[in] [string,charset(UTF16)] uint16 *Account,
|
||||
[in] wkssvc_PasswordBuffer *EncryptedPassword,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *Account,
|
||||
[in,unique] wkssvc_PasswordBuffer *EncryptedPassword,
|
||||
[in,out,ref] uint32 *num_ous,
|
||||
[out,ref] [size_is(*num_ous)] [string,charset(UTF16)] uint16 ***ous
|
||||
/*
|
||||
* this is a [ref] pointer to a [unique] pointer to an
|
||||
* array of [unique] pointers to a string array
|
||||
*/
|
||||
[out,ref] [size_is(,*num_ous)] [string,charset(UTF16)] uint16 ***ous
|
||||
);
|
||||
|
||||
/*****************************/
|
||||
/* Function 0x1b */
|
||||
WERROR wkssvc_NetrAddAlternateComputerName(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 *NewAlternateMachineName,
|
||||
[in] [string,charset(UTF16)] uint16 *Account,
|
||||
[in] wkssvc_PasswordBuffer *EncryptedPassword,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *NewAlternateMachineName,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *Account,
|
||||
[in,unique] wkssvc_PasswordBuffer *EncryptedPassword,
|
||||
[in] uint32 Reserved
|
||||
);
|
||||
|
||||
/*****************************/
|
||||
/* Function 0x1c */
|
||||
WERROR wkssvc_NetrRemoveAlternateComputerName(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 *AlternateMachineNameToRemove,
|
||||
[in] [string,charset(UTF16)] uint16 *Account,
|
||||
[in] wkssvc_PasswordBuffer *EncryptedPassword,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *AlternateMachineNameToRemove,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *Account,
|
||||
[in,unique] wkssvc_PasswordBuffer *EncryptedPassword,
|
||||
[in] uint32 Reserved
|
||||
);
|
||||
|
||||
/*****************************/
|
||||
/* Function 0x1d */
|
||||
WERROR wkssvc_NetrSetPrimaryComputername(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] [string,charset(UTF16)] uint16 *primary_name,
|
||||
[in] [string,charset(UTF16)] uint16 *Account,
|
||||
[in] wkssvc_PasswordBuffer *EncryptedPassword,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *primary_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *Account,
|
||||
[in,unique] wkssvc_PasswordBuffer *EncryptedPassword,
|
||||
[in] uint32 Reserved
|
||||
);
|
||||
|
||||
@@ -780,7 +787,7 @@ import "srvsvc.idl", "lsa.idl";
|
||||
} wkssvc_ComputerNamesCtr;
|
||||
|
||||
WERROR wkssvc_NetrEnumerateComputerNames(
|
||||
[in] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in,unique] [string,charset(UTF16)] uint16 *server_name,
|
||||
[in] wkssvc_ComputerNameType name_type,
|
||||
[in] uint32 Reserved,
|
||||
[out,ref] wkssvc_ComputerNamesCtr **ctr
|
||||
|
||||
11
source/librpc/ndr.pc.in
Normal file
11
source/librpc/ndr.pc.in
Normal file
@@ -0,0 +1,11 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: ndr
|
||||
Description: Network Data Representation Core Library
|
||||
Requires: samba-config talloc
|
||||
Version: 0.0.1
|
||||
Libs: -L${libdir} -lndr
|
||||
Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1
|
||||
221
source/main.mk
221
source/main.mk
@@ -35,13 +35,13 @@ include kdc/config.mk
|
||||
DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \
|
||||
$(srcdir)/version.h
|
||||
|
||||
binaries: $(BINARIES)
|
||||
libraries: $(STATIC_LIBS) $(SHARED_LIBS)
|
||||
modules: $(SHARED_MODULES)
|
||||
headers: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
|
||||
manpages: $(MANPAGES)
|
||||
all: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules pythonmods
|
||||
everything: all libraries headers
|
||||
binaries:: $(BINARIES)
|
||||
libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
|
||||
modules:: $(SHARED_MODULES)
|
||||
headers:: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
|
||||
manpages:: $(MANPAGES)
|
||||
all:: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules pythonmods
|
||||
everything:: all libraries headers
|
||||
|
||||
LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)=$(builddir)/bin/shared
|
||||
|
||||
@@ -49,9 +49,9 @@ LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)=$(builddir)/bin/shared
|
||||
# needed by samba3's 'make test' and the build-farm
|
||||
# scripts use that it as fallback in case
|
||||
# 'make everything' fails
|
||||
testsuite: bin/smbclient bin/cifsdd bin/smbtorture bin/nmblookup
|
||||
testsuite:: bin/smbclient bin/cifsdd bin/smbtorture bin/nmblookup
|
||||
|
||||
showlayout:
|
||||
showlayout::
|
||||
@echo 'Samba will be installed into:'
|
||||
@echo ' basedir: $(BASEDIR)'
|
||||
@echo ' bindir: $(BINDIR)'
|
||||
@@ -72,30 +72,14 @@ showlayout:
|
||||
@echo ' datadir: $(DATADIR)'
|
||||
@echo ' winbindd_socket_dir: $(WINBINDD_SOCKET_DIR)'
|
||||
|
||||
showflags:
|
||||
@echo 'Samba will be compiled with flags:'
|
||||
@echo ' CPP = $(CPP)'
|
||||
@echo ' CPPFLAGS = $(CPPFLAGS)'
|
||||
@echo ' CC = $(CC)'
|
||||
@echo ' CFLAGS = $(CFLAGS)'
|
||||
@echo ' PICFLAG = $(PICFLAG)'
|
||||
@echo ' BNLD = $(BNLD)'
|
||||
@echo ' BNLD_FLAGS = $(BNLD_FLAGS)'
|
||||
@echo ' STLD = $(STLD)'
|
||||
@echo ' STLD_FLAGS = $(STLD_FLAGS)'
|
||||
@echo ' SHLD = $(SHLD)'
|
||||
@echo ' SHLD_FLAGS = $(SHLD_FLAGS)'
|
||||
@echo ' MDLD = $(MDLD)'
|
||||
@echo ' MDLD_FLAGS = $(MDLD_FLAGS)'
|
||||
@echo ' SHLIBEXT = $(SHLIBEXT)'
|
||||
showflags::
|
||||
@echo ' srcdir = $(srcdir)'
|
||||
@echo ' builddir = $(builddir)'
|
||||
@echo ' pwd = '`/bin/pwd`
|
||||
|
||||
# The permissions to give the executables
|
||||
INSTALLPERMS = 0755
|
||||
|
||||
install: showlayout everything installbin installdat installswat installmisc installlib \
|
||||
install:: showlayout everything installbin installdat installswat installmisc installlib \
|
||||
installheader installpc installplugins
|
||||
|
||||
# DESTDIR is used here to prevent packagers wasting their time
|
||||
@@ -106,7 +90,7 @@ install: showlayout everything installbin installdat installswat installmisc ins
|
||||
# the removal of DESTDIR. Do not remove it even though you think it
|
||||
# is not used.
|
||||
|
||||
installdirs:
|
||||
installdirs::
|
||||
@$(SHELL) $(srcdir)/script/installdirs.sh \
|
||||
$(DESTDIR)$(BASEDIR) \
|
||||
$(DESTDIR)$(BINDIR) \
|
||||
@@ -126,7 +110,7 @@ installdirs:
|
||||
$(DESTDIR)$(PKGCONFIGDIR) \
|
||||
$(DESTDIR)$(CONFIGDIR) \
|
||||
|
||||
installbin: $(SBIN_PROGS) $(BIN_PROGS) $(TORTURE_PROGS) installdirs
|
||||
installbin:: $(SBIN_PROGS) $(BIN_PROGS) $(TORTURE_PROGS) installdirs
|
||||
@$(SHELL) $(srcdir)/script/installbin.sh \
|
||||
$(INSTALLPERMS) \
|
||||
$(DESTDIR)$(BASEDIR) \
|
||||
@@ -146,58 +130,52 @@ installbin: $(SBIN_PROGS) $(BIN_PROGS) $(TORTURE_PROGS) installdirs
|
||||
$(DESTDIR)$(TORTUREDIR) \
|
||||
$(TORTURE_PROGS)
|
||||
|
||||
installlib: $(INSTALLABLE_SHARED_LIBS) $(STATIC_LIBS) installdirs
|
||||
installlib:: $(INSTALLABLE_SHARED_LIBS) $(STATIC_LIBS) installdirs
|
||||
@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(LIBDIR) "$(SHLIBEXT)" $(INSTALLABLE_SHARED_LIBS)
|
||||
#@$(SHELL) $(srcdir)/script/installlib.sh $(DESTDIR)$(LIBDIR) "$(STLIBEXT)" $(STATIC_LIBS)
|
||||
|
||||
installheader: headers installdirs
|
||||
installheader:: headers installdirs
|
||||
@srcdir=$(srcdir) builddir=$(builddir) $(PERL) $(srcdir)/script/installheader.pl $(DESTDIR)$(INCLUDEDIR) $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
|
||||
|
||||
installdat: installdirs
|
||||
installdat:: installdirs
|
||||
@$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(DATADIR) $(srcdir)
|
||||
|
||||
installswat: installdirs
|
||||
installswat:: installdirs
|
||||
@$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir)
|
||||
|
||||
installman: manpages installdirs
|
||||
installman:: manpages installdirs
|
||||
@$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(MANDIR) $(MANPAGES)
|
||||
|
||||
installmisc: installdirs
|
||||
installmisc:: installdirs
|
||||
@$(SHELL) $(srcdir)/script/installmisc.sh $(srcdir) $(DESTDIR)$(JSDIR) $(DESTDIR)$(SETUPDIR) $(DESTDIR)$(BINDIR)
|
||||
|
||||
installpc: installdirs
|
||||
installpc:: installdirs
|
||||
@$(SHELL) $(srcdir)/script/installpc.sh $(builddir) $(DESTDIR)$(PKGCONFIGDIR) $(PC_FILES)
|
||||
|
||||
uninstall: uninstallbin uninstallman uninstallmisc uninstalllib uninstallheader \
|
||||
uninstall:: uninstallbin uninstallman uninstallmisc uninstalllib uninstallheader \
|
||||
uninstallplugins
|
||||
|
||||
uninstallmisc:
|
||||
uninstallmisc::
|
||||
#FIXME
|
||||
|
||||
uninstallbin:
|
||||
uninstallbin::
|
||||
@$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(SBIN_PROGS)
|
||||
@$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(BIN_PROGS)
|
||||
@$(SHELL) $(srcdir)/script/uninstalltorture.sh $(DESTDIR)$(TORTUREDIR) $(TORTURE_PROGS)
|
||||
|
||||
uninstalllib:
|
||||
uninstalllib::
|
||||
@$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(LIBDIR) $(SHARED_LIBS)
|
||||
#@$(SHELL) $(srcdir)/script/uninstalllib.sh $(DESTDIR)$(LIBDIR) $(STATIC_LIBS)
|
||||
|
||||
uninstallheader:
|
||||
uninstallheader::
|
||||
@$(SHELL) $(srcdir)/script/uninstallheader.sh $(DESTDIR)$(INCLUDEDIR) $(PUBLIC_HEADERS)
|
||||
|
||||
uninstallman:
|
||||
uninstallman::
|
||||
@$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(MANDIR) $(MANPAGES)
|
||||
|
||||
Makefile: config.status $(MK_FILES)
|
||||
./config.status
|
||||
|
||||
etags:
|
||||
etags `find $(srcdir) -name "*.[ch]"`
|
||||
|
||||
ctags:
|
||||
ctags `find $(srcdir) -name "*.[ch]"`
|
||||
|
||||
pidl/Makefile: pidl/Makefile.PL
|
||||
cd pidl && $(PERL) Makefile.PL
|
||||
|
||||
@@ -206,10 +184,10 @@ testcov-html:: pidl-testcov
|
||||
pidl-testcov: pidl/Makefile
|
||||
cd pidl && cover -test
|
||||
|
||||
installpidl: pidl/Makefile
|
||||
installpidl:: pidl/Makefile
|
||||
$(MAKE) -C pidl install
|
||||
|
||||
uninstallpidl: pidl/Makefile
|
||||
uninstallpidl:: pidl/Makefile
|
||||
$(MAKE) -C pidl uninstall
|
||||
|
||||
$(IDL_HEADER_FILES) \
|
||||
@@ -219,10 +197,10 @@ $(IDL_HEADER_FILES) \
|
||||
$(IDL_NDR_EJS_C_FILES) $(IDL_NDR_EJS_H_FILES) \
|
||||
$(IDL_NDR_PY_C_FILES) $(IDL_NDR_PY_H_FILES): idl
|
||||
|
||||
idl_full: pidl/lib/Parse/Pidl/IDL.pm pidl/lib/Parse/Pidl/Expr.pm
|
||||
idl_full:: pidl/lib/Parse/Pidl/IDL.pm pidl/lib/Parse/Pidl/Expr.pm
|
||||
@CPP="$(CPP)" PERL="$(PERL)" srcdir=$(srcdir) $(srcdir)/script/build_idl.sh FULL
|
||||
|
||||
idl: pidl/lib/Parse/Pidl/IDL.pm pidl/lib/Parse/Pidl/Expr.pm
|
||||
idl:: pidl/lib/Parse/Pidl/IDL.pm pidl/lib/Parse/Pidl/Expr.pm
|
||||
@CPP="$(CPP)" PERL="$(PERL)" srcdir=$(srcdir) $(srcdir)/script/build_idl.sh PARTIAL
|
||||
|
||||
pidl/lib/Parse/Pidl/IDL.pm: pidl/idl.yp
|
||||
@@ -233,139 +211,8 @@ pidl/lib/Parse/Pidl/Expr.pm: pidl/idl.yp
|
||||
-$(YAPP) -m 'Parse::Pidl::Expr' -o pidl/lib/Parse/Pidl/Expr.pm pidl/expr.yp ||\
|
||||
touch pidl/lib/Parse/Pidl/Expr.pm
|
||||
|
||||
include/config.h:
|
||||
@echo "include/config.h not present"
|
||||
@echo "You need to rerun ./autogen.sh and ./configure"
|
||||
@/bin/false
|
||||
mkinclude selftest/config.mk
|
||||
mkinclude rules.mk
|
||||
|
||||
$(srcdir)/version.h: $(srcdir)/VERSION
|
||||
@$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
|
||||
|
||||
regen_version:
|
||||
@$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
|
||||
|
||||
clean_pch:
|
||||
@echo "Removing precompiled headers"
|
||||
@-rm -f include/includes.h.gch
|
||||
|
||||
pch: clean_pch include/includes.h.gch
|
||||
|
||||
clean:: clean_pch
|
||||
@echo Removing objects
|
||||
@-find . -name '*.o' -exec rm -f '{}' \;
|
||||
@echo Removing hostcc objects
|
||||
@-find . -name '*.ho' -exec rm -f '{}' \;
|
||||
@echo Removing binaries
|
||||
@-rm -f $(BIN_PROGS) $(SBIN_PROGS) $(BINARIES) $(TORTURE_PROGS)
|
||||
@echo Removing libraries
|
||||
@-rm -f $(STATIC_LIBRARIES) $(SHARED_LIBRARIES)
|
||||
@-rm -f bin/static/*.a bin/shared/*.$(SHLIBEXT)
|
||||
@echo Removing modules
|
||||
@-rm -f bin/modules/*/*.$(SHLIBEXT)
|
||||
@-rm -f bin/*_init_module.c
|
||||
@echo Removing dummy targets
|
||||
@-rm -f bin/.*_*
|
||||
@echo Removing generated files
|
||||
@-rm -f bin/*_init_module.c
|
||||
@-rm -rf librpc/gen_*
|
||||
@echo Removing proto headers
|
||||
@-rm -f $(PROTO_HEADERS)
|
||||
|
||||
distclean: clean
|
||||
-rm -f include/config.h include/config_tmp.h include/build.h
|
||||
-rm -f Makefile
|
||||
-rm -f config.status
|
||||
-rm -f config.log config.cache
|
||||
-rm -f config.pm config.mk
|
||||
-rm -f $(PC_FILES)
|
||||
|
||||
removebackup:
|
||||
-rm -f *.bak *~ */*.bak */*~ */*/*.bak */*/*~ */*/*/*.bak */*/*/*~
|
||||
|
||||
realdistclean:: distclean removebackup
|
||||
-rm -f include/config_tmp.h.in
|
||||
-rm -f version.h
|
||||
-rm -f configure
|
||||
-rm -f $(MANPAGES)
|
||||
|
||||
check:: test
|
||||
|
||||
include selftest/config.mk
|
||||
|
||||
unused_macros:
|
||||
$(srcdir)/script/find_unused_macros.pl `find . -name "*.[ch]"` | sort
|
||||
|
||||
###############################################################################
|
||||
# File types
|
||||
###############################################################################
|
||||
|
||||
.SUFFIXES: .x .c .et .y .l .d .o .h .h.gch .a .$(SHLIBEXT) .1 .1.xml .3 .3.xml .5 .5.xml .7 .7.xml .8 .8.xml .ho .idl .hd
|
||||
|
||||
.c.d:
|
||||
@echo "Generating dependencies for $<"
|
||||
@$(DEPENDS)
|
||||
|
||||
.c.hd:
|
||||
@echo "Generating host-compiler dependencies for $<"
|
||||
@$(HDEPENDS)
|
||||
|
||||
include/includes.d: include/includes.h
|
||||
@echo "Generating dependencies for $<"
|
||||
@$(PCHDEPENDS)
|
||||
|
||||
.c.o:
|
||||
@if test -n "$(CC_CHECKER)"; then \
|
||||
echo "Checking $< with '$(CC_CHECKER)'"; \
|
||||
$(CHECK) ; \
|
||||
fi
|
||||
@echo "Compiling $<"
|
||||
@-mkdir -p `dirname $@`
|
||||
@$(COMPILE) && exit 0 ; \
|
||||
echo "The following command failed:" 1>&2;\
|
||||
echo "$(COMPILE)" 1>&2;\
|
||||
$(COMPILE) >/dev/null 2>&1
|
||||
|
||||
.c.ho:
|
||||
@echo "Compiling $< with host compiler"
|
||||
@-mkdir -p `dirname $@`
|
||||
@$(HCOMPILE) && exit 0;\
|
||||
echo "The following command failed:" 1>&2;\
|
||||
echo "$(HCOMPILE)" 1>&2;\
|
||||
$(HCOMPILE) >/dev/null 2>&1
|
||||
|
||||
.h.h.gch:
|
||||
@echo "Precompiling $<"
|
||||
@$(PCHCOMPILE)
|
||||
|
||||
.y.c:
|
||||
@echo "Building $< with $(YACC)"
|
||||
@-$(srcdir)/script/yacc_compile.sh "$(YACC)" "$<" "$@"
|
||||
|
||||
.l.c:
|
||||
@echo "Building $< with $(LEX)"
|
||||
@-$(srcdir)/script/lex_compile.sh "$(LEX)" "$<" "$@"
|
||||
|
||||
DOCBOOK_MANPAGE_URL = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
|
||||
|
||||
.1.xml.1:
|
||||
$(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
|
||||
|
||||
.3.xml.3:
|
||||
$(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
|
||||
|
||||
.5.xml.5:
|
||||
$(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
|
||||
|
||||
.7.xml.7:
|
||||
$(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
|
||||
|
||||
.8.xml.8:
|
||||
$(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
|
||||
|
||||
DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
|
||||
include/includes.d
|
||||
|
||||
dist:: idl_full manpages configure distclean
|
||||
|
||||
configure:
|
||||
./autogen.sh
|
||||
showflags::
|
||||
@echo ' pwd = '`/bin/pwd`
|
||||
|
||||
@@ -88,20 +88,10 @@ static void nbtd_task_init(struct task_server *task)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
initialise the nbt server
|
||||
*/
|
||||
static NTSTATUS nbtd_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops)
|
||||
{
|
||||
return task_server_startup(event_ctx, lp_ctx,
|
||||
model_ops, nbtd_task_init);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
register ourselves as a available server
|
||||
*/
|
||||
NTSTATUS server_service_nbtd_init(void)
|
||||
{
|
||||
return register_server_service("nbt", nbtd_init);
|
||||
return register_server_service("nbt", nbtd_task_init);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ AC_CHECK_HEADERS(nss.h nss_common.h ns_api.h )
|
||||
case "$host_os" in
|
||||
*linux*)
|
||||
SMB_LIBRARY(nss_winbind,
|
||||
[Linux Name service switch library using winbind],
|
||||
[nsswitch/winbind_nss_linux.o],
|
||||
[LIBWINBIND-CLIENT],
|
||||
[2],[2])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[LIBRARY::LIBSAMBA-CONFIG]
|
||||
DESCRIPTION = Reading Samba configuration files
|
||||
VERSION = 0.0.1
|
||||
SO_VERSION = 0
|
||||
PC_FILE = samba-config.pc
|
||||
OBJ_FILES = loadparm.o \
|
||||
params.o \
|
||||
generic.o \
|
||||
|
||||
@@ -2408,6 +2408,8 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
|
||||
lp_do_global_parameter_var(lp_ctx, "setup directory", "%s",
|
||||
dyn_SETUPDIR);
|
||||
|
||||
lp_do_global_parameter(lp_ctx, "prefork children:smb", "4");
|
||||
|
||||
for (i = 0; parm_table[i].label; i++) {
|
||||
if (!(lp_ctx->flags[i] & FLAG_CMDLINE)) {
|
||||
lp_ctx->flags[i] |= FLAG_DEFAULT;
|
||||
|
||||
@@ -50,6 +50,7 @@ typedef struct loadparm_context {
|
||||
%extend {
|
||||
loadparm_context(TALLOC_CTX *mem_ctx) { return loadparm_init(mem_ctx); }
|
||||
bool load(const char *filename) { return lp_load($self, filename); }
|
||||
bool load_default() { return lp_load_default($self); }
|
||||
#ifdef SWIGPYTHON
|
||||
int __len__() { return lp_numservices($self); }
|
||||
struct loadparm_service *__getitem__(const char *name) { return lp_service($self, name); }
|
||||
|
||||
@@ -64,6 +64,7 @@ class LoadParm(object):
|
||||
_param.LoadParm_swiginit(self,_param.new_LoadParm(*args, **kwargs))
|
||||
__swig_destroy__ = _param.delete_LoadParm
|
||||
LoadParm.load = new_instancemethod(_param.LoadParm_load,None,LoadParm)
|
||||
LoadParm.load_default = new_instancemethod(_param.LoadParm_load_default,None,LoadParm)
|
||||
LoadParm.__len__ = new_instancemethod(_param.LoadParm___len__,None,LoadParm)
|
||||
LoadParm.__getitem__ = new_instancemethod(_param.LoadParm___getitem__,None,LoadParm)
|
||||
LoadParm.configfile = new_instancemethod(_param.LoadParm_configfile,None,LoadParm)
|
||||
|
||||
@@ -2602,6 +2602,7 @@ SWIGINTERNINLINE PyObject*
|
||||
return PyBool_FromLong(value ? 1 : 0);
|
||||
}
|
||||
|
||||
SWIGINTERN bool loadparm_context_load_default(loadparm_context *self){ return lp_load_default(self); }
|
||||
SWIGINTERN int loadparm_context___len__(loadparm_context *self){ return lp_numservices(self); }
|
||||
|
||||
#define SWIG_From_long PyInt_FromLong
|
||||
@@ -2840,6 +2841,34 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_LoadParm_load_default(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj = 0;
|
||||
loadparm_context *arg1 = (loadparm_context *) 0 ;
|
||||
bool result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
char * kwnames[] = {
|
||||
(char *) "self", NULL
|
||||
};
|
||||
|
||||
arg1 = loadparm_init(NULL);
|
||||
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:LoadParm_load_default",kwnames,&obj0)) SWIG_fail;
|
||||
if (obj0) {
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_loadparm_context, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LoadParm_load_default" "', argument " "1"" of type '" "loadparm_context *""'");
|
||||
}
|
||||
arg1 = (loadparm_context *)(argp1);
|
||||
}
|
||||
result = (bool)loadparm_context_load_default(arg1);
|
||||
resultobj = SWIG_From_bool((bool)(result));
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_LoadParm___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj = 0;
|
||||
loadparm_context *arg1 = (loadparm_context *) 0 ;
|
||||
@@ -4050,6 +4079,7 @@ SWIGINTERN PyObject *Swig_var_default_config_get(void) {
|
||||
static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"new_LoadParm", (PyCFunction)_wrap_new_LoadParm, METH_NOARGS, NULL},
|
||||
{ (char *)"LoadParm_load", (PyCFunction) _wrap_LoadParm_load, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"LoadParm_load_default", (PyCFunction) _wrap_LoadParm_load_default, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"LoadParm___len__", (PyCFunction) _wrap_LoadParm___len__, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"LoadParm___getitem__", (PyCFunction) _wrap_LoadParm___getitem__, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"LoadParm_configfile", (PyCFunction) _wrap_LoadParm_configfile, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
|
||||
10
source/param/samba-config.pc.in
Normal file
10
source/param/samba-config.pc.in
Normal file
@@ -0,0 +1,10 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: samba-config
|
||||
Description: Reading Samba configuration files
|
||||
Version: 0.0.1
|
||||
Libs: -L${libdir} -lsamba-config
|
||||
Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1
|
||||
@@ -46,6 +46,9 @@ class LoadParmTestCase(unittest.TestCase):
|
||||
self.assertTrue(file.is_myname("BLA"))
|
||||
self.assertFalse(file.is_myname("FOOBAR"))
|
||||
|
||||
def test_load_default(self):
|
||||
file = param.LoadParm()
|
||||
file.load_default()
|
||||
|
||||
class ParamTestCase(unittest.TestCase):
|
||||
def test_init(self):
|
||||
|
||||
@@ -293,12 +293,7 @@ properties: property { $_[1] }
|
||||
;
|
||||
|
||||
property: identifier {{ "$_[1]" => "1" }}
|
||||
| identifier '(' listtext ')' {{ "$_[1]" => "$_[3]" }}
|
||||
;
|
||||
|
||||
listtext:
|
||||
anytext
|
||||
| listtext ',' anytext { "$_[1] $_[3]" }
|
||||
| identifier '(' commalisttext ')' {{ "$_[1]" => "$_[3]" }}
|
||||
;
|
||||
|
||||
commalisttext:
|
||||
|
||||
@@ -6,7 +6,7 @@ package Parse::Pidl::CUtil;
|
||||
|
||||
require Exporter;
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(get_pointer_to get_value_of);
|
||||
@EXPORT = qw(get_pointer_to get_value_of get_array_element);
|
||||
use vars qw($VERSION);
|
||||
$VERSION = '0.01';
|
||||
|
||||
@@ -36,4 +36,17 @@ sub get_value_of($)
|
||||
}
|
||||
}
|
||||
|
||||
sub get_array_element($$)
|
||||
{
|
||||
my ($var_name, $idx) = @_;
|
||||
|
||||
if ($var_name =~ /^\*.*$/) {
|
||||
$var_name = "($var_name)";
|
||||
} elsif ($var_name =~ /^\&.*$/) {
|
||||
$var_name = "($var_name)";
|
||||
}
|
||||
|
||||
return "$var_name"."[$idx]";
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@@ -148,10 +148,6 @@ sub CheckInterface($)
|
||||
{
|
||||
my $if = shift;
|
||||
|
||||
if (has_property($if, "pointer_default_top") and
|
||||
$if->{PROPERTIES}->{pointer_default_top} ne "ref") {
|
||||
warning($if, "pointer_default_top() is pidl-specific");
|
||||
}
|
||||
}
|
||||
|
||||
sub Check($)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -72,9 +72,9 @@ my $scalar_alignment = {
|
||||
'ipv4address' => 4
|
||||
};
|
||||
|
||||
sub GetElementLevelTable($)
|
||||
sub GetElementLevelTable($$)
|
||||
{
|
||||
my $e = shift;
|
||||
my ($e, $pointer_default) = @_;
|
||||
|
||||
my $order = [];
|
||||
my $is_deferred = 0;
|
||||
@@ -157,32 +157,45 @@ sub GetElementLevelTable($)
|
||||
|
||||
# Next, all the pointers
|
||||
foreach my $i (1..$e->{POINTERS}) {
|
||||
my $pt = pointer_type($e);
|
||||
|
||||
my $level = "EMBEDDED";
|
||||
# Top level "ref" pointers do not have a referrent identifier
|
||||
$level = "TOP" if ( defined($pt)
|
||||
and $i == 1
|
||||
and $e->{PARENT}->{TYPE} eq "FUNCTION");
|
||||
$level = "TOP" if ($i == 1 and $e->{PARENT}->{TYPE} eq "FUNCTION");
|
||||
|
||||
my $pt;
|
||||
#
|
||||
# Only the first level gets the pointer type from the
|
||||
# pointer property, the others get them from
|
||||
# the pointer_default() interface property
|
||||
#
|
||||
# see http://msdn2.microsoft.com/en-us/library/aa378984(VS.85).aspx
|
||||
# (Here they talk about the rightmost pointer, but testing shows
|
||||
# they mean the leftmost pointer.)
|
||||
#
|
||||
# --metze
|
||||
#
|
||||
$pt = pointer_type($e);
|
||||
if ($i > 1) {
|
||||
$is_deferred = 1 if ($pt ne "ref" and $e->{PARENT}->{TYPE} eq "FUNCTION");
|
||||
$pt = $pointer_default;
|
||||
}
|
||||
|
||||
push (@$order, {
|
||||
TYPE => "POINTER",
|
||||
# for now, there can only be one pointer type per element
|
||||
POINTER_TYPE => pointer_type($e),
|
||||
POINTER_TYPE => $pt,
|
||||
POINTER_INDEX => $pointer_idx,
|
||||
IS_DEFERRED => "$is_deferred",
|
||||
LEVEL => $level
|
||||
});
|
||||
|
||||
warning($e, "top-level \[out\] pointer `$e->{NAME}' is not a \[ref\] pointer")
|
||||
if ($i == 1 and pointer_type($e) ne "ref" and
|
||||
if ($i == 1 and $pt ne "ref" and
|
||||
$e->{PARENT}->{TYPE} eq "FUNCTION" and
|
||||
not has_property($e, "in"));
|
||||
|
||||
$pointer_idx++;
|
||||
|
||||
# everything that follows will be deferred
|
||||
$is_deferred = 1 if ($e->{PARENT}->{TYPE} ne "FUNCTION");
|
||||
$is_deferred = 1 if ($level ne "TOP");
|
||||
|
||||
my $array_size = shift @size_is;
|
||||
my $array_length;
|
||||
@@ -391,7 +404,7 @@ sub ParseElement($$)
|
||||
NAME => $e->{NAME},
|
||||
TYPE => $e->{TYPE},
|
||||
PROPERTIES => $e->{PROPERTIES},
|
||||
LEVELS => GetElementLevelTable($e),
|
||||
LEVELS => GetElementLevelTable($e, $pointer_default),
|
||||
REPRESENTATION_TYPE => ($e->{PROPERTIES}->{represent_as} or $e->{TYPE}),
|
||||
ALIGN => align_type($e->{TYPE}),
|
||||
ORIGINAL => $e
|
||||
@@ -581,7 +594,7 @@ sub ParseFunction($$$)
|
||||
my $rettype = undef;
|
||||
my $thisopnum = undef;
|
||||
|
||||
CheckPointerTypes($d, $ndr->{PROPERTIES}->{pointer_default_top});
|
||||
CheckPointerTypes($d, "ref");
|
||||
|
||||
if (not defined($d->{PROPERTIES}{noopnum})) {
|
||||
$thisopnum = ${$opnum};
|
||||
@@ -623,7 +636,7 @@ sub CheckPointerTypes($$)
|
||||
|
||||
foreach my $e (@{$s->{ELEMENTS}}) {
|
||||
if ($e->{POINTERS} and not defined(pointer_type($e))) {
|
||||
$e->{PROPERTIES}->{$default} = 1;
|
||||
$e->{PROPERTIES}->{$default} = '1';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -661,12 +674,6 @@ sub ParseInterface($)
|
||||
$idl->{PROPERTIES}->{pointer_default} = "unique";
|
||||
}
|
||||
|
||||
if (not has_property($idl, "pointer_default_top")) {
|
||||
$idl->{PROPERTIES}->{pointer_default_top} = "ref";
|
||||
} else {
|
||||
warning($idl, "pointer_default_top() is a pidl extension and should not be used");
|
||||
}
|
||||
|
||||
foreach my $d (@{$idl->{DATA}}) {
|
||||
if ($d->{TYPE} eq "FUNCTION") {
|
||||
push (@functions, ParseFunction($idl, $d, \$opnum));
|
||||
@@ -688,7 +695,7 @@ sub ParseInterface($)
|
||||
if (!defined $idl->{PROPERTIES}->{endpoint}) {
|
||||
push @endpoints, "\"ncacn_np:[\\\\pipe\\\\" . $idl->{NAME} . "]\"";
|
||||
} else {
|
||||
@endpoints = split / /, $idl->{PROPERTIES}->{endpoint};
|
||||
@endpoints = split /,/, $idl->{PROPERTIES}->{endpoint};
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -824,7 +831,6 @@ my %property_list = (
|
||||
"uuid" => ["INTERFACE"],
|
||||
"endpoint" => ["INTERFACE"],
|
||||
"pointer_default" => ["INTERFACE"],
|
||||
"pointer_default_top" => ["INTERFACE"],
|
||||
"helper" => ["INTERFACE"],
|
||||
"authservice" => ["INTERFACE"],
|
||||
|
||||
|
||||
@@ -82,10 +82,11 @@ sub HeaderElement($)
|
||||
|
||||
#####################################################################
|
||||
# parse a struct
|
||||
sub HeaderStruct($$)
|
||||
sub HeaderStruct($$;$)
|
||||
{
|
||||
my($struct,$name) = @_;
|
||||
my($struct,$name,$tail) = @_;
|
||||
pidl "struct $name";
|
||||
pidl $tail if defined($tail) and not defined($struct->{ELEMENTS});
|
||||
return if (not defined($struct->{ELEMENTS}));
|
||||
pidl " {\n";
|
||||
$tab_depth++;
|
||||
@@ -103,13 +104,14 @@ sub HeaderStruct($$)
|
||||
if (defined $struct->{PROPERTIES}) {
|
||||
HeaderProperties($struct->{PROPERTIES}, []);
|
||||
}
|
||||
pidl $tail if defined($tail);
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
# parse a enum
|
||||
sub HeaderEnum($$)
|
||||
sub HeaderEnum($$;$)
|
||||
{
|
||||
my($enum,$name) = @_;
|
||||
my($enum,$name,$tail) = @_;
|
||||
my $first = 1;
|
||||
|
||||
pidl "enum $name";
|
||||
@@ -131,7 +133,6 @@ sub HeaderEnum($$)
|
||||
my $count = 0;
|
||||
my $with_val = 0;
|
||||
my $without_val = 0;
|
||||
if (defined($enum->{ELEMENTS})) {
|
||||
pidl " { __donnot_use_enum_$name=0x7FFFFFFF}\n";
|
||||
foreach my $e (@{$enum->{ELEMENTS}}) {
|
||||
my $t = "$e";
|
||||
@@ -152,9 +153,9 @@ sub HeaderEnum($$)
|
||||
}
|
||||
pidl "#define $name ( $value )\n";
|
||||
}
|
||||
}
|
||||
pidl "#endif\n";
|
||||
}
|
||||
pidl $tail if defined($tail);
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
@@ -172,12 +173,13 @@ sub HeaderBitmap($$)
|
||||
|
||||
#####################################################################
|
||||
# parse a union
|
||||
sub HeaderUnion($$)
|
||||
sub HeaderUnion($$;$)
|
||||
{
|
||||
my($union,$name) = @_;
|
||||
my($union,$name,$tail) = @_;
|
||||
my %done = ();
|
||||
|
||||
pidl "union $name";
|
||||
pidl $tail if defined($tail) and not defined($union->{ELEMENTS});
|
||||
return if (not defined($union->{ELEMENTS}));
|
||||
pidl " {\n";
|
||||
$tab_depth++;
|
||||
@@ -195,18 +197,19 @@ sub HeaderUnion($$)
|
||||
if (defined $union->{PROPERTIES}) {
|
||||
HeaderProperties($union->{PROPERTIES}, []);
|
||||
}
|
||||
pidl $tail if defined($tail);
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
# parse a type
|
||||
sub HeaderType($$$)
|
||||
sub HeaderType($$$;$)
|
||||
{
|
||||
my($e,$data,$name) = @_;
|
||||
my($e,$data,$name,$tail) = @_;
|
||||
if (ref($data) eq "HASH") {
|
||||
($data->{TYPE} eq "ENUM") && HeaderEnum($data, $name);
|
||||
($data->{TYPE} eq "ENUM") && HeaderEnum($data, $name, $tail);
|
||||
($data->{TYPE} eq "BITMAP") && HeaderBitmap($data, $name);
|
||||
($data->{TYPE} eq "STRUCT") && HeaderStruct($data, $name);
|
||||
($data->{TYPE} eq "UNION") && HeaderUnion($data, $name);
|
||||
($data->{TYPE} eq "STRUCT") && HeaderStruct($data, $name, $tail);
|
||||
($data->{TYPE} eq "UNION") && HeaderUnion($data, $name, $tail);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -215,14 +218,15 @@ sub HeaderType($$$)
|
||||
} else {
|
||||
pidl mapTypeName($e->{TYPE});
|
||||
}
|
||||
pidl $tail if defined($tail);
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
# parse a typedef
|
||||
sub HeaderTypedef($)
|
||||
sub HeaderTypedef($;$)
|
||||
{
|
||||
my($typedef) = shift;
|
||||
HeaderType($typedef, $typedef->{DATA}, $typedef->{NAME}) if defined ($typedef->{DATA});
|
||||
my($typedef,$tail) = @_;
|
||||
HeaderType($typedef, $typedef->{DATA}, $typedef->{NAME}, $tail) if defined ($typedef->{DATA});
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
@@ -359,16 +363,11 @@ sub HeaderInterface($)
|
||||
}
|
||||
|
||||
foreach my $t (@{$interface->{TYPES}}) {
|
||||
HeaderTypedef($t) if ($t->{TYPE} eq "TYPEDEF");
|
||||
HeaderStruct($t, $t->{NAME}) if ($t->{TYPE} eq "STRUCT");
|
||||
HeaderUnion($t, $t->{NAME}) if ($t->{TYPE} eq "UNION");
|
||||
HeaderEnum($t, $t->{NAME}) if ($t->{TYPE} eq "ENUM");
|
||||
HeaderTypedef($t, ";\n\n") if ($t->{TYPE} eq "TYPEDEF");
|
||||
HeaderStruct($t, $t->{NAME}, ";\n\n") if ($t->{TYPE} eq "STRUCT");
|
||||
HeaderUnion($t, $t->{NAME}, ";\n\n") if ($t->{TYPE} eq "UNION");
|
||||
HeaderEnum($t, $t->{NAME}, ";\n\n") if ($t->{TYPE} eq "ENUM");
|
||||
HeaderBitmap($t, $t->{NAME}) if ($t->{TYPE} eq "BITMAP");
|
||||
pidl ";\n\n" if ($t->{TYPE} eq "BITMAP" or
|
||||
$t->{TYPE} eq "STRUCT" or
|
||||
$t->{TYPE} eq "TYPEDEF" or
|
||||
$t->{TYPE} eq "UNION" or
|
||||
$t->{TYPE} eq "ENUM");
|
||||
}
|
||||
|
||||
foreach my $fn (@{$interface->{FUNCTIONS}}) {
|
||||
|
||||
@@ -14,7 +14,7 @@ require Exporter;
|
||||
use strict;
|
||||
use Parse::Pidl::Typelist qw(hasType getType mapTypeName typeHasBody);
|
||||
use Parse::Pidl::Util qw(has_property ParseExpr ParseExprExt print_uuid);
|
||||
use Parse::Pidl::CUtil qw(get_pointer_to get_value_of);
|
||||
use Parse::Pidl::CUtil qw(get_pointer_to get_value_of get_array_element);
|
||||
use Parse::Pidl::NDR qw(GetPrevLevel GetNextLevel ContainsDeferred is_charset_array);
|
||||
use Parse::Pidl::Samba4 qw(is_intree choose_header);
|
||||
use Parse::Pidl::Samba4::Header qw(GenerateFunctionInEnv GenerateFunctionOutEnv EnvSubstituteValue GenerateStructEnv);
|
||||
@@ -42,11 +42,13 @@ sub append_prefix($$)
|
||||
{
|
||||
my ($e, $var_name) = @_;
|
||||
my $pointers = 0;
|
||||
my $arrays = 0;
|
||||
|
||||
foreach my $l (@{$e->{LEVELS}}) {
|
||||
if ($l->{TYPE} eq "POINTER") {
|
||||
$pointers++;
|
||||
} elsif ($l->{TYPE} eq "ARRAY") {
|
||||
$arrays++;
|
||||
if (($pointers == 0) and
|
||||
(not $l->{IS_FIXED}) and
|
||||
(not $l->{IS_INLINE})) {
|
||||
@@ -54,7 +56,7 @@ sub append_prefix($$)
|
||||
}
|
||||
} elsif ($l->{TYPE} eq "DATA") {
|
||||
if (Parse::Pidl::Typelist::scalar_is_reference($l->{DATA_TYPE})) {
|
||||
return get_value_of($var_name) unless ($pointers);
|
||||
return get_value_of($var_name) unless ($pointers or $arrays);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -375,7 +377,7 @@ sub ParseArrayPullHeader($$$$$$)
|
||||
}
|
||||
|
||||
if (not $l->{IS_FIXED} and not is_charset_array($e, $l)) {
|
||||
$self->AllocateArrayLevel($e,$l,$ndr,$env,$size);
|
||||
$self->AllocateArrayLevel($e,$l,$ndr,$var_name,$size);
|
||||
}
|
||||
|
||||
return $length;
|
||||
@@ -384,7 +386,7 @@ sub ParseArrayPullHeader($$$$$$)
|
||||
sub compression_alg($$)
|
||||
{
|
||||
my ($e, $l) = @_;
|
||||
my ($alg, $clen, $dlen) = split(/ /, $l->{COMPRESSION});
|
||||
my ($alg, $clen, $dlen) = split(/,/, $l->{COMPRESSION});
|
||||
|
||||
return $alg;
|
||||
}
|
||||
@@ -392,7 +394,7 @@ sub compression_alg($$)
|
||||
sub compression_clen($$$)
|
||||
{
|
||||
my ($e, $l, $env) = @_;
|
||||
my ($alg, $clen, $dlen) = split(/ /, $l->{COMPRESSION});
|
||||
my ($alg, $clen, $dlen) = split(/,/, $l->{COMPRESSION});
|
||||
|
||||
return ParseExpr($clen, $env, $e->{ORIGINAL});
|
||||
}
|
||||
@@ -400,7 +402,7 @@ sub compression_clen($$$)
|
||||
sub compression_dlen($$$)
|
||||
{
|
||||
my ($e,$l,$env) = @_;
|
||||
my ($alg, $clen, $dlen) = split(/ /, $l->{COMPRESSION});
|
||||
my ($alg, $clen, $dlen) = split(/,/, $l->{COMPRESSION});
|
||||
|
||||
return ParseExpr($dlen, $env, $e->{ORIGINAL});
|
||||
}
|
||||
@@ -582,7 +584,7 @@ sub ParseElementPushLevel
|
||||
my $length = ParseExpr($l->{LENGTH_IS}, $env, $e->{ORIGINAL});
|
||||
my $counter = "cntr_$e->{NAME}_$l->{LEVEL_INDEX}";
|
||||
|
||||
$var_name = $var_name . "[$counter]";
|
||||
$var_name = get_array_element($var_name, $counter);
|
||||
|
||||
if (($primitives and not $l->{IS_DEFERRED}) or ($deferred and $l->{IS_DEFERRED})) {
|
||||
$self->pidl("for ($counter = 0; $counter < $length; $counter++) {");
|
||||
@@ -669,23 +671,48 @@ sub ParsePtrPush($$$$)
|
||||
}
|
||||
}
|
||||
|
||||
sub ParseDataPrint($$$$)
|
||||
sub need_pointer_to($$$)
|
||||
{
|
||||
my ($self, $e, $l, $var_name) = @_;
|
||||
my ($e, $l, $scalar_only) = @_;
|
||||
|
||||
if (not ref($l->{DATA_TYPE}) or
|
||||
defined($l->{DATA_TYPE}->{NAME})) {
|
||||
my $t;
|
||||
if (ref($l->{DATA_TYPE})) {
|
||||
$t = "$l->{DATA_TYPE}->{TYPE}_$l->{DATA_TYPE}->{NAME}";
|
||||
} else {
|
||||
$t = $l->{DATA_TYPE};
|
||||
}
|
||||
if (not Parse::Pidl::Typelist::is_scalar($t) or
|
||||
Parse::Pidl::Typelist::scalar_is_reference($t)) {
|
||||
|
||||
if (not Parse::Pidl::Typelist::is_scalar($t)) {
|
||||
return 1 if $scalar_only;
|
||||
}
|
||||
|
||||
my $arrays = 0;
|
||||
|
||||
foreach my $tl (@{$e->{LEVELS}}) {
|
||||
last if $l == $tl;
|
||||
if ($tl->{TYPE} eq "ARRAY") {
|
||||
$arrays++;
|
||||
}
|
||||
}
|
||||
|
||||
if (Parse::Pidl::Typelist::scalar_is_reference($t)) {
|
||||
return 1 unless $arrays;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub ParseDataPrint($$$$)
|
||||
{
|
||||
my ($self, $e, $l, $var_name) = @_;
|
||||
|
||||
if (not ref($l->{DATA_TYPE}) or defined($l->{DATA_TYPE}->{NAME})) {
|
||||
|
||||
if (need_pointer_to($e, $l, 1)) {
|
||||
$var_name = get_pointer_to($var_name);
|
||||
}
|
||||
$self->pidl("ndr_print_$t(ndr, \"$e->{NAME}\", $var_name);");
|
||||
|
||||
$self->pidl(TypeFunctionName("ndr_print", $l->{DATA_TYPE})."(ndr, \"$e->{NAME}\", $var_name);");
|
||||
} else {
|
||||
$self->ParseTypePrint($l->{DATA_TYPE}, $var_name);
|
||||
}
|
||||
@@ -752,7 +779,7 @@ sub ParseElementPrint($$$$)
|
||||
$self->pidl("if (idx_$l->{LEVEL_INDEX}) {");
|
||||
$self->indent;
|
||||
|
||||
$var_name = $var_name . "[$counter]";
|
||||
$var_name = get_array_element($var_name, $counter);
|
||||
}
|
||||
} elsif ($l->{TYPE} eq "DATA") {
|
||||
$self->ParseDataPrint($e, $l, $var_name);
|
||||
@@ -815,12 +842,11 @@ sub ParseDataPull($$$$$$$)
|
||||
{
|
||||
my ($self,$e,$l,$ndr,$var_name,$primitives,$deferred) = @_;
|
||||
|
||||
if (not ref($l->{DATA_TYPE}) or
|
||||
defined($l->{DATA_TYPE}->{NAME})) {
|
||||
if (not ref($l->{DATA_TYPE}) or defined($l->{DATA_TYPE}->{NAME})) {
|
||||
|
||||
my $ndr_flags = CalcNdrFlags($l, $primitives, $deferred);
|
||||
|
||||
if (Parse::Pidl::Typelist::scalar_is_reference($l->{DATA_TYPE})) {
|
||||
if (need_pointer_to($e, $l, 0)) {
|
||||
$var_name = get_pointer_to($var_name);
|
||||
}
|
||||
|
||||
@@ -830,7 +856,7 @@ sub ParseDataPull($$$$$$$)
|
||||
|
||||
if (my $range = has_property($e, "range")) {
|
||||
$var_name = get_value_of($var_name);
|
||||
my ($low, $high) = split(/ /, $range, 2);
|
||||
my ($low, $high) = split(/,/, $range, 2);
|
||||
$self->pidl("if ($var_name < $low || $var_name > $high) {");
|
||||
$self->pidl("\treturn ndr_pull_error($ndr, NDR_ERR_RANGE, \"value out of range\");");
|
||||
$self->pidl("}");
|
||||
@@ -845,21 +871,15 @@ sub ParseDataPush($$$$$$$)
|
||||
my ($self,$e,$l,$ndr,$var_name,$primitives,$deferred) = @_;
|
||||
|
||||
if (not ref($l->{DATA_TYPE}) or defined($l->{DATA_TYPE}->{NAME})) {
|
||||
my $t;
|
||||
if (ref($l->{DATA_TYPE}) eq "HASH") {
|
||||
$t = "$l->{DATA_TYPE}->{TYPE}_$l->{DATA_TYPE}->{NAME}";
|
||||
} else {
|
||||
$t = $l->{DATA_TYPE};
|
||||
}
|
||||
|
||||
my $ndr_flags = CalcNdrFlags($l, $primitives, $deferred);
|
||||
|
||||
# strings are passed by value rather than reference
|
||||
if (not Parse::Pidl::Typelist::is_scalar($t) or
|
||||
Parse::Pidl::Typelist::scalar_is_reference($t)) {
|
||||
if (need_pointer_to($e, $l, 1)) {
|
||||
$var_name = get_pointer_to($var_name);
|
||||
}
|
||||
|
||||
my $ndr_flags = CalcNdrFlags($l, $primitives, $deferred);
|
||||
$self->pidl("NDR_CHECK(ndr_push_$t($ndr, $ndr_flags, $var_name));");
|
||||
$self->pidl("NDR_CHECK(".TypeFunctionName("ndr_push", $l->{DATA_TYPE})."($ndr, $ndr_flags, $var_name));");
|
||||
} else {
|
||||
$self->ParseTypePush($l->{DATA_TYPE}, $var_name, $primitives, $deferred);
|
||||
}
|
||||
@@ -890,15 +910,17 @@ sub CalcNdrFlags($$$)
|
||||
return undef;
|
||||
}
|
||||
|
||||
sub ParseMemCtxPullStart($$$$)
|
||||
sub ParseMemCtxPullFlags($$$$)
|
||||
{
|
||||
my ($self, $e, $l, $ptr_name) = @_;
|
||||
my ($self, $e, $l) = @_;
|
||||
|
||||
my $mem_r_ctx = "_mem_save_$e->{NAME}_$l->{LEVEL_INDEX}";
|
||||
my $mem_c_ctx = $ptr_name;
|
||||
my $mem_c_flags = "0";
|
||||
return undef unless ($l->{TYPE} eq "POINTER" or $l->{TYPE} eq "ARRAY");
|
||||
|
||||
return if ($l->{TYPE} eq "ARRAY" and $l->{IS_FIXED});
|
||||
return undef if ($l->{TYPE} eq "ARRAY" and $l->{IS_FIXED});
|
||||
return undef if has_fast_array($e, $l);
|
||||
return undef if is_charset_array($e, $l);
|
||||
|
||||
my $mem_flags = "0";
|
||||
|
||||
if (($l->{TYPE} eq "POINTER") and ($l->{POINTER_TYPE} eq "ref")) {
|
||||
my $nl = GetNextLevel($e, $l);
|
||||
@@ -906,12 +928,25 @@ sub ParseMemCtxPullStart($$$$)
|
||||
my $next_is_string = (($nl->{TYPE} eq "DATA") and
|
||||
($nl->{DATA_TYPE} eq "string"));
|
||||
if ($next_is_array or $next_is_string) {
|
||||
return;
|
||||
} else {
|
||||
$mem_c_flags = "LIBNDR_FLAG_REF_ALLOC";
|
||||
return undef;
|
||||
} elsif ($l->{LEVEL} eq "TOP") {
|
||||
$mem_flags = "LIBNDR_FLAG_REF_ALLOC";
|
||||
}
|
||||
}
|
||||
|
||||
return $mem_flags;
|
||||
}
|
||||
|
||||
sub ParseMemCtxPullStart($$$$)
|
||||
{
|
||||
my ($self, $e, $l, $ptr_name) = @_;
|
||||
|
||||
my $mem_r_ctx = "_mem_save_$e->{NAME}_$l->{LEVEL_INDEX}";
|
||||
my $mem_c_ctx = $ptr_name;
|
||||
my $mem_c_flags = $self->ParseMemCtxPullFlags($e, $l);
|
||||
|
||||
return unless defined($mem_c_flags);
|
||||
|
||||
$self->pidl("$mem_r_ctx = NDR_PULL_GET_MEM_CTX(ndr);");
|
||||
$self->pidl("NDR_PULL_SET_MEM_CTX(ndr, $mem_c_ctx, $mem_c_flags);");
|
||||
}
|
||||
@@ -921,21 +956,9 @@ sub ParseMemCtxPullEnd($$$)
|
||||
my ($self, $e, $l) = @_;
|
||||
|
||||
my $mem_r_ctx = "_mem_save_$e->{NAME}_$l->{LEVEL_INDEX}";
|
||||
my $mem_r_flags = "0";
|
||||
my $mem_r_flags = $self->ParseMemCtxPullFlags($e, $l);
|
||||
|
||||
return if ($l->{TYPE} eq "ARRAY" and $l->{IS_FIXED});
|
||||
|
||||
if (($l->{TYPE} eq "POINTER") and ($l->{POINTER_TYPE} eq "ref")) {
|
||||
my $nl = GetNextLevel($e, $l);
|
||||
my $next_is_array = ($nl->{TYPE} eq "ARRAY");
|
||||
my $next_is_string = (($nl->{TYPE} eq "DATA") and
|
||||
($nl->{DATA_TYPE} eq "string"));
|
||||
if ($next_is_array or $next_is_string) {
|
||||
return;
|
||||
} else {
|
||||
$mem_r_flags = "LIBNDR_FLAG_REF_ALLOC";
|
||||
}
|
||||
}
|
||||
return unless defined($mem_r_flags);
|
||||
|
||||
$self->pidl("NDR_PULL_SET_MEM_CTX(ndr, $mem_r_ctx, $mem_r_flags);");
|
||||
}
|
||||
@@ -1025,7 +1048,7 @@ sub ParseElementPullLevel
|
||||
my $counter = "cntr_$e->{NAME}_$l->{LEVEL_INDEX}";
|
||||
my $array_name = $var_name;
|
||||
|
||||
$var_name = $var_name . "[$counter]";
|
||||
$var_name = get_array_element($var_name, $counter);
|
||||
|
||||
$self->ParseMemCtxPullStart($e, $l, $array_name);
|
||||
|
||||
@@ -1106,10 +1129,7 @@ sub ParsePtrPull($$$$$)
|
||||
my $next_is_string = (($nl->{TYPE} eq "DATA") and
|
||||
($nl->{DATA_TYPE} eq "string"));
|
||||
|
||||
if ($l->{POINTER_TYPE} eq "ref") {
|
||||
if ($l->{LEVEL} eq "EMBEDDED") {
|
||||
$self->pidl("NDR_CHECK(ndr_pull_ref_ptr($ndr, &_ptr_$e->{NAME}));");
|
||||
}
|
||||
if ($l->{POINTER_TYPE} eq "ref" and $l->{LEVEL} eq "TOP") {
|
||||
|
||||
if (!$next_is_array and !$next_is_string) {
|
||||
$self->pidl("if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {");
|
||||
@@ -1118,16 +1138,19 @@ sub ParsePtrPull($$$$$)
|
||||
}
|
||||
|
||||
return;
|
||||
} elsif ($l->{POINTER_TYPE} eq "ref" and $l->{LEVEL} eq "EMBEDDED") {
|
||||
$self->pidl("NDR_CHECK(ndr_pull_ref_ptr($ndr, &_ptr_$e->{NAME}));");
|
||||
} elsif (($l->{POINTER_TYPE} eq "unique") or
|
||||
($l->{POINTER_TYPE} eq "relative") or
|
||||
($l->{POINTER_TYPE} eq "full")) {
|
||||
$self->pidl("NDR_CHECK(ndr_pull_generic_ptr($ndr, &_ptr_$e->{NAME}));");
|
||||
$self->pidl("if (_ptr_$e->{NAME}) {");
|
||||
$self->indent;
|
||||
} else {
|
||||
die("Unhandled pointer type $l->{POINTER_TYPE}");
|
||||
}
|
||||
|
||||
$self->pidl("if (_ptr_$e->{NAME}) {");
|
||||
$self->indent;
|
||||
|
||||
# Don't do this for arrays, they're allocated at the actual level
|
||||
# of the array
|
||||
unless ($next_is_array or $next_is_string) {
|
||||
@@ -1441,31 +1464,12 @@ sub DeclareArrayVariables($$)
|
||||
}
|
||||
}
|
||||
|
||||
sub need_decl_mem_ctx($$)
|
||||
{
|
||||
my ($e,$l) = @_;
|
||||
|
||||
return 0 if has_fast_array($e,$l);
|
||||
return 0 if is_charset_array($e,$l);
|
||||
return 1 if (($l->{TYPE} eq "ARRAY") and not $l->{IS_FIXED});
|
||||
|
||||
if (($l->{TYPE} eq "POINTER") and ($l->{POINTER_TYPE} eq "ref")) {
|
||||
my $nl = GetNextLevel($e, $l);
|
||||
my $next_is_array = ($nl->{TYPE} eq "ARRAY");
|
||||
my $next_is_string = (($nl->{TYPE} eq "DATA") and
|
||||
($nl->{DATA_TYPE} eq "string"));
|
||||
return 0 if ($next_is_array or $next_is_string);
|
||||
}
|
||||
return 1 if ($l->{TYPE} eq "POINTER");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub DeclareMemCtxVariables($$)
|
||||
{
|
||||
my ($self,$e) = @_;
|
||||
foreach my $l (@{$e->{LEVELS}}) {
|
||||
if (need_decl_mem_ctx($e, $l)) {
|
||||
my $mem_flags = $self->ParseMemCtxPullFlags($e, $l);
|
||||
if (defined($mem_flags)) {
|
||||
$self->pidl("TALLOC_CTX *_mem_save_$e->{NAME}_$l->{LEVEL_INDEX};");
|
||||
}
|
||||
}
|
||||
@@ -1607,7 +1611,7 @@ sub ParseUnionPushPrimitives($$$)
|
||||
if ($el->{CASE} eq "default") {
|
||||
$have_default = 1;
|
||||
}
|
||||
$self->pidl("$el->{CASE}:");
|
||||
$self->pidl("$el->{CASE}: {");
|
||||
|
||||
if ($el->{TYPE} ne "EMPTY") {
|
||||
$self->indent;
|
||||
@@ -1621,7 +1625,7 @@ sub ParseUnionPushPrimitives($$$)
|
||||
$self->ParseElementPush($el, "ndr", {$el->{NAME} => "$varname->$el->{NAME}"}, 1, 0);
|
||||
$self->deindent;
|
||||
}
|
||||
$self->pidl("break;");
|
||||
$self->pidl("break; }");
|
||||
$self->pidl("");
|
||||
}
|
||||
if (! $have_default) {
|
||||
@@ -2058,9 +2062,7 @@ sub ParseFunctionPush($$)
|
||||
|
||||
sub AllocateArrayLevel($$$$$$)
|
||||
{
|
||||
my ($self,$e,$l,$ndr,$env,$size) = @_;
|
||||
|
||||
my $var = ParseExpr($e->{NAME}, $env, $e->{ORIGINAL});
|
||||
my ($self,$e,$l,$ndr,$var,$size) = @_;
|
||||
|
||||
my $pl = GetPrevLevel($e, $l);
|
||||
if (defined($pl) and
|
||||
@@ -2236,7 +2238,7 @@ sub FunctionTable($$)
|
||||
$interface->{PROPERTIES}->{authservice} = "\"host\"";
|
||||
}
|
||||
|
||||
my @a = split / /, $interface->{PROPERTIES}->{authservice};
|
||||
my @a = split /,/, $interface->{PROPERTIES}->{authservice};
|
||||
my $authservice_count = $#a + 1;
|
||||
|
||||
$self->pidl("static const char * const $interface->{NAME}\_authservice_strings[] = {");
|
||||
@@ -2311,7 +2313,7 @@ sub HeaderInterface($$$)
|
||||
}
|
||||
|
||||
if (defined $interface->{PROPERTIES}->{helper}) {
|
||||
$self->HeaderInclude(split / /, $interface->{PROPERTIES}->{helper});
|
||||
$self->HeaderInclude(split /,/, $interface->{PROPERTIES}->{helper});
|
||||
}
|
||||
|
||||
if (defined $interface->{PROPERTIES}->{uuid}) {
|
||||
|
||||
@@ -134,7 +134,7 @@ $c
|
||||
$cc = "cc";
|
||||
}
|
||||
|
||||
my $flags = `pkg-config --libs --cflags ndr samba-config`;
|
||||
my $flags = `pkg-config --libs --cflags ndr`;
|
||||
|
||||
my $cmd = "$cc $cflags -x c - -o $outfile $flags $ldflags";
|
||||
$cmd =~ s/\n//g;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More tests => 40;
|
||||
use Test::More tests => 46;
|
||||
use FindBin qw($RealBin);
|
||||
use lib "$RealBin";
|
||||
use Util;
|
||||
@@ -22,7 +22,7 @@ my $e = {
|
||||
'PARENT' => { TYPE => 'STRUCT' },
|
||||
'LINE' => 42 };
|
||||
|
||||
is_deeply(GetElementLevelTable($e), [
|
||||
is_deeply(GetElementLevelTable($e, "unique"), [
|
||||
{
|
||||
'IS_DEFERRED' => 0,
|
||||
'LEVEL_INDEX' => 0,
|
||||
@@ -33,7 +33,7 @@ is_deeply(GetElementLevelTable($e), [
|
||||
}
|
||||
]);
|
||||
|
||||
my $ne = ParseElement($e, undef);
|
||||
my $ne = ParseElement($e, "unique");
|
||||
is($ne->{ORIGINAL}, $e);
|
||||
is($ne->{NAME}, "v");
|
||||
is($ne->{ALIGN}, 1);
|
||||
@@ -60,7 +60,7 @@ $e = {
|
||||
'TYPE' => 'uint8',
|
||||
'LINE' => 42 };
|
||||
|
||||
is_deeply(GetElementLevelTable($e), [
|
||||
is_deeply(GetElementLevelTable($e, "unique"), [
|
||||
{
|
||||
LEVEL_INDEX => 0,
|
||||
IS_DEFERRED => 0,
|
||||
@@ -90,7 +90,7 @@ $e = {
|
||||
'PARENT' => { TYPE => 'STRUCT' },
|
||||
'LINE' => 42 };
|
||||
|
||||
is_deeply(GetElementLevelTable($e), [
|
||||
is_deeply(GetElementLevelTable($e, "unique"), [
|
||||
{
|
||||
LEVEL_INDEX => 0,
|
||||
IS_DEFERRED => 0,
|
||||
@@ -128,7 +128,7 @@ $e = {
|
||||
'PARENT' => { TYPE => 'STRUCT' },
|
||||
'LINE' => 42 };
|
||||
|
||||
is_deeply(GetElementLevelTable($e), [
|
||||
is_deeply(GetElementLevelTable($e, "unique"), [
|
||||
{
|
||||
LEVEL_INDEX => 0,
|
||||
IS_DEFERRED => 0,
|
||||
@@ -147,6 +147,97 @@ is_deeply(GetElementLevelTable($e), [
|
||||
}
|
||||
]);
|
||||
|
||||
# Case 3 : ref pointers
|
||||
#
|
||||
$e = {
|
||||
'FILE' => 'foo.idl',
|
||||
'NAME' => 'v',
|
||||
'PROPERTIES' => {"ref" => 1},
|
||||
'POINTERS' => 3,
|
||||
'TYPE' => 'uint8',
|
||||
'PARENT' => { TYPE => 'STRUCT' },
|
||||
'LINE' => 42 };
|
||||
|
||||
is_deeply(GetElementLevelTable($e, "unique"), [
|
||||
{
|
||||
LEVEL_INDEX => 0,
|
||||
IS_DEFERRED => 0,
|
||||
TYPE => 'POINTER',
|
||||
POINTER_TYPE => "ref",
|
||||
POINTER_INDEX => 0,
|
||||
LEVEL => 'EMBEDDED'
|
||||
},
|
||||
{
|
||||
LEVEL_INDEX => 1,
|
||||
IS_DEFERRED => 1,
|
||||
TYPE => 'POINTER',
|
||||
POINTER_TYPE => "unique",
|
||||
POINTER_INDEX => 1,
|
||||
LEVEL => 'EMBEDDED'
|
||||
},
|
||||
{
|
||||
LEVEL_INDEX => 2,
|
||||
IS_DEFERRED => 1,
|
||||
TYPE => 'POINTER',
|
||||
POINTER_TYPE => "unique",
|
||||
POINTER_INDEX => 2,
|
||||
LEVEL => 'EMBEDDED'
|
||||
},
|
||||
{
|
||||
'IS_DEFERRED' => 1,
|
||||
'LEVEL_INDEX' => 3,
|
||||
'DATA_TYPE' => 'uint8',
|
||||
'CONTAINS_DEFERRED' => 0,
|
||||
'TYPE' => 'DATA',
|
||||
'IS_SURROUNDING' => 0,
|
||||
}
|
||||
]);
|
||||
|
||||
# Case 3 : ref pointers
|
||||
#
|
||||
$e = {
|
||||
'FILE' => 'foo.idl',
|
||||
'NAME' => 'v',
|
||||
'PROPERTIES' => {"ref" => 1},
|
||||
'POINTERS' => 3,
|
||||
'TYPE' => 'uint8',
|
||||
'PARENT' => { TYPE => 'STRUCT' },
|
||||
'LINE' => 42 };
|
||||
|
||||
is_deeply(GetElementLevelTable($e, "ref"), [
|
||||
{
|
||||
LEVEL_INDEX => 0,
|
||||
IS_DEFERRED => 0,
|
||||
TYPE => 'POINTER',
|
||||
POINTER_TYPE => "ref",
|
||||
POINTER_INDEX => 0,
|
||||
LEVEL => 'EMBEDDED'
|
||||
},
|
||||
{
|
||||
LEVEL_INDEX => 1,
|
||||
IS_DEFERRED => 1,
|
||||
TYPE => 'POINTER',
|
||||
POINTER_TYPE => "ref",
|
||||
POINTER_INDEX => 1,
|
||||
LEVEL => 'EMBEDDED'
|
||||
},
|
||||
{
|
||||
LEVEL_INDEX => 2,
|
||||
IS_DEFERRED => 1,
|
||||
TYPE => 'POINTER',
|
||||
POINTER_TYPE => "ref",
|
||||
POINTER_INDEX => 2,
|
||||
LEVEL => 'EMBEDDED'
|
||||
},
|
||||
{
|
||||
'IS_DEFERRED' => 1,
|
||||
'LEVEL_INDEX' => 3,
|
||||
'DATA_TYPE' => 'uint8',
|
||||
'CONTAINS_DEFERRED' => 0,
|
||||
'TYPE' => 'DATA',
|
||||
'IS_SURROUNDING' => 0,
|
||||
}
|
||||
]);
|
||||
|
||||
# Case 4 : top-level ref pointers
|
||||
#
|
||||
@@ -159,7 +250,7 @@ $e = {
|
||||
'PARENT' => { TYPE => 'FUNCTION' },
|
||||
'LINE' => 42 };
|
||||
|
||||
is_deeply(GetElementLevelTable($e), [
|
||||
is_deeply(GetElementLevelTable($e, "unique"), [
|
||||
{
|
||||
LEVEL_INDEX => 0,
|
||||
IS_DEFERRED => 0,
|
||||
@@ -178,6 +269,190 @@ is_deeply(GetElementLevelTable($e), [
|
||||
}
|
||||
]);
|
||||
|
||||
# Case 4 : top-level ref pointers, triple with pointer_default("unique")
|
||||
#
|
||||
$e = {
|
||||
'FILE' => 'foo.idl',
|
||||
'NAME' => 'v',
|
||||
'PROPERTIES' => {"ref" => 1},
|
||||
'POINTERS' => 3,
|
||||
'TYPE' => 'uint8',
|
||||
'PARENT' => { TYPE => 'FUNCTION' },
|
||||
'LINE' => 42 };
|
||||
|
||||
is_deeply(GetElementLevelTable($e, "unique"), [
|
||||
{
|
||||
LEVEL_INDEX => 0,
|
||||
IS_DEFERRED => 0,
|
||||
TYPE => 'POINTER',
|
||||
POINTER_TYPE => "ref",
|
||||
POINTER_INDEX => 0,
|
||||
LEVEL => 'TOP'
|
||||
},
|
||||
{
|
||||
LEVEL_INDEX => 1,
|
||||
IS_DEFERRED => 0,
|
||||
TYPE => 'POINTER',
|
||||
POINTER_TYPE => "unique",
|
||||
POINTER_INDEX => 1,
|
||||
LEVEL => 'EMBEDDED'
|
||||
},
|
||||
{
|
||||
LEVEL_INDEX => 2,
|
||||
IS_DEFERRED => 1,
|
||||
TYPE => 'POINTER',
|
||||
POINTER_TYPE => "unique",
|
||||
POINTER_INDEX => 2,
|
||||
LEVEL => 'EMBEDDED'
|
||||
},
|
||||
{
|
||||
'IS_DEFERRED' => 1,
|
||||
'LEVEL_INDEX' => 3,
|
||||
'DATA_TYPE' => 'uint8',
|
||||
'CONTAINS_DEFERRED' => 0,
|
||||
'TYPE' => 'DATA',
|
||||
'IS_SURROUNDING' => 0,
|
||||
}
|
||||
]);
|
||||
|
||||
# Case 4 : top-level unique pointers, triple with pointer_default("unique")
|
||||
#
|
||||
$e = {
|
||||
'FILE' => 'foo.idl',
|
||||
'NAME' => 'v',
|
||||
'PROPERTIES' => {"unique" => 1, "in" => 1},
|
||||
'POINTERS' => 3,
|
||||
'TYPE' => 'uint8',
|
||||
'PARENT' => { TYPE => 'FUNCTION' },
|
||||
'LINE' => 42 };
|
||||
|
||||
is_deeply(GetElementLevelTable($e, "unique"), [
|
||||
{
|
||||
LEVEL_INDEX => 0,
|
||||
IS_DEFERRED => 0,
|
||||
TYPE => 'POINTER',
|
||||
POINTER_TYPE => "unique",
|
||||
POINTER_INDEX => 0,
|
||||
LEVEL => 'TOP'
|
||||
},
|
||||
{
|
||||
LEVEL_INDEX => 1,
|
||||
IS_DEFERRED => 1,
|
||||
TYPE => 'POINTER',
|
||||
POINTER_TYPE => "unique",
|
||||
POINTER_INDEX => 1,
|
||||
LEVEL => 'EMBEDDED'
|
||||
},
|
||||
{
|
||||
LEVEL_INDEX => 2,
|
||||
IS_DEFERRED => 1,
|
||||
TYPE => 'POINTER',
|
||||
POINTER_TYPE => "unique",
|
||||
POINTER_INDEX => 2,
|
||||
LEVEL => 'EMBEDDED'
|
||||
},
|
||||
{
|
||||
'IS_DEFERRED' => 1,
|
||||
'LEVEL_INDEX' => 3,
|
||||
'DATA_TYPE' => 'uint8',
|
||||
'CONTAINS_DEFERRED' => 0,
|
||||
'TYPE' => 'DATA',
|
||||
'IS_SURROUNDING' => 0,
|
||||
}
|
||||
]);
|
||||
|
||||
# Case 4 : top-level unique pointers, triple with pointer_default("ref")
|
||||
#
|
||||
$e = {
|
||||
'FILE' => 'foo.idl',
|
||||
'NAME' => 'v',
|
||||
'PROPERTIES' => {"unique" => 1, "in" => 1},
|
||||
'POINTERS' => 3,
|
||||
'TYPE' => 'uint8',
|
||||
'PARENT' => { TYPE => 'FUNCTION' },
|
||||
'LINE' => 42 };
|
||||
|
||||
is_deeply(GetElementLevelTable($e, "ref"), [
|
||||
{
|
||||
LEVEL_INDEX => 0,
|
||||
IS_DEFERRED => 0,
|
||||
TYPE => 'POINTER',
|
||||
POINTER_TYPE => "unique",
|
||||
POINTER_INDEX => 0,
|
||||
LEVEL => 'TOP'
|
||||
},
|
||||
{
|
||||
LEVEL_INDEX => 1,
|
||||
IS_DEFERRED => 1,
|
||||
TYPE => 'POINTER',
|
||||
POINTER_TYPE => "ref",
|
||||
POINTER_INDEX => 1,
|
||||
LEVEL => 'EMBEDDED'
|
||||
},
|
||||
{
|
||||
LEVEL_INDEX => 2,
|
||||
IS_DEFERRED => 1,
|
||||
TYPE => 'POINTER',
|
||||
POINTER_TYPE => "ref",
|
||||
POINTER_INDEX => 2,
|
||||
LEVEL => 'EMBEDDED'
|
||||
},
|
||||
{
|
||||
'IS_DEFERRED' => 1,
|
||||
'LEVEL_INDEX' => 3,
|
||||
'DATA_TYPE' => 'uint8',
|
||||
'CONTAINS_DEFERRED' => 0,
|
||||
'TYPE' => 'DATA',
|
||||
'IS_SURROUNDING' => 0,
|
||||
}
|
||||
]);
|
||||
|
||||
# Case 4 : top-level ref pointers, triple with pointer_default("ref")
|
||||
#
|
||||
$e = {
|
||||
'FILE' => 'foo.idl',
|
||||
'NAME' => 'v',
|
||||
'PROPERTIES' => {"ref" => 1},
|
||||
'POINTERS' => 3,
|
||||
'TYPE' => 'uint8',
|
||||
'PARENT' => { TYPE => 'FUNCTION' },
|
||||
'LINE' => 42 };
|
||||
|
||||
is_deeply(GetElementLevelTable($e, "ref"), [
|
||||
{
|
||||
LEVEL_INDEX => 0,
|
||||
IS_DEFERRED => 0,
|
||||
TYPE => 'POINTER',
|
||||
POINTER_TYPE => "ref",
|
||||
POINTER_INDEX => 0,
|
||||
LEVEL => 'TOP'
|
||||
},
|
||||
{
|
||||
LEVEL_INDEX => 1,
|
||||
IS_DEFERRED => 0,
|
||||
TYPE => 'POINTER',
|
||||
POINTER_TYPE => "ref",
|
||||
POINTER_INDEX => 1,
|
||||
LEVEL => 'EMBEDDED'
|
||||
},
|
||||
{
|
||||
LEVEL_INDEX => 2,
|
||||
IS_DEFERRED => 1,
|
||||
TYPE => 'POINTER',
|
||||
POINTER_TYPE => "ref",
|
||||
POINTER_INDEX => 2,
|
||||
LEVEL => 'EMBEDDED'
|
||||
},
|
||||
{
|
||||
'IS_DEFERRED' => 1,
|
||||
'LEVEL_INDEX' => 3,
|
||||
'DATA_TYPE' => 'uint8',
|
||||
'CONTAINS_DEFERRED' => 0,
|
||||
'TYPE' => 'DATA',
|
||||
'IS_SURROUNDING' => 0,
|
||||
}
|
||||
]);
|
||||
|
||||
# representation_type
|
||||
$e = {
|
||||
'FILE' => 'foo.idl',
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Published under the GNU General Public License
|
||||
use strict;
|
||||
|
||||
use Test::More tests => 3;
|
||||
use Test::More tests => 2;
|
||||
use FindBin qw($RealBin);
|
||||
use lib "$RealBin";
|
||||
use Util;
|
||||
@@ -19,9 +19,3 @@ sub parse_idl($)
|
||||
|
||||
test_warnings("", sub {parse_idl("void x();"); });
|
||||
test_warnings("nofile:0: top-level [out] pointer `x' is not a [ref] pointer\n", sub {parse_idl("void x([out,unique] int *x);"); });
|
||||
|
||||
test_warnings("nofile:0: pointer_default_top() is a pidl extension and should not be used\n", sub {
|
||||
my $pidl = Parse::Pidl::IDL::parse_string("[pointer_default_top(unique)] interface echo { void x(); }; ", "nofile");
|
||||
Parse::Pidl::NDR::Parse($pidl);
|
||||
});
|
||||
|
||||
|
||||
@@ -798,10 +798,10 @@ static WERROR dcesrv_netr_NETRLOGONSETSERVICEBITS(struct dcesrv_call_state *dce_
|
||||
|
||||
|
||||
/*
|
||||
netr_NETRLOGONGETTRUSTRID
|
||||
netr_LogonGetTrustRid
|
||||
*/
|
||||
static WERROR dcesrv_netr_NETRLOGONGETTRUSTRID(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
|
||||
struct netr_NETRLOGONGETTRUSTRID *r)
|
||||
static WERROR dcesrv_netr_LogonGetTrustRid(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
|
||||
struct netr_LogonGetTrustRid *r)
|
||||
{
|
||||
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
|
||||
}
|
||||
@@ -1213,10 +1213,10 @@ static WERROR dcesrv_netr_DsrEnumerateDomainTrusts(struct dcesrv_call_state *dce
|
||||
|
||||
|
||||
/*
|
||||
netr_DSRDEREGISTERDNSHOSTRECORDS
|
||||
netr_DsrDeregisterDNSHostRecords
|
||||
*/
|
||||
static WERROR dcesrv_netr_DSRDEREGISTERDNSHOSTRECORDS(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
|
||||
struct netr_DSRDEREGISTERDNSHOSTRECORDS *r)
|
||||
static WERROR dcesrv_netr_DsrDeregisterDNSHostRecords(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
|
||||
struct netr_DsrDeregisterDNSHostRecords *r)
|
||||
{
|
||||
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
|
||||
}
|
||||
|
||||
@@ -457,18 +457,6 @@ failed:
|
||||
task_server_terminate(task, "Failed to startup dcerpc server task");
|
||||
}
|
||||
|
||||
/*
|
||||
called on startup of the smb server service It's job is to start
|
||||
listening on all configured sockets
|
||||
*/
|
||||
static NTSTATUS dcesrv_init(struct event_context *event_context,
|
||||
struct loadparm_context *lp_ctx,
|
||||
const struct model_ops *model_ops)
|
||||
{
|
||||
return task_server_startup(event_context, lp_ctx,
|
||||
model_ops, dcesrv_task_init);
|
||||
}
|
||||
|
||||
NTSTATUS server_service_rpc_init(void)
|
||||
{
|
||||
init_module_fn static_init[] = { STATIC_dcerpc_server_MODULES };
|
||||
@@ -479,5 +467,5 @@ NTSTATUS server_service_rpc_init(void)
|
||||
|
||||
talloc_free(shared_init);
|
||||
|
||||
return register_server_service("rpc", dcesrv_init);
|
||||
return register_server_service("rpc", dcesrv_task_init);
|
||||
}
|
||||
|
||||
196
source/rules.mk
Normal file
196
source/rules.mk
Normal file
@@ -0,0 +1,196 @@
|
||||
# Dependencies command
|
||||
DEPENDS = $(CC) -M -MG -MP -MT $(<:.c=.o) -MT $@ \
|
||||
$(CFLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
|
||||
$(CPPFLAGS) $(FIRST_PREREQ) -o $@
|
||||
# Dependencies for host objects
|
||||
HDEPENDS = $(CC) -M -MG -MP -MT $(<:.c=.ho) -MT $@ \
|
||||
$(HOSTCC_FLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
|
||||
$(CPPFLAGS) $(FIRST_PREREQ) -o $@
|
||||
# Dependencies for precompiled headers
|
||||
PCHDEPENDS = $(CC) -M -MG -MT include/includes.h.gch -MT $@ \
|
||||
$(CFLAGS) $(CPPFLAGS) $(FIRST_PREREQ) -o $@
|
||||
|
||||
# $< is broken in older BSD versions:
|
||||
# when $@ is foo/bar.o, $< could be torture/foo/bar.c
|
||||
# if it also exists. So better use $* which is foo/bar
|
||||
# and append .c manually to get foo/bar.c
|
||||
#
|
||||
# If we have GNU Make, it is safe to use $<, which also lets
|
||||
# building with $srcdir != $builddir work.
|
||||
|
||||
# Run a static analysis checker
|
||||
CHECK = $(CC_CHECKER) $(CFLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
|
||||
$(PICFLAG) $(CPPLAGS) -c $(FIRST_PREREQ) -o $@
|
||||
|
||||
# Run the configured compiler
|
||||
COMPILE = $(CC) $(CFLAGS) $(PICFLAG) \
|
||||
`$(PERL) $(srcdir)/script/cflags.pl $@` \
|
||||
$(CPPFLAGS) \
|
||||
-c $(FIRST_PREREQ) -o $@
|
||||
|
||||
# Run the compiler for the build host
|
||||
HCOMPILE = $(HOSTCC) $(HOSTCC_FLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
|
||||
$(CPPFLAGS) -c $(FIRST_PREREQ) -o $@
|
||||
|
||||
# Precompile headers
|
||||
PCHCOMPILE = @$(CC) -Ilib/replace \
|
||||
$(CFLAGS) `$(PERL) $(srcdir)/script/cflags.pl $@` \
|
||||
$(PICFLAG) $(CPPFLAGS) -c $(FIRST_PREREQ) -o $@
|
||||
|
||||
include/config.h:
|
||||
@echo "include/config.h not present"
|
||||
@echo "You need to rerun ./autogen.sh and ./configure"
|
||||
@/bin/false
|
||||
|
||||
$(srcdir)/version.h: $(srcdir)/VERSION
|
||||
@$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
|
||||
|
||||
regen_version::
|
||||
@$(SHELL) script/mkversion.sh VERSION $(srcdir)/version.h $(srcdir)/
|
||||
|
||||
clean_pch::
|
||||
@echo "Removing precompiled headers"
|
||||
@-rm -f include/includes.h.gch
|
||||
|
||||
pch:: clean_pch include/includes.h.gch
|
||||
|
||||
clean:: clean_pch
|
||||
@echo Removing objects
|
||||
@-find . -name '*.o' -exec rm -f '{}' \;
|
||||
@echo Removing hostcc objects
|
||||
@-find . -name '*.ho' -exec rm -f '{}' \;
|
||||
@echo Removing binaries
|
||||
@-rm -f $(BIN_PROGS) $(SBIN_PROGS) $(BINARIES) $(TORTURE_PROGS)
|
||||
@echo Removing libraries
|
||||
@-rm -f $(STATIC_LIBRARIES) $(SHARED_LIBRARIES)
|
||||
@-rm -f bin/static/*.a bin/shared/*.$(SHLIBEXT)
|
||||
@echo Removing modules
|
||||
@-rm -f bin/modules/*/*.$(SHLIBEXT)
|
||||
@-rm -f bin/*_init_module.c
|
||||
@echo Removing dummy targets
|
||||
@-rm -f bin/.*_*
|
||||
@echo Removing generated files
|
||||
@-rm -f bin/*_init_module.c
|
||||
@-rm -rf librpc/gen_*
|
||||
@echo Removing proto headers
|
||||
@-rm -f $(PROTO_HEADERS)
|
||||
|
||||
distclean:: clean
|
||||
-rm -f include/config.h include/config_tmp.h include/build.h
|
||||
-rm -f Makefile
|
||||
-rm -f config.status
|
||||
-rm -f config.log config.cache
|
||||
-rm -f config.pm config.mk
|
||||
-rm -f $(PC_FILES)
|
||||
|
||||
removebackup::
|
||||
-rm -f *.bak *~ */*.bak */*~ */*/*.bak */*/*~ */*/*/*.bak */*/*/*~
|
||||
|
||||
realdistclean:: distclean removebackup
|
||||
-rm -f include/config_tmp.h.in
|
||||
-rm -f version.h
|
||||
-rm -f configure
|
||||
-rm -f $(MANPAGES)
|
||||
|
||||
check:: test
|
||||
|
||||
unused_macros:
|
||||
$(srcdir)/script/find_unused_macros.pl `find . -name "*.[ch]"` | sort
|
||||
|
||||
###############################################################################
|
||||
# File types
|
||||
###############################################################################
|
||||
|
||||
.SUFFIXES: .x .c .et .y .l .d .o .h .h.gch .a .$(SHLIBEXT) .1 .1.xml .3 .3.xml .5 .5.xml .7 .7.xml .8 .8.xml .ho .idl .hd
|
||||
|
||||
.c.d:
|
||||
@echo "Generating dependencies for $<"
|
||||
@$(DEPENDS)
|
||||
|
||||
.c.hd:
|
||||
@echo "Generating host-compiler dependencies for $<"
|
||||
@$(HDEPENDS)
|
||||
|
||||
include/includes.d: include/includes.h
|
||||
@echo "Generating dependencies for $<"
|
||||
@$(PCHDEPENDS)
|
||||
|
||||
.c.o:
|
||||
@if test -n "$(CC_CHECKER)"; then \
|
||||
echo "Checking $< with '$(CC_CHECKER)'"; \
|
||||
$(CHECK) ; \
|
||||
fi
|
||||
@echo "Compiling $<"
|
||||
@-mkdir -p `dirname $@`
|
||||
@$(COMPILE) && exit 0 ; \
|
||||
echo "The following command failed:" 1>&2;\
|
||||
echo "$(COMPILE)" 1>&2;\
|
||||
$(COMPILE) >/dev/null 2>&1
|
||||
|
||||
.c.ho:
|
||||
@echo "Compiling $< with host compiler"
|
||||
@-mkdir -p `dirname $@`
|
||||
@$(HCOMPILE) && exit 0;\
|
||||
echo "The following command failed:" 1>&2;\
|
||||
echo "$(HCOMPILE)" 1>&2;\
|
||||
$(HCOMPILE) >/dev/null 2>&1
|
||||
|
||||
.h.h.gch:
|
||||
@echo "Precompiling $<"
|
||||
@$(PCHCOMPILE)
|
||||
|
||||
.y.c:
|
||||
@echo "Building $< with $(YACC)"
|
||||
@-$(srcdir)/script/yacc_compile.sh "$(YACC)" "$<" "$@"
|
||||
|
||||
.l.c:
|
||||
@echo "Building $< with $(LEX)"
|
||||
@-$(srcdir)/script/lex_compile.sh "$(LEX)" "$<" "$@"
|
||||
|
||||
DOCBOOK_MANPAGE_URL = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
|
||||
|
||||
.1.xml.1:
|
||||
$(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
|
||||
|
||||
.3.xml.3:
|
||||
$(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
|
||||
|
||||
.5.xml.5:
|
||||
$(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
|
||||
|
||||
.7.xml.7:
|
||||
$(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
|
||||
|
||||
.8.xml.8:
|
||||
$(XSLTPROC) -o $@ $(DOCBOOK_MANPAGE_URL) $<
|
||||
|
||||
DEP_FILES = $(patsubst %.ho,%.hd,$(patsubst %.o,%.d,$(ALL_OBJS))) \
|
||||
include/includes.d
|
||||
|
||||
dist:: idl_full manpages configure distclean
|
||||
|
||||
configure:
|
||||
./autogen.sh
|
||||
|
||||
showflags::
|
||||
@echo 'Samba will be compiled with flags:'
|
||||
@echo ' CPP = $(CPP)'
|
||||
@echo ' CPPFLAGS = $(CPPFLAGS)'
|
||||
@echo ' CC = $(CC)'
|
||||
@echo ' CFLAGS = $(CFLAGS)'
|
||||
@echo ' PICFLAG = $(PICFLAG)'
|
||||
@echo ' BNLD = $(BNLD)'
|
||||
@echo ' BNLD_FLAGS = $(BNLD_FLAGS)'
|
||||
@echo ' STLD = $(STLD)'
|
||||
@echo ' STLD_FLAGS = $(STLD_FLAGS)'
|
||||
@echo ' SHLD = $(SHLD)'
|
||||
@echo ' SHLD_FLAGS = $(SHLD_FLAGS)'
|
||||
@echo ' MDLD = $(MDLD)'
|
||||
@echo ' MDLD_FLAGS = $(MDLD_FLAGS)'
|
||||
@echo ' SHLIBEXT = $(SHLIBEXT)'
|
||||
|
||||
etags:
|
||||
etags `find $(srcdir) -name "*.[ch]"`
|
||||
|
||||
ctags:
|
||||
ctags `find $(srcdir) -name "*.[ch]"`
|
||||
@@ -34,3 +34,5 @@ RPC-NETLOGON.*.GetTrustPasswords
|
||||
BASE-CHARSET.*.Testing partial surrogate
|
||||
.*NET-API-DELSHARE.* # DelShare isn't implemented yet
|
||||
RAP.*netservergetinfo
|
||||
kinit with pkinit # fails with: salt type 3 not supported
|
||||
|
||||
|
||||
@@ -50,3 +50,4 @@ RPC-FRSAPI # Not provided by Samba 4
|
||||
WINBIND # FIXME: This should not be skipped
|
||||
NSS-TEST # Fails
|
||||
samba4.samba3sam.python # Conversion from EJS not yet finished
|
||||
RAW-OFFLINE # Samba 4 doesn't have much offline support yet
|
||||
|
||||
@@ -12,7 +12,8 @@ import optparse
|
||||
import samba.getopt as options
|
||||
|
||||
parser = optparse.OptionParser("%s <BINDING> [path]" % sys.argv[0])
|
||||
parser.add_option_group(options.SambaOptions(parser))
|
||||
sambaopts = options.SambaOptions(parser)
|
||||
parser.add_option_group(sambaopts)
|
||||
parser.add_option("--createkey", type="string", metavar="KEYNAME",
|
||||
help="create a key")
|
||||
|
||||
@@ -25,7 +26,7 @@ if len(args) < 1:
|
||||
binding = args[0]
|
||||
|
||||
print "Connecting to " + binding
|
||||
conn = winreg.winreg(binding, opts.configfile)
|
||||
conn = winreg.winreg(binding, sambaopts.get_loadparm())
|
||||
|
||||
def list_values(key):
|
||||
(num_values, max_valnamelen, max_valbufsize) = conn.QueryInfoKey(key, winreg.String())[4:8]
|
||||
|
||||
@@ -80,7 +80,7 @@ static int ejs_irpc_connect(MprVarHandle eid, int argc, char **argv)
|
||||
for (i=0;i<10000;i++) {
|
||||
p->msg_ctx = messaging_init(p,
|
||||
lp_messaging_path(p, global_loadparm),
|
||||
cluster_id(EJS_ID_BASE + i),
|
||||
cluster_id(EJS_ID_BASE, i),
|
||||
lp_iconv_convenience(global_loadparm),
|
||||
ev);
|
||||
if (p->msg_ctx) break;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user